New standard proposal

Derek Foreman manmower at
Fri Sep 26 23:36:50 EEST 2003

On Fri, 26 Sep 2003, Carlos [ISO-8859-1] Perelló Marín wrote:

> El vie, 26-09-2003 a las 04:45, Derek Foreman escribió:
> > On Fri, 26 Sep 2003, Carlos [ISO-8859-1] Perell Marn wrote:
> > 
> > The burning library I'm working on won't use a device if it's mounted, 
> > so if a user inserts a CDRW with a valid filesystem on it, they won't be 
> > able to blank it or burn to it until they unmount it.
> > (insert, unmount, burn.. seems counterintuitive, and I think I'll end up 
> > fielding thousands of "can't blank CDRW" bug reports :)
> You could just send an unmount message.

After the volume manager broadcasts to all interested apps that the volume 
is up?  That's suboptimal.

> > Same problem with backing up a disc.  if it's inserted while my program is 
> > running, it's probably a safe assumption the user doesn't want it 
> > automounted.
> Backing up a disc?

Making a copy of a cd.  This also has to be done with the disc unmounted.

> > How do you do the automounting with CDs?  some CDROM drives take a few 
> > seconds to figure out they're empty if you're just polling with mount.  It 
> > might not be a good idea to manage all cdrom drives in all cases.
> It's an ioctl poll.

Which ioctl?  I'd like to see how my drive reacts to it.

> > If it's polling, then a far more interesting failure mode is a race
> > between mount and erase on a CDRW.  app opens device, locks drive door,
> > gives a 5 second warning that all contents will be lost.  automounter
> > kicks in, mounts the volume, runs an auto run script.  app sends the blank
> > disc command...
> I will not execute any autorun script, that's a Nautilus/Konqueror task.
> I will only notify about CD insertions and places where they are
> mounted.
> The idea is that all applications work together with the daemon, so if
> you are listen for the server events you can just request an unmount and
> then erase the CD/DVD, or you will be notified about a blank CDR
> insertion, etc...

I'm not all that concerned with who is doing the auto run, I just need the 
ability to make sure it doesn't take place.  Having to wait for a lazy 
unmount, or for some install-shield style application to close on a cd you 
inserted because you wanted to erase it would be frustrating.

Havoc's suggestion of having the HAL export a way to get an exclusive lock
on the device looks like it solves this nicely though. :)

More information about the xdg mailing list