New -padding modes "included" and "excluded"

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

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)",