[Xfce4-commits] <xfce4-sensors-plugin:master> fix bug 8839 when hddtemp daemon is no longer running; solved by detecting invalid disk argument
Fabian
noreply at xfce.org
Sun May 13 16:40:03 CEST 2012
Updating branch refs/heads/master
to 8c7157106a094c0d5bd99ef65f657e485203e770 (commit)
from 2ef392d82773ffea2e0af167db08c6fe0c7f973c (commit)
commit 8c7157106a094c0d5bd99ef65f657e485203e770
Author: Fabian <timystery at arcor.de>
Date: Sun May 13 15:46:40 2012 +0200
fix bug 8839 when hddtemp daemon is no longer running; solved by detecting invalid disk argument
.gitignore | 7 +++++++
lib/hddtemp.c | 3 +++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c68be6c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+*.o
+.gitignore
+*.bz2
+*.gz
+Makefile
+*.swp
+*.gmo
diff --git a/lib/hddtemp.c b/lib/hddtemp.c
index c585f55..ca0d646 100644
--- a/lib/hddtemp.c
+++ b/lib/hddtemp.c
@@ -528,6 +528,9 @@ get_hddtemp_value (char* disk, gboolean *suppressmessage)
//size_t read_size;
#endif
+ if (disk==NULL)
+ return 0.0;
+
if (suppressmessage!=NULL)
nevershowagain = *suppressmessage;
else
More information about the Xfce4-commits
mailing list