summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Eckelmann2010-09-26 21:18:15 +0200
committerKarel Zak2010-09-30 22:32:50 +0200
commitd4ac6657c5ff8b3a29cdf236ab787558aab8fbb1 (patch)
tree7c2fd63d11be8857de0818892cc4946bc0e3301b
parentmount: avoid starting a man page line with a single quote (diff)
downloadkernel-qcow2-util-linux-d4ac6657c5ff8b3a29cdf236ab787558aab8fbb1.tar.gz
kernel-qcow2-util-linux-d4ac6657c5ff8b3a29cdf236ab787558aab8fbb1.tar.xz
kernel-qcow2-util-linux-d4ac6657c5ff8b3a29cdf236ab787558aab8fbb1.zip
mount: Don't call canonicalize_*(SPEC) for 9p
When calling "mount -t 9p -o trans=virtio foobar /mnt/bar" and foobar exists in the current path, the 9p virtio transport driver will be called with $CWD/foobar and fail with "9p: no channels available". Similar problems exist with remote file servers "mount -t 9p 23.42.08.15 /mnt/bar" and Plan 9 From User Space applications "mount -t 9p -o trans=unix,uname=$USER `namespace`/acme /mnt/bar" A similar exception like for nfs, cifs and smbfs must be added for 9p. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
-rw-r--r--mount/mount.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mount/mount.c b/mount/mount.c
index 22828b4e2..0567418db 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -1805,7 +1805,8 @@ mount_one (const char *spec, const char *node, const char *types,
}
/* Handle possible LABEL= and UUID= forms of spec */
- if (types == NULL || (strncmp(types, "nfs", 3) &&
+ if (types == NULL || (strncmp(types, "9p", 2) &&
+ strncmp(types, "nfs", 3) &&
strncmp(types, "cifs", 4) &&
strncmp(types, "smbfs", 5))) {
nspec = spec_to_devname(spec);