version 1.66, 2008/08/13 12:21:19 |
version 1.67, 2008/08/30 10:41:38 |
|
|
char *cdname; |
char *cdname; |
int fd = -1; |
int fd = -1; |
int writeperm = 0; |
int writeperm = 0; |
int mediacap = 0; |
int mediacap[MMC_FEATURE_MAX / 8]; |
int verbose = 1; |
int verbose = 1; |
int msf = 1; |
int msf = 1; |
const char *cddb_host; |
const char *cddb_host; |
|
|
if (!open_cd(cdname, 1)) |
if (!open_cd(cdname, 1)) |
return 0; |
return 0; |
|
|
if (get_media_capabilities(&mediacap) == -1) { |
if (get_media_capabilities(mediacap, 1) == -1) { |
warnx("Can't determine media type"); |
warnx("Can't determine media type"); |
return (0); |
return (0); |
} |
} |
if ((mediacap & MEDIACAP_CDRW_WRITE) == 0 && |
if (isset(mediacap, MMC_FEATURE_CDRW_WRITE) == 0 && |
get_media_type() != MEDIATYPE_CDRW) { |
get_media_type() != MEDIATYPE_CDRW) { |
warnx("The media doesn't support blanking"); |
warnx("The media doesn't support blanking"); |
return (0); |
return (0); |
|
|
|
|
if (!open_cd(cdname, 1)) |
if (!open_cd(cdname, 1)) |
exit(1); |
exit(1); |
if (get_media_capabilities(&mediacap) == -1) |
if (get_media_capabilities(mediacap, 1) == -1) |
errx(1, "Can't determine media type"); |
errx(1, "Can't determine media type"); |
if ((mediacap & MEDIACAP_TAO) == 0) |
if (isset(mediacap, MMC_FEATURE_CD_TAO) == 0) |
errx(1, "The media can't be written in TAO mode"); |
errx(1, "The media can't be written in TAO mode"); |
|
|
get_disc_size(&availblk); |
get_disc_size(&availblk); |