[Goodies-commits] r4980 - xfce4-sensors-plugin/trunk/panel-plugin

Fabian Nowak timystery at xfce.org
Sat Jun 21 13:02:11 CEST 2008


Author: timystery
Date: 2008-06-21 11:02:11 +0000 (Sat, 21 Jun 2008)
New Revision: 4980

Modified:
   xfce4-sensors-plugin/trunk/panel-plugin/hddtemp.c
Log:
- extended blacklist by mmc
- removed blacklist for devices
- added whitelist with hd and sd only as device prefixes


Modified: xfce4-sensors-plugin/trunk/panel-plugin/hddtemp.c
===================================================================
--- xfce4-sensors-plugin/trunk/panel-plugin/hddtemp.c	2008-06-21 02:27:17 UTC (rev 4979)
+++ xfce4-sensors-plugin/trunk/panel-plugin/hddtemp.c	2008-06-21 11:02:11 UTC (rev 4980)
@@ -155,11 +155,14 @@
     /* read from /sys/block */
     gdir = g_dir_open ("/sys/block/", 0, NULL);
     while ( (dirname = g_dir_read_name (gdir))!=NULL ) {
-        if ( strncmp (dirname, "ram", 3)!=0 &&
+        /* if ( strncmp (dirname, "ram", 3)!=0 &&
              strncmp (dirname, "loop", 4)!=0 &&
              strncmp (dirname, "md", 2)!=0 &&
              strncmp (dirname, "fd", 2)!=0 &&
-             strncmp (dirname, "dm-", 3)!=0 ) {
+             strncmp (dirname, "mmc", 3)!=0 &&
+             strncmp (dirname, "dm-", 3)!=0 ) { */
+            if ( strncmp (dirname, "hd", 2)==0 ||
+                            strncmp (dirname, "sd", 2)==0 ) {
             /* TODO: look, if /dev/dirname exists? */
             chipfeature = g_new0 (t_chipfeature, 1);
             chipfeature->devicename = g_strconcat ("/dev/", dirname, NULL); /* /proc/ide/hda/model ?? */




More information about the Goodies-commits mailing list