]> granicus.if.org Git - psmisc/commitdiff
fuser -m regression
authorCraig Small <csmall@users.sourceforge.net>
Thu, 30 Aug 2012 22:09:45 +0000 (08:09 +1000)
committerCraig Small <csmall@users.sourceforge.net>
Thu, 30 Aug 2012 22:09:45 +0000 (08:09 +1000)
While fuser -m /boot worked, fuser -m /dev/blah would show everything.
This was because the filesystem for /dev was added as a target, not the
filesystem /dev/blah.

This simple fix suggested by SF user hanpt works well.

Ref: https://sourceforge.net/tracker/?func=detail&aid=3559232&group_id=15273&atid=115273
Signed-off-by: Craig Small <csmall@users.sourceforge.net>
ChangeLog
src/fuser.c

index 1c5d57b22b725569bce79b5d8d51c807b62b293a..ce56ba0038aaf1549d0735d62aacd84dc7fc08ab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 Changes in 22.20
 ================
        * pstree sorts properly on names Debian #682014
+       * fuser -m regresion fixed SF #3559232, thanks to hanpt
 Changes in 22.19
 ================
        * killall with no args exits again SF #3536526
index e29a3458c0e9b2fd8cb669e77fbda69f28eed5d5..7db31326be3720c312cd55eb5f366467a25cfabf 100644 (file)
@@ -4,7 +4,7 @@
  * Based on fuser.c Copyright (C) 1993-2005 Werner Almesberger and Craig Small
  *
  * Completely re-written
- * Copyright (C) 2005-2011 Craig Small
+ * Copyright (C) 2005-2012 Craig Small
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -449,14 +449,6 @@ int parse_file(struct names *this_name, struct inode_list **ino_list, const char
                        free(this_name->filename);
                this_name->filename = strdup(new);
        }
-#ifdef _LISTS_H
-       if (opts & OPT_MOUNTS) {
-               this_name->st.st_dev = device(this_name->filename);
-               this_name->st.st_ino = 0;
-               add_inode(ino_list, this_name, this_name->st.st_dev, this_name->st.st_ino);
-               return 0;
-       }
-#endif
 
        if (timeout(stat, this_name->filename, &(this_name->st), 5) != 0) {
       if (errno == ENOENT)