util-linux/util-linux-2.12p-lvm2dupes-76467.patch
kzak 63568100b2 - fix #154498 - util-linux login & pam session
- fix #155293 - man 5 nfs should include vers as a mount option
- fix #76467 - At boot time, fsck chokes on LVs listed by label in fstab
- new Source URL
- added note about ATAPI IDE floppy to fdformat.8
- fix #145355 - Man pages for fstab and fstab-sync in conflict
2005-04-25 10:23:12 +00:00

28 lines
809 B
Diff

--- util-linux-2.12p/mount/mount_by_label.c.lvm2dupes 2005-04-25 11:33:53.657880224 +0200
+++ util-linux-2.12p/mount/mount_by_label.c 2005-04-25 11:36:32.075797040 +0200
@@ -195,6 +195,15 @@
return 1;
}
+/* We need to avoid listing /dev/dm-X devices, because they are added to the uuidcache separately by the
+ uuidcache_init_dm routine. Duplicate entries cause mount-by-label to fail.
+ */
+static int
+is_lvm2(char *ptname)
+{
+ return !strncmp(ptname, "dm-", 3);
+}
+
static void
uuidcache_init(void) {
char line[100];
@@ -266,7 +275,7 @@
/* devfs has .../disc and .../part1 etc. */
for (s = ptname; *s; s++);
- if (isdigit(s[-1]) || is_xvm(ptname)) {
+ if ((isdigit(s[-1]) || is_xvm(ptname)) && !is_lvm2(ptname)) {
/*
* Note: this is a heuristic only - there is no reason