From d4ac6657c5ff8b3a29cdf236ab787558aab8fbb1 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 26 Sep 2010 21:18:15 +0200 Subject: [PATCH] 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 --- mount/mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mount/mount.c b/mount/mount.c index 22828b4e..0567418d 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); -- 2.39.5