summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-plugins/wmdf/files/wmdf_sys-fs.patch')
-rw-r--r--x11-plugins/wmdf/files/wmdf_sys-fs.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/x11-plugins/wmdf/files/wmdf_sys-fs.patch b/x11-plugins/wmdf/files/wmdf_sys-fs.patch
new file mode 100644
index 000000000000..eefa3f1301ce
--- /dev/null
+++ b/x11-plugins/wmdf/files/wmdf_sys-fs.patch
@@ -0,0 +1,42 @@
+--- wmdf.c.orig 2005-07-06 10:03:10.000000000 +0200
++++ wmdf.c 2005-07-06 10:05:19.000000000 +0200
+@@ -332,9 +332,10 @@
+ FILE *fp,*fd;
+ char mountpoint[255], dummy[255],devnme[255],fstype[255],options[255];
+ char s[255];
+-
++ char *ref[] ={"none","proc","sysfs","usbfs","udev","devpts"};
+ unsigned int rio = 0,wio = 0,temprio = 0,tempwio = 0;
+ int i = 0;
++ int j=0;
+ int pos = 0;
+ int x;
+
+@@ -342,13 +343,20 @@
+
+ if((fp = fopen("/etc/mtab","r")) != NULL) {
+
+- while(!feof(fp)) {
+- fscanf(fp,"%s %s %s %s %s %s\n",devnme,mountpoint,fstype,options,dummy,dummy);
+- if((x = strcmp("none",devnme)) != 0) {
+- add_disk(&cur_disk_infos,mountpoint,devnme,i);
+- i++;
+- }
+- }
++ while(!feof(fp)) {
++ x=0;
++ fscanf(fp,"%s %s %s %s %s %s\n",devnme,mountpoint,fstype,options,dummy,dummy);
++ for (j=0;j<6;j++){
++ if(strcmp(ref[j],devnme)==0) {
++ x=1;
++ break;
++ }
++ }
++ if(x==0) {
++ add_disk(&cur_disk_infos,mountpoint,devnme,i);
++ i++;
++ }
++ }
+ } else {
+ fprintf(stderr,"Error opening /etc/mtab\n");
+ return;