summaryrefslogtreecommitdiff
path: root/mount/mount.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2009-12-03 15:30:53 +0100
committerKarel Zak <kzak@redhat.com>2009-12-03 15:30:53 +0100
commit45fc569a75d4e83a045027acf8e2eda08638fa0d (patch)
tree03affc61e0a29f2ad538a2d678156a3a0013ca8d /mount/mount.c
parentbe779d181d79110a76814af5208117a7f75adbee (diff)
downloadutil-linux-old-45fc569a75d4e83a045027acf8e2eda08638fa0d.tar.gz
mount: add --no-canonicalize option
For example the /sbin/mount.fuse command calls mount -i -f /dev/foo /absolut/path and it does not make sense to canonicalize already absolute paths. The new --no-canonicalize option allows to avoid unwanted readlink() calls. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/mount.c')
-rw-r--r--mount/mount.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mount/mount.c b/mount/mount.c
index 3eafa92a..f3f8910e 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -1924,6 +1924,7 @@ static struct option longopts[] = {
{ "make-rslave", 0, 0, 141 },
{ "make-rprivate", 0, 0, 142 },
{ "make-runbindable", 0, 0, 143 },
+ { "no-canonicalize", 0, 0, 144 },
{ "internal-only", 0, 0, 'i' },
{ NULL, 0, 0, 0 }
};
@@ -2216,7 +2217,9 @@ main(int argc, char *argv[]) {
case 143:
mounttype = (MS_UNBINDABLE | MS_REC);
break;
-
+ case 144:
+ nocanonicalize = 1;
+ break;
case '?':
default:
usage (stderr, EX_USAGE);