chiark / gitweb /
Do not show empty wd2ipf slots as there can be many
authorIan Jackson <ian@chiark.greenend.org.uk>
Tue, 1 Jun 2010 16:34:14 +0000 (17:34 +0100)
committerIan Jackson <ian@chiark.greenend.org.uk>
Tue, 1 Jun 2010 16:34:14 +0000 (17:34 +0100)
filemon.c

index b06bfaa..0c8a1d0 100644 (file)
--- a/filemon.c
+++ b/filemon.c
@@ -109,8 +109,10 @@ void filemon_method_dump_info(FILE *f) {
   fprintf(f,"inotify");
   DUMPV("%d",,filemon_inotify_fd);
   DUMPV("%d",,filemon_inotify_wdmax);
+  fprintf(f,"\n");
   for (i=0; i<filemon_inotify_wdmax; i++)
-    fprintf(f," wd2ipf[%d]=%p\n", i, filemon_inotify_wd2ipf[i]);
+    if (filemon_inotify_wd2ipf[i])
+      fprintf(f," wd2ipf[%d]=%p\n", i, filemon_inotify_wd2ipf[i]);
 }
 
 #endif /* HAVE_INOTIFY && !HAVE_FILEMON */