On Mon, May 07, 2007 at 02:03:41PM +0200, Karel Zak wrote: > > Hi Matthias, > > > @@ -364,11 +366,21 @@ getfsfile (const char *file) { > > struct mntentchn * > > getfsspec (const char *spec) { > > struct mntentchn *mc, *mc0; > > + const char *nspec, *fsname; > > > > mc0 = fstab_head(); > > - for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) > > - if (streq(mc->m.mnt_fsname, spec)) > > + for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { > > + if (!strncmp (mc->m.mnt_fsname, "LABEL=", 6)) { > > + fsname = mount_volume_get_devname_by_label(mc->m.mnt_fsname + 6); > > + } else if (!strncmp(mc->m.mnt_fsname, "UUID=", 5)) { > > + fsname = mount_volume_get_devname_by_uuid(mc->m.mnt_fsname + 5); > > + } else { > > + fsname = mc->m.mnt_fsname; > > + } > > + nspec = canonicalize(fsname); > > + if (streq(nspec, spec)) > > return mc; > > + } > > return NULL; > > } > > I don't understand this change. The getfsspec() compares a SPEC with > spec-es from fstab. Your > > if (streq(nspec, spec)) > > will never work, because the "nspec" is path to a device and the "spec" is > LABEL=foo, UUID=foo or /dev/foo. The other problem is that you want Ah.. you are right :-) The "spec" is already canonicalize()ed in the main(), so you compare paths with paths. > to scan (by mount_volume_get_* ) all devices which are defined in fstab -- > this is not acceptable (because performance, udev, ...). This is still a problem, but I'll fix it. No problem. Karel -- Karel Zak <kzak@xxxxxxxxxx> - To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html