From c570e4868d7882b4e463a3ae11b653af0c6118b2 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 17 Feb 2007 08:56:41 +0000 Subject: [PATCH] Allowed forceful blanking of blank media in burn_disc_erase() --- cdrskin/cdrskin.1 | 21 ++++++++++++++------- cdrskin/cdrskin.c | 3 ++- cdrskin/cdrskin_timestamp.h | 2 +- libburn/async.c | 15 +++++++++++---- test/libburner.c | 2 +- 5 files changed, 29 insertions(+), 14 deletions(-) diff --git a/cdrskin/cdrskin.1 b/cdrskin/cdrskin.1 index 305ed5b..9150da0 100644 --- a/cdrskin/cdrskin.1 +++ b/cdrskin/cdrskin.1 @@ -279,6 +279,9 @@ complete "de-icing" so no reader slips on unwritten data areas. deformat_sequential Like blank=all but with the additional ability to blank overwriteable DVD-RW. This will destroy their formatting and make them sequentially recordable. +Another peculiarity is the ability to blank media which appear already blank. +This is similar to option -force but does not try to blank media other than +recognizable CD-RW and DVD-RW. .br (Note: blank=deformat_sequential* are not original cdrecord options.) .TP @@ -336,9 +339,10 @@ insecure about drive or media state. This includes the attempt to blank media which are classified as unknown or unsuitable, and the attempt to use write modes which libburn believes they are not supported by the drive. .br -Another application is with blank=format_* to enforce re-formatting of media -which appear to be sufficiently formatted already. +Another application is to enforce blanking or re-formatting of media +which appear to be in the desired blank or format state already. .br +.B Caution: Use this only when in urgent need. .TP .BI fs= size @@ -661,13 +665,16 @@ Disable fifo despite any fs=. Use a separate fifo for each track. .TP .BI \--fill_up_media -.B Caution: -Option is still immature and likely to change. -Problems arose with sequential DVD-RW on one drive. -.br Expand the last track of the session to occupy all remaining free space on the media. -This option overrides option -multi. +.br +This option overrides option -multi. It will not fill up media if option -sao +is given with CD media. +.br +.B Caution: +This option might increase read compatibility with DVD-ROM drives but +with some DVD recorders and media types it might also fail to produce readable +media at all. "Your mileage may vary". .TP .BI grab_drive_and_wait= seconds Open the addressed drive, wait the given number of seconds, release the drive, diff --git a/cdrskin/cdrskin.c b/cdrskin/cdrskin.c index e81e9f1..bb432ab 100644 --- a/cdrskin/cdrskin.c +++ b/cdrskin/cdrskin.c @@ -3939,7 +3939,8 @@ int Cdrskin_blank(struct CdrskiN *skin, int flag) if(s!=BURN_DISC_FULL && (s!=BURN_DISC_APPENDABLE || skin->no_blank_appendable) && - !(profile_number == 0x13 && skin->prodvd_cli_compatible)) { + (profile_number!=0x13 || !skin->prodvd_cli_compatible) && + (s!=BURN_DISC_BLANK || !skin->force_is_set)) { Cdrskin_release_drive(skin,0); if(s==BURN_DISC_BLANK) { fprintf(stderr, diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 05fe317..73dd0b7 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2007.02.17.085118" +#define Cdrskin_timestamP "2007.02.17.085533" diff --git a/libburn/async.c b/libburn/async.c index 4498fa7..6bb1060 100644 --- a/libburn/async.c +++ b/libburn/async.c @@ -236,10 +236,17 @@ void burn_disc_erase(struct burn_drive *drive, int fast) /* ts A70103 moved up from burn_disc_erase_sync() */ /* ts A60825 : allow on parole to blank appendable CDs */ /* ts A70131 : allow blanking of overwriteable DVD-RW (profile 0x13) */ - if ( ! (drive->status == BURN_DISC_FULL || - (drive->status == BURN_DISC_APPENDABLE && - ! libburn_back_hack_42) || - drive->current_profile == 0x13 ) ) { + /* ts A70216 : allow blanking of CD-RW or DVD-RW in any regular state + and of any kind of full media */ + if ((drive->current_profile != 0x0a && + drive->current_profile != 0x13 && + drive->current_profile != 0x14 && + drive->status != BURN_DISC_FULL) + || + (drive->status != BURN_DISC_FULL && + drive->status != BURN_DISC_APPENDABLE && + drive->status != BURN_DISC_BLANK) + ) { libdax_msgs_submit(libdax_messenger, drive->global_index, 0x00020130, LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH, diff --git a/test/libburner.c b/test/libburner.c index 44d4f60..4ad868d 100644 --- a/test/libburner.c +++ b/test/libburner.c @@ -276,7 +276,7 @@ int libburner_blank_disc(struct burn_drive *drive, int blank_fast) return 2; } else if (disc_state == BURN_DISC_FULL || disc_state == BURN_DISC_APPENDABLE) { - ; /* this is what libburn is willing to blank */ + ; /* this is what libburner is willing to blank */ } else if (disc_state == BURN_DISC_EMPTY) { fprintf(stderr,"FATAL: No media detected in drive\n"); return 0;