New blank type as_needed

Thomas Schmitt 16 years ago
parent 44368aef6c
commit 12b0fbf17c

@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH CDRSKIN 1 "April 26, 2008"
.TH CDRSKIN 1 "April 27, 2008"
.\" Please adjust this date whenever revising the manpage.
.\" Some roff macros, for reference:
@ -168,7 +168,7 @@ Multiple cycles of blanking and overwriting with random numbers might be.
Currently DVD-RW, DVD-R and DVD+R[/DL] can be used for the Sequential recording
DVD-RW must be in state "Sequential Recording".
This applies to DVD-RW only if they are in state "Sequential Recording".
The media must be either blank or appendable.
Newly purchased DVD-RW and DVD-R media are in this state.
Used DVD-RW get into blank sequential state by option
@ -218,10 +218,6 @@ Best reader compatibility is achieved without it
Currently types DVD+RW, DVD-RW, DVD-RAM and BD-RE can be overwritten via
cdrskin. BD-RE is supported only with option --allow_untested_media.
DVD+RW and DVD-RAM media need no special initial formatting. They offer a
single continuous data area for blockwise random access. BD-RE need
explicit formatting before use. See blank=format_defectmgt .
Option -audio is not allowed. Only one track is allowed.
Option -multi cannot mark a recognizeable end of overwriteable media.
Therefore -multi is banned unless ISO-9660 images shall be expandable by help
@ -233,6 +229,12 @@ media get treated as blank regardless wether they hold data or not.
Currently there is no difference between -sao and -tao. If ever, then -tao
will be the mode which preserves the current behavior.
DVD+RW and DVD-RAM media need no special initial formatting. They offer a
single continuous data area for blockwise random access. BD-RE need
explicit formatting before use. See
.B blank=as_needed
or blank=format_defectmgt .
DVD-RW are sold in state "Sequential Recording". To become suitable for the
Overwriteable DVD recording model they need to get formatted to state
@ -355,8 +357,16 @@ This is combinable with burning in the same run of cdrskin.
The type given with blank= selects the particular behavior:
Print this list of blanking types.
Try to make the media ready for writing from scratch. If it needs formatting,
then format it. If it is not blank, then try to apply blank=fast.
It is a reason to abort if the media cannot assume thoroughly writeable state,
e.g. if it is non-blank write-once.
This leaves unformatted DVD-RW in unformatted blank state. To format DVD-RW use
The following blank types are specific to particular media familes. Use them if special features are desired.
Blank an entire CD-RW or an unformatted DVD-RW.
@ -386,6 +396,7 @@ and if cdrskin supports formatting for the media type,
and if formatting will not happen automatically during write.
This currently applies to unformatted DVD-RW, DVD-RAM and BD-RE.
Eventually the appropriate default formatting is chosen.
If other media or states are encountered then nothing happens.
Note: BD-RE currently is only supported with option --allow_untested_media .
@ -466,6 +477,9 @@ The numbers after text "Format idx" are the ones to be used with
format_by_index_. Format descriptor lists are volatile. Do neither eject
nor write the media between the run of --list_formats and the run of
blank=format_by_index_ or else you may get a different format than desired.
Print this list of blanking types.
.BI \-checkdrive

@ -2391,6 +2391,8 @@ return:
fprintf(stderr,"\tdisk\t\tblank the entire disk\n");
fprintf(stderr,"\tfast\t\tminimally blank the entire disk\n");
fprintf(stderr,"\tminimal\t\tminimally blank the entire disk\n");
"\tas_needed\tblank or format media to make it ready for (re-)use\n");
"\tdeformat_sequential\t\tfully blank, even formatted DVD-RW\n");
@ -3170,6 +3172,10 @@ struct CdrskiN {
gets mapped to default variants of specialized
formats if the media state requires formatting
before writing
gets mapped to 6 for DVD-RAM and BD-RE,
to 0 with all other non-blanks
bit8-15: bit0-7 of burn_disc_format(flag)
depending on job type
@ -4302,11 +4308,13 @@ int Cdrskin_invalidate_iso_head(struct CdrskiN *skin, int flag)
@param flag Bitfield for control purposes:
bit0= permission to check for overwriteable ISO image
bit1= do not report media profile
bit2= do not report but only check for pseudo appendable
@return 1=ok, 2=ok, is pseudo appendable, <=0 error
int Cdrskin_report_disc_status(struct CdrskiN *skin, enum burn_disc_status s,
int flag)
int ret, iso_size;
int ret, iso_size, pseudo_appendable= 0;
if(flag&1) {
if(skin->media_is_overwriteable && skin->grow_overwriteable_iso>0) {
@ -4314,10 +4322,14 @@ int Cdrskin_report_disc_status(struct CdrskiN *skin, enum burn_disc_status s,
ret= 1;
ret= Cdrskin_overwriteable_iso_size(skin,&iso_size,0);
if(ret>0) {
pseudo_appendable= 1;
printf("cdrskin: status %d ",s);
@ -4345,7 +4357,7 @@ int Cdrskin_report_disc_status(struct CdrskiN *skin, enum burn_disc_status s,
printf("-unknown status code-\n");
#ifdef Cdrskin_libburn_has_get_profilE
@ -4367,7 +4379,7 @@ int Cdrskin_report_disc_status(struct CdrskiN *skin, enum burn_disc_status s,
@ -5077,9 +5089,10 @@ int Cdrskin_blank(struct CdrskiN *skin, int flag)
char *verb= "blank", *presperf="blanking", *fmt_text= "...";
char profile_name[80];
static char fmtp[][40]= {
"format_default", "format_overwrite", "deformat_sequential",
"format_defectmgt", "format_by_index", "format_if_needed"};
static int fmtp_max= 6;
"...", "format_overwrite", "deformat_sequential",
"(-format)", "format_defectmgt", "format_by_index",
"format_if_needed", "as_needed"};
static int fmtp_max= 7;
start_time= Sfile_microtime(0); /* will be refreshed later */
ret= Cdrskin_grab_drive(skin,0);
@ -5093,14 +5106,11 @@ int Cdrskin_blank(struct CdrskiN *skin, int flag)
ret= Cdrskin_report_disc_status(skin,s,
do_format= skin->blank_format_type & 0xff;
if(do_format == 1 || do_format == 3 || do_format == 4 || do_format == 5 ||
do_format ==6) {
verb= "format";
presperf= "formatting";
#ifdef Cdrskin_libburn_has_pretend_fulL
@ -5121,11 +5131,11 @@ int Cdrskin_blank(struct CdrskiN *skin, int flag)
do_format= 4;
do_format= 1;
} else if(do_format==6) { /* format_if_needed */
} else if(do_format==6 || do_format==7) { /* format_if_needed , if_needed */
/* Find out whether format is needed at all.
Eventuelly set up a suitable formatting run
if(profile_number == 0x14) { /* sequential DVD-RW */
if(profile_number == 0x14 && do_format==6) { /* sequential DVD-RW */
do_format= 1;
skin->blank_format_type= 1|(1<<8);
skin->blank_format_size= 128*1024*1024;
@ -5139,16 +5149,24 @@ int Cdrskin_blank(struct CdrskiN *skin, int flag)
skin->blank_format_size= 0;
} else if(do_format==7) { /* try to blank what is not blank yet */
do_format= 0;
skin->blank_fast= 1;
if(do_format==6) {
if(do_format==6 || do_format==7) {
"cdrskin: NOTE : blank=format_if_needed : did not apply formatting\n"));
"cdrskin: NOTE : blank=%s : no need for action detected\n", fmt_text));
{ret= 2; goto ex;}
if(do_format == 1 || do_format == 3 || do_format == 4) {
verb= "format";
presperf= "formatting";
if(do_format==2) {
/* Forceful blanking to Sequential Recording for DVD-R[W] and CD-RW */
@ -7196,7 +7214,10 @@ set_blank:;
skin->blank_format_type= 2;
skin->blank_fast= 1;
skin->preskin->demands_cdrskin_caps= 1;
} else if(strcmp(cpt,"help")==0) {
} else if(strcmp(cpt,"as_needed")==0) {
skin->do_blank= 1;
skin->blank_format_type= 7;
} else if(strcmp(cpt,"help")==0) {
/* is handled in Cdrpreskin_setup() */;
} else {

@ -1 +1 @@
#define Cdrskin_timestamP "2008.04.27.084704"
#define Cdrskin_timestamP "2008.04.27.140144"