OSDN Git Service

e2fsprogs: fix blkid whole-disk scanning heuristics
authorEric Sandeen <sandeen@sandeen.net>
Thu, 29 Nov 2007 18:57:35 +0000 (12:57 -0600)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 2 Dec 2007 10:25:30 +0000 (05:25 -0500)
commit38361bbbb55735cf0f4ed6d56079c70fb3328036
treec917454872b436f26c395eba648ee73608fe51ce
parent7e5a86a66044c4bf4021d1e2900a8748011f17b5
e2fsprogs: fix blkid whole-disk scanning heuristics

The heuristics in blkid/devname.c probe_all() for scanning whole disks
with no partitions assume that a device name with no digit on the end
will always be present as a delineator, i.e.:

sda
sda1
sdb
sdc

In this case, when sdc is seen, it's the clue to go back and scan sdb.
However, for something like:

sda
sda1
sdb
loop0

this falls down, and sdb is never scanned.
(thanks to Karel Zak for pointing this out).

Addresses-Red-Hat-Bugzilla: #400321

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/blkid/devname.c