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: udev and usb.agent
Date: Sun, 16 Oct 2005 11:57:20 +0000	[thread overview]
Message-ID: <20051016115720.GA15594@vrfy.org> (raw)
In-Reply-To: <Pine.LNX.4.63.0510151611080.8404@terminal.gregs.com>

On Sun, Oct 16, 2005 at 09:33:39AM +1000, Greg Bell wrote:
> >>What am I doing wrong?  Is there a way to get hotplug to call udev to do
> >>the device mapping BEFORE usb.agent gets called?
> >
> >The "camera script" is probably triggered by the usb device event, not the
> >block device event. Use an explicit udev rule that matches the block device
> >and the usb properties of the camera.
> 
> But the udev, whether the rule is for USB or SCSI, is getting run after 
> the usb.agent stuff...

Probably, but usb.agent has nothing to do with the block device event!
These are completely different events...

> >The old agent crap should no longer
> >be used.
> 
> But udev only does device creation, not scripts.

Catch up! udev does _all_ hotplug today. Everything that runs on hotplug
events is managed by udev. You can plug into any stage of the event
processing with udev rules and run an unlimited number of scripts...

> >Modern desktop setups don't
> >need to fiddle around with device id's and scripts to make your camera
> >just work.
> 
> Sure, they 'just work', but they don't do the fun stuff I'm hoping to 
> script up...
> 
> So, again, why does hotplug call udev *after* it calls usb.agent? 

Again, udev calls _everything_, also the agent stuff. Use the right
event, and everything will work!

> usb.agent can't do much since it doesn't have a nice static name for the 
> newly inserted usb device until after udev runs...

Matching on the right event will carry DEVNAME in the environment, which
is the name of the node.

Good luck,
Kay


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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-10-16 11:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-15  6:14 udev and usb.agent Greg Bell
2005-10-15 18:27 ` Kay Sievers
2005-10-15 23:33 ` Greg Bell
2005-10-16 11:57 ` Kay Sievers [this message]
2005-10-17  0:42 ` Greg Bell
2005-10-17  1:44 ` Kay Sievers
2005-10-27 10:36 ` Olivier Blin
2005-10-28  1:09 ` Kay Sievers

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=20051016115720.GA15594@vrfy.org \
    --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).