On Mon, Aug 03, 2009 at 05:06:54PM +0100, Richard W.M. Jones wrote:
This isn't very well tested at the moment because my main
testing
machine is broken. So just for comment, only to be applied with
caution.
[...]
+ /* In the second pass we look at all devices in /dev and
/dev/mapper
+ * and try to find matching device major/minor numbers for them in
+ * the hash.
+ */
Actually this algorithm is wrong, although the code is still
worth reviewing.
It should check /dev/mapper first, and remove any hash entries which
match as it goes along. Otherwise it'll find /dev/dm-X devices, and
we don't want that to happen ...
Rich.
--
Richard Jones, Emerging Technologies, Red Hat
http://et.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://et.redhat.com/~rjones/libguestfs/
See what it can do:
http://et.redhat.com/~rjones/libguestfs/recipes.html