summaryrefslogtreecommitdiffstats
path: root/sbin/mount_ext2fs
diff options
context:
space:
mode:
authorjh <jh@FreeBSD.org>2012-01-16 19:34:21 +0000
committerjh <jh@FreeBSD.org>2012-01-16 19:34:21 +0000
commitae73284c1a1116d89c84235929df10421a348b30 (patch)
tree54d0a2f2ed01c217587bf7b24aec11a7fbcadd97 /sbin/mount_ext2fs
parent5a45f730a5625608124e818a7be2c3dbd2d20512 (diff)
downloadFreeBSD-src-ae73284c1a1116d89c84235929df10421a348b30.zip
FreeBSD-src-ae73284c1a1116d89c84235929df10421a348b30.tar.gz
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)
Diffstat (limited to 'sbin/mount_ext2fs')
-rw-r--r--sbin/mount_ext2fs/mount_ext2fs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/mount_ext2fs/mount_ext2fs.c b/sbin/mount_ext2fs/mount_ext2fs.c
index 04d2ea0..8753997 100644
--- a/sbin/mount_ext2fs/mount_ext2fs.c
+++ b/sbin/mount_ext2fs/mount_ext2fs.c
@@ -103,7 +103,8 @@ main(int argc, char *argv[])
* Resolve the mountpoint with realpath(3) and remove unnecessary
* slashes from the devicename if there are any.
*/
- (void)checkpath(fs_name, mntpath);
+ if (checkpath(fs_name, mntpath) != 0)
+ err(EX_USAGE, "%s", mntpath);
(void)rmslashes(fspec, fspec);
build_iovec(&iov, &iovlen, "fstype", fstype, strlen(fstype) + 1);
OpenPOWER on IntegriCloud