From: Karel Zak Date: Thu, 17 Dec 2009 11:33:21 +0000 (+0100) Subject: umount: add --no-canonicalize X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=387ade2a24cc6fd13e8b5db123c4fa47f430948d;p=util-linux umount: add --no-canonicalize Signed-off-by: Karel Zak --- diff --git a/mount/umount.8 b/mount/umount.8 index ca67e1d6..aa904112 100644 --- a/mount/umount.8 +++ b/mount/umount.8 @@ -119,6 +119,10 @@ Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore. (Requires kernel 2.4.11 or later.) +.IP "\fB\-\-no\-canonicalize\fP" +Don't canonicalize paths. For more details about this option see the +.B mount(8) +man page. .SH "THE LOOP DEVICE" The diff --git a/mount/umount.c b/mount/umount.c index a695f0c6..7f146558 100644 --- a/mount/umount.c +++ b/mount/umount.c @@ -388,6 +388,8 @@ static struct option longopts[] = { "version", 0, 0, 'V' }, { "read-only", 0, 0, 'r' }, { "types", 1, 0, 't' }, + + { "no-canonicalize", 0, 0, 144 }, { NULL, 0, 0, 0 } }; @@ -672,7 +674,10 @@ main (int argc, char *argv[]) { types = optarg; break; case 'i': - external_allowed = 0; + external_allowed = 0; + break; + case 144: + nocanonicalize = 1; break; case 0: break; @@ -691,7 +696,8 @@ main (int argc, char *argv[]) { } } - if (restricted && (all || types || nomtab || force || remount)) { + if (restricted && + (all || types || nomtab || force || remount || nocanonicalize)) { die (2, _("umount: only root can do that")); }