diff options
Diffstat (limited to 'sbin/mount_ifs/mount.c')
-rw-r--r-- | sbin/mount_ifs/mount.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sbin/mount_ifs/mount.c b/sbin/mount_ifs/mount.c index 039ee95..b84696a 100644 --- a/sbin/mount_ifs/mount.c +++ b/sbin/mount_ifs/mount.c @@ -61,6 +61,7 @@ static const char rcsid[] = #include <unistd.h> #include "extern.h" +#include "mntopts.h" #include "pathnames.h" /* `meta' options */ @@ -354,7 +355,6 @@ mountfs(vfstype, spec, name, flags, options, mntopts) NULL }; const char *argv[100], **edir; - struct stat sb; struct statfs sf; pid_t pid; int argc, i, status; @@ -365,16 +365,8 @@ mountfs(vfstype, spec, name, flags, options, mntopts) (void)&name; #endif - if (realpath(name, mntpath) != NULL && stat(mntpath, &sb) == 0) { - if (!S_ISDIR(sb.st_mode)) { - warnx("%s: not a directory", mntpath); - return (1); - } - } else { - warn("%s", mntpath); - return (1); - } - + /* resolve the mountpoint with realpath(3) */ + (void)checkpath(name, mntpath); name = mntpath; if (mntopts == NULL) |