diff options
author | Dave Reisner | 2011-12-27 00:47:24 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-02 14:28:30 +0100 |
commit | 46c59b51196d4e3f4fe3e4418f6f33d2f0d485d8 (patch) | |
tree | c38e9d2ffff67ba98ecbcbb34639ea3bf2c46614 /mount/mount.c | |
parent | libmount: avoid resolving pseudofs source on update (diff) | |
download | kernel-qcow2-util-linux-46c59b51196d4e3f4fe3e4418f6f33d2f0d485d8.tar.gz kernel-qcow2-util-linux-46c59b51196d4e3f4fe3e4418f6f33d2f0d485d8.tar.xz kernel-qcow2-util-linux-46c59b51196d4e3f4fe3e4418f6f33d2f0d485d8.zip |
mount: don't canonicalize the source of a pseudofs
In line with previous patches, the source of a pseudofs is strictly
semantic; do not attempt to resolve it to a filesystem path.
As a side effect of this, nspec needs to be initialized to NULL since
it may not be assigned null by spec_to_devname when the FS is deemed
a pseudofs.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'mount/mount.c')
-rw-r--r-- | mount/mount.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mount/mount.c b/mount/mount.c index a18b2df87..57c0f5977 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -2033,7 +2033,7 @@ is_existing_file (const char *s) { static int mount_one (const char *spec, const char *node, const char *types, const char *fstabopts, char *cmdlineopts, int freq, int pass) { - const char *nspec; + const char *nspec = NULL; char *opts; /* Substitute values in opts, if required */ @@ -2063,7 +2063,8 @@ mount_one (const char *spec, const char *node, const char *types, strncmp(types, "nfs", 3) && strncmp(types, "cifs", 4) && strncmp(types, "smbfs", 5))) { - nspec = spec_to_devname(spec); + if (!is_pseudo_fs(types)) + nspec = spec_to_devname(spec); if (nspec) spec = nspec; } |