New option -list_profiles
This commit is contained in:
@ -15626,6 +15626,8 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
||||
"",
|
||||
" -list_formats Show media specific list of format descriptors.",
|
||||
"",
|
||||
" -list_profiles "in"|"out"|"all",
|
||||
" Show list of media types supported by indev resp. outdev.",
|
||||
" -print_size Print the foreseeable consumption by next -commit.",
|
||||
"",
|
||||
" -tell_media_space",
|
||||
@ -16171,6 +16173,33 @@ int Xorriso_option_list_formats(struct XorrisO *xorriso, int flag)
|
||||
}
|
||||
|
||||
|
||||
/* Option -list_profiles */
|
||||
int Xorriso_option_list_profiles(struct XorrisO *xorriso, char *which,
|
||||
int flag)
|
||||
{
|
||||
int ret;
|
||||
int mode= 0;
|
||||
|
||||
if(strncmp(which,"in",2)==0)
|
||||
mode|= 1;
|
||||
else if(strncmp(which,"out",3)==0)
|
||||
mode|= 2;
|
||||
else
|
||||
mode|= 3;
|
||||
if(mode & 1) {
|
||||
ret= Xorriso_toc(xorriso, 1 | 16 | 32);
|
||||
if(ret > 0)
|
||||
Xorriso_list_profiles(xorriso, 0);
|
||||
}
|
||||
if((mode & 2) && xorriso->in_drive_handle != xorriso->out_drive_handle) {
|
||||
ret= Xorriso_toc(xorriso, 1 | 2 | 16 | 32);
|
||||
if(ret > 0)
|
||||
Xorriso_list_profiles(xorriso, 2);
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
/* Option -load session|track|sbsector value */
|
||||
/* @param flag bit0= with adr_mode sbsector: adr_value is possibly 16 too high
|
||||
@return <=0 error , 1 success, 2 revoked by -reassure
|
||||
@ -18797,7 +18826,8 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
|
||||
"commit_eject","compliance",
|
||||
"dev","dialog","disk_dev_ino","disk_pattern","dummy","eject",
|
||||
"iso_rr_pattern","follow","format","fs","gid","grow_blindly","hardlinks",
|
||||
"history","indev","in_charset","joliet","list_delimiter","local_charset",
|
||||
"history","indev","in_charset","joliet",
|
||||
"list_delimiter","list_profiles","local_charset",
|
||||
"mark","md5","not_leaf","not_list","not_mgt",
|
||||
"options_from_file","osirrox","outdev","out_charset","overwrite",
|
||||
"pacifier","padding","path_list","pathspecs","pkt_output","print","prompt",
|
||||
@ -19273,6 +19303,10 @@ next_command:;
|
||||
} else if(strcmp(cmd,"list_formats")==0) {
|
||||
ret= Xorriso_option_list_formats(xorriso, 0);
|
||||
|
||||
} else if(strcmp(cmd,"list_profiles")==0) {
|
||||
(*idx)++;
|
||||
ret= Xorriso_option_list_profiles(xorriso, arg1, 0);
|
||||
|
||||
} else if(strcmp(cmd,"load")==0) {
|
||||
(*idx)+= 2;
|
||||
ret= Xorriso_option_load(xorriso, arg1, arg2, 0);
|
||||
|
Reference in New Issue
Block a user