Blame SOURCES/psmisc-22.20-fuser-finds-btrfs-procs.patch

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