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 328732 - When try to copy a blank volume, size is incorrect
When try to copy a blank volume, size is incorrect
Status: RESOLVED FIXED
Product: nautilus-cd-burner
Classification: Deprecated
Component: cd-burner
2.13.x
Other Linux
: Normal minor
: ---
Assigned To: Nautilus CD Burner Maintainers
Nautilus CD Burner Maintainers
: 332647 341179 (view as bug list)
Depends on: 339051
Blocks:
 
 
Reported: 2006-01-26 15:13 UTC by Fabio Bonelli
Modified: 2006-05-19 15:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for this bug (11.72 KB, patch)
2006-05-16 17:31 UTC, Fabio Bonelli
none Details | Review
Patch (11.69 KB, patch)
2006-05-19 12:15 UTC, Fabio Bonelli
none Details | Review

Description Fabio Bonelli 2006-01-26 15:13:50 UTC
1. Insert a blank DVD
2. Run nautilus-cd-burner --source-device=/dev/device
3. "Data size: $CAPACITY_OF_A_DVD" is shown

It should tell the user that the disk is blank, instead.
Comment 1 William Jon McCann 2006-03-29 17:27:16 UTC
*** Bug 332647 has been marked as a duplicate of this bug. ***
Comment 2 Fabio Bonelli 2006-05-16 17:31:08 UTC
Created attachment 65605 [details] [review]
Patch for this bug

This should bring order to the capacity/size ambiguity (and changes the API a little)
Comment 3 William Jon McCann 2006-05-16 17:42:21 UTC
That looks pretty good.  Do you think we need NAUTILUS_BURN_MEDIA_SIZE_BLANK or can we just return zero for that?

Also, this change pretty much implies requiring HAL I think.  It is becoming increasingly difficult to do things correctly (and without reinventing the wheel) without HAL.
Comment 4 Fabio Bonelli 2006-05-16 22:18:43 UTC
Yes, I forgot to mention that this depends on HAL because I don't provide a non-HAL fallback.

I think that returning zero is ok. Thanks for the fast review.
Comment 5 Fabio Bonelli 2006-05-19 12:15:45 UTC
Created attachment 65825 [details] [review]
Patch

Updated patch without NAUTILUS_BURN_MEDIA_SIZE_BLANK.
Comment 6 William Jon McCann 2006-05-19 15:22:20 UTC
I've committed this with a few changes.

 * get_media_capacity didn't actually get the capacity but the size
 * fix a compiler warning about an uninitialized value
 * there were tabs introduced to the spacing in nautilus-burn-drive.h
 * use the new API in list_cddrives
 * bump the LT_VERSION since we break the API

I'll patch rhythmbox to support this new API.

Thanks Fabio.

2006-05-19  William Jon McCann  <mccann@jhu.edu>

	* src/list_cddrives.c (list_media_info, display_size):
	Use both capacity and size API.

	* configure.in: Bump LT_VERSION since we break API.

	* src/nautilus-burn-drive.c:
	(nautilus_burn_drive_get_media_capacity_from_path),
	(nautilus_burn_drive_hal_get_media_capacity),
	(nautilus_burn_drive_get_media_size),
	(nautilus_burn_drive_get_media_capacity),
	(nautilus_burn_drive_nohal_is_mounted):
	* src/nautilus-burn-drive.h:
	* src/nautilus-burn-recorder.c:
	(nautilus_burn_recorder_wait_for_insertion):
	* src/ncb-operation.c: (request_media):
	* src/ncb-selection.c: (verify_device):
	Rename drive_get_media_size to get_media_capacity because
	that is what it actually is.  Add a new drive_get_media_size
	that reports the data size of the volume.

	Patch from Fabio Bonelli <fabiobonelli@libero.it>
	Fixes #328732
Comment 7 William Jon McCann 2006-05-19 15:31:52 UTC
*** Bug 341179 has been marked as a duplicate of this bug. ***