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

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



> -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


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