Dr. Werner Fink 2011-02-09 09:41:47 +00:00 committed by Git OBS Bridge
parent 668ec0aa37
commit 6f744a908d

View File

@ -1,5 +1,5 @@
--- src/fuser.c
+++ src/fuser.c 2011-02-08 16:25:57.543927495 +0000
+++ src/fuser.c 2011-02-09 09:39:51.116426890 +0000
@@ -32,9 +32,11 @@
#include <stdlib.h>
#include <string.h>
@ -377,7 +377,7 @@
continue;
}
/* Scan the devices */
@@ -1682,3 +1752,279 @@ scan_swaps(struct names *names_head, str
@@ -1682,3 +1752,281 @@ scan_swaps(struct names *names_head, str
}
fclose(fp);
}
@ -542,7 +542,7 @@
+ use = &name[0];
+ }
+
+ if (*use != '/') { /* sepcial file (socket, pipe, inotify) */
+ if (*use != '/') { /* special file (socket, pipe, inotify) */
+ struct stat st;
+ if (timeout(stat, path, &st, 5) != 0)
+ return (dev_t)-1;
@ -555,6 +555,8 @@
+ continue;
+ if (mnt->nlen == 1) /* root fs is the last entry */
+ return mnt->dev;
+ if (use[mnt->nlen] != '\0' && use[mnt->nlen] != '/')
+ continue;
+ if (strncmp(use, mnt->mpoint, mnt->nlen) == 0)
+ return mnt->dev;
+ }
@ -658,7 +660,7 @@
+ return curr;
+}
--- src/fuser.h
+++ src/fuser.h 2011-02-08 16:25:57.575238622 +0000
+++ src/fuser.h 2011-02-09 09:38:34.764426085 +0000
@@ -85,6 +85,17 @@ struct mount_list {
struct mount_list *next;
};