Blob Blame History Raw
diff -up ./src/fuser.c.ori ./src/fuser.c
--- ./src/fuser.c.ori	2017-01-27 16:13:01.822913522 +0100
+++ ./src/fuser.c	2017-01-27 16:18:55.077040761 +0100
@@ -191,10 +191,6 @@ scan_procs(struct names *names_head, str
 		struct stat *cwd_stat = NULL;
 		struct stat *exe_stat = NULL;
 		struct stat *root_stat = NULL;
-#ifdef _LISTS_H
-		char path[256] = "/proc/", *slash;
-		ssize_t len;
-#endif
 
 		if (topproc_dent->d_name[0] < '0' || topproc_dent->d_name[0] > '9')	/* Not a process */
 			continue;
@@ -204,30 +200,12 @@ scan_procs(struct names *names_head, str
 			continue;
 		uid = getpiduid(pid);
 
-#ifdef _LISTS_H
-		strcpy(&path[6], topproc_dent->d_name);
-		len = strlen(path);
-		slash = &path[len];
-
-		*slash = '\0';
-		strcat(slash, "/cwd");
-		cwd_dev = device(path);
-
-		*slash = '\0';
-		strcat(slash, "/exe");
-		exe_dev = device(path);
-
-		*slash = '\0';
-		strcat(slash, "/root");
-		root_dev = device(path);
-#else
 		cwd_stat = get_pidstat(pid, "cwd");
 		exe_stat = get_pidstat(pid, "exe");
 		root_stat = get_pidstat(pid, "root");
 		cwd_dev = cwd_stat ? cwd_stat->st_dev : 0;
 		exe_dev = exe_stat ? exe_stat->st_dev : 0;
 		root_dev = root_stat ? root_stat->st_dev : 0;
-#endif
 
 		/* Scan the devices */
 		for (dev_tmp = dev_head; dev_tmp != NULL;