|
|
|
@ -755,6 +755,9 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
|
|
|
|
|
" -partition_sec_hd NUMBER Define number of sectors per head",
|
|
|
|
|
" -partition_hd_cyl NUMBER Define number of heads per cylinder",
|
|
|
|
|
" -mips-boot FILE Set mips boot image name (relative to image root)",
|
|
|
|
|
" -mipsel-boot FILE Set mipsel boot image name (relative to image root)",
|
|
|
|
|
" -B FILES, -sparc-boot FILES Set sparc boot image names",
|
|
|
|
|
" -sparc-label label text Set sparc boot disk label",
|
|
|
|
|
" -append_partition NUMBER TYPE FILE",
|
|
|
|
|
" Append FILE after image. TYPE is hex: 0x..",
|
|
|
|
|
" --modification-date=YYYYMMDDhhmmsscc",
|
|
|
|
@ -874,14 +877,14 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
|
|
|
|
|
int ret, i, j, was_path= 0, was_other_option= 0, mem_graft_points, mem;
|
|
|
|
|
int do_print_size= 0, fd, idx, iso_level= 0, emul_boot= 2;
|
|
|
|
|
int option_b= 0, was_failure= 0, fret, lower_r= 0, zero= 0;
|
|
|
|
|
int dir_mode= -1, file_mode= -1, count;
|
|
|
|
|
int dir_mode= -1, file_mode= -1, count, partition_number;
|
|
|
|
|
mode_t mode_and, mode_or;
|
|
|
|
|
int with_boot_image= 0, with_cat_path= 0;
|
|
|
|
|
int *weight_list= NULL, weight_count= 0;
|
|
|
|
|
int *delay_opt_list= NULL, delay_opt_count= 0;
|
|
|
|
|
char sfe[5*SfileadrL], adr[SfileadrL+8], ra_text[80], pathspec[2*SfileadrL];
|
|
|
|
|
char *ept, *add_pt, eff_path[SfileadrL], indev[SfileadrL+8], msc[80], *cpt;
|
|
|
|
|
char *boot_path;
|
|
|
|
|
char *boot_path, partno_text[8];
|
|
|
|
|
static char *sort_weight_args[4]= {"", "-exec", "sort_weight", ""};
|
|
|
|
|
|
|
|
|
|
strcpy(ra_text, xorriso->report_about_text);
|
|
|
|
@ -1365,6 +1368,59 @@ not_enough_args:;
|
|
|
|
|
if(ret <= 0)
|
|
|
|
|
goto problem_handler_2;
|
|
|
|
|
|
|
|
|
|
} else if(strcmp(argv[i], "-B") == 0 ||
|
|
|
|
|
strcmp(argv[i], "-sparc-boot") == 0) {
|
|
|
|
|
i++;
|
|
|
|
|
if(strlen(argv[i]) >= SfileadrL)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
/* Switch system area type to: SUN Disk Label */
|
|
|
|
|
strcpy(pathspec, "sparc_label=");
|
|
|
|
|
strcat(pathspec, xorriso->ascii_disc_label);
|
|
|
|
|
ret= Xorriso_option_boot_image(xorriso, "any", pathspec, 0);
|
|
|
|
|
if(ret <= 0)
|
|
|
|
|
goto problem_handler_2;
|
|
|
|
|
|
|
|
|
|
/* Interpret list of boot partition images or "..." */;
|
|
|
|
|
cpt= ept= argv[i];
|
|
|
|
|
partition_number= 2;
|
|
|
|
|
while(ept != NULL) {
|
|
|
|
|
ept= strchr(cpt, ',');
|
|
|
|
|
if(ept != NULL) {
|
|
|
|
|
strncpy(pathspec, cpt, ept - cpt);
|
|
|
|
|
pathspec[ept - cpt]= 0;
|
|
|
|
|
cpt= ept + 1;
|
|
|
|
|
} else
|
|
|
|
|
strcpy(pathspec, cpt);
|
|
|
|
|
if(strcmp(pathspec, "...") == 0) {
|
|
|
|
|
for(; partition_number <= 8; partition_number++) {
|
|
|
|
|
sprintf(partno_text, "%d", partition_number);
|
|
|
|
|
ret= Xorriso_option_append_partition(xorriso, partno_text, "0x0",
|
|
|
|
|
".", 0);
|
|
|
|
|
if(ret <= 0)
|
|
|
|
|
goto problem_handler_2;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if(partition_number > 8) {
|
|
|
|
|
sprintf(xorriso->info_text,
|
|
|
|
|
"-as %s -sparc-boot %s : Too many boot images", whom, argv[i]);
|
|
|
|
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE",0);
|
|
|
|
|
goto problem_handler_2;
|
|
|
|
|
}
|
|
|
|
|
sprintf(partno_text, "%d", partition_number);
|
|
|
|
|
ret= Xorriso_option_append_partition(xorriso, partno_text, "0x0",
|
|
|
|
|
pathspec, 0);
|
|
|
|
|
if(ret <= 0)
|
|
|
|
|
goto problem_handler_2;
|
|
|
|
|
partition_number++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else if(strcmp(argv[i], "-sparc-label") == 0) {
|
|
|
|
|
i++;
|
|
|
|
|
strncpy(xorriso->ascii_disc_label, argv[i], Xorriso_disc_label_sizE - 1);
|
|
|
|
|
xorriso->ascii_disc_label[Xorriso_disc_label_sizE - 1] = 0;
|
|
|
|
|
|
|
|
|
|
} else if(argv[i][0]=='-' && argv[i][1]!=0) {
|
|
|
|
|
ret= Xorriso_genisofs_count_args(xorriso, argc - i, argv + i, &count, 1);
|
|
|
|
|
if(ret > 0) {
|
|
|
|
|