linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: The Next Generation
Date: Thu, 24 Feb 2005 12:26:46 +0000	[thread overview]
Message-ID: <1109248006.6894.66.camel@localhost.localdomain> (raw)
In-Reply-To: <20050217190941.GA1561@vrfy.org>

On Thu, 2005-02-24 at 14:29 +0300, Roman Kagan wrote:
>On Thu, Feb 17, 2005 at 08:09:41PM +0100, Kay Sievers wrote:
>> I propose to make the udev architecture _the_ generic hotplug handler.
>> We use the same rules which we are using today to compose a name for a
>> specific device. We just need something like a POSTPROCESS="/sbin/some-program"
>> key for our rules which adds a program to a list of programs to be executed
>> after the device node is created.
>> udev needs a bit of tweaking to handle physical devices, but it applies the same
>> logic as we currently use for device naming.
>
>After initial indigestion, I get to like this approach.  Indeed,
>allowing the hotplug multiplexer to apply sophisticated policies is a
>good thing, and the current udev way of handling policies seems to cover
>everything one may need.
>
>I'd like to point out two issues in this regard:
>
>1) NAME and SYMLINK rules become just a special case of rules, and
>   should be treated as such.  This means that the namedev functionality
>   should be logically isolated from the multiplexer functionality,
>   probably not into a separate program, but at least it should be
>   possible to compile out at build time and switch off at runtime.
>   (This seems to have been mostly addressed in your patch)

Most of the new systems out there will never work without udev again,
but sure, we can have an option to skip node creation/removal. :)

As Marco already pointed out, it seems a bit confusing to stop the rule
processing if a NAME key is found, so no later HOTPLUG, SYMLINK key is
added to the list. We may change that, but let the first NAME key still
set the value? And we may introduce an additional OPTION to make a rule
final?

>2) the multiplexer shouldn't touch sysfs unless explicitly or implicitly
>   requested to.  E.g. some of the keys in udev can be deduced from the
>   environment variables passed to hotplug by the kernel.

The problem with the hotplug environment variables is backwards
compatibility. If we require a specific kernel version at some time, we
may do that - if it really helps.
And with the new libsysfs no attribute which is not explicitly
requested, will be openend.

>    (BTW a generic ENV{variable} key would be useful too.)

Yes, this will be nice, if we handle /sys/devices with rules.

>   OTOH if a hotplug script wants to make sure a particular sysfs
>   attribute is available when it runs, it would add
>   SYSFS{attribute}="*" to its rule, so that the multiplexer does
>   wait_for_sysfs() for it.

Nice idea. We may implement the whole wait_for_sysfs logic as a set of
rules. I like that.

Thanks,
Kay



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
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-02-24 12:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-17 19:09 The Next Generation Kay Sievers
2005-02-17 20:21 ` Marco d'Itri
2005-02-17 20:35 ` Kay Sievers
2005-02-18  5:26 ` Alexander E. Patrakov
2005-02-24 11:29 ` Roman Kagan
2005-02-24 12:26 ` Kay Sievers [this message]
2005-02-24 17:51 ` Roman Kagan
2005-02-24 19:37 ` Kay Sievers
2005-02-24 20:39 ` Roman Kagan
2005-02-25 12:54 ` Kevin P. Fleming
2005-02-25 23:17 ` Greg KH
2005-02-25 23:59 ` Marco d'Itri
2005-02-26  0:07 ` Greg KH
2005-02-26  0:18 ` Kay Sievers
2005-02-27 20:13 ` David Brownell
2005-02-27 23:34 ` Kay Sievers
2005-02-28 17:02 ` Roman Kagan
2005-02-28 17:38 ` Kay Sievers
2005-02-28 18:41 ` Kay Sievers
2005-02-28 19:11 ` Roman Kagan
2005-02-28 19:49 ` Marco d'Itri
2005-02-28 20:37 ` Kay Sievers
2005-02-28 20:42 ` Chris Larson
2005-02-28 20:46 ` Kay Sievers
2005-02-28 20:50 ` Marco d'Itri
2005-02-28 21:01 ` Kay Sievers
2005-02-28 21:14 ` Erik van Konijnenburg
2005-02-28 21:25 ` Roman Kagan
2005-03-01 20:17 ` Tobias Klauser
2005-03-02  7:13 ` David Brownell

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=1109248006.6894.66.camel@localhost.localdomain \
    --to=kay.sievers@vrfy.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).