.
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=32
This commit is contained in:
parent
668ec0aa37
commit
6f744a908d
@ -1,5 +1,5 @@
|
|||||||
--- src/fuser.c
|
--- 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 @@
|
@@ -32,9 +32,11 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -377,7 +377,7 @@
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Scan the devices */
|
/* 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);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
@ -542,7 +542,7 @@
|
|||||||
+ use = &name[0];
|
+ use = &name[0];
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (*use != '/') { /* sepcial file (socket, pipe, inotify) */
|
+ if (*use != '/') { /* special file (socket, pipe, inotify) */
|
||||||
+ struct stat st;
|
+ struct stat st;
|
||||||
+ if (timeout(stat, path, &st, 5) != 0)
|
+ if (timeout(stat, path, &st, 5) != 0)
|
||||||
+ return (dev_t)-1;
|
+ return (dev_t)-1;
|
||||||
@ -555,6 +555,8 @@
|
|||||||
+ continue;
|
+ continue;
|
||||||
+ if (mnt->nlen == 1) /* root fs is the last entry */
|
+ if (mnt->nlen == 1) /* root fs is the last entry */
|
||||||
+ return mnt->dev;
|
+ return mnt->dev;
|
||||||
|
+ if (use[mnt->nlen] != '\0' && use[mnt->nlen] != '/')
|
||||||
|
+ continue;
|
||||||
+ if (strncmp(use, mnt->mpoint, mnt->nlen) == 0)
|
+ if (strncmp(use, mnt->mpoint, mnt->nlen) == 0)
|
||||||
+ return mnt->dev;
|
+ return mnt->dev;
|
||||||
+ }
|
+ }
|
||||||
@ -658,7 +660,7 @@
|
|||||||
+ return curr;
|
+ return curr;
|
||||||
+}
|
+}
|
||||||
--- src/fuser.h
|
--- 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 {
|
@@ -85,6 +85,17 @@ struct mount_list {
|
||||||
struct mount_list *next;
|
struct mount_list *next;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user