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

Re: [PATCH] Fix comparison between /dev/disk/* paths and udev symlinks (#621515).



On 08/20/2010 04:07 PM, Chris Lumens wrote:
> ---

Annoying that we still need to do this kind of hack, but ACK.

>  storage/udev.py |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/storage/udev.py b/storage/udev.py
> index 12116f6..62ef214 100644
> --- a/storage/udev.py
> +++ b/storage/udev.py
> @@ -49,8 +49,12 @@ def udev_resolve_devspec(devspec):
>              ret = dev
>              break
>          else:
> +            spec = devspec
> +            if not spec.startswith("/dev/"):
> +                spec = os.path.normpath("/dev/" + spec)
> +
>              for link in dev["symlinks"]:
> -                if devspec == link:
> +                if spec == link:
>                      ret = dev
>                      break
>  


-- 
        Peter

The Shuttle is now going five times the sound of speed.
		-- Dan Rather, first landing of Columbia

01234567890123456789012345678901234567890123456789012345678901234567890123456789


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