From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: usb-storage
Date: Tue, 09 Mar 2004 22:40:24 +0000 [thread overview]
Message-ID: <20040309224024.GA12965@kroah.com> (raw)
In-Reply-To: <404DFA8B.6080608@libero.it>
On Tue, Mar 09, 2004 at 11:12:54PM +0100, Luca T. wrote:
> Ok,
> as Greg suggested the script is fired only the first time an usb-disk is
> plugged in.
> I verified this by unloading the usb-storage kernel module and then
> plugging in an usb-disk. The script has been executed correctly.
> Now, i need a way to detect when an usb-disk is plugged in and out, not
> only the first time, but everytime this happens.
You will get a scsi event every time this happens, but this is only in
the 2.6 kernel. 2.4 does not support this.
> I noticed that not only the usb-storage module isn't unloaded when the
> usb-disk is removed but it also leaves the device-file (for instance
> /dev/sda). So i have no way to know when the disk is removed :(
Only udev manages the /dev entries, unless you are using devfs. I'm
guessing you aren't using udev or devfs? If so, the device nodes are
always there.
Hope this helps,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&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
next prev parent reply other threads:[~2004-03-09 22:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-09 17:10 usb-storage Luca T.
2004-03-09 17:21 ` usb-storage Sabharwal, Atul
2004-03-09 19:09 ` usb-storage Luca T.
2004-03-09 19:46 ` usb-storage Greg KH
2004-03-09 22:12 ` usb-storage Luca T.
2004-03-09 22:40 ` Greg KH [this message]
2004-03-09 22:49 ` usb-storage Luca T.
2004-03-09 22:59 ` usb-storage Greg KH
2004-03-10 5:06 ` usb-storage Mika Penttilä
-- strict thread matches above, loose matches on Subject: below --
2004-02-02 16:59 usb-storage Thorsten Alge
2004-02-03 6:41 ` usb-storage pa3gcu
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=20040309224024.GA12965@kroah.com \
--to=greg@kroah.com \
--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.