Re: [PATCH 6/7] Add udev_device_is_dasd() to detect DASD devices.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ack

Sorry for the late code review, but it looked OK so I deferred my comments.

I think matching for the string prefix "dasd" is fine here.
The other option I could think of was to use the DRIVER in udev-db but
that would require to go from the dasd partition to the parent dasd
block device because only that would have the DRIVER attribute.

On 10/08/2009 09:28 AM, David Cantrell wrote:
> The only thing I can tell is available for us from the udev db is to see
> if the DEVNAME starts with 'dasd'.  We'll need this for the dracut
> changes for DASD later.
> ---
>  storage/udev.py |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/storage/udev.py b/storage/udev.py
> index 2c41343..d051157 100644
> --- a/storage/udev.py
> +++ b/storage/udev.py
> @@ -157,6 +157,14 @@ def udev_device_is_md(info):
>      return info.has_key("MD_DEVNAME") and \
>             info.has_key("MD_METADATA")
> 
> +def udev_device_is_dasd(info):
> +    """ Return True if the device is a dasd device. """
> +    devname = info.get("DEVNAME")
> +    if devname:
> +        return devname.startswith("dasd")
> +    else:
> +        return False
> +
>  def udev_device_is_cdrom(info):
>      """ Return True if the device is an optical drive. """
>      # FIXME: how can we differentiate USB drives from CD-ROM drives?

Steffen

Linux on System z Development

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Erich Baier
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux