summaryrefslogtreecommitdiffstats
path: root/src/fuser.h
diff options
context:
space:
mode:
authorCraig Small <csmall@enc.com.au>2015-06-25 21:31:17 +1000
committerCraig Small <csmall@enc.com.au>2015-06-25 21:31:17 +1000
commitc29931c654278eda29b28041ff094fd5c3630712 (patch)
tree0a45c772d6b2bdab5a71a6ab1db7cae84964155d /src/fuser.h
parent8350cae4f195b47afb4e5f3b3f5bed1dd40767ac (diff)
fuser: rework string comparison
This one is a patch that reworks the string comparision for file name space in fuser. It makes the usage of this configurable with --enable-mountinfo-list at build time as well as at runtime with --inode. Also it uses shared memory maps to reduce the load on write/read the stat buffers. References: https://sourceforge.net/p/psmisc/patches/36/
Diffstat (limited to 'src/fuser.h')
-rw-r--r--src/fuser.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fuser.h b/src/fuser.h
index 242ce19..a4df711 100644
--- a/src/fuser.h
+++ b/src/fuser.h
@@ -11,6 +11,7 @@ typedef unsigned short opt_type;
#define OPT_USER 64
#define OPT_ISMOUNTPOINT 128
#define OPT_WRITE 256
+#define OPT_ALWAYSSTAT 512
struct procs {
pid_t pid;
@@ -86,7 +87,7 @@ struct mount_list {
struct mount_list *next;
};
-#if defined (__GNUC__) && defined(__OPTIMIZE__) && !defined (__CYGWIN__)
+#if defined (__GNUC__) && defined(WITH_MOUNTINFO_LIST)
# include "lists.h"
typedef struct mntinfo_s {
list_t this;
@@ -95,6 +96,8 @@ typedef struct mntinfo_s {
size_t nlen;
char *mpoint;
} mntinfo_t;
+#else
+# undef WITH_MOUNTINFO_LIST
#endif
#define NAMESPACE_FILE 0