On Fri, Dec 17, 2004 at 05:04:57PM -0500, Alan Stern wrote:
> On Fri, 17 Dec 2004, Tom Rini wrote:
> 
> > > Amusingly enough, the change in behavior was caused not by adding code 
> > > but 
> > > by removing it.  The usb-storage driver in 2.4 went to some trouble to 
> > > try 
> > > and maintain the ficticious existences of devices after they had been 
> > > unplugged.  In 2.6 all that was removed, and so now when you unplug a 
> > > device it just goes away, period.
> > 
> > Ah.  How hard would it be to get the 2.6 behavior, if one wanted it?
> 
> You would have to reprogram part of the usb-storage driver.  It wouldn't 
> be a terribly hard job for someone who was already familiar with the 
> driver.  But it would mean you would be running a non-vanilla kernel.
> 
> > > By the way, you shouldn't need to reload usb-storage in 2.4 to use a
> > > device after it has been unplugged.  Plugging it back in ought to be 
> > > enough.  Just don't try to mount it while it's not plugged in.
> > 
> > I wasn't clear.  Indeed what I was saying was that if you try and
> > accidentally mount it while it's not plugged in, things go wrong.
> 
> A much easier approach would be to avoid using the "mount" command 
> directly, and create a shell script that would check for the device's 
> presence in /proc/bus/usb/devices before allowing the mount to proceed.

That's a good idea, thanks.

-- 
Tom Rini
http://gate.crashing.org/~trini/


-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to