freebsd-dev/sbin/mksnap_ffs
Maxim Sobolev 591e89c89b Work around an issue with mksnap_ffs not working in chroot'ed environment.
The problem is that the statfs(2) system call used to determine the relevant
mount point returns path within real root in the f_mntonname, causing
nmount(2) system call to fail with ENOENT.

Use a bit of heuristics to skip over few starting path elements when it
happens until we hit an actual mount point.

For this to work properly the whole mount should be accessible within the
chroot, it's going to still fail if chroot only has access to a part of the
mounted fs.

Reviewed by:	mckusick
Approved by:	mckusick
MFC after:	2 weeks
2017-04-11 21:55:39 +00:00
..
Makefile sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
Makefile.depend Add META_MODE support. 2015-06-13 19:20:56 +00:00
mksnap_ffs.8 mksnap_ffs appeared in FreeBSD 5.1. 2016-10-02 23:59:31 +00:00
mksnap_ffs.c Work around an issue with mksnap_ffs not working in chroot'ed environment. 2017-04-11 21:55:39 +00:00