sbin/hammer: Remove redundant ioctl(GET_PSEUDOFS) call in getpfs()
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Wed, 21 Sep 2016 00:18:55 +0000 (09:18 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 6 Oct 2016 20:33:08 +0000 (05:33 +0900)
commitec206eb9d5e9317a7365a123f0b28947d257e176
tree2129a7e365a5fed582a4b795ef3e6dd054a5f119
parentf5280412bd66bcc4e55f5f7967c0cb50a9c1adb6
sbin/hammer: Remove redundant ioctl(GET_PSEUDOFS) call in getpfs()

If scanpfsid() failed, it needs to try to open(2) the path whether
it's a symlink or a file or a directory, but it needs not to call
ioctl(GET_PSEUDOFS) which gets called right after this anyway.

The error message "Cannot access PFS" is misleading too, because
once scanpfsid() fails, the path isn't necessarily a PFS or a symlink
to a PFS.

Also note that calling this ioctl with -1 set to pfs.pfs_id is okay.
In that case, the ioctl will try to detect the PFS id based on fd.
sbin/hammer/cmd_pfs.c