]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r196309:
authorpjd <pjd@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 17 Aug 2009 10:02:31 +0000 (10:02 +0000)
committerpjd <pjd@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 17 Aug 2009 10:02:31 +0000 (10:02 +0000)
commitb3220a38ce09919f19fabab1bba0c44cb54ec18c
tree145e068beecfbad0fa9069d0f88a178ec1fd909a
parentcee74a7c60461b778cb90038be8f0cc47e20b742
MFC r196309:

getcwd() (when __getcwd() fails) works by stating current directory, going up
(..), calling readdir and looking for previous directory inode.  In case of
.zfs/ directory this doesn't work, because .zfs/ is hidden by default, so it
won't be visible in readdir output.

Fix this by implementing VPTOCNP for snapshot directories, so __getcwd()
doesn't fail and getcwd() doesn't have to use readdir method.

This fixes /bin/pwd from within .zfs/snapshot/<name>/.

Suggested by: kib
Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196310 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c