After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 135302 - can't burn CDRW when they are already mounted
can't burn CDRW when they are already mounted
Status: RESOLVED FIXED
Product: nautilus-cd-burner
Classification: Deprecated
Component: cd-burner
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nautilus CD Burner Maintainers
Nautilus CD Burner Maintainers
: 141467 155932 (view as bug list)
Depends on:
Blocks: 152379
 
 
Reported: 2004-02-24 17:24 UTC by Frederic Crozat
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: 2.8.x
GNOME version: ---


Attachments
Patch to do the unmount/mount shuffle for CDRW media (8.30 KB, patch)
2004-05-10 11:34 UTC, Richard Kinder
needs-work Details | Review

Description Frederic Crozat 2004-02-24 17:24:22 UTC
This is a follow-up of Mdk bug http://qa.mandrakesoft.com/show_bug.cgi?id=8071

-get an already burned CDRW
-mount it (or have it automouted by magicdev)
-try to use ncb to burn on it
=> ncd complains about invalid media because drive is mounted.

Suggestion : grab mount/unmount code from nautilus and unmount drive before
starting burning (and remount after burn is done, if medium wasn't ejected)
Comment 1 Frederic Crozat 2004-02-24 18:32:38 UTC
It seems you need to unmount the CD ONLY with kernel 2.6.x. With
kernel 2.4.x, ncb is able to sense media when it is already mounted..
Comment 2 Bastien Nocera 2004-03-14 13:51:48 UTC
Frederic, it's normal, your 2.4.x kernel tree doesn't have the O_SYNC
patch for CD-Rom access. Use a Red Hat-provided 2.4.x kernel, and it
will behave just like the 2.6.x kernel.

Is umounting the CD before poking it a good idea by you, Alex?
Comment 3 Alexander Larsson 2004-03-15 09:41:06 UTC
Unmounting might be a good idea. For e.g. the re-write case. It might
cause stangeness though, so we need to test it on a few systems first.
Comment 4 Richard Kinder 2004-04-29 01:10:09 UTC
Please attach a patch to this report so we can test this out - or point me to
where in the code I should hack.
Comment 5 Bastien Nocera 2004-04-29 19:57:30 UTC
in wait_for_insertion() in nautilus-cd-burner.c, check if the media type is
"BUSY", if it is busy, and we're supposed to blank the CD, umount the CD and
check again, otherwise through out an error and ask for a blank media (like now).
Comment 6 Bastien Nocera 2004-04-30 08:22:47 UTC
*** Bug 141467 has been marked as a duplicate of this bug. ***
Comment 7 Richard Kinder 2004-05-10 11:34:45 UTC
Created attachment 27532 [details] [review]
Patch to do the unmount/mount shuffle for CDRW media

This patch does the following:

1) If the 'Erase CD' checkbox is checked, and the CD is busy, unmount the CD
drive and try guessing the media type again.
2) If the media was unmounted prior to the burn ('Erase CD' checked), it is
re-mounted after the burn completes (either successfully or unsuccessfully).

The upshot of this is that if the disc in the drive is not a CDRW, but 'erase
cd' is checked, if the user doesn't abort the CD burning, the newly created
CDRW will be mounted after the burn finishes. Whether this situation is
desirable is questionable, but it is definitely better than the current
situation of having to unmount prior to starting the burn.

Anyone listening - please test.
Comment 8 Alexander Larsson 2004-05-11 11:34:58 UTC
Comments on the patch:
A lot of spaces before paranthesis in function calls are missing.

CD_FLAG_DO_SET and CD_FLAG_DO_CLEAR aren't really necessary, I prefer explicit
boolean ops. Also, defining them like that with the brackets can cause problems
with nested ifs. (You should wrap with G_STMT_START/G_STMT_END if you need
macros like these.)

The unmount_disc code looks quite fragile and complicated. There isn't a great
way to do this, but a better one than what the patch does would be to compare
stat()->st_dev on the device path and the path of the listed volumes. We already
have the st_dev for all volumes stored internally in gnome-vfs, so Ideally we
should be able to use that.

Comment 9 Alexander Larsson 2004-10-12 08:08:51 UTC
This is fixed in cvs.
Comment 10 Bastien Nocera 2004-10-20 12:27:28 UTC
*** Bug 155932 has been marked as a duplicate of this bug. ***