Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "fuser" command to properly deal with an invalid argument
The man page of the "fuser" command suggests that the argument can be a full pathname or inode address. However, the "fuser" command accepts an invalid argument and prints a bogus result as below: crash> fuser x PID TASK COMM USAGE 100507 ffff9914431f4c80 "packagekitd" fd 100508 ffff991574e59980 "gmain" fd 100509 ffff9914431f3300 "gdbus" fd 102020 ffff991574400000 "sshd" fd 102043 ffff991441d19980 "sshd" fd The current fuser command has no checking mechanism to determine if an argument is valid or not. Let's add it to handle such cases. With the patch: crash> fuser x fuser: invalid argument: x In addition, also add a note that fuser does not expect an argument other than an inode address and full pathname, and if others are specified, the output can be an unexpected result. Reported-by: Buland Kumar Singh <bsingh@redhat.com> Signed-off-by: Lianbo Jiang <lijiang@redhat.com> Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
- Loading branch information