On Fri, 2009-06-12 at 14:05 +0200, Jacek Danecki wrote: > Jacek Danecki wrote: > > This patch adds support for new class MDRaidContainerDevice. > Rewritten patch. This one mostly looks good. See comments below. > diff --git a/storage/udev.py b/storage/udev.py > index 63cc3fd..210237e 100644 > --- a/storage/udev.py > +++ b/storage/udev.py > @@ -195,9 +195,16 @@ def udev_device_is_dm(info): > """ Return True if the device is a device-mapper device. """ > return info.has_key("DM_NAME") > > +def udev_device_is_container(info): I'd like to see this named udev_device_is_md_container instead. While we're writing new code we should make it as clear as possible. > + if info.has_key("MD_LEVEL") and \ > + info["MD_LEVEL"] == "container": > + return True > + return False > + Why not just: return info.get("MD_LEVEL") == "container" > def udev_device_is_md(info): > """ Return True is the device is an mdraid array device. """ > - return info.has_key("MD_METADATA") > + return info.has_key("MD_DEVNAME") and \ > + info.has_key("MD_METADATA") > > def udev_device_is_cdrom(info): > """ Return True if the device is an optical drive. """ > _______________________________________________ > Anaconda-devel-list mailing list > Anaconda-devel-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/anaconda-devel-list _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list