Re: [PATCH] Fix devicelibs.dm.device_is_multipath support for new udev rules.

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

 



> -def dm_is_multipath(major, minor):
> +def dm_is_multipath(info):
> +    major = None
> +    minor = None
> +
> +    if info.has_key('MAJOR'):
> +        major = info['MAJOR']
> +    elif info.has_key('DM_MAJOR'):
> +        major = info['DM_MAJOR']
> +    if info.has_key('MINOR'):
> +        major = info['MINOR']
> +    elif info.has_key('DM_MINOR'):
> +        major = info['DM_MINOR']
> +
> +    if major is None or minor is None:
> +        return False
> +
>      for map in block.dm.maps():
>          dev = map.dev
>          if dev.major == int(major) and dev.minor == int(minor):

Looks fine to me.  I like the new dm_is_multipath calling convention
more than the old one, too.

- Chris

_______________________________________________
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