Blob Blame History Raw
diff -up ./src/fuser.c.ori ./src/fuser.c
--- ./src/fuser.c.ori	2019-03-18 14:11:41.636699159 +0100
+++ ./src/fuser.c	2019-03-18 14:13:10.987730367 +0100
@@ -180,6 +180,9 @@ scan_procs(struct names *names_head, str
 	pid_t pid, my_pid;
 	uid_t uid;
 
+	if ( (ino_head == NULL) && (dev_head == NULL) )
+		return;
+
 	if ((topproc_dir = opendir("/proc")) == NULL) {
 		fprintf(stderr, _("Cannot open /proc directory: %s\n"),
 			strerror(errno));
@@ -1665,6 +1668,10 @@ scan_knfsd(struct names *names_head, str
 	char *find_space;
 	struct stat st;
 
+	if ( (ino_head == NULL) && (dev_head == NULL) )
+		return;
+
+
 	if ((fp = fopen(KNFSD_EXPORTS, "r")) == NULL) {
 #ifdef DEBUG
 		printf("Cannot open %s\n", KNFSD_EXPORTS);
@@ -1711,6 +1718,10 @@ scan_mounts(struct names *names_head, st
 	char *find_space;
 	struct stat st;
 
+	if ( (ino_head == NULL) && (dev_head == NULL) )
+		return;
+
+
 	if ((fp = fopen(PROC_MOUNTS, "r")) == NULL) {
 		fprintf(stderr, "Cannot open %s\n", PROC_MOUNTS);
 		return;
@@ -1754,6 +1765,9 @@ scan_swaps(struct names *names_head, str
 	char *find_space;
 	struct stat st;
 
+	if ( (ino_head == NULL) && (dev_head == NULL) )
+		return;
+
 	if ((fp = fopen(PROC_SWAPS, "r")) == NULL) {
 		/*fprintf(stderr, "Cannot open %s\n", PROC_SWAPS); */
 		return;