From: Theodore Ts'o Date: Thu, 31 Oct 2002 20:30:26 +0000 (-0500) Subject: get_device_by_label.c (read_partitions): Pay attention to X-Git-Tag: E2FSPROGS-1_30~8 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f68b3b0bda2d9b2c884778a62fa43f345a4cd7c1;p=tools%2Fe2fsprogs.git get_device_by_label.c (read_partitions): Pay attention to partitions returned in /proc/partitions that begin with with the string "lvm". --- diff --git a/misc/ChangeLog b/misc/ChangeLog index f38ceaa..c455454 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,9 @@ +2002-10-31 Theodore Ts'o + + * 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 * Makefile.in (install): Search all compression extensions when diff --git a/misc/get_device_by_label.c b/misc/get_device_by_label.c index a80bfbc..cde85a7 100644 --- a/misc/get_device_by_label.c +++ b/misc/get_device_by_label.c @@ -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