New -padding modes "included" and "excluded"

This commit is contained in:
Thomas Schmitt 2011-03-02 09:40:37 +00:00
parent 22aeae78a7
commit e172c9ed53
4 changed files with 20 additions and 3 deletions

View File

@ -1690,7 +1690,7 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" Give up any unejected drive afterwards.",
" -close \"on\"|\"off\"",
" If \"on\" then mark the written media as not appendable.",
" -padding number[\"k\"|\"m\"]",
" -padding number[\"k\"|\"m\"]|\"included\"|\"appended\"",
" Append extra bytes to image stream. (Default is 300k)",
" -dummy \"on\"|\"off\"",
" If \"on\" simulate burning. Refuse if media cannot simulate.",

View File

@ -54,7 +54,19 @@ int Xorriso_option_pacifier(struct XorrisO *xorriso, char *style, int flag)
int Xorriso_option_padding(struct XorrisO *xorriso, char *size, int flag)
{
double num;
if(strcmp(size, "included") == 0) {
xorriso->do_padding_by_libisofs= 1;
return(1);
} else if(strcmp(size, "excluded") == 0 || strcmp(size, "appended") == 0) {
xorriso->do_padding_by_libisofs= 0;
return(1);
} else if(size[0] < '0' || size[0] > '9') {
sprintf(xorriso->info_text, "-padding: unrecognized non-numerical mode ");
Text_shellsafe(size, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
return(0);
}
num= Scanf_io_size(size, 0);
if(num < 0 || num > 1024.0 * 1024.0 * 1024.0) {
sprintf(xorriso->info_text, "-padding: wrong size %.f (allowed: %.f - %.f)",

View File

@ -1616,6 +1616,11 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
sprintf(line,"-padding %dk\n", xorriso->padding/1024);
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->do_padding_by_libisofs == 0);
sprintf(line,"-padding %s\n",
xorriso->do_padding_by_libisofs ? "included" : "appended");
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (strcmp(xorriso->report_about_text,"UPDATE")==0);
sprintf(line,"-report_about %s\n",xorriso->report_about_text);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2011.03.02.093009"
#define Xorriso_timestamP "2011.03.02.094049"