[PATCH] eject improvement - Nautilus bugzilla # 151840.



Hello,

Apple machines tend to miss eject buttons on cdrom-drives. This
together with some types of media can put the user in a bad situation:

DVD:s
xine and mplayer both play DVD:s without mounting them. My patches
makes it possible to eject the DVD media without prior mounting.

Audio CD:s
My kernel does not allow me to mount audio CD:s. Without the patches,
it is impossible to eject an audio CD with nautilus because the media
is unmountable by the kernel. The user has to start a terminal and use
the eject command. Not very user friendly. This probably applies to
all media that is unsupported (not mountable) by the kernel.

The attached patches contain the following changes:

gnome-vfs: makes it possible to eject unmounted media. bugfixes.
nautilus: adds right-click eject on removable media.

The gnome-vfs patch also fixes the following:

gnome-vfs-volume-ops.c, gnome_vfs_drive_eject():
current_vol->next should be used instead of current_vol.

gnome-vfs-volume-ops.c, mount_unmount_thread():
Memory leak if umount fails but eject succeeds.
My fix (refuse to eject if umount fails) might conflict with bugzilla #143569

gnome-vfs-volume-ops.c, mount_unmount_thread():
g_free(standard_error) is used differently with mount and eject.
error is not set to NULL for eject.

Summary of tests:

(no media in CD-ROM)
[computer] mount -> error "mount: no medium found".
[computer] eject -> no message at all. this is because "eject" returns 0.

(media in CD-ROM)
[computer] mount -> ok
[computer] unmount -> ok
[computer] eject (when mounted) -> ok
[computer] eject (when unmounted) -> ok
[desktop] unmount -> ok
[desktop] eject -> ok

(media in CD-ROM, but mounted by root)
[computer] unmount -> error "umount: only root can unmount..."
[computer] eject (when mounted) -> error "umount: only root can unmount..."
[desktop] unmount -> error "umount: only root can unmount..."
[desktop] eject -> error "umount: only root can unmount..."

Sorry for not producing patches against CVS, but I do not know where
to checkout from...

Thanks,

/ magnus

Attachment: gnome-vfs-2.8.1-eject_20041204.patch
Description: Binary data

Attachment: nautilus-2.8.0-eject_20041204.patch
Description: Binary data



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