All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobias Klauser <tklauser@access.unizh.ch>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH RFC] Merge udev_scan_block() and udev_scan_class() in udevstart.c
Date: Mon, 06 Jun 2005 16:24:01 +0000	[thread overview]
Message-ID: <20050606162401.GA777@access.unizh.ch> (raw)
In-Reply-To: <20050605130015.GA4640@access.unizh.ch>

On 2005-06-06 at 00:01:18 +0200, Kay Sievers <kay.sievers@vrfy.org> wrote:
> On Sun, Jun 05, 2005 at 03:00:16PM +0200, Tobias Klauser wrote:
> > udev_scan_block() and udev_scan_class() in udevstart.c have a lot of
> > redundant code and therefor I was thinking about a way to merge them.
> > My patch might not be the most elegant solution but it reduces the code
> > about 40 lines (see diffstat).
> 
> You will not get any class device with that patch! This prevents going
> down into the directories where the "dev" files are, it works only
> for block devices, cause they find a "dev" at the parent, but
> class-directories are empty here:
> 
>   if (has_devt(dirname))
>   	device_list_insert(dirname, type, &device_list);
>   else
>   	continue;
> 
> Please test more carefully before changing that bootup-critical parts of
> udev. The test directory contains a udevstart-test for that reason.

Sorry, that was stupid...

> There is a reason for these functions to be separate, but if you still think
> that this is worth to do, you may check the dirent type:
>   DTYPE(de) = DT_DIR
> instead of "dev" file lookups at every entry, which happens more often after
> merging these too functions.
> Anyway, I'm not convinced, that these functions are not better kept separate.

OK, if there's a reason for them to be separate I just didn't know it
while looking at the code.

Again, sorry for the noise.

Tobias


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r 
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

      parent reply	other threads:[~2005-06-06 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-05 13:00 [PATCH RFC] Merge udev_scan_block() and udev_scan_class() in udevstart.c Tobias Klauser
2005-06-05 22:01 ` Kay Sievers
2005-06-06 16:24 ` Tobias Klauser [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=20050606162401.GA777@access.unizh.ch \
    --to=tklauser@access.unizh.ch \
    --cc=linux-hotplug@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.