From 387ade2a24cc6fd13e8b5db123c4fa47f430948d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 17 Dec 2009 12:33:21 +0100 Subject: [PATCH] umount: add --no-canonicalize Signed-off-by: Karel Zak --- mount/umount.8 | 4 ++++ mount/umount.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) 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")); } -- 2.39.5