Date: Mon, 10 Nov 2003 18:53:44 +0100 (CET) From: Stefan Farfeleder <stefan@fafoe.narf.at> To: FreeBSD-gnats-submit@FreeBSD.org Cc: stefan@fafoe.narf.at Subject: bin/59144: [patch] Allow a trailing / for mount -u too Message-ID: <20031110175344.E5E691AC@wombat.fafoe.narf.at> Resent-Message-ID: <200311101800.hAAI0aN8040471@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 59144 >Category: bin >Synopsis: [patch] Allow a trailing / for mount -u too >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Nov 10 10:00:36 PST 2003 >Closed-Date: >Last-Modified: >Originator: Stefan Farfeleder >Release: FreeBSD 5.1-CURRENT i386 >Organization: >Environment: System: FreeBSD wombat.fafoe.narf.at 5.1-CURRENT FreeBSD 5.1-CURRENT #4: Mon Nov 10 14:51:15 CET 2003 stefan@wombat.fafoe.narf.at:/usr/home/stefan/freebsd/obj/usr/home/stefan/freebsd/src/sys/WOMBAT i386 >Description: In mount.c's revision 1.38 mount was patched to strip a trailing / from a path to "[f]ix tab completion mounts (like /cdrom/)". Annoyingly and inconsequently this is not done for the MNT_UPDATE case (mount -u). >How-To-Repeat: $ sudo mount -u /usr/ mount: not currently mounted /usr/ >Fix: --- mount.c.diff begins here --- Index: src/sbin/mount/mount.c =================================================================== RCS file: /usr/home/ncvs/src/sbin/mount/mount.c,v retrieving revision 1.54 diff -u -r1.54 mount.c --- src/sbin/mount/mount.c 7 Aug 2003 04:51:41 -0000 1.54 +++ src/sbin/mount/mount.c 10 Nov 2003 17:29:53 -0000 @@ -233,6 +233,7 @@ if (vfslist != NULL) usage(); + rmslashes(*argv, *argv); if (init_flags & MNT_UPDATE) { mntfromname = NULL; have_fstab = 0; @@ -271,7 +272,6 @@ 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", --- mount.c.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031110175344.E5E691AC>