* How to hot unplug?
@ 2002-07-09 13:14 ming deng
2002-07-09 14:50 ` David Brownell
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: ming deng @ 2002-07-09 13:14 UTC (permalink / raw)
To: linux-hotplug
When a USB device is detached, I want to do something to clear up, like
unmount the directory for USB Mass Storage devices. Is there any
function in hotplug supporting that?
cheers,
Ming
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Stuff, things, and much much more.
http://thinkgeek.com/sf
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to hot unplug?
2002-07-09 13:14 How to hot unplug? ming deng
@ 2002-07-09 14:50 ` David Brownell
2002-07-09 15:07 ` ming deng
2002-07-09 17:29 ` Stephen Williams
2 siblings, 0 replies; 4+ messages in thread
From: David Brownell @ 2002-07-09 14:50 UTC (permalink / raw)
To: linux-hotplug
ming deng wrote:
> When a USB device is detached, I want to do something to clear up, like
> unmount the directory for USB Mass Storage devices. Is there any
> function in hotplug supporting that?
You get a notification that the device was removed,
but so far nothing uses it. Feel free to develop
appropriate patches. In the case of unmounting,
I'd look at the issues for mounting devices first.
(My expectation is that the 2.5 driverfs and disk
model unification work will make that workable.)
One thing that folk have wanted to do is unload
drivers that are no longer needed. Although there's
a lot of email on linux-kernel about module unload
races, the real reason that's not done is that the
kernel doesn't track which drivers are needed: only
which are in curreng use. Having userspace guess
such stuff is error prone at best.
- Dave
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Stuff, things, and much much more.
http://thinkgeek.com/sf
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to hot unplug?
2002-07-09 13:14 How to hot unplug? ming deng
2002-07-09 14:50 ` David Brownell
@ 2002-07-09 15:07 ` ming deng
2002-07-09 17:29 ` Stephen Williams
2 siblings, 0 replies; 4+ messages in thread
From: ming deng @ 2002-07-09 15:07 UTC (permalink / raw)
To: linux-hotplug
David Brownell wrote:
> ming deng wrote:
>
>> When a USB device is detached, I want to do something to clear up,
>> like unmount the directory for USB Mass Storage devices. Is there any
>> function in hotplug supporting that?
>
>
> You get a notification that the device was removed,
> but so far nothing uses it. Feel free to develop
> appropriate patches. In the case of unmounting,
> I'd look at the issues for mounting devices first.
> (My expectation is that the 2.5 driverfs and disk
> model unification work will make that workable.)
>
thanks. And I found out $REMOVER works. But can someone tell me the
rationale behind using $REMOVER instead of using "remove"?
cheers,
Ming
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Stuff, things, and much much more.
http://thinkgeek.com/sf
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to hot unplug?
2002-07-09 13:14 How to hot unplug? ming deng
2002-07-09 14:50 ` David Brownell
2002-07-09 15:07 ` ming deng
@ 2002-07-09 17:29 ` Stephen Williams
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Williams @ 2002-07-09 17:29 UTC (permalink / raw)
To: linux-hotplug
mingd@oeone.com said:
> thanks. And I found out $REMOVER works. But can someone tell me the
> rationale behind using $REMOVER instead of using "remove"?
The REMOVER variable is set to be a command to execute when the
device is removed. The shell script equivalent of a function pointer:-)
This is very much faster then all the lookups and matching that is
done on device add, and is easily tailored to the specific device,
as the device add script can set whatever REMOVER is appropriate.
It is also compatible with the default behavior of ignoring remove.
--
Steve Williams "The woods are lovely, dark and deep.
steve at icarus.com But I have promises to keep,
steve at picturel.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
abuse@xo.com
uce@ftc.gov
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Stuff, things, and much much more.
http://thinkgeek.com/sf
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-07-09 17:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-09 13:14 How to hot unplug? ming deng
2002-07-09 14:50 ` David Brownell
2002-07-09 15:07 ` ming deng
2002-07-09 17:29 ` Stephen Williams
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).