Whamcloud - gitweb
get_device_by_label.c (read_partitions): Pay attention to
authorTheodore Ts'o <tytso@mit.edu>
Thu, 31 Oct 2002 20:30:26 +0000 (15:30 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 31 Oct 2002 20:30:26 +0000 (15:30 -0500)
partitions returned in /proc/partitions that begin with
with the string "lvm".

misc/ChangeLog
misc/get_device_by_label.c

index f38ceaa..c455454 100644 (file)
@@ -1,3 +1,9 @@
+2002-10-31  Theodore Ts'o  <tytso@mit.edu>
+
+       * get_device_by_label.c (read_partitions): Pay attention to
+               partitions returned in /proc/partitions that begin with
+               with the string "lvm".
+
 2002-10-30  Theodore Ts'o  <tytso@mit.edu>
 
        * Makefile.in (install): Search all compression extensions when
index a80bfbc..cde85a7 100644 (file)
@@ -289,9 +289,10 @@ read_partitions(void)
                /* skip entire disk (minor 0, 64, ... on ide;
                   0, 16, ... on sd) */
                /* heuristic: partition name ends in a digit */
+               /* OR partition name starts with 'lvm' */
 
                for(s = ptname; *s; s++);
-               if (isdigit(s[-1])) {
+               if (isdigit(s[-1]) || !strncmp(ptname, "lvm", 3)) {
                        /*
                         * We first look in /dev for the device, but
                         * if we don't find it, or if the stat