New (yet inofficial) -as mkisofs options -hfs-bless and -hfs-bless-by

This commit is contained in:
2012-05-25 19:01:39 +00:00
parent eda78234a6
commit 059d891b39
4 changed files with 108 additions and 10 deletions

View File

@ -612,7 +612,7 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
""
};
static char arg2_options[][41]= {
"--scdbackup_tag", "--sort-weight",
"-hfs-bless-by", "--scdbackup_tag", "--sort-weight",
""
};
static char arg3_options[][41]= {
@ -733,7 +733,10 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" -hide-hfsplus-list FILE File with list of HFS+ files to hide",
" -hfsplus Generate HFS+ filesystem",
" -hfsplus-file-creator-type CREATOR TYPE iso_rr_path",
" Attach creator and type to a File.",
" Attach creator and type to a File",
" -hfs-bless FOLDER_NAME Name of Folder to be blessed",
" -hfs-bless-by BLESS_TYPE ISO_RR_PATH",
" Bless ISO_RR_PATH by BLESS_TYPE {p,i,s,9,x}",
#endif
@ -1080,7 +1083,7 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
int do_print_size= 0, fd, idx, iso_level= 1, emul_boot= 2;
int option_b= 0, was_failure= 0, fret, lower_r= 0, zero= 0;
int dir_mode= -1, file_mode= -1, count, partition_number, allow_dir_id_ext= 1;
int root_seen= 0, do_md5_mem, option_d= 0;
int root_seen= 0, do_md5_mem, option_d= 0, arg_count;
mode_t mode_and, mode_or;
int with_boot_image= 0, with_cat_path= 0, with_emul_toc= 0;
int old_root_md5= 1, old_root_dev= 0, old_root_ino= 1;
@ -1506,17 +1509,23 @@ illegal_c:;
} else if(strcmp(argpt, "-joliet-long")==0) {
Xorriso_relax_compliance(xorriso,
"joliet_long_paths:joliet_long_names", 0);
} else if(strcmp(argpt, "-hfsplus") == 0) {
xorriso->do_hfsplus= 1;
} else if(strcmp(argpt, "-hfsplus-file-creator-type") == 0) {
if(i + 3 >= argc)
} else if(strcmp(argpt, "-hfs-bless") == 0 ||
strcmp(argpt, "-hfs-bless-by") == 0 ||
strcmp(argpt, "-hfsplus-file-creator-type") == 0) {
arg_count= 1;
if(strcmp(argpt, "-hfs-bless-by") == 0)
arg_count= 2;
else if(strcmp(argpt, "-hfsplus-file-creator-type") == 0)
arg_count= 3;
if(i + arg_count >= argc)
goto not_enough_args;
/* Memorize command until all pathspecs are processed */
delay_opt_list[delay_opt_count++]= i;
if(argv[i] != argpt)
delay_opt_list[delay_opt_count - 1]|= 1<<31;
i+= 3;
i+= arg_count;
} else if(strcmp(argpt, "-hfsplus") == 0) {
xorriso->do_hfsplus= 1;
} else if(strcmp(argpt, "-graft-points")==0) {
xorriso->allow_graft_points= 1;
} else if(strcmp(argpt, "-path-list")==0 ||
@ -2210,6 +2219,16 @@ problem_handler_2:;
if(ret <= 0)
goto problem_handler_boot;
} else if(strcmp(argpt, "-hfs-bless") == 0) {
ret= Xorriso_hfsplus_bless(xorriso, argv[i + 1], NULL, "ppc_bootdir", 0);
if(ret <= 0)
goto problem_handler_boot;
} else if(strcmp(argpt, "-hfs-bless-by") == 0) {
ret= Xorriso_hfsplus_bless(xorriso, argv[i + 2], NULL, argv[i + 1], 0);
if(ret <= 0)
goto problem_handler_boot;
} else if(strcmp(argpt, "-hfsplus-file-creator-type") == 0) {
ret= Xorriso_hfsplus_file_creator_type(xorriso, argv[i + 3], NULL,
argv[i + 1], argv[i + 2], 0);