mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Alan Jenkins <alan-jenkins-cCz0Lq7MMjm9FHfhHBbuYA@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] dracut-gencmdline: use udevadm info to go from /dev/X to /sys/Y
Date: Thu, 29 Oct 2009 10:59:33 +0000	[thread overview]
Message-ID: <4AE97595.6020704@tuffmail.co.uk> (raw)
In-Reply-To: <4AE9606C.1090008-cCz0Lq7MMjm9FHfhHBbuYA@public.gmane.org>

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.

      parent reply	other threads:[~2009-10-29 10:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29  9:29 [PATCH] dracut-gencmdline: use udevadm info to go from /dev/X to /sys/Y Alan Jenkins
     [not found] ` <4AE9606C.1090008-cCz0Lq7MMjm9FHfhHBbuYA@public.gmane.org>
2009-10-29 10:59   ` Alan Jenkins [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AE97595.6020704@tuffmail.co.uk \
    --to=alan-jenkins-ccz0lq7mmjm9fhfhhbbuya@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox