Fixes a problem when you define a device via a persistent
udev device name in /etc/fstab but use the real block device
name on mount invocation.
Signed-off-by: Matthias Koenig <[EMAIL PROTECTED]>
---
mount/fstab.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/mount/fstab.c b/mount/fstab.c
index 03ddf4e..9ed4e5d 100644
--- a/mount/fstab.c
+++ b/mount/fstab.c
@@ -418,11 +418,17 @@ getfs_by_spec (const char *spec) {
struct mntentchn *
getfs_by_devname (const char *devname) {
struct mntentchn *mc, *mc0;
+ char *name;
mc0 = fstab_head();
- for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
- if (streq(mc->m.mnt_fsname, devname))
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
+ name = canonicalize(mc->m.mnt_fsname);
+ if (streq(name, devname)) {
+ free(name);
return mc;
+ }
+ free(name);
+ }
return NULL;
}
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html