--- /var/lib/iserv/remote-support/iserv-martin.von.wittich/src2/psmisc-22.21/src/fuser.c	2017-09-14 16:55:21.000000000 +0200
+++ /var/lib/iserv/remote-support/iserv-martin.von.wittich/src/psmisc-22.21/src/fuser.c	2017-09-14 16:57:15.808933238 +0200
@@ -59,7 +59,7 @@
 #include "signals.h"
 #include "i18n.h"
 
-//#define DEBUG 1
+#define DEBUG 1
 
 #define NAME_FIELD 20		/* space reserved for file name */
 /* Function defines */
@@ -504,6 +504,11 @@
 	for (sun_tmp = sun_head; sun_tmp != NULL; sun_tmp = sun_tmp->next) {
 		if (sun_tmp->dev == this_name->st.st_dev
 		    && sun_tmp->inode == this_name->st.st_ino) {
+#ifdef DEBUG
+			printf("adding socket %s %lX %lX\n", this_name->filename,
+			       (unsigned long)net_dev,
+			       (unsigned long)sun_tmp->net_inode);
+#endif				/* DEBUG */
 			add_inode(ino_list, this_name, net_dev,
 				  sun_tmp->net_inode);
 			return 0;
@@ -1555,7 +1560,7 @@
 {
 	FILE *fp;
 	char line[BUFSIZ];
-	int scanned_inode;
+	ino_t scanned_inode;
 	struct stat st;
 	struct unixsocket_list *newsocket;
 
@@ -1567,7 +1572,7 @@
 	while (fgets(line, BUFSIZ, fp) != NULL) {
 		char *path;
 		char *scanned_path = NULL;
-		if (sscanf(line, "%*x: %*x %*x %*x %*x %*d %d %as",
+		if (sscanf(line, "%*x: %*x %*x %*x %*x %*d %lld %as",
 			   &scanned_inode, &scanned_path) != 2) {
 			if (scanned_path)
 				free(scanned_path);
@@ -1576,6 +1581,9 @@
 		if (scanned_path == NULL)
 			continue;
 		path = scanned_path;
+#ifdef DEBUG
+		fprintf(stderr, "fill_unix_cache: scanned_inode:%lld scanned_path:%s\n", scanned_inode, scanned_path);
+#endif				/* DEBUG */
 		if (*scanned_path == '@')
 			scanned_path++;
 		if (timeout(stat, scanned_path, &st, 5) < 0) {

Reply via email to