git: sbin/hammer: Fix error message on pfs open/ioctl failure

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Wed Apr 1 14:32:35 PDT 2015


commit 3865ad2ff31118df608fdc43033b32b7341ccc28
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Mon Mar 30 22:28:17 2015 +0900

    sbin/hammer: Fix error message on pfs open/ioctl failure
    
    - "Not a HAMMER root" doesn't seem to be a good error message
      when getpfs() or ioctl(HAMMERIOC_GET_PSEUDOFS) has failed.
    
    - getpfs() returning negative indicates open(2) has failed.
      ioctl(HAMMERIOC_GET_PSEUDOFS) returning negative (particularly
      when caller has set pfs->pfs_id to -1 before ioctl) usually
      indicates the fd has nothing to do with the existing valid pfs.
      It makes better sense with a message like "Invalid PFS path %s"
      or something.

Summary of changes:
 sbin/hammer/cmd_pseudofs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3865ad2ff31118df608fdc43033b32b7341ccc28


-- 
DragonFly BSD source repository


More information about the Commits mailing list