Re: [PATCH] dracut-gencmdline: use udevadm info to go from /dev/X to /sys/Y

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

 



Alan Jenkins wrote:
> Avoid some manual spelunking in sysfs.  This makes for slightly shorter
> and simpler code.
>   

Argh, please ignore this patch.

> +    path=$(udevadm info --name "$1" --query=path 2>/dev/null

> -        dev=$(for x in /sys/block/* ; do find $x/ -name dev ; done | while read device ; do \
> -              echo "$majmin" | cmp -s $device && echo $device ; done)
> -        if [ -n "$dev" ]; then
> -            dev=${dev%%/dev}
> -            dev=${dev%%/}
> -            echo "$dev"
> -            return 0
> -        fi
>   

Device-mapper was still creating some of it's own device nodes as of
April this year.  So it's not safe to rely on udev knowing about
everything in /dev.

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux