Fix function getpfs for pseudo-filesystems specified as absolute path
authorMichael Neumann <mneumann@dragonflybsd.org>
Sun, 17 Aug 2008 10:35:18 +0000 (10:35 +0000)
committerMichael Neumann <mneumann@dragonflybsd.org>
Sun, 17 Aug 2008 10:35:18 +0000 (10:35 +0000)
commitdb98331ec0434333c8a55b4c107c75ecbec66188
treead5967a3160fc0e17e71f12524372e78c1c0a903
parent4e9c6c8412414823d0c789f38590ee8773e325fb
Fix function getpfs for pseudo-filesystems specified as absolute path
located in the root directory.

Finding the path portion of e.g. "/tmp.pfs" failed, as it produced an
empty string "" for which open(2) naturally fails. Instead we now detect
this situation (empty string) and use "/".

Fixes Issue: 1122
sbin/hammer/cmd_pseudofs.c