diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 8510db5d0132..14b56c926f69 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -265,6 +265,7 @@ main(argc, argv) mntbuf->f_mntonname, init_flags, options, 0); break; } + rmslashes(*argv, *argv); if ((fs = getfsfile(*argv)) == NULL && (fs = getfsspec(*argv)) == NULL) errx(1, "%s: unknown special file or file system", diff --git a/sbin/mount_ifs/mount.c b/sbin/mount_ifs/mount.c index 8510db5d0132..14b56c926f69 100644 --- a/sbin/mount_ifs/mount.c +++ b/sbin/mount_ifs/mount.c @@ -265,6 +265,7 @@ main(argc, argv) mntbuf->f_mntonname, init_flags, options, 0); break; } + rmslashes(*argv, *argv); if ((fs = getfsfile(*argv)) == NULL && (fs = getfsspec(*argv)) == NULL) errx(1, "%s: unknown special file or file system",