[PATCH 7/8] Properly identify dm devices even when udev info is incomplete.

Anne Mulhern amulhern at redhat.com
Tue Sep 16 19:41:39 UTC 2014





----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Tuesday, September 16, 2014 12:41:10 PM
> Subject: [PATCH 7/8] Properly identify dm devices even when udev info is	incomplete.
> 
> This will help us to ignore device-mapper devices that we can't use.
> 
> Resolves: rhbz#1080727
> ---
>  blivet/udev.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/blivet/udev.py b/blivet/udev.py
> index 5755d0c..14bf50a 100644
> --- a/blivet/udev.py
> +++ b/blivet/udev.py
> @@ -159,7 +159,8 @@ def device_get_label(udev_info):
>  
>  def device_is_dm(info):
>      """ Return True if the device is a device-mapper device. """
> -    return 'DM_NAME' in info
> +    dm_dir = "%s/dm" % device_get_sysfs_path(info)
> +    return 'DM_NAME' in info or os.path.exists(dm_dir)
>  
>  def device_is_md(info):
>      """ Return True if the device is a mdraid array device. """
> --
> 1.9.3
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

More proper to use os.path.join() instead of % op.

- mulhern


More information about the anaconda-patches mailing list