Re: udev rule for unmount action

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 09 June 2009 02:45:57 David Zeuthen wrote:

Hi David,

> That's a very interesting blog entry, thanks for sharing. My experience
> dealing with the storage stack in GNOME is that people keep asking for
> this feature.

... and KDE users obviously, too ;-)

> Actually I think doing this on the desktop level is the way forward.
> There are two problems here.
>
> First, consider a USB optical drive attached to the system. A typical
> thing you want to do here is to eject the disc so you can insert another
> one. Now, to eject media you first have to unmount it before you can
> send the eject ioctl to the device. But if you hook into the unmount
> process then you unbind the device before it is mounted and you never
> get to send the eject ioctl.
>
> The other example is when the user manually wants to unmount a partition
> instead of ejecting it. Now, in the Nautilus file manager we do default
> to ejecting stuff (the eject icon in the sidebar) but the user can also
> right-click and click on Unmount in the context menu. If you hook into
> the unmount process then the device(s) actually disappears, much against
> what the user wanted.

Perfectly right. And that is why it would make sense IMHO to let the user 
specify special treatment for certain devices (like it is possible with udev 
rules (serial number, manufactor, model....)).
Actually, I am asking myself if the eject command is sufficient in this case of 
a certain external HD device that seems to need some more commands to go into 
suspend mode. That's why I think it would make more sense not to hard-wire 
certain detach/supend/spindown commands, but make them selectable for every 
device. Well, just some brainstorming. :-)


> Anyway, it's not a problem to do all this from the desktop level and I
> just added support for this.

As you seem to be a GNOME guy, I'll probably have to wait until someone starts 
to integrate DeviceKit support into Solid. Are you aware of any work in this 
direction?

Thanks for your effort.

Cheers,
Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux