]> err.no Git - util-linux/commitdiff
mount: don't canonicalize LABEL= or UUID= spec
authorKarel Zak <kzak@redhat.com>
Thu, 6 Mar 2008 14:43:41 +0000 (15:43 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 6 Mar 2008 14:43:41 +0000 (15:43 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/fstab.c

index ada8d3222574437a58f4de90723d2c10adf54e48..277f4f1d515950ee29e80cd7f0ddbac544149567 100644 (file)
@@ -433,7 +433,13 @@ getfs_by_devname (const char *devname) {
 
        /* noncanonical devname in fstab */
        for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
-               char *fs = canonicalize(mc->m.mnt_fsname);
+               char *fs;
+
+               if (strncmp(mc->m.mnt_fsname, "LABEL=", 6) == 0 ||
+                               strncmp(mc->m.mnt_fsname, "UUID=", 5) == 0)
+                       continue;
+
+               fs = canonicalize(mc->m.mnt_fsname);
                if (streq(fs, devname)) {
                        free(fs);
                        return mc;