diff options
author | Jaakko Heinonen <jh@FreeBSD.org> | 2012-01-16 19:34:21 +0000 |
---|---|---|
committer | Jaakko Heinonen <jh@FreeBSD.org> | 2012-01-16 19:34:21 +0000 |
commit | d3250014386b2eae2bf27edcde24d97f7bbfcfc5 (patch) | |
tree | 54d0a2f2ed01c217587bf7b24aec11a7fbcadd97 /sbin/mount_unionfs | |
parent | 03c142e76290016711675793c65fe924a3d1b779 (diff) | |
download | src-test2-d3250014386b2eae2bf27edcde24d97f7bbfcfc5.tar.gz src-test2-d3250014386b2eae2bf27edcde24d97f7bbfcfc5.zip |
Change checkpath() to not exit on error. This is a prerequisite for
fixing the mount(8) "failok" option.
PR: 163668
Reviewed by: Garrett Cooper, delphij (previous version)
Notes
Notes:
svn path=/head/; revision=230226
Diffstat (limited to 'sbin/mount_unionfs')
-rw-r--r-- | sbin/mount_unionfs/mount_unionfs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/mount_unionfs/mount_unionfs.c b/sbin/mount_unionfs/mount_unionfs.c index edb0fff07596..c42bf04dbed4 100644 --- a/sbin/mount_unionfs/mount_unionfs.c +++ b/sbin/mount_unionfs/mount_unionfs.c @@ -176,8 +176,10 @@ main(int argc, char *argv[]) usage(); /* resolve both target and source with realpath(3) */ - (void)checkpath(argv[0], target); - (void)checkpath(argv[1], source); + if (checkpath(argv[0], target) != 0) + err(EX_USAGE, "%s", target); + if (checkpath(argv[1], source) != 0) + err(EX_USAGE, "%s", source); if (subdir(target, source) || subdir(source, target)) errx(EX_USAGE, "%s (%s) and %s (%s) are not distinct paths", |