libisoburn  1.5.4
About: libisoburn is a frontend for the libraries libburn and libisofs which enables creation and expansion of ISO-9660 filesystems on all media and file types supported by libburn. It implements the API and command interpreter of program xorriso, and installs this program as small dynamically linked binary. xorriso is suitable for incremental data backup and for production of bootable ISO 9660 images. A statically linked version is available as GNU xorriso.
  Fossies Dox: libisoburn-1.5.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

xorriso.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define Xorriso_includeD   yes
 
#define Xorriso_libburnia_xorrisO   yes
 
#define Xorriso_header_version_majoR   1
 These three release version numbers tell the revision of this header file and of the API which it describes. More...
 
#define Xorriso_header_version_minoR   5
 
#define Xorriso_header_version_micrO   4
 
#define Xorriso_program_patch_leveL   ""
 If needed: Something like ".pl01" to indicate a bug fix. More...
 
#define Xorriso_max_outlist_stacK   32
 Maximum number of stacked redirections. More...
 

Functions

void Xorriso__version (int *major, int *minor, int *micro)
 Obtain the three release version numbers of the library. More...
 
int Xorriso__is_compatible (int major, int minor, int micro, int flag)
 Check whether all features of header file xorriso.h from the given major.minor.micro revision triple can be delivered by the library version which is performing this call. More...
 
char * Xorriso__get_patch_level_text (int flag)
 
int Xorriso__preset_signal_behavior (int behavior, int flag)
 
int Xorriso_new (struct XorrisO **xorriso, char *progname, int flag)
 
int Xorriso_startup_libraries (struct XorrisO *xorriso, int flag)
 
int Xorriso_change_is_pending (struct XorrisO *xorriso, int flag)
 
int Xorriso_make_return_value (struct XorrisO *xorriso, int flag)
 
int Xorriso_destroy (struct XorrisO **xorriso, int flag)
 
int Xorriso_prescan_args (struct XorrisO *xorriso, int argc, char **argv, int flag)
 
int Xorriso_read_rc (struct XorrisO *xorriso, int flag)
 
int Xorriso_program_arg_bsl (struct XorrisO *xorriso, int argc, char ***argv, int flag)
 
int Xorriso_interpreter (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_execute_option (struct XorrisO *xorriso, char *line, int flag)
 
int Xorriso_parse_line (struct XorrisO *xorriso, char *line, char *prefix, char *separators, int max_words, int *argc, char ***argv, int flag)
 
void Xorriso__dispose_words (int *argc, char ***argv)
 
int Xorriso_dialog (struct XorrisO *xorriso, int flag)
 
int Xorriso_msgs_submit (struct XorrisO *xorriso, int error_code, char msg_text[], int os_errno, char severity[], int flag)
 Submit a problem message to the xorriso problem reporting and handling system. More...
 
int Xorriso_msgs_submit_void (void *xorriso, int error_code, char msg_text[], int os_errno, char severity[], int flag)
 Alternative call interface of Xorriso_msgs_submit with void* instead of struct XorrisO*. More...
 
int Xorriso_eval_problem_status (struct XorrisO *xorriso, int ret, int flag)
 Evaluate an advise whether to abort or whether to go on with option processing. More...
 
int Xorriso_set_problem_status (struct XorrisO *xorriso, char *severity, int flag)
 Set the current problem status of the xorriso handle. More...
 
int Xorriso__severity_cmp (char *sev1, char *sev2)
 Compare two severity texts for their severeness. More...
 
char * Xorriso__severity_list (int flag)
 Return a blank separated list of severity names. More...
 
int Xorriso_get_problem_status (struct XorrisO *xorriso, char severity[80], int flag)
 Obtain the current problem status of the xorriso handle. More...
 
int Xorriso_process_msg_queues (struct XorrisO *xorriso, int flag)
 Forward any pending messages from the library message queues to the xorriso message system which puts out on info channel. More...
 
int Xorriso_process_errfile (struct XorrisO *xorriso, int error_code, char msg_text[], int os_errno, int flag)
 Write a message for option -errfile_log. More...
 
int Xorriso_sieve_add_filter (struct XorrisO *xorriso, char *name, int channels, char *prefix, char *separators, int num_words, int *word_idx, int max_results, int flag)
 Add a filter rule to the message sieve. More...
 
int Xorriso_sieve_get_result (struct XorrisO *xorriso, char *name, int *argc, char ***argv, int *available, int flag)
 Inquire recorded results from a particular filter rule. More...
 
int Xorriso_sieve_clear_results (struct XorrisO *xorriso, int flag)
 Dispose all recorded results. More...
 
int Xorriso_sieve_dispose (struct XorrisO *xorriso, int flag)
 Dispose all filter rules. More...
 
int Xorriso_sieve_big (struct XorrisO *xorriso, int flag)
 Install a large sieve with filters for about any interesting message of xorriso. More...
 
int Xorriso_push_outlists (struct XorrisO *xorriso, int *stack_handle, int flag)
 Enable a new redirection of info and/or result channel. More...
 
int Xorriso_fetch_outlists (struct XorrisO *xorriso, int stack_handle, struct Xorriso_lsT **result_list, struct Xorriso_lsT **info_list, int flag)
 Obtain the currently collected text messages of redirected info and result channel. More...
 
int Xorriso_peek_outlists (struct XorrisO *xorriso, int stack_handle, int timeout, int flag)
 Inquire whether messages are pending in redirected result and info channel. More...
 
int Xorriso_pull_outlists (struct XorrisO *xorriso, int stack_handle, struct Xorriso_lsT **result_list, struct Xorriso_lsT **info_list, int flag)
 Disable the redirection given by stack_handle. More...
 
int Xorriso_start_msg_watcher (struct XorrisO *xorriso, int(*result_handler)(void *handle, char *text), void *result_handle, int(*info_handler)(void *handle, char *text), void *info_handle, int flag)
 Redirect output by Xorriso_push_outlists() and start a thread which fetches this output and performs a call of a given function with each message that is obtained. More...
 
int Xorriso_stop_msg_watcher (struct XorrisO *xorriso, int flag)
 Revoke output redirection by Xorriso_start_msg_watcher() and end the watcher thread. More...
 
char * Xorriso_lst_get_text (struct Xorriso_lsT *entry, int flag)
 Obtain the text message from the current list item. More...
 
struct Xorriso_lsTXorriso_lst_get_next (struct Xorriso_lsT *entry, int flag)
 Obtain the address of the next item in the chain of messages. More...
 
struct Xorriso_lsTXorriso_lst_get_prev (struct Xorriso_lsT *entry, int flag)
 Obtain the address of the previous item in the chain of messages. More...
 
int Xorriso_lst_destroy_all (struct Xorriso_lsT **lstring, int flag)
 Destroy all list items which are directly or indirectly connected to the given link item. More...
 
int Xorriso_option_abort_on (struct XorrisO *xorriso, char *severity, int flag)
 
int Xorriso_option_abstract_file (struct XorrisO *xorriso, char *name, int flag)
 
int Xorriso_option_acl (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_add (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_add_plainly (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_alter_date (struct XorrisO *xorriso, char *time_type, char *timestring, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_append_partition (struct XorrisO *xorriso, char *partno_text, char *type_text, char *image_path, int flag)
 
int Xorriso_option_application_id (struct XorrisO *xorriso, char *name, int flag)
 
int Xorriso_option_application_use (struct XorrisO *xorriso, char *path, int flag)
 
int Xorriso_option_as (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_assert_volid (struct XorrisO *xorriso, char *pattern, char *severity, int flag)
 
int Xorriso_option_auto_charset (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_backslash_codes (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_ban_stdio_write (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_biblio_file (struct XorrisO *xorriso, char *name, int flag)
 
int Xorriso_option_blank (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_boot_image (struct XorrisO *xorriso, char *form, char *treatment, int flag)
 
int Xorriso_option_calm_drive (struct XorrisO *xorriso, char *which, int flag)
 
int Xorriso_option_cdi (struct XorrisO *xorriso, char *iso_rr_path, int flag)
 
int Xorriso_option_cdx (struct XorrisO *xorriso, char *disk_path, int flag)
 
int Xorriso_option_changes_pending (struct XorrisO *xorriso, char *state, int flag)
 
int Xorriso_option_charset (struct XorrisO *xorriso, char *name, int flag)
 
int Xorriso_option_check_md5 (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_check_media (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_check_media_defaults (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_chgrpi (struct XorrisO *xorriso, char *gid, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_chmodi (struct XorrisO *xorriso, char *mode, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_chowni (struct XorrisO *xorriso, char *uid, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_clone (struct XorrisO *xorriso, char *origin, char *dest, int flag)
 
int Xorriso_option_close (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_close_damaged (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_close_filter_list (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_commit (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_commit_eject (struct XorrisO *xorriso, char *which, int flag)
 
int Xorriso_option_compare (struct XorrisO *xorriso, char *disk_path, char *iso_path, int flag)
 
int Xorriso_option_compliance (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_concat (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_copyright_file (struct XorrisO *xorriso, char *name, int flag)
 
int Xorriso_option_cp_clone (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_cpri (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_cpx (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_cut_out (struct XorrisO *xorriso, char *disk_path, char *start, char *count, char *iso_rr_path, int flag)
 
int Xorriso_option_dev (struct XorrisO *xorriso, char *adr, int flag)
 
int Xorriso_option_data_cache_size (struct XorrisO *xorriso, char *num_tiles, char *tile_blocks, int flag)
 
int Xorriso_option_devices (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_dialog (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_disk_dev_ino (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_disk_pattern (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_displacement (struct XorrisO *xorriso, char *value, int flag)
 
int Xorriso_option_drive_access (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_drive_class (struct XorrisO *xorriso, char *d_class, char *pattern, int flag)
 
int Xorriso_option_dummy (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_dvd_obs (struct XorrisO *xorriso, char *obs, int flag)
 
int Xorriso_option_early_stdio_test (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_ecma119_map (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_eject (struct XorrisO *xorriso, char *which, int flag)
 
int Xorriso_option_end (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_errfile_log (struct XorrisO *xorriso, char *mode, char *path, int flag)
 
int Xorriso_option_error_behavior (struct XorrisO *xorriso, char *occasion, char *behavior, int flag)
 
int Xorriso_option_external_filter (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_extract (struct XorrisO *xorriso, char *disk_path, char *iso_path, int flag)
 
int Xorriso_option_extract_boot_images (struct XorrisO *xorriso, char *disk_dir_path, int flag)
 
int Xorriso_option_extract_cut (struct XorrisO *xorriso, char *iso_rr_path, char *start, char *count, char *disk_path, int flag)
 
int Xorriso_option_file_name_limit (struct XorrisO *xorriso, char *value, int flag)
 
int Xorriso_option_file_size_limit (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_find (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_follow (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_fs (struct XorrisO *xorriso, char *size, int flag)
 
int Xorriso_option_getfacli (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_gid (struct XorrisO *xorriso, char *gid, int flag)
 
int Xorriso_option_grow_blindly (struct XorrisO *xorriso, char *msc2, int flag)
 
int Xorriso_option_hardlinks (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_help (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_hfsplus (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_hide (struct XorrisO *xorriso, char *hide_state, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_history (struct XorrisO *xorriso, char *line, int flag)
 
int Xorriso_option_iso_nowtime (struct XorrisO *xorriso, char *text, int flag)
 
int Xorriso_option_iso_rr_pattern (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_jigdo (struct XorrisO *xorriso, char *aspect, char *arg, int flag)
 
int Xorriso_option_joliet (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_joliet_map (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_launch_frontend (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_list_arg_sorting (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_list_delimiter (struct XorrisO *xorriso, char *text, int flag)
 
int Xorriso_option_list_extras (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_list_formats (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_list_profiles (struct XorrisO *xorriso, char *which, int flag)
 
int Xorriso_option_list_speeds (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_lnsi (struct XorrisO *xorriso, char *target, char *path, int flag)
 
int Xorriso_option_load (struct XorrisO *xorriso, char *adr_mode, char *adr_value, int flag)
 
int Xorriso_option_logfile (struct XorrisO *xorriso, char *channel, char *fileadr, int flag)
 
int Xorriso_option_lsi (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_lsx (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_map (struct XorrisO *xorriso, char *disk_path, char *iso_path, int flag)
 
int Xorriso_option_map_l (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_mark (struct XorrisO *xorriso, char *mark, int flag)
 
int Xorriso_option_md5 (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_mkdiri (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_modesty_on_drive (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_mount (struct XorrisO *xorriso, char *dev, char *adr_mode, char *adr, char *cmd, int flag)
 
int Xorriso_option_mount_opts (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_move (struct XorrisO *xorriso, char *origin, char *dest, int flag)
 
int Xorriso_option_msg_op (struct XorrisO *xorriso, char *what, char *arg, int flag)
 
int Xorriso_option_mvi (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_named_pipe_loop (struct XorrisO *xorriso, char *mode, char *stdin_pipe, char *stdout_pipe, char *stderr_pipe, int flag)
 
int Xorriso_option_no_rc (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_not_leaf (struct XorrisO *xorriso, char *pattern, int flag)
 
int Xorriso_option_not_list (struct XorrisO *xorriso, char *adr, int flag)
 
int Xorriso_option_not_mgt (struct XorrisO *xorriso, char *setting, int flag)
 
int Xorriso_option_not_paths (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_options_from_file (struct XorrisO *xorriso, char *adr, int flag)
 
int Xorriso_option_osirrox (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_overwrite (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_pacifier (struct XorrisO *xorriso, char *style, int flag)
 
int Xorriso_option_padding (struct XorrisO *xorriso, char *size, int flag)
 
int Xorriso_option_page (struct XorrisO *xorriso, int len, int width, int flag)
 
int Xorriso_option_paste_in (struct XorrisO *xorriso, char *iso_rr_path, char *disk_path, char *start, char *count, int flag)
 
int Xorriso_option_path_list (struct XorrisO *xorriso, char *adr, int flag)
 
int Xorriso_option_pathspecs (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_pkt_output (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_preparer_id (struct XorrisO *xorriso, char *name, int flag)
 
int Xorriso_option_print (struct XorrisO *xorriso, char *text, int flag)
 
int Xorriso_option_print_size (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_prog (struct XorrisO *xorriso, char *name, int flag)
 
int Xorriso_option_prompt (struct XorrisO *xorriso, char *text, int flag)
 
int Xorriso_option_prog_help (struct XorrisO *xorriso, char *name, int flag)
 
int Xorriso_option_publisher (struct XorrisO *xorriso, char *name, int flag)
 
int Xorriso_option_pvd_info (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_pwdi (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_pwdx (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_read_fs (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_read_mkisofsrc (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_reassure (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_report_about (struct XorrisO *xorriso, char *severity, int flag)
 
int Xorriso_option_report_el_torito (struct XorrisO *xorriso, char *form, int flag)
 
int Xorriso_option_report_system_area (struct XorrisO *xorriso, char *form, int flag)
 
int Xorriso_option_return_with (struct XorrisO *xorriso, char *severity, int exit_value, int flag)
 
int Xorriso_option_rmi (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_rockridge (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_rollback (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_rom_toc_scan (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_rr_reloc_dir (struct XorrisO *xorriso, char *name, int flag)
 
int Xorriso_option_scdbackup_tag (struct XorrisO *xorriso, char *list_path, char *record_name, int flag)
 
int Xorriso_option_scsi_dev_family (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_scsi_log (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_session_log (struct XorrisO *xorriso, char *path, int flag)
 
int Xorriso_option_setfacl_listi (struct XorrisO *xorriso, char *disk_path, int flag)
 
int Xorriso_option_setfacli (struct XorrisO *xorriso, char *acl_text, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_setfattri (struct XorrisO *xorriso, char *name, char *value, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_setfattr_listi (struct XorrisO *xorriso, char *path, int flag)
 
int Xorriso_option_set_filter (struct XorrisO *xorriso, char *name, int argc, char **argv, int *idx, int flag)
 
int Xorriso_option_sh_style_result (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_signal_handling (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_sleep (struct XorrisO *xorriso, char *duration, int flag)
 
int Xorriso_option_speed (struct XorrisO *xorriso, char *speed, int flag)
 
int Xorriso_option_split_size (struct XorrisO *xorriso, char *s, int flag)
 
int Xorriso_option_status (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_status_history_max (struct XorrisO *xorriso, int num1, int flag)
 
int Xorriso_option_stdio_sync (struct XorrisO *xorriso, char *rhythm, int flag)
 
int Xorriso_option_stream_recording (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_system_id (struct XorrisO *xorriso, char *name, int flag)
 
int Xorriso_option_tell_media_space (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_temp_mem_limit (struct XorrisO *xorriso, char *size, int flag)
 
int Xorriso_option_toc (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_toc_of (struct XorrisO *xorriso, char *which, int flag)
 
int Xorriso_option_truncate_overwritable (struct XorrisO *xorriso, char *adr_mode, char *adr_value, char *adjust, int flag)
 
int Xorriso_option_uid (struct XorrisO *xorriso, char *uid, int flag)
 
int Xorriso_option_unregister_filter (struct XorrisO *xorriso, char *name, int flag)
 
int Xorriso_option_update (struct XorrisO *xorriso, char *disk_path, char *iso_path, int flag)
 
int Xorriso_option_use_readline (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_use_immed_bit (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_version (struct XorrisO *xorriso, int flag)
 
int Xorriso_option_volid (struct XorrisO *xorriso, char *volid, int flag)
 
int Xorriso_option_volset_id (struct XorrisO *xorriso, char *name, int flag)
 
int Xorriso_option_volume_date (struct XorrisO *xorriso, char *time_type, char *timestring, int flag)
 
int Xorriso_option_write_type (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_xattr (struct XorrisO *xorriso, char *mode, int flag)
 
int Xorriso_option_zisofs (struct XorrisO *xorriso, char *mode, int flag)
 

Macro Definition Documentation

◆ Xorriso_header_version_majoR

#define Xorriso_header_version_majoR   1

These three release version numbers tell the revision of this header file and of the API which it describes.

They shall be memorized by applications at build time.

Since
0.5.8

Definition at line 75 of file xorriso.h.

◆ Xorriso_header_version_micrO

#define Xorriso_header_version_micrO   4

Definition at line 77 of file xorriso.h.

◆ Xorriso_header_version_minoR

#define Xorriso_header_version_minoR   5

Definition at line 76 of file xorriso.h.

◆ Xorriso_includeD

#define Xorriso_includeD   yes

Definition at line 49 of file xorriso.h.

◆ Xorriso_libburnia_xorrisO

#define Xorriso_libburnia_xorrisO   yes

Definition at line 64 of file xorriso.h.

◆ Xorriso_max_outlist_stacK

#define Xorriso_max_outlist_stacK   32

Maximum number of stacked redirections.

Definition at line 998 of file xorriso.h.

◆ Xorriso_program_patch_leveL

#define Xorriso_program_patch_leveL   ""

If needed: Something like ".pl01" to indicate a bug fix.

Normally empty.

Since
0.5.8

Definition at line 83 of file xorriso.h.

Function Documentation

◆ Xorriso__dispose_words()

void Xorriso__dispose_words ( int *  argc,
char ***  argv 
)

Definition at line 2120 of file parse_exec.c.

2121 {
2122  Sfile_make_argv("", "", argc, argv, 2); /* release memory */
2123 }
int Sfile_make_argv(char *progname, char *line, int *argc, char ***argv, int flag)
Definition: sfile.c:828

References Sfile_make_argv().

Referenced by Xorriso_msg_op_parse(), Xorriso_option_msg_op(), Xorriso_sieve_filter_msg(), and Xorriso_sieve_get_result().

◆ Xorriso__get_patch_level_text()

char* Xorriso__get_patch_level_text ( int  flag)

Definition at line 83 of file base_obj.c.

84 {
86 }
#define Xorriso_program_patch_leveL
If needed: Something like ".pl01" to indicate a bug fix.
Definition: xorriso.h:83

References Xorriso_program_patch_leveL.

◆ Xorriso__is_compatible()

int Xorriso__is_compatible ( int  major,
int  minor,
int  micro,
int  flag 
)

Check whether all features of header file xorriso.h from the given major.minor.micro revision triple can be delivered by the library version which is performing this call.

if (! Xorriso__is_compatible(Xorriso_header_version_majoR, Xorriso_header_version_minoR, Xorriso_header_version_micrO, 0)) ...refuse to start the program with this dynamic library version...

Since
0.5.8
Parameters
majorobtained at build time
minorobtained at build time
microobtained at build time
flagBitfield for control purposes. Unused yet. Submit 0.
Returns
1= library can work for caller 0= library is not usable in some aspects. Caller must restrict itself to an earlier API version or must not use this library at all.

Definition at line 72 of file base_obj.c.

73 {
74  int own_major, own_minor, own_micro;
75 
76  Xorriso__version(&own_major, &own_minor, &own_micro);
77  return(own_major > major ||
78  (own_major == major && (own_minor > minor ||
79  (own_minor == minor && own_micro >= micro))));
80 }
void Xorriso__version(int *major, int *minor, int *micro)
Obtain the three release version numbers of the library.
Definition: base_obj.c:64

References Xorriso__version().

Referenced by check_compatibility().

◆ Xorriso__preset_signal_behavior()

int Xorriso__preset_signal_behavior ( int  behavior,
int  flag 
)

Definition at line 790 of file base_obj.c.

791 {
792  if(behavior < 0 || behavior > 3)
793  return(0);
794  Xorriso_signal_behavioR= behavior;
795  return(1);
796 }
static int Xorriso_signal_behavioR
Definition: base_obj.c:61

References Xorriso_signal_behavioR.

Referenced by Xorriso_option_signal_handling().

◆ Xorriso__severity_cmp()

int Xorriso__severity_cmp ( char *  sev1,
char *  sev2 
)

Compare two severity texts for their severeness.

Unknown severity texts get defaulted to "FATAL".

Since
1.2.6
Parameters
sev1First severity text to compare
sev2Second severity text to compare
Returns
-1 sev1 is less severe than sev2 0 sev1 is equally severe to sev2 1 sev1 is more severe than sev2

Definition at line 401 of file lib_mgt.c.

402 {
403  int s1= 0x7fffffff, s2= 0x7fffffff, ret;
404  char *default_sev= "FATAL";
405 
406  ret= Xorriso__text_to_sev(sev1, &s1, 0);
407  if(ret <= 0)
408  Xorriso__text_to_sev(default_sev, &s1, 0);
409  ret= Xorriso__text_to_sev(sev2, &s2, 0);
410  if(ret <= 0)
411  Xorriso__text_to_sev(default_sev, &s2, 0);
412  if(s1 < s2)
413  return -1;
414  if(s1 > s2)
415  return(1);
416  return(0);
417 }
int Xorriso__text_to_sev(char *severity_name, int *severity_number, int flag)
Definition: lib_mgt.c:387

References Xorriso__text_to_sev().

Referenced by Xorriso_option_commit(), and Xorriso_option_msg_op().

◆ Xorriso__severity_list()

char* Xorriso__severity_list ( int  flag)

Return a blank separated list of severity names.

Sorted from low to high severity.

Since
1.2.6
Parameters
flagBitfield for control purposes (unused yet, submit 0)
Returns
A constant string with the severity names

Definition at line 420 of file lib_mgt.c.

421 {
422  return(burn_list_sev_texts(0));
423 }

Referenced by Xorriso_option_msg_op().

◆ Xorriso__version()

void Xorriso__version ( int *  major,
int *  minor,
int *  micro 
)

Obtain the three release version numbers of the library.

These are the numbers encountered by the application when linking with libisoburn, i.e. possibly not before run time. Better do not base the fundamental compatibility decision of an application on these numbers. For a reliable check use Xorriso__is_compatible().

Since
0.5.8
Parameters
majorThe maturity version (0 for now, as we are still learning)
minorThe development goal version.
microThe development step version. This has an additional meaning:
         Pare numbers indicate a version with frozen API. I.e. you can
         rely on the same set of features to be present in all
         published releases with that major.minor.micro combination.
         Features of a pare release will stay available and ABI
         compatible as long as the SONAME of libisoburn stays "1".
         Currently there are no plans to ever change the SONAME.

         Odd numbers indicate that API upgrades are in progress.
         I.e. new features might be already present or they might
         be still missing. Newly introduced features may be changed
         incompatibly or even be revoked before release of a pare
         version.
         So micro revisions {1,3,5,7,9} should never be used for
         dynamic linking unless the proper library match can be
         guaranteed by external circumstances.
Returns
1 success, <=0 might in future become an error indication

Definition at line 64 of file base_obj.c.

65 {
69 }
#define Xorriso_header_version_minoR
Definition: xorriso.h:76
#define Xorriso_header_version_micrO
Definition: xorriso.h:77
#define Xorriso_header_version_majoR
These three release version numbers tell the revision of this header file and of the API which it des...
Definition: xorriso.h:75

References Xorriso_header_version_majoR, Xorriso_header_version_micrO, and Xorriso_header_version_minoR.

Referenced by check_compatibility(), main(), and Xorriso__is_compatible().

◆ Xorriso_change_is_pending()

◆ Xorriso_destroy()

int Xorriso_destroy ( struct XorrisO **  xorriso,
int  flag 
)

Definition at line 592 of file base_obj.c.

593 {
594  struct XorrisO *m;
595  int i;
596 
597  m= *xorriso;
598  if(m==NULL)
599  return(0);
600 
601  /* Give up drives and image to unref all connected xorriso objects */
602  Xorriso_give_up_drive(m, 3);
603 
604  if(m->in_charset!=NULL)
605  free(m->in_charset);
606  if(m->out_charset!=NULL)
607  free(m->out_charset);
610  Xorriso_destroy_re(m,0);
622 
623 #ifdef Xorriso_with_libjtE
624  if(m->libjte_handle)
625  libjte_destroy(&(m->libjte_handle));
626 #endif
627 
630  for(i= 0; i < Xorriso_max_appended_partitionS; i++)
631  if(m->appended_partitions[i] != NULL)
632  free(m->appended_partitions[i]);
633 
634  Xorriso_detach_libraries(m, flag&1);
635 
637  pthread_mutex_destroy(&(m->lib_msg_queue_lock));
639  pthread_mutex_destroy(&(m->result_msglists_lock));
641  pthread_mutex_destroy(&(m->write_to_channel_lock));
643  pthread_mutex_destroy(&(m->problem_status_lock));
644  if(m->msg_watcher_lock_ini)
645  pthread_mutex_destroy(&(m->msg_watcher_lock));
646  if(m->msgw_fetch_lock_ini)
647  pthread_mutex_destroy(&(m->msgw_fetch_lock));
648  Xorriso_sieve_dispose(m, 0);
649 
650  free((char *) m);
651  *xorriso= NULL;
652  return(1);
653 }
int Exclusions_destroy(struct ExclusionS **o, int flag)
Definition: aux_objects.c:710
int Xorriso_lst_destroy_all(struct Xorriso_lsT **lstring, int flag)
Destroy all list items which are directly or indirectly connected to the given link item.
Definition: aux_objects.c:591
int Xorriso_destroy_node_array(struct XorrisO *xorriso, int flag)
Definition: base_obj.c:656
int Xorriso_destroy_re(struct XorrisO *m, int flag)
Definition: base_obj.c:563
int Xorriso_destroy_di_array(struct XorrisO *xorriso, int flag)
Definition: base_obj.c:699
int Xorriso_destroy_hln_array(struct XorrisO *xorriso, int flag)
Definition: base_obj.c:675
int Checkmediajob_destroy(struct CheckmediajoB **o, int flag)
Definition: check_media.c:604
int Sectorbitmap_destroy(struct SectorbitmaP **o, int flag)
Definition: check_media.c:276
int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag)
Definition: drive_mgt.c:762
int Xorriso_destroy_all_extf(struct XorrisO *xorriso, int flag)
Definition: filters.c:158
int Xorriso_detach_libraries(struct XorrisO *xorriso, int flag)
Definition: lib_mgt.c:258
struct ExclusionS * joliet_hidings
pthread_mutex_t result_msglists_lock
pthread_mutex_t msg_watcher_lock
int result_msglists_lock_ini
struct ExclusionS * disk_exclusions
int problem_status_lock_ini
char * out_charset
int lib_msg_queue_lock_ini
int msg_watcher_lock_ini
struct ExclusionS * iso_rr_hidings
struct SectorbitmaP * in_sector_map
char * appended_partitions[8]
struct ExclusionS * hfsplus_hidings
int write_to_channel_lock_ini
pthread_mutex_t problem_status_lock
char * in_charset
int msgw_fetch_lock_ini
pthread_mutex_t lib_msg_queue_lock
struct Xorriso_lsT * drive_blacklist
pthread_mutex_t write_to_channel_lock
struct Xorriso_lsT * jigdo_values
struct Xorriso_lsT * jigdo_params
struct Xorriso_lsT * drive_whitelist
struct CheckmediajoB * check_media_default
struct Xorriso_lsT * drive_greylist
pthread_mutex_t msgw_fetch_lock
int Xorriso_sieve_dispose(struct XorrisO *xorriso, int flag)
Dispose all filter rules.
Definition: text_io.c:1892
#define Xorriso_max_appended_partitionS

References XorrisO::appended_partitions, XorrisO::check_media_default, Checkmediajob_destroy(), XorrisO::disk_exclusions, XorrisO::drive_blacklist, XorrisO::drive_greylist, XorrisO::drive_whitelist, Exclusions_destroy(), XorrisO::hfsplus_hidings, XorrisO::in_charset, XorrisO::in_sector_map, XorrisO::iso_rr_hidings, XorrisO::jigdo_params, XorrisO::jigdo_values, XorrisO::joliet_hidings, XorrisO::lib_msg_queue_lock, XorrisO::lib_msg_queue_lock_ini, XorrisO::msg_watcher_lock, XorrisO::msg_watcher_lock_ini, XorrisO::msgw_fetch_lock, XorrisO::msgw_fetch_lock_ini, XorrisO::out_charset, XorrisO::problem_status_lock, XorrisO::problem_status_lock_ini, XorrisO::result_msglists_lock, XorrisO::result_msglists_lock_ini, Sectorbitmap_destroy(), XorrisO::write_to_channel_lock, XorrisO::write_to_channel_lock_ini, Xorriso_destroy_all_extf(), Xorriso_destroy_di_array(), Xorriso_destroy_hln_array(), Xorriso_destroy_node_array(), Xorriso_destroy_re(), Xorriso_detach_libraries(), Xorriso_give_up_drive(), Xorriso_lst_destroy_all(), Xorriso_max_appended_partitionS, and Xorriso_sieve_dispose().

Referenced by main(), Xorriso_execv(), and Xorriso_new().

◆ Xorriso_dialog()

int Xorriso_dialog ( struct XorrisO xorriso,
int  flag 
)

Definition at line 2181 of file parse_exec.c.

2182 {
2183  int ret, line_size= 2 * SfileadrL;
2184  char *line= NULL;
2185 
2186  Xorriso_alloc_meM(line, char, line_size);
2187 
2188  if(!xorriso->dialog)
2189  {ret= 1; goto ex;}
2190  if(xorriso->abort_on_is_default)
2191  Xorriso_option_abort_on(xorriso, "NEVER", 0);
2192  xorriso->is_dialog= 1;
2193  while(1) {
2194  if(xorriso->pending_option[0]!=0) {
2195  Xorriso_mark(xorriso,0);
2196  strcpy(line,xorriso->pending_option);
2197  xorriso->pending_option[0]= 0;
2198  } else {
2199  if(!xorriso->bar_is_fresh) {
2200  sprintf(xorriso->info_text,"============================\n");
2201  Xorriso_info(xorriso,0);
2202  xorriso->bar_is_fresh= 1;
2203  }
2204  sprintf(xorriso->info_text,"enter option and arguments :\n");
2205  Xorriso_info(xorriso,0);
2206  Xorriso_mark(xorriso,0);
2207  ret= Xorriso_dialog_input(xorriso,line, line_size, 4);
2208  if(ret<=0)
2209  break;
2210  }
2211  sprintf(xorriso->info_text,
2212  "==============================================================\n");
2213  Xorriso_info(xorriso,0);
2214 
2215  ret= Xorriso_execute_option(xorriso,line,1<<17);
2216  if(ret<0)
2217  goto ex;
2218  if(ret==3)
2219  goto ex;
2220  xorriso->did_something_useful= 1;
2221  xorriso->no_volset_present= 0; /* Re-enable "No ISO image present." */
2222  }
2223  ret= 1;
2224 ex:;
2225  xorriso->is_dialog= 0;
2226  Xorriso_free_meM(line);
2227  return(ret);
2228 }
#define SfileadrL
int Xorriso_option_abort_on(struct XorrisO *xorriso, char *in_severity, int flag)
Definition: opts_a_c.c:39
int Xorriso_execute_option(struct XorrisO *xorriso, char *line, int flag)
Definition: parse_exec.c:2126
#define Xorriso_free_meM(pt)
Definition: sfile.h:27
#define Xorriso_alloc_meM(pt, typ, count)
Definition: sfile.h:19
int no_volset_present
int bar_is_fresh
char info_text[10 *4096]
int abort_on_is_default
char pending_option[4096]
int did_something_useful
int Xorriso_info(struct XorrisO *xorriso, int flag)
Definition: text_io.c:2367
int Xorriso_mark(struct XorrisO *xorriso, int flag)
Definition: text_io.c:2403
int Xorriso_dialog_input(struct XorrisO *xorriso, char line[], int linesize, int flag)
Definition: text_io.c:316

References XorrisO::abort_on_is_default, XorrisO::bar_is_fresh, XorrisO::dialog, XorrisO::did_something_useful, XorrisO::info_text, XorrisO::is_dialog, XorrisO::no_volset_present, XorrisO::pending_option, SfileadrL, Xorriso_alloc_meM, Xorriso_dialog_input(), Xorriso_execute_option(), Xorriso_free_meM, Xorriso_info(), Xorriso_mark(), and Xorriso_option_abort_on().

Referenced by main().

◆ Xorriso_eval_problem_status()

int Xorriso_eval_problem_status ( struct XorrisO xorriso,
int  ret,
int  flag 
)

Evaluate an advise whether to abort or whether to go on with option processing.

This should be called after any option function was processed. It updates the problem status by processing the library message queues and then it uses this status and the submitted return value of the option function to evaluate the situation.

Parameters
xorrisoThe environment handle
retThe return value of the previously called option function
flagbit0= do not issue own event messages bit1= take xorriso->request_to_abort as reason for abort
Returns
Gives the advice: 2= pardon was given, go on 1= no problem, go on 0= function failed but xorriso would not abort, go on <0= do abort -1 = due to xorriso->problem_status or due to ret<0 -2 = due to xorriso->request_to_abort
Parameters
flagbit0= do not issue own event messages bit1= take xorriso->request_to_abort as reason for abort
Returns
Gives the advice: 2= pardon was given, go on 1= no problem, go on 0= function failed but xorriso would not abort, go on <0= do abort -1 = due to problem_status -2 = due to xorriso->request_to_abort

Definition at line 307 of file parse_exec.c.

308 {
309  static int sev= 0;
310  if(sev==0)
311  Xorriso__text_to_sev("SORRY", &sev, 0);
312 
313  if((flag&2) && xorriso->request_to_abort)
314  return(-2);
315 
316  Xorriso_process_msg_queues(xorriso, 0);
317  if(ret>0 && xorriso->problem_status <= 0)
318  return(1);
319 
320  if(xorriso->problem_status < xorriso->abort_on_severity &&
321  xorriso->problem_status > 0) {
322  if(xorriso->problem_status >= sev && !(flag&1)) {
323  sprintf(xorriso->info_text,
324  "xorriso : NOTE : Tolerated problem event of severity '%s'\n",
325  xorriso->problem_status_text);
326  Xorriso_info(xorriso, 0);/* submit not as problem event */
327  }
328  ret= 2;
329  } else if(xorriso->problem_status > 0) {
330  sprintf(xorriso->info_text,
331  "xorriso : aborting : -abort_on '%s' encountered '%s'\n",
332  xorriso->abort_on_text, xorriso->problem_status_text);
333  if(!(flag&1))
334  Xorriso_info(xorriso, 0);/* submit not as problem event */
335  ret= -1;
336  } else if(ret>0)
337  ret= 1;
338  else
339  ret= 2;
340  return(ret);
341 }
int Xorriso_process_msg_queues(struct XorrisO *xorriso, int flag)
Forward any pending messages from the library message queues to the xorriso message system which puts...
Definition: lib_mgt.c:519
char problem_status_text[20]
int abort_on_severity
char abort_on_text[20]
int request_to_abort
int problem_status

References XorrisO::abort_on_severity, XorrisO::abort_on_text, XorrisO::info_text, XorrisO::problem_status, XorrisO::problem_status_text, XorrisO::request_to_abort, Xorriso__text_to_sev(), Xorriso_info(), and Xorriso_process_msg_queues().

Referenced by Xorriso_add_tree(), Xorriso_check_burn_abort(), Xorriso_check_interval(), Xorriso_concat(), Xorriso_extract_boot_images(), Xorriso_find_compare(), Xorriso_findi(), Xorriso_findi_sorted(), Xorriso_findx(), Xorriso_genisofs(), Xorriso_genisofs_hide_list(), Xorriso_interpreter(), Xorriso_make_iso_write_opts(), Xorriso_option_add(), Xorriso_option_alter_date(), Xorriso_option_check_md5(), Xorriso_option_chgrpi(), Xorriso_option_chmodi(), Xorriso_option_chowni(), Xorriso_option_cp_clone(), Xorriso_option_cpri(), Xorriso_option_cpx(), Xorriso_option_getfacli(), Xorriso_option_hide(), Xorriso_option_map_l(), Xorriso_option_mkdiri(), Xorriso_option_mvi(), Xorriso_option_options_from_file(), Xorriso_option_path_list(), Xorriso_option_rmi(), Xorriso_option_set_filter(), Xorriso_option_setfacli(), Xorriso_option_setfattri(), Xorriso_prescan_args(), Xorriso_read_rc(), Xorriso_restore(), Xorriso_restore_disk_object(), Xorriso_restore_node_array(), Xorriso_restore_sorted(), Xorriso_restore_tree(), Xorriso_rmi(), Xorriso_rmx(), Xorriso_setfattr(), Xorriso_tree_restore_node(), and Xorriso_write_session().

◆ Xorriso_execute_option()

int Xorriso_execute_option ( struct XorrisO xorriso,
char *  line,
int  flag 
)

Definition at line 2126 of file parse_exec.c.

2133 {
2134  int ret,argc= 0, idx= 1;
2135  char **argv= NULL;
2136  double tdiff;
2137  struct timeval tv;
2138 
2139  gettimeofday(&tv, NULL);
2140  Xorriso_reset_counters(xorriso,0);
2141  xorriso->idle_time= 0.0;
2142  tdiff= tv.tv_sec+(1.e-6*(double) tv.tv_usec);
2143 
2144  ret= Xorriso_parse_line(xorriso, line, "", "", 0, &argc, &argv, 32 | 64);
2145  if(ret <= 0)
2146  goto ex;
2147 
2148  if(argc<2)
2149  {ret= 1; goto ex;}
2150  if(argv[1][0]=='#')
2151  {ret= 1; goto ex;}
2152 
2153  ret= Xorriso_interpreter(xorriso, argc, argv, &idx, flag&0xffff);
2154  if(ret<0)
2155  goto ex;
2156  gettimeofday(&tv, NULL);
2157  tdiff= tv.tv_sec+(1.e-6*(double) tv.tv_usec)-tdiff-xorriso->idle_time;
2158  if(tdiff<0.001)
2159  tdiff= 0.001;
2160  if(xorriso->error_count>0) {
2161  sprintf(xorriso->info_text,
2162  "----------------------------- %7.f errors encountered\n",
2163  xorriso->error_count);
2164  Xorriso_info(xorriso,!(flag&(1<<16)));
2165  }
2166 
2167  /* ??? >>> print elapsed time tdiff ? */;
2168 
2169  if((flag&(1<<17)) && !xorriso->bar_is_fresh) {
2170  sprintf(xorriso->info_text,"============================\n");
2171  Xorriso_info(xorriso,0);
2172  xorriso->bar_is_fresh= 1;
2173  }
2174  Xorriso_reset_counters(xorriso,0);
2175 ex:;
2176  Sfile_make_argv("", "", &argc, &argv, 2); /* release memory */
2177  return(ret);
2178 }
int Xorriso_parse_line(struct XorrisO *xorriso, char *line, char *prefix, char *separators, int max_words, int *argc, char ***argv, int flag)
Definition: parse_exec.c:2066
int Xorriso_interpreter(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: parse_exec.c:949
double error_count
double idle_time
int Xorriso_reset_counters(struct XorrisO *xorriso, int flag)
Definition: text_io.c:4065

References XorrisO::bar_is_fresh, XorrisO::error_count, XorrisO::idle_time, XorrisO::info_text, Sfile_make_argv(), Xorriso_info(), Xorriso_interpreter(), Xorriso_parse_line(), and Xorriso_reset_counters().

Referenced by Xorriso_dialog(), Xorriso_named_pipe_loop(), Xorriso_option_options_from_file(), and Xorriso_report_system_area().

◆ Xorriso_fetch_outlists()

int Xorriso_fetch_outlists ( struct XorrisO xorriso,
int  stack_handle,
struct Xorriso_lsT **  result_list,
struct Xorriso_lsT **  info_list,
int  flag 
)

Obtain the currently collected text messages of redirected info and result channel.

The messages are handed out as two lists. Both lists have to be disposed via Xorriso_lst_destroy_all() when they are no longer needed. The message lists are either NULL or represented by their first Xorriso_lsT item.

This call is safe for being used by a concurrent thread while a xorriso API call is being executed on the same struct XorrisO. In such a situation, it should not be used with high frequency in order not to hamper the ongoing xorriso operation by blocking its message output facility. A hundred times per second should be enough.

Since
1.2.6
Parameters
xorrisoThe environment handle
stack_handleAn id number returned by Xorriso_push_outlists() and not yet revoked by Xorriso_pull_outlists(). Submit -1 to address the most recent valid id.
result_listResult and mark messages (usually directed to stdout)
info_listInfo and mark messages (usually directed to stderr)
flagBitfield for control purposes bit0= fetch result channel bit1= fetch info channel If bit0 and bit1 are 0, both channels get fetched.
Returns
1 on success, <=0 if failure

Definition at line 1206 of file text_io.c.

1209 {
1210  int ret, locked= 0;
1211 
1212 #ifdef Xorriso_fetch_with_msg_queueS
1213 
1214  ret= Xorriso_process_msg_queues(xorriso, 0);
1215  if(ret <= 0)
1216  goto ex;
1217 
1218 #endif /* Xorriso_fetch_with_msg_queueS */
1219 
1220  if((flag & 3) == 0)
1221  flag|= 3;
1222 
1223  ret= Xorriso_lock_outlists(xorriso, 0);
1224  if(ret <= 0)
1225  goto ex;
1226  locked= 1;
1227 
1228  if(stack_handle == -1)
1229  stack_handle= xorriso->msglist_stackfill - 1;
1230  if(stack_handle < 0 || stack_handle >= xorriso->msglist_stackfill) {
1231  Xorriso_unlock_outlists(xorriso, 0);
1232  locked= 0;
1233  Xorriso_msgs_submit(xorriso, 0,
1234  "Program error: Wrong message output redirection stack handle",
1235  0, "FATAL", 0);
1236  ret= -1; goto ex;
1237  }
1238 
1239  if(flag & 1) {
1240  *result_list= xorriso->result_msglists[stack_handle];
1241  xorriso->result_msglists[stack_handle]= NULL;
1242  }
1243  if(flag & 2) {
1244  *info_list= xorriso->info_msglists[stack_handle];
1245  xorriso->info_msglists[stack_handle]= NULL;
1246  }
1247 
1248  ret= 1;
1249 ex:;
1250  if(locked)
1251  Xorriso_unlock_outlists(xorriso, 0);
1252  return(ret);
1253 }
int msglist_stackfill
struct Xorriso_lsT * info_msglists[Xorriso_max_outlist_stacK]
struct Xorriso_lsT * result_msglists[Xorriso_max_outlist_stacK]
int Xorriso_msgs_submit(struct XorrisO *xorriso, int error_code, char msg_text[], int os_errno, char severity[], int flag)
Submit a problem message to the xorriso problem reporting and handling system.
Definition: text_io.c:2504
static int Xorriso_unlock_outlists(struct XorrisO *xorriso, int flag)
Definition: text_io.c:875
static int Xorriso_lock_outlists(struct XorrisO *xorriso, int flag)
Definition: text_io.c:865

References XorrisO::info_msglists, XorrisO::msglist_stackfill, XorrisO::result_msglists, Xorriso_lock_outlists(), Xorriso_msgs_submit(), Xorriso_process_msg_queues(), and Xorriso_unlock_outlists().

Referenced by Xorriso_interpreter(), and Xorriso_msg_watcher().

◆ Xorriso_get_problem_status()

int Xorriso_get_problem_status ( struct XorrisO xorriso,
char  severity[80],
int  flag 
)

Obtain the current problem status of the xorriso handle.

Parameters
xorrisoThe environment handle
severityThe severity text matching the current problem status
flagUnused yet. Submit 0.
Returns
The severity rank number. 0= no problem occurred.

Definition at line 215 of file parse_exec.c.

217 {
218  if(flag & 1) {
219  strcpy(severity, xorriso->eternal_problem_status_text);
220  return(xorriso->eternal_problem_status);
221  } else {
222  strcpy(severity, xorriso->problem_status_text);
223  return(xorriso->problem_status);
224  }
225 }
char eternal_problem_status_text[20]
int eternal_problem_status

References XorrisO::eternal_problem_status, XorrisO::eternal_problem_status_text, XorrisO::problem_status, and XorrisO::problem_status_text.

Referenced by Xorriso_option_commit().

◆ Xorriso_interpreter()

int Xorriso_interpreter ( struct XorrisO xorriso,
int  argc,
char **  argv,
int *  idx,
int  flag 
)

Definition at line 949 of file parse_exec.c.

955 {
956  int ret, was_dashed, end_ret, num1, num2, cmd_data_size= 2 * SfileadrL;
957  int mem_idx, arg_count, i;
958  char *cmd, *original_cmd, *cmd_data= NULL, *arg1, *arg2, *arg3, *arg4;
959 
960  Xorriso_alloc_meM(cmd_data, char, cmd_data_size);
961 
962  if(xorriso==NULL)
963  {ret= 0; goto ex;}
964  if(xorriso->is_dialog) {
965  xorriso->result_line_counter= xorriso->result_page_counter= 0;
966  if(xorriso->result_page_length<0)
967  xorriso->result_page_length= -xorriso->result_page_length;
968  }
969 
970 next_command:;
971  if(flag&2) {
972  ret= 1;
973  if(xorriso->argument_emulation==1)
974  ret= Xorriso_as_genisofs(xorriso, argc, argv, idx, 0);
975  else if(xorriso->argument_emulation==2)
976  ret= Xorriso_as_cdrskin(xorriso, argc, argv, idx, 0);
977  if(xorriso->argument_emulation>0) {
978  xorriso->argument_emulation= 0;
979  if(ret<=0)
980  goto eval_any_problems;
981  if((*idx)>=argc)
982  {ret= 1; goto ex;}
983  }
984  if((xorriso->arrange_args || (flag & 8)) && !(flag & (4 | 16))) {
985  ret= Xorriso_exec_args_sorted(xorriso, argc, argv, idx, 0);
986  goto ex;
987  }
988  }
989 
990  ret= Xorriso_count_args(xorriso, argc - *idx, argv + *idx, &arg_count, 1);
991  if((ret == 1 || ret == 2) &&
992  strcmp(argv[*idx], xorriso->list_delimiter) != 0) {
993  sprintf(xorriso->info_text, "Command: %s", argv[*idx]);
994  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
995  for(i= 1; i <= arg_count && *idx + i < argc; i++) {
996  sprintf(xorriso->info_text, "Parameter: %s", argv[*idx + i]);
997  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
998  }
999  if(*idx + arg_count >= argc) {
1000  sprintf(xorriso->info_text, "Missing arguments: %d",
1001  *idx + arg_count + 1 - argc);
1002  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
1003  }
1004  }
1005 
1006  xorriso->prepended_wd= 0;
1007  xorriso->request_to_abort= xorriso->request_not_to_ask= 0;
1008  Xorriso_set_problem_status(xorriso, "", 0);
1009  if((*idx)<argc)
1010  original_cmd= cmd= argv[*idx];
1011  else
1012  original_cmd= cmd= "";
1013  if(xorriso->add_plainly==3 && cmd[0] && !xorriso->is_dialog) {
1014  (*idx)++;
1015  goto add_plain_argument;
1016  }
1017  was_dashed= 0;
1018  ret= Xorriso_normalize_command(xorriso, original_cmd, -1,
1019  cmd_data, cmd_data_size, &cmd, 0);
1020  if(ret<0)
1021  goto eval_any_problems;
1022  was_dashed= ret;
1023 
1024  (*idx)++;
1025  if((*idx)<argc)
1026  arg1= argv[(*idx)];
1027  else
1028  arg1= "";
1029  if((*idx)+1<argc)
1030  arg2= argv[(*idx)+1];
1031  else
1032  arg2= "";
1033  if((*idx) + 2 < argc)
1034  arg3= argv[(*idx) + 2];
1035  else
1036  arg3= "";
1037 
1038  ret= 1;
1039  if(cmd[0]=='#' || cmd[0]==0) {
1040  /* ignore comment line and empty option */;
1041 
1042  } else if(strcmp(cmd,"abort_on")==0) {
1043  (*idx)++;
1044  ret= Xorriso_option_abort_on(xorriso, arg1, 0);
1045 
1046  } else if(strcmp(cmd,"abstract_file")==0) {
1047  (*idx)++;
1048  Xorriso_option_abstract_file(xorriso, arg1, 0);
1049 
1050  } else if(strcmp(cmd,"acl")==0) {
1051  (*idx)++;
1052  ret= Xorriso_option_acl(xorriso, arg1, 0);
1053 
1054  } else if(strcmp(cmd,"add")==0) {
1055  ret= Xorriso_option_add(xorriso, argc, argv, idx, 0);
1056 
1057  } else if(strcmp(cmd,"add_plainly")==0) {
1058  (*idx)++;
1059  ret= Xorriso_option_add_plainly(xorriso, arg1, 0);
1060 
1061  } else if(strcmp(cmd,"alter_date")==0 || strcmp(cmd,"alter_date_r")==0) {
1062  (*idx)+= 2;
1063  ret= Xorriso_option_alter_date(xorriso, arg1, arg2, argc, argv, idx,
1064  strlen(cmd)>10);
1065 
1066  } else if(strcmp(cmd,"append_partition")==0) {
1067  (*idx)+= 3;
1068  ret= Xorriso_option_append_partition(xorriso, arg1, arg2, arg3, 0);
1069 
1070  } else if(strcmp(cmd,"application_id")==0) {
1071  (*idx)++;
1072  ret= Xorriso_option_application_id(xorriso, arg1, 0);
1073 
1074  } else if(strcmp(cmd,"application_use") == 0) {
1075  (*idx)++;
1076  ret= Xorriso_option_application_use(xorriso, arg1, 0);
1077 
1078  } else if(strcmp(cmd,"as")==0) {
1079  ret= Xorriso_option_as(xorriso, argc, argv, idx, 0);
1080 
1081  } else if(strcmp(cmd,"assert_volid")==0) {
1082  (*idx)+= 2;
1083  ret= Xorriso_option_assert_volid(xorriso, arg1, arg2, 0);
1084 
1085  } else if(strcmp(cmd,"auto_charset")==0) {
1086  (*idx)++;
1087  ret= Xorriso_option_auto_charset(xorriso, arg1, 0);
1088 
1089  } else if(strcmp(cmd,"backslash_codes")==0) {
1090  (*idx)++;
1091  ret= Xorriso_option_backslash_codes(xorriso, arg1, 0);
1092 
1093  } else if(strcmp(cmd,"ban_stdio_write")==0) {
1094  ret= Xorriso_option_ban_stdio_write(xorriso, 0);
1095 
1096  } else if(strcmp(cmd,"biblio_file")==0) {
1097  (*idx)++;
1098  Xorriso_option_biblio_file(xorriso, arg1, 0);
1099 
1100  } else if(strcmp(cmd,"blank")==0) {
1101  (*idx)++;
1102  ret= Xorriso_option_blank(xorriso, arg1, 0);
1103 
1104  } else if(strcmp(cmd,"boot_image")==0) {
1105  (*idx)+= 2;
1106  ret= Xorriso_option_boot_image(xorriso, arg1, arg2, 0);
1107 
1108  } else if(strcmp(cmd,"calm_drive")==0) {
1109  (*idx)++;
1110  ret= Xorriso_option_calm_drive(xorriso, arg1, 0);
1111 
1112  } else if(strcmp(cmd,"cd")==0 || strcmp(cmd,"cdi")==0) {
1113  (*idx)++;
1114  ret= Xorriso_option_cdi(xorriso, arg1, 0);
1115 
1116  } else if(strcmp(cmd,"cdx")==0) {
1117  (*idx)++;
1118  ret= Xorriso_option_cdx(xorriso, arg1, 0);
1119 
1120  } else if(strcmp(cmd, "changes_pending")==0) {
1121  (*idx)++;
1122  ret= Xorriso_option_changes_pending(xorriso, arg1, 0);
1123 
1124  } else if(strcmp(cmd,"charset")==0) {
1125  (*idx)++;
1126  ret= Xorriso_option_charset(xorriso, arg1, 3);
1127 
1128  } else if(strcmp(cmd,"check_md5")==0) {
1129  ret= Xorriso_option_check_md5(xorriso, argc, argv, idx, 0);
1130 
1131  } else if(strcmp(cmd,"check_md5_r")==0) {
1132  ret= Xorriso_option_check_md5(xorriso, argc, argv, idx, 8);
1133 
1134  } else if(strcmp(cmd,"check_media")==0) {
1135  ret= Xorriso_option_check_media(xorriso, argc, argv, idx, 0);
1136 
1137  } else if(strcmp(cmd,"check_media_defaults")==0) {
1138  ret= Xorriso_option_check_media_defaults(xorriso, argc, argv, idx, 0);
1139 
1140  } else if(strcmp(cmd,"chgrp")==0 || strcmp(cmd,"chgrpi")==0) {
1141  (*idx)+= 1;
1142  ret= Xorriso_option_chgrpi(xorriso, arg1, argc, argv, idx, 0);
1143 
1144  } else if(strcmp(cmd,"chgrp_r")==0 || strcmp(cmd,"chgrp_ri")==0) {
1145  (*idx)+= 1;
1146  ret= Xorriso_option_chgrpi(xorriso, arg1, argc, argv, idx, 1);
1147 
1148  } else if(strcmp(cmd,"chmod")==0 || strcmp(cmd,"chmodi")==0) {
1149  (*idx)+= 1;
1150  ret= Xorriso_option_chmodi(xorriso, arg1, argc, argv, idx, 0);
1151 
1152  } else if(strcmp(cmd,"chmod_r")==0 || strcmp(cmd,"chmod_ri")==0) {
1153  (*idx)+= 1;
1154  ret= Xorriso_option_chmodi(xorriso, arg1, argc, argv, idx, 1);
1155 
1156  } else if(strcmp(cmd,"chown_r")==0 || strcmp(cmd,"chown_ri")==0) {
1157  (*idx)+= 1;
1158  ret= Xorriso_option_chowni(xorriso, arg1, argc, argv, idx, 1);
1159 
1160  } else if(strcmp(cmd,"chown")==0 || strcmp(cmd,"chowni")==0) {
1161  (*idx)+= 1;
1162  ret= Xorriso_option_chowni(xorriso, arg1, argc, argv, idx, 0);
1163 
1164  } else if(strcmp(cmd,"clone")==0) {
1165  (*idx)+= 2;
1166  ret= Xorriso_option_clone(xorriso, arg1, arg2, 1);
1167 
1168  } else if(strcmp(cmd,"close")==0) {
1169  (*idx)++;
1170  ret= Xorriso_option_close(xorriso, arg1, 0);
1171 
1172  } else if(strcmp(cmd,"close_damaged")==0) {
1173  (*idx)++;
1174  ret= Xorriso_option_close_damaged(xorriso, arg1, 0);
1175 
1176  } else if(strcmp(cmd,"close_filter_list")==0) {
1177  ret= Xorriso_option_close_filter_list(xorriso, 0);
1178 
1179  } else if(strcmp(cmd,"commit")==0) {
1180  ret= Xorriso_option_commit(xorriso, 0);
1181 
1182  } else if(strcmp(cmd,"commit_eject")==0) {
1183  (*idx)++;
1184  ret= Xorriso_option_commit_eject(xorriso, arg1, 0);
1185 
1186  } else if(strcmp(cmd,"compare")==0) {
1187  (*idx)+= 2;
1188  ret= Xorriso_option_compare(xorriso, arg1, arg2, 1);
1189 
1190  } else if(strcmp(cmd,"compare_l")==0) {
1191  ret= Xorriso_option_map_l(xorriso, argc, argv, idx, 1<<8);
1192 
1193  } else if(strcmp(cmd,"compare_r")==0) {
1194  (*idx)+= 2;
1195  ret= Xorriso_option_compare(xorriso, arg1, arg2, 1|8);
1196 
1197  } else if(strcmp(cmd,"compliance")==0) {
1198  (*idx)++;
1199  Xorriso_option_compliance(xorriso, arg1, 0);
1200 
1201  } else if(strcmp(cmd,"concat") == 0) {
1202  ret= Xorriso_option_concat(xorriso, argc, argv, idx, 0);
1203 
1204  } else if(strcmp(cmd,"copyright_file")==0) {
1205  (*idx)++;
1206  Xorriso_option_copyright_file(xorriso, arg1, 0);
1207 
1208  } else if(strcmp(cmd,"cp_clone") == 0) {
1209  ret= Xorriso_option_cp_clone(xorriso, argc, argv, idx, 0);
1210 
1211  } else if(strcmp(cmd,"cp_rx")==0 || strcmp(cmd,"cp_rax")==0) {
1212  ret= Xorriso_option_cpx(xorriso, argc, argv, idx,
1213  1|((strcmp(cmd,"cp_rax")==0)<<1));
1214 
1215  } else if(strcmp(cmd,"cpr")==0 || strcmp(cmd,"cpri")==0) {
1216  ret= Xorriso_option_cpri(xorriso, argc, argv, idx, 0);
1217 
1218  } else if(strcmp(cmd,"cpx")==0 || strcmp(cmd,"cpax")==0) {
1219  ret= Xorriso_option_cpx(xorriso, argc, argv, idx,
1220  (strcmp(cmd,"cpax")==0)<<1);
1221 
1222  } else if(strcmp(cmd,"cut_out")==0) {
1223  (*idx)+= 4;
1224  if((*idx)>argc) {
1225  sprintf(xorriso->info_text,
1226  "-cut_out: Not enough arguments. Needed are: disk_path start count so_rr_path");
1227  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
1228  ret= 0;
1229  } else
1230  ret= Xorriso_option_cut_out(xorriso, arg1, arg2,
1231  argv[(*idx)-2], argv[(*idx)-1], 0);
1232 
1233  } else if(strcmp(cmd,"data_cache_size")==0) {
1234  (*idx)+= 2;
1235  ret= Xorriso_option_data_cache_size(xorriso, arg1, arg2, 0);
1236 
1237  } else if(strcmp(cmd,"dev")==0) {
1238  (*idx)++;
1239  ret= Xorriso_option_dev(xorriso, arg1, 3);
1240 
1241  } else if(strcmp(cmd,"device_links")==0) {
1242  ret= Xorriso_option_devices(xorriso, 1);
1243 
1244  } else if(strcmp(cmd,"devices")==0) {
1245  ret= Xorriso_option_devices(xorriso, 0);
1246 
1247  } else if(strcmp(cmd,"dialog")==0) {
1248  (*idx)++;
1249  ret= Xorriso_option_dialog(xorriso, arg1, 0);
1250 
1251  } else if(strcmp(cmd,"disk_dev_ino")==0) {
1252  (*idx)++;
1253  ret= Xorriso_option_disk_dev_ino(xorriso, arg1, 0);
1254 
1255  } else if(strcmp(cmd,"displacement")==0) {
1256  (*idx)++;
1257  ret= Xorriso_option_displacement(xorriso, arg1, 0);
1258 
1259  } else if(strcmp(cmd,"disk_pattern")==0) {
1260  (*idx)++;
1261  ret= Xorriso_option_disk_pattern(xorriso, arg1, 0);
1262 
1263  } else if(strcmp(cmd,"drive_access")==0) {
1264  (*idx)++;
1265  ret= Xorriso_option_drive_access(xorriso, arg1, 0);
1266 
1267  } else if(strcmp(cmd,"drive_class")==0) {
1268  (*idx)+= 2;
1269  ret= Xorriso_option_drive_class(xorriso, arg1, arg2, 0);
1270 
1271  } else if(strcmp(cmd,"du")==0 || strcmp(cmd,"dui")==0 ||
1272  strcmp(cmd,"dus")==0 || strcmp(cmd,"dusi")==0) {
1273  ret= Xorriso_option_lsi(xorriso, argc, argv, idx, (cmd[2]!='s')|4);
1274 
1275  } else if(strcmp(cmd,"dummy")==0) {
1276  (*idx)++;
1277  ret= Xorriso_option_dummy(xorriso, arg1, 0);
1278 
1279  } else if(strcmp(cmd,"dvd_obs")==0) {
1280  (*idx)++;
1281  ret= Xorriso_option_dvd_obs(xorriso, arg1, 0);
1282 
1283  } else if(strcmp(cmd,"dux")==0 || strcmp(cmd,"dusx")==0) {
1284  ret= Xorriso_option_lsx(xorriso, argc, argv, idx, (cmd[2]!='s')|4);
1285 
1286  } else if(strcmp(cmd,"early_stdio_test")==0) {
1287  (*idx)++;
1288  ret= Xorriso_option_early_stdio_test(xorriso, arg1, 0);
1289 
1290  } else if(strcmp(cmd,"ecma119_map")==0) {
1291  (*idx)++;
1292  ret= Xorriso_option_ecma119_map(xorriso, arg1, 0);
1293 
1294  } else if(strcmp(cmd,"eject")==0) {
1295  (*idx)++;
1296  ret= Xorriso_option_eject(xorriso, arg1, 0);
1297 
1298  } else if(strcmp(cmd,"end")==0) {
1299  end_ret= Xorriso_option_end(xorriso, 0);
1300  ret= Xorriso_eval_problem_status(xorriso, ret, 0);
1301  if(ret<0)
1302  goto ex;
1303  if(end_ret!=2)
1304  {ret= 3; goto ex;}
1305 
1306  } else if(strcmp(cmd,"errfile_log")==0) {
1307  (*idx)+= 2;
1308  ret= Xorriso_option_errfile_log(xorriso, arg1, arg2, 0);
1309 
1310  } else if(strcmp(cmd,"error_behavior")==0) {
1311  (*idx)+= 2;
1312  ret= Xorriso_option_error_behavior(xorriso, arg1, arg2, 0);
1313 
1314  } else if(strcmp(cmd,"external_filter")==0) {
1315  ret= Xorriso_option_external_filter(xorriso, argc, argv, idx, 0);
1316 
1317  } else if(strcmp(cmd,"extract")==0) {
1318  (*idx)+= 2;
1319  ret= Xorriso_option_extract(xorriso, arg1, arg2, 0);
1320 
1321  } else if(strcmp(cmd,"extract_boot_images")==0) {
1322  (*idx)+= 1;
1323  if((*idx)>argc) {
1324  sprintf(xorriso->info_text,
1325  "-extract_boot_images: Empty disk_path cannot be used as target directory");
1326  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
1327  ret= 0;
1328  } else {
1329  ret= Xorriso_option_extract_boot_images(xorriso, arg1, 0);
1330  }
1331 
1332  } else if(strcmp(cmd,"extract_cut")==0) {
1333  (*idx)+= 4;
1334  if((*idx)>argc) {
1335  sprintf(xorriso->info_text,
1336  "-extract_cut: Not enough arguments. Needed are: disk_path start count iso_rr_path");
1337  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
1338  ret= 0;
1339  } else
1340  ret= Xorriso_option_extract_cut(xorriso, arg1, arg2,
1341  argv[(*idx)-2], argv[(*idx)-1], 0);
1342 
1343  } else if(strcmp(cmd,"extract_l")==0) {
1344  ret= Xorriso_option_map_l(xorriso, argc, argv, idx, 3<<8);
1345 
1346  } else if(strcmp(cmd,"extract_single")==0) {
1347  (*idx)+= 2;
1348  ret= Xorriso_option_extract(xorriso, arg1, arg2, 32);
1349 
1350  } else if(strcmp(cmd,"file_name_limit")==0) {
1351  (*idx)++;
1352  ret= Xorriso_option_file_name_limit(xorriso, arg1, 0);
1353 
1354  } else if(strcmp(cmd,"file_size_limit")==0) {
1355  ret= Xorriso_option_file_size_limit(xorriso, argc, argv, idx, 0);
1356 
1357  } else if(strcmp(cmd,"find")==0 || strcmp(cmd,"findi")==0) {
1358  ret= Xorriso_option_find(xorriso, argc, argv, idx, 0);
1359 
1360  } else if(strcmp(cmd,"findx")==0) {
1361  ret= Xorriso_option_find(xorriso, argc, argv, idx, 1);
1362 
1363  } else if(strcmp(cmd,"follow")==0) {
1364  (*idx)++;
1365  ret= Xorriso_option_follow(xorriso, arg1, 0);
1366 
1367  } else if(strcmp(cmd,"for_backup")==0) {
1368  Xorriso_option_hardlinks(xorriso, "on", 0);
1369  Xorriso_option_acl(xorriso, "on", 0);
1370  Xorriso_option_xattr(xorriso, "any", 0);
1371  Xorriso_option_md5(xorriso, "on", 0);
1372  ret= 1;
1373 
1374  } else if(strcmp(cmd,"format")==0) {
1375  (*idx)++;
1376  ret= Xorriso_option_blank(xorriso, arg1, 1);
1377 
1378  } else if(strcmp(cmd,"fs")==0) {
1379  (*idx)++;
1380  ret= Xorriso_option_fs(xorriso, arg1, 0);
1381 
1382  } else if(strcmp(cmd,"getfacl")==0 || strcmp(cmd,"getfacli")==0) {
1383  ret= Xorriso_option_getfacli(xorriso, argc, argv, idx, 0);
1384 
1385  } else if(strcmp(cmd,"getfacl_r")==0 || strcmp(cmd,"getfacl_ri")==0) {
1386  ret= Xorriso_option_getfacli(xorriso, argc, argv, idx, 1);
1387 
1388  } else if(strcmp(cmd,"getfattr")==0 || strcmp(cmd,"getfattri")==0) {
1389  ret= Xorriso_option_getfacli(xorriso, argc, argv, idx, 2);
1390 
1391  } else if(strcmp(cmd,"getfattr_r")==0 || strcmp(cmd,"getfattr_ri")==0) {
1392  ret= Xorriso_option_getfacli(xorriso, argc, argv, idx, 1 | 2);
1393 
1394  } else if(strcmp(cmd,"gid")==0) {
1395  (*idx)++;
1396  ret= Xorriso_option_gid(xorriso,arg1,0);
1397 
1398  } else if(strcmp(cmd,"grow_blindly")==0) {
1399  (*idx)++;
1400  ret= Xorriso_option_grow_blindly(xorriso,arg1,0);
1401 
1402  } else if(strcmp(cmd,"hardlinks")==0) {
1403  (*idx)++;
1404  ret= Xorriso_option_hardlinks(xorriso, arg1, 0);
1405 
1406  } else if(strcmp(cmd,"hfsplus")==0) {
1407  (*idx)++;
1408  ret= Xorriso_option_hfsplus(xorriso, arg1, 0);
1409 
1410  } else if(strcmp(cmd,"help")==0) {
1411  Xorriso_option_help(xorriso,0);
1412 
1413  } else if(strcmp(cmd,"hide")==0) {
1414  (*idx)+= 1;
1415  ret= Xorriso_option_hide(xorriso, arg1, argc, argv, idx, 1);
1416 
1417  } else if(strcmp(cmd,"history")==0) {
1418  /* add to readline history */
1419  (*idx)++;
1420  ret= Xorriso_option_history(xorriso, arg1, 0);
1421 
1422  } else if(strcmp(cmd,"indev")==0) {
1423  (*idx)++;
1424  ret= Xorriso_option_dev(xorriso, arg1, 1);
1425 
1426  } else if(strcmp(cmd,"in_charset")==0) {
1427  (*idx)++;
1428  ret= Xorriso_option_charset(xorriso, arg1, 1);
1429 
1430  } else if(strcmp(cmd,"iso_nowtime")==0) {
1431  (*idx)++;
1432  ret= Xorriso_option_iso_nowtime(xorriso, arg1, 0);
1433 
1434  } else if(strcmp(cmd,"iso_rr_pattern")==0) {
1435  (*idx)++;
1436  ret= Xorriso_option_iso_rr_pattern(xorriso, arg1, 0);
1437 
1438  } else if(strcmp(cmd,"jigdo")==0) {
1439  (*idx)+= 2;
1440  ret= Xorriso_option_jigdo(xorriso, arg1, arg2, 0);
1441 
1442  } else if(strcmp(cmd,"joliet")==0) {
1443  (*idx)++;
1444  ret= Xorriso_option_joliet(xorriso, arg1, 0);
1445 
1446  } else if(strcmp(cmd,"joliet_map")==0) {
1447  (*idx)++;
1448  ret= Xorriso_option_joliet_map(xorriso, arg1, 0);
1449 
1450  } else if(strcmp(cmd, "launch_frontend") == 0) {
1451  ret= Xorriso_option_launch_frontend(xorriso, argc, argv, idx, 0);
1452 
1453  } else if(strcmp(cmd, "list_arg_sorting") == 0) {
1454  ret= Xorriso_option_list_arg_sorting(xorriso, 0);
1455 
1456  } else if(strcmp(cmd, "list_delimiter") == 0) {
1457  (*idx)++;
1458  ret= Xorriso_option_list_delimiter(xorriso, arg1, 0);
1459 
1460  } else if(strcmp(cmd, "list_extras") == 0) {
1461  (*idx)++;
1462  ret= Xorriso_option_list_extras(xorriso, arg1, 0);
1463 
1464  } else if(strcmp(cmd,"list_formats")==0) {
1465  ret= Xorriso_option_list_formats(xorriso, 0);
1466 
1467  } else if(strcmp(cmd,"list_profiles")==0) {
1468  (*idx)++;
1469  ret= Xorriso_option_list_profiles(xorriso, arg1, 0);
1470 
1471  } else if(strcmp(cmd,"list_speeds")==0) {
1472  ret= Xorriso_option_list_speeds(xorriso, 0);
1473 
1474  } else if(strcmp(cmd, "lns") == 0 || strcmp(cmd, "lnsi") == 0) {
1475  (*idx)+= 2;
1476  ret= Xorriso_option_lnsi(xorriso, arg1, arg2, 0);
1477 
1478  } else if(strcmp(cmd,"load")==0) {
1479  (*idx)+= 2;
1480  ret= Xorriso_option_load(xorriso, arg1, arg2, 0);
1481 
1482  } else if(strcmp(cmd,"local_charset")==0) {
1483  (*idx)++;
1484  ret= Xorriso_option_charset(xorriso, arg1, 4);
1485 
1486  } else if(strcmp(cmd,"logfile")==0) {
1487  (*idx)+= 2;
1488  ret= Xorriso_option_logfile(xorriso, arg1, arg2, 0);
1489 
1490  } else if(strcmp(cmd,"ls")==0 || strcmp(cmd,"lsi")==0 ||
1491  strcmp(cmd,"lsl")==0 || strcmp(cmd,"lsli")==0) {
1492  ret= Xorriso_option_lsi(xorriso, argc, argv, idx, (cmd[2]=='l'));
1493 
1494  } else if(strcmp(cmd,"lsd")==0 || strcmp(cmd,"lsdi")==0 ||
1495  strcmp(cmd,"lsdl")==0 || strcmp(cmd,"lsdli")==0) {
1496  ret= Xorriso_option_lsi(xorriso, argc, argv, idx, (cmd[3]=='l')|8);
1497 
1498  } else if(strcmp(cmd,"lsdx")==0 || strcmp(cmd,"lsdlx")==0) {
1499  ret= Xorriso_option_lsx(xorriso, argc, argv, idx, (cmd[3]=='l')|8);
1500 
1501  } else if(strcmp(cmd,"lsx")==0 || strcmp(cmd,"lslx")==0) {
1502  ret= Xorriso_option_lsx(xorriso, argc, argv, idx, (cmd[2]=='l'));
1503 
1504  } else if(strcmp(cmd,"map")==0) {
1505  (*idx)+= 2;
1506  ret= Xorriso_option_map(xorriso, arg1, arg2, 0);
1507 
1508  } else if(strcmp(cmd,"map_l")==0) {
1509  ret= Xorriso_option_map_l(xorriso, argc, argv, idx, 0);
1510 
1511  } else if(strcmp(cmd,"map_single")==0) {
1512  (*idx)+= 2;
1513  ret= Xorriso_option_map(xorriso, arg1, arg2, 32);
1514 
1515  } else if(strcmp(cmd,"mark")==0) {
1516  (*idx)++;
1517  ret= Xorriso_option_mark(xorriso, arg1, 0);
1518 
1519  } else if(strcmp(cmd, "md5")==0) {
1520  (*idx)++;
1521  ret= Xorriso_option_md5(xorriso, arg1, 0);
1522 
1523  } else if(strcmp(cmd,"mkdir")==0 || strcmp(cmd,"mkdiri")==0) {
1524  ret= Xorriso_option_mkdiri(xorriso, argc, argv, idx, 0);
1525 
1526  } else if(strcmp(cmd, "modesty_on_drive")==0) {
1527  (*idx)++;
1528  ret= Xorriso_option_modesty_on_drive(xorriso, arg1, 0);
1529 
1530  } else if(strcmp(cmd, "mount") == 0 || strcmp(cmd, "mount_cmd") == 0) {
1531  (*idx)+= 4;
1532  if((*idx)>argc) {
1533  sprintf(xorriso->info_text,
1534  "-%s: Not enough arguments. Needed are: device entity id command",
1535  cmd);
1536  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
1537  ret= 0;
1538  } else
1539  ret= Xorriso_option_mount(xorriso, arg1, arg2,
1540  argv[(*idx)-2], argv[(*idx)-1],
1541  (strcmp(cmd, "mount_cmd") == 0));
1542 
1543  } else if(strcmp(cmd, "mount_opts")==0) {
1544  (*idx)++;
1545  ret= Xorriso_option_mount_opts(xorriso, arg1, 0);
1546 
1547  } else if(strcmp(cmd, "move")==0) {
1548  (*idx)+= 2;
1549  ret= Xorriso_option_move(xorriso, arg1, arg2, 0);
1550 
1551  } else if(strcmp(cmd,"msg_op") == 0) {
1552  (*idx)+= 2;
1553  ret= Xorriso_option_msg_op(xorriso, arg1, arg2, 0);
1554 
1555  } else if(strcmp(cmd,"mv")==0 || strcmp(cmd,"mvi")==0) {
1556  ret= Xorriso_option_mvi(xorriso, argc, argv, idx, 0);
1557 
1558  } else if(strcmp(cmd,"named_pipe_loop")==0) {
1559  if((*idx) + 3 < argc)
1560  arg4= argv[(*idx) + 3];
1561  else
1562  arg4= "";
1563  (*idx)+= 4;
1564  ret= Xorriso_option_named_pipe_loop(xorriso, arg1, arg2, arg3, arg4, 0);
1565  if(ret == 3)
1566  goto ex;
1567 
1568  } else if(strcmp(cmd,"no_rc")==0) {
1569  ret= Xorriso_option_no_rc(xorriso, 0);
1570 
1571  } else if(strcmp(cmd,"not_leaf")==0) {
1572  (*idx)++;
1573  ret= Xorriso_option_not_leaf(xorriso, arg1, 0);
1574 
1575  } else if(strcmp(cmd,"not_list")==0) {
1576  (*idx)++;
1577  ret= Xorriso_option_not_list(xorriso, arg1, 0);
1578 
1579  } else if(strcmp(cmd,"not_mgt")==0) {
1580  (*idx)++;
1581  ret= Xorriso_option_not_mgt(xorriso, arg1, 0);
1582 
1583  } else if(strcmp(cmd,"not_paths")==0) {
1584  ret= Xorriso_option_not_paths(xorriso, argc, argv, idx, 0);
1585 
1586  } else if(strcmp(cmd,"options_from_file")==0) {
1587  (*idx)++;
1588  ret= Xorriso_option_options_from_file(xorriso,arg1,0);
1589  if(ret==3)
1590  goto ex;
1591 
1592  } else if(strcmp(cmd,"osirrox")==0) {
1593  (*idx)++;
1594  ret= Xorriso_option_osirrox(xorriso,arg1,0);
1595 
1596  } else if(strcmp(cmd,"outdev")==0) {
1597  (*idx)++;
1598  ret= Xorriso_option_dev(xorriso, arg1, 2);
1599 
1600  } else if(strcmp(cmd,"out_charset")==0) {
1601  (*idx)++;
1602  ret= Xorriso_option_charset(xorriso, arg1, 2);
1603 
1604  } else if(strcmp(cmd,"overwrite")==0) {
1605  (*idx)++;
1606  ret= Xorriso_option_overwrite(xorriso,arg1,0);
1607 
1608  } else if(strcmp(cmd,"pacifier")==0) {
1609  (*idx)++;
1610  ret= Xorriso_option_pacifier(xorriso, arg1, 0);
1611 
1612  } else if(strcmp(cmd,"padding")==0) {
1613  (*idx)++;
1614  ret= Xorriso_option_padding(xorriso, arg1, 0);
1615 
1616  } else if(strcmp(cmd,"page")==0) {
1617  (*idx)+= 2;
1618  num1= num2= 0;
1619  sscanf(arg1,"%d",&num1);
1620  sscanf(arg2,"%d",&num2);
1621  if(num1<0)
1622  num1= 0;
1623  if(arg1[0]==0)
1624  num1= 16;
1625  if(num2<=0)
1626  num2= 80;
1627  ret= Xorriso_option_page(xorriso, num1, num2, 0);
1628 
1629  } else if(strcmp(cmd,"paste_in")==0) {
1630  (*idx)+= 4;
1631  if((*idx)>argc) {
1632  sprintf(xorriso->info_text,
1633  "-paste_in: Not enough arguments. Needed are: disk_path start count so_rr_path");
1634  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
1635  ret= 0;
1636  } else
1637  ret= Xorriso_option_paste_in(xorriso, arg1, arg2,
1638  argv[(*idx)-2], argv[(*idx)-1], 0);
1639 
1640  } else if(strcmp(cmd,"path-list")==0 || strcmp(cmd,"path_list")==0) {
1641  (*idx)++;
1642  ret= Xorriso_option_path_list(xorriso, arg1, 0);
1643 
1644  } else if(strcmp(cmd,"pathspecs")==0) {
1645  (*idx)++;
1646  ret= Xorriso_option_pathspecs(xorriso, arg1, 0);
1647 
1648  } else if(strcmp(cmd,"pkt_output")==0) {
1649  (*idx)++;
1650  ret= Xorriso_option_pkt_output(xorriso, arg1, 0);
1651 
1652  } else if(strcmp(cmd,"preparer_id")==0) {
1653  (*idx)++;
1654  ret= Xorriso_option_preparer_id(xorriso, arg1, 0);
1655 
1656  } else if(strcmp(cmd,"print")==0) {
1657  (*idx)++;
1658  ret= Xorriso_option_print(xorriso, arg1, 0);
1659 
1660  } else if(strcmp(cmd,"print_info")==0) {
1661  (*idx)++;
1662  ret= Xorriso_option_print(xorriso, arg1, 1);
1663 
1664  } else if(strcmp(cmd,"print_mark")==0) {
1665  (*idx)++;
1666  ret= Xorriso_option_print(xorriso, arg1, 2);
1667 
1668  } else if(strcmp(cmd,"print_size")==0) {
1669  Xorriso_option_print_size(xorriso, 0);
1670 
1671  } else if(strcmp(cmd,"prompt")==0) {
1672  (*idx)++;
1673  ret= Xorriso_option_prompt(xorriso, arg1, 0);
1674 
1675  } else if(strcmp(cmd,"prog")==0) {
1676  (*idx)++;
1677  ret= Xorriso_option_prog(xorriso, arg1, 0);
1678 
1679  } else if(strcmp(cmd,"publisher")==0) {
1680  (*idx)++;
1681  Xorriso_option_publisher(xorriso, arg1, 0);
1682 
1683  } else if(strcmp(cmd,"pvd_info")==0) {
1684  Xorriso_option_pvd_info(xorriso, 0);
1685 
1686  } else if(strcmp(cmd,"pwd")==0 || strcmp(cmd,"pwdi")==0) {
1687  Xorriso_option_pwdi(xorriso, 0);
1688 
1689  } else if(strcmp(cmd,"pwdx")==0) {
1690  Xorriso_option_pwdx(xorriso, 0);
1691 
1692  } else if(strcmp(cmd,"quoted_not_list")==0) {
1693  (*idx)++;
1694  ret= Xorriso_option_not_list(xorriso, arg1, 1);
1695 
1696  } else if(strcmp(cmd,"quoted_path_list")==0) {
1697  (*idx)++;
1698  ret= Xorriso_option_path_list(xorriso, arg1, 1);
1699 
1700  } else if(strcmp(cmd,"read_fs")==0) {
1701  (*idx)++;
1702  ret= Xorriso_option_read_fs(xorriso, arg1, 0);
1703 
1704  } else if(strcmp(cmd,"read_mkisofsrc")==0) {
1705  ret= Xorriso_option_read_mkisofsrc(xorriso, 0);
1706 
1707  } else if(strcmp(cmd,"read_speed")==0) {
1708  (*idx)++;
1709  ret= Xorriso_option_speed(xorriso, arg1, 1);
1710 
1711  } else if(strcmp(cmd,"reassure")==0) {
1712  (*idx)++;
1713  ret= Xorriso_option_reassure(xorriso, arg1, 0);
1714 
1715  } else if(strcmp(cmd,"report_about")==0) {
1716  (*idx)++;
1717  ret= Xorriso_option_report_about(xorriso, arg1, 0);
1718 
1719  } else if(strcmp(cmd,"report_el_torito")==0) {
1720  (*idx)++;
1721  ret= Xorriso_option_report_el_torito(xorriso, arg1, 0);
1722 
1723  } else if(strcmp(cmd,"report_system_area")==0) {
1724  (*idx)++;
1725  ret= Xorriso_option_report_system_area(xorriso, arg1, 0);
1726 
1727  } else if(strcmp(cmd,"return_with")==0) {
1728  (*idx)+= 2;
1729  num2= 0;
1730  sscanf(arg2,"%d",&num2);
1731  ret= Xorriso_option_return_with(xorriso, arg1, num2, 0);
1732 
1733  } else if(strcmp(cmd,"rm")==0 || strcmp(cmd,"rmi")==0) {
1734  ret= Xorriso_option_rmi(xorriso, argc, argv, idx, 0);
1735 
1736  } else if(strcmp(cmd,"rm_r")==0 || strcmp(cmd,"rm_ri")==0) {
1737  ret= Xorriso_option_rmi(xorriso, argc, argv, idx, 1);
1738 
1739  } else if(strcmp(cmd,"rmdir")==0 || strcmp(cmd,"rmdiri")==0) {
1740  ret= Xorriso_option_rmi(xorriso, argc, argv, idx, 2);
1741 
1742  } else if(strcmp(cmd, "rockridge") == 0) {
1743  (*idx)++;
1744  ret= Xorriso_option_rockridge(xorriso, arg1, 0);
1745 
1746  } else if(strcmp(cmd,"rollback")==0) {
1747  ret= Xorriso_option_rollback(xorriso, 0);
1748 
1749  } else if(strcmp(cmd,"rollback_end")==0) {
1750  end_ret= Xorriso_option_end(xorriso, 1);
1751  ret= Xorriso_eval_problem_status(xorriso, ret, 0);
1752  if(ret<0)
1753  goto ex;
1754  if(end_ret!=2)
1755  {ret= 3; goto ex;}
1756 
1757  } else if(strcmp(cmd,"rom_toc_scan")==0) {
1758  (*idx)++;
1759  Xorriso_option_rom_toc_scan(xorriso, arg1, 0);
1760 
1761  } else if(strcmp(cmd,"rr_reloc_dir")==0) {
1762  (*idx)++;
1763  Xorriso_option_rr_reloc_dir(xorriso, arg1, 0);
1764 
1765  } else if(strcmp(cmd,"scdbackup_tag")==0) {
1766  (*idx)+= 2;
1767  ret= Xorriso_option_scdbackup_tag(xorriso, arg1, arg2, 0);
1768 
1769  } else if(strcmp(cmd, "scsi_dev_family") == 0) {
1770  (*idx)++;
1771  ret= Xorriso_option_scsi_dev_family(xorriso, arg1, 0);
1772 
1773  } else if(strcmp(cmd, "scsi_log") == 0) {
1774  (*idx)++;
1775  ret= Xorriso_option_scsi_log(xorriso, arg1, 0);
1776 
1777  } else if(strcmp(cmd,"session_log")==0) {
1778  (*idx)++;
1779  ret= Xorriso_option_session_log(xorriso, arg1, 0);
1780 
1781  } else if(strcmp(cmd, "session_string") == 0) {
1782  (*idx)+= 4;
1783  if((*idx)>argc) {
1784  sprintf(xorriso->info_text,
1785  "-%s: Not enough arguments. Needed are: device entity id command",
1786  cmd);
1787  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
1788  ret= 0;
1789  } else
1790  ret= Xorriso_option_mount(xorriso, arg1, arg2,
1791  argv[(*idx)-2], argv[(*idx)-1], 2);
1792 
1793  } else if(strcmp(cmd,"setfacl")==0 || strcmp(cmd,"setfacli")==0) {
1794  (*idx)+= 1;
1795  ret= Xorriso_option_setfacli(xorriso, arg1, argc, argv, idx, 0);
1796 
1797  } else if(strcmp(cmd,"setfacl_list")==0 || strcmp(cmd,"setfacl_listi")==0) {
1798  (*idx)+= 1;
1799  ret= Xorriso_option_setfacl_listi(xorriso, arg1, 0);
1800 
1801  } else if(strcmp(cmd,"setfacl_r")==0 || strcmp(cmd,"setfacl_ri")==0) {
1802  (*idx)+= 1;
1803  ret= Xorriso_option_setfacli(xorriso, arg1, argc, argv, idx, 1);
1804 
1805  } else if(strcmp(cmd,"setfattr")==0 || strcmp(cmd,"setfattri")==0) {
1806  (*idx)+= 2;
1807  ret= Xorriso_option_setfattri(xorriso, arg1, arg2, argc, argv, idx, 0);
1808 
1809  } else if(strcmp(cmd,"setfattr_list")==0 || strcmp(cmd,"setfattr_listi")==0) {
1810  (*idx)+= 1;
1811  ret= Xorriso_option_setfattr_listi(xorriso, arg1, 0);
1812 
1813  } else if(strcmp(cmd,"setfattr_r")==0 || strcmp(cmd,"setfattr_ri")==0) {
1814  (*idx)+= 2;
1815  ret= Xorriso_option_setfattri(xorriso, arg1, arg2, argc, argv, idx, 1);
1816 
1817  } else if(strcmp(cmd,"set_filter")==0 || strcmp(cmd,"set_filter_r")==0) {
1818  (*idx)+= 1;
1819  ret= Xorriso_option_set_filter(xorriso, arg1, argc, argv, idx,
1820  strcmp(cmd,"set_filter_r")==0);
1821 
1822  } else if(strcmp(cmd,"show_stream")==0 || strcmp(cmd,"show_stream_r")==0) {
1823  ret= Xorriso_option_set_filter(xorriso, "", argc, argv, idx,
1824  (strcmp(cmd,"show_stream_r")==0) | 2 | 4);
1825 
1826  } else if(strcmp(cmd,"sh_style_result")==0) {
1827  (*idx)++;
1828  ret= Xorriso_option_sh_style_result(xorriso, arg1, 0);
1829 
1830  } else if(strcmp(cmd,"signal_handling")==0) {
1831  (*idx)++;
1832  ret= Xorriso_option_signal_handling(xorriso, arg1, 0);
1833 
1834  } else if(strcmp(cmd,"sleep")==0) {
1835  (*idx)++;
1836  ret= Xorriso_option_sleep(xorriso, arg1, 0);
1837 
1838  } else if(strcmp(cmd,"speed")==0) {
1839  (*idx)++;
1840  ret= Xorriso_option_speed(xorriso, arg1, 0);
1841 
1842  } else if(strcmp(cmd,"split_size")==0) {
1843  (*idx)++;
1844  ret= Xorriso_option_split_size(xorriso, arg1, 0);
1845 
1846  } else if(strcmp(cmd,"status")==0) {
1847  (*idx)++;
1848  ret= Xorriso_option_status(xorriso, arg1, 0);
1849 
1850  } else if(strcmp(cmd,"status_history_max")==0) {
1851  (*idx)++;
1852  sscanf(arg1,"%d",&num1);
1853  ret= Xorriso_option_status_history_max(xorriso, num1, 0);
1854 
1855  } else if(strcmp(cmd,"stdio_sync")==0) {
1856  (*idx)++;
1857  ret= Xorriso_option_stdio_sync(xorriso, arg1, 0);
1858 
1859  } else if(strcmp(cmd,"stream_recording")==0) {
1860  (*idx)++;
1861  ret= Xorriso_option_stream_recording(xorriso, arg1, 0);
1862 
1863  } else if(strcmp(cmd,"system_id")==0) {
1864  (*idx)++;
1865  ret= Xorriso_option_system_id(xorriso, arg1, 0);
1866 
1867  } else if(strcmp(cmd,"tell_media_space")==0) {
1868  Xorriso_option_tell_media_space(xorriso, 0);
1869 
1870  } else if(strcmp(cmd,"temp_mem_limit")==0) {
1871  (*idx)++;
1872  ret= Xorriso_option_temp_mem_limit(xorriso, arg1, 0);
1873 
1874  } else if(strcmp(cmd,"test")==0) { /* This option does not exist. */
1875  /* install temporary test code here */;
1876 
1877 if (0) {
1878 /* Test setup for for Xorriso_push_outlists() et.al. */
1879 /* Test setup for Xorriso_parse_line */
1880  int stack_handle = -1, line_count= 0;
1881  struct Xorriso_lsT *result_list, *info_list;
1882  int Xorriso_process_msg_lists(struct XorrisO *xorriso,
1883  struct Xorriso_lsT *result_list,
1884  struct Xorriso_lsT *info_list,
1885  int *line_count, int flag);
1886 
1887  (*idx)++;
1888  if(strcmp(arg1, "push") == 0) {
1889  ret= Xorriso_push_outlists(xorriso, &stack_handle, 3);
1890  fprintf(stderr, "xorriso -test: push = %d, handle = %d\n",
1891  ret, stack_handle);
1892  } else if(strcmp(arg1, "pull") == 0) {
1893  ret= Xorriso_pull_outlists(xorriso, -1, &result_list, &info_list, 0);
1894  fprintf(stderr, "xorriso -test: pull = %d\n", ret);
1895  if(ret > 0) {
1896  ret= Xorriso_process_msg_lists(xorriso, result_list, info_list,
1897  &line_count, 0);
1898  fprintf(stderr,
1899  "xorriso -test: Xorriso_process_msg_lists() = %d, line_count = %d\n",
1900  ret, line_count);
1901  }
1902  } else if(strcmp(arg1, "fetch") == 0) {
1903  ret= Xorriso_fetch_outlists(xorriso, -1, &result_list, &info_list, 0);
1904  fprintf(stderr, "xorriso -test: fetch = %d\n", ret);
1905  if(ret > 0) {
1906  ret= Xorriso_process_msg_lists(xorriso, result_list, info_list,
1907  &line_count, 0);
1908  fprintf(stderr,
1909  "xorriso -test: Xorriso_process_msg_lists() = %d, line_count = %d\n",
1910  ret, line_count);
1911  }
1912  } else if(strcmp(arg1, "peek") == 0) {
1913  ret= Xorriso_peek_outlists(xorriso, -1, 0, 0);
1914  fprintf(stderr, "xorriso -test: peek = %d\n", ret);
1915  } else if(strcmp(arg1, "sleep_peek") == 0) {
1916  usleep(1000000);
1917  ret= Xorriso_peek_outlists(xorriso, -1, 0, 0);
1918  fprintf(stderr, "xorriso -test: sleep_peek = %d\n", ret);
1919  } else if(strcmp(arg1, "peek_loop") == 0) {
1920  ret= Xorriso_peek_outlists(xorriso, -1, 3, 4);
1921  fprintf(stderr, "xorriso -test: peek_loop = %d\n", ret);
1922  } else if(strcmp(arg1, "start") == 0) {
1923  ret= Xorriso_start_msg_watcher(xorriso, NULL, NULL, NULL, NULL, 0);
1924  fprintf(stderr, "xorriso -test: Xorriso_start_msg_watcher() = %d\n", ret);
1925  } else if(strcmp(arg1, "stop") == 0) {
1926  ret= Xorriso_stop_msg_watcher(xorriso, 0);
1927  fprintf(stderr, "xorriso -test: Xorriso_stop_msg_watcher() = %d\n", ret);
1928 
1929  } else if(strcmp(arg1, "help") == 0) {
1930  fprintf(stderr, "-test [mode] [arguments]\n");
1931  fprintf(stderr, " push\n");
1932  fprintf(stderr, " perform Xorriso_push_outlists()\n");
1933  fprintf(stderr, " pull\n");
1934  fprintf(stderr, " perform Xorriso_pull_outlists() and show messages\n");
1935  fprintf(stderr, " fetch\n");
1936  fprintf(stderr, " perform Xorriso_fetch_outlists() and show\n");
1937  fprintf(stderr, " peek\n");
1938  fprintf(stderr, " perform Xorriso_peek_outlists()\n");
1939  fprintf(stderr, " sleep_peek\n");
1940  fprintf(stderr, " sleep 1 s and perform Xorriso_peek_outlists()\n");
1941  fprintf(stderr, " peek_loop\n");
1942  fprintf(stderr, " wait for up to 3s in Xorriso_peek_outlists()\n");
1943  fprintf(stderr, " for return value 0 or -1\n");
1944  fprintf(stderr, " start\n");
1945  fprintf(stderr, " perform Xorriso_start_msg_watcher()\n");
1946  fprintf(stderr, " stop\n");
1947  fprintf(stderr, " perform Xorriso_stop_msg_watcher()\n");
1948  } else {
1949  fprintf(stderr, "xorriso -test: unknown mode: %s\n", arg1);
1950  }
1951  ret= 0;
1952 }
1953 
1954  } else if(strcmp(cmd,"toc")==0) {
1955  Xorriso_option_toc(xorriso, 0);
1956 
1957  } else if(strcmp(cmd,"toc_of")==0) {
1958  (*idx)++;
1959  Xorriso_option_toc_of(xorriso, arg1, 0);
1960 
1961  } else if(strcmp(cmd,"truncate_overwritable")==0) {
1962  (*idx)+= 3;
1963  ret= Xorriso_option_truncate_overwritable(xorriso, arg1, arg2, arg3, 0);
1964 
1965  } else if(strcmp(cmd,"uid")==0) {
1966  (*idx)++;
1967  ret= Xorriso_option_uid(xorriso,arg1,0);
1968 
1969  } else if(strcmp(cmd,"unregister_filter")==0) {
1970  (*idx)++;
1971  ret= Xorriso_option_unregister_filter(xorriso, arg1, 0);
1972 
1973  } else if(strcmp(cmd,"update")==0) {
1974  (*idx)+= 2;
1975  ret= Xorriso_option_update(xorriso, arg1, arg2, 1);
1976 
1977  } else if(strcmp(cmd,"update_l") == 0 || strcmp(cmd,"update_lx") == 0) {
1978  ret= Xorriso_option_map_l(xorriso, argc, argv, idx, 2<<8);
1979 
1980  } else if(strcmp(cmd,"update_li") == 0) {
1981  ret= Xorriso_option_map_l(xorriso, argc, argv, idx, 5 << 8);
1982 
1983  } else if(strcmp(cmd,"update_lxi") == 0) {
1984  ret= Xorriso_option_map_l(xorriso, argc, argv, idx, 4 << 8);
1985 
1986  } else if(strcmp(cmd,"update_r")==0) {
1987  (*idx)+= 2;
1988  ret= Xorriso_option_update(xorriso, arg1, arg2, 1|8);
1989 
1990  } else if(strcmp(cmd,"use_immed_bit")==0) {
1991  (*idx)++;
1992  ret= Xorriso_option_use_immed_bit(xorriso, arg1, 0);
1993 
1994  } else if(strcmp(cmd,"use_readline")==0) {
1995  (*idx)++;
1996  ret= Xorriso_option_use_readline(xorriso, arg1, 0);
1997 
1998  } else if(strcmp(cmd,"version")==0){
1999  ret= Xorriso_option_version(xorriso, 0);
2000 
2001  } else if(strcmp(cmd,"volset_id")==0) {
2002  (*idx)++;
2003  ret= Xorriso_option_volset_id(xorriso, arg1, 0);
2004 
2005  } else if(strcmp(cmd,"volid")==0) {
2006  (*idx)++;
2007  ret= Xorriso_option_volid(xorriso,arg1,0);
2008 
2009  } else if(strcmp(cmd,"volume_date")==0) {
2010  (*idx)+= 2;
2011  ret= Xorriso_option_volume_date(xorriso, arg1, arg2, 0);
2012 
2013  } else if(strcmp(cmd,"write_type")==0) {
2014  (*idx)++;
2015  ret= Xorriso_option_write_type(xorriso, arg1, 0);
2016 
2017  } else if(strcmp(cmd, "x") == 0) {
2018  /* only in effect in Xorriso_prescan_args() */;
2019 
2020  } else if(strcmp(cmd,"xattr")==0) {
2021  (*idx)++;
2022  ret= Xorriso_option_xattr(xorriso, arg1, 0);
2023 
2024  } else if(strcmp(cmd,"zisofs")==0) {
2025  (*idx)++;
2026  ret= Xorriso_option_zisofs(xorriso, arg1, 0);
2027 
2028  } else if(strcmp(cmd, xorriso->list_delimiter)==0){
2029  /* tis ok */;
2030 
2031  } else if(was_dashed) {
2032  if(xorriso->add_plainly>1)
2033  goto add_plain_argument;
2034 unknown_option:;
2035  sprintf(xorriso->info_text, "Not a known command: '%s'\n",
2036  original_cmd);
2037  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
2038  {ret= 0; goto eval_any_problems;}
2039 
2040  } else {
2041  if(xorriso->add_plainly<=0)
2042  goto unknown_option;
2043 add_plain_argument:;
2044  mem_idx= *idx;
2045  (*idx)--;
2046  ret= Xorriso_option_add(xorriso, (*idx)+1, argv, idx, 0);
2047  (*idx)= mem_idx;
2048 
2049  }
2050 
2051 eval_any_problems:
2052  ret= Xorriso_eval_problem_status(xorriso, ret, 0);
2053  if(ret<0)
2054  goto ex;
2055 
2056  if(*idx < argc && !(flag & 4))
2057  goto next_command;
2058 
2059 ex:;
2060  fflush(stdout);
2061  Xorriso_free_meM(cmd_data);
2062  return(ret);
2063 }
int Xorriso_as_cdrskin(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: emulators.c:2815
int Xorriso_as_genisofs(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: emulators.c:2800
int Xorriso_option_abstract_file(struct XorrisO *xorriso, char *name, int flag)
Definition: opts_a_c.c:66
int Xorriso_option_check_media_defaults(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_a_c.c:1925
int Xorriso_option_blank(struct XorrisO *xorriso, char *in_mode, int flag)
Definition: opts_a_c.c:581
int Xorriso_option_cut_out(struct XorrisO *xorriso, char *disk_path, char *start, char *count, char *iso_rr_path, int flag)
Definition: opts_a_c.c:2779
int Xorriso_option_append_partition(struct XorrisO *xorriso, char *partno_text, char *type_text, char *image_path, int flag)
Definition: opts_a_c.c:295
int Xorriso_option_cp_clone(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_a_c.c:2464
int Xorriso_option_compare(struct XorrisO *xorriso, char *disk_path, char *iso_path, int flag)
Definition: opts_a_c.c:2258
int Xorriso_option_chgrpi(struct XorrisO *xorriso, char *gid, int argc, char **argv, int *idx, int flag)
Definition: opts_a_c.c:1954
int Xorriso_option_biblio_file(struct XorrisO *xorriso, char *name, int flag)
Definition: opts_a_c.c:566
int Xorriso_option_chowni(struct XorrisO *xorriso, char *uid, int argc, char **argv, int *idx, int flag)
Definition: opts_a_c.c:2062
int Xorriso_option_cpx(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_a_c.c:2645
int Xorriso_option_copyright_file(struct XorrisO *xorriso, char *name, int flag)
Definition: opts_a_c.c:2451
int Xorriso_option_commit_eject(struct XorrisO *xorriso, char *which, int flag)
Definition: opts_a_c.c:2234
int Xorriso_option_as(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_a_c.c:397
int Xorriso_option_close(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_a_c.c:2124
int Xorriso_option_acl(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_a_c.c:78
int Xorriso_option_cpri(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_a_c.c:2568
int Xorriso_option_ban_stdio_write(struct XorrisO *xorriso, int flag)
Definition: opts_a_c.c:558
int Xorriso_option_add_plainly(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_a_c.c:220
int Xorriso_option_cdx(struct XorrisO *xorriso, char *disk_path, int flag)
Definition: opts_a_c.c:1463
int Xorriso_option_chmodi(struct XorrisO *xorriso, char *mode, int argc, char **argv, int *idx, int flag)
Definition: opts_a_c.c:2007
int Xorriso_option_close_filter_list(struct XorrisO *xorriso, int flag)
Definition: opts_a_c.c:2169
int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form, char *treatment, int flag)
Definition: opts_a_c.c:695
int Xorriso_option_close_damaged(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_a_c.c:2141
int Xorriso_option_add(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_a_c.c:123
int Xorriso_option_commit(struct XorrisO *xorriso, int flag)
Definition: opts_a_c.c:2182
int Xorriso_option_calm_drive(struct XorrisO *xorriso, char *which, int flag)
Definition: opts_a_c.c:1377
int Xorriso_option_changes_pending(struct XorrisO *xorriso, char *state, int flag)
Definition: opts_a_c.c:1530
int Xorriso_option_concat(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_a_c.c:2368
int Xorriso_option_clone(struct XorrisO *xorriso, char *origin, char *dest, int flag)
Definition: opts_a_c.c:2113
int Xorriso_option_backslash_codes(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_a_c.c:507
int Xorriso_option_compliance(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_a_c.c:2360
int Xorriso_option_auto_charset(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_a_c.c:491
int Xorriso_option_cdi(struct XorrisO *xorriso, char *iso_rr_path, int flag)
Definition: opts_a_c.c:1399
int Xorriso_option_check_md5(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_a_c.c:1635
int Xorriso_option_charset(struct XorrisO *xorriso, char *name, int flag)
Definition: opts_a_c.c:1564
int Xorriso_option_alter_date(struct XorrisO *xorriso, char *time_type, char *timestring, int argc, char **argv, int *idx, int flag)
Definition: opts_a_c.c:242
int Xorriso_option_application_id(struct XorrisO *xorriso, char *name, int flag)
Definition: opts_a_c.c:362
int Xorriso_option_check_media(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_a_c.c:1760
int Xorriso_option_assert_volid(struct XorrisO *xorriso, char *pattern, char *severity, int flag)
Definition: opts_a_c.c:445
int Xorriso_option_application_use(struct XorrisO *xorriso, char *path, int flag)
Definition: opts_a_c.c:379
int Xorriso_option_errfile_log(struct XorrisO *xorriso, char *mode, char *path, int flag)
Definition: opts_d_h.c:478
int Xorriso_option_getfacli(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_d_h.c:1588
int Xorriso_option_history(struct XorrisO *xorriso, char *line, int flag)
Definition: opts_d_h.c:2621
int Xorriso_option_extract_cut(struct XorrisO *xorriso, char *iso_rr_path, char *start, char *count, char *disk_path, int flag)
Definition: opts_d_h.c:669
int Xorriso_option_devices(struct XorrisO *xorriso, int flag)
Definition: opts_d_h.c:136
int Xorriso_option_end(struct XorrisO *xorriso, int flag)
Definition: opts_d_h.c:437
int Xorriso_option_file_size_limit(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_d_h.c:730
int Xorriso_option_eject(struct XorrisO *xorriso, char *which, int flag)
Definition: opts_d_h.c:409
int Xorriso_option_drive_class(struct XorrisO *xorriso, char *d_class, char *pattern, int flag)
Definition: opts_d_h.c:298
int Xorriso_option_displacement(struct XorrisO *xorriso, char *value, int flag)
Definition: opts_d_h.c:230
int Xorriso_option_find(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_d_h.c:818
int Xorriso_option_hardlinks(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_d_h.c:1676
int Xorriso_option_grow_blindly(struct XorrisO *xorriso, char *msc2, int flag)
Definition: opts_d_h.c:1657
int Xorriso_option_data_cache_size(struct XorrisO *xorriso, char *num_tiles, char *tile_blocks, int flag)
Definition: opts_d_h.c:40
int Xorriso_option_dummy(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_d_h.c:340
int Xorriso_option_disk_pattern(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_d_h.c:212
int Xorriso_option_extract(struct XorrisO *xorriso, char *iso_path, char *disk_path, int flag)
Definition: opts_d_h.c:590
int Xorriso_option_error_behavior(struct XorrisO *xorriso, char *occasion, char *behavior, int flag)
Definition: opts_d_h.c:524
int Xorriso_option_fs(struct XorrisO *xorriso, char *size, int flag)
Definition: opts_d_h.c:1563
int Xorriso_option_follow(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_d_h.c:1480
int Xorriso_option_gid(struct XorrisO *xorriso, char *gid, int flag)
Definition: opts_d_h.c:1642
int Xorriso_option_dialog(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_d_h.c:176
int Xorriso_option_drive_access(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_d_h.c:261
int Xorriso_option_hide(struct XorrisO *xorriso, char *hide_state, int argc, char **argv, int *idx, int flag)
Definition: opts_d_h.c:2581
int Xorriso_option_external_filter(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_d_h.c:562
int Xorriso_option_file_name_limit(struct XorrisO *xorriso, char *value, int flag)
Definition: opts_d_h.c:707
int Xorriso_option_dev(struct XorrisO *xorriso, char *in_adr, int flag)
Definition: opts_d_h.c:72
int Xorriso_option_disk_dev_ino(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_d_h.c:194
int Xorriso_option_extract_boot_images(struct XorrisO *xorriso, char *disk_dir_path, int flag)
Definition: opts_d_h.c:651
int Xorriso_option_early_stdio_test(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_d_h.c:368
int Xorriso_option_hfsplus(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_d_h.c:2565
int Xorriso_option_help(struct XorrisO *xorriso, int flag)
Definition: opts_d_h.c:1758
int Xorriso_option_dvd_obs(struct XorrisO *xorriso, char *obs, int flag)
Definition: opts_d_h.c:348
int Xorriso_option_ecma119_map(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_d_h.c:387
int Xorriso_option_modesty_on_drive(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_i_o.c:940
int Xorriso_option_named_pipe_loop(struct XorrisO *xorriso, char *mode, char *stdin_pipe, char *stdout_pipe, char *stderr_pipe, int flag)
Definition: opts_i_o.c:1334
int Xorriso_option_mark(struct XorrisO *xorriso, char *mark, int flag)
Definition: opts_i_o.c:862
int Xorriso_option_joliet(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_i_o.c:91
int Xorriso_option_joliet_map(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_i_o.c:107
int Xorriso_option_mkdiri(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_i_o.c:914
int Xorriso_option_not_list(struct XorrisO *xorriso, char *adr, int flag)
Definition: opts_i_o.c:1438
int Xorriso_option_iso_nowtime(struct XorrisO *xorriso, char *text, int flag)
Definition: opts_i_o.c:33
int Xorriso_option_map(struct XorrisO *xorriso, char *disk_path, char *iso_path, int flag)
Definition: opts_i_o.c:552
int Xorriso_option_no_rc(struct XorrisO *xorriso, int flag)
Definition: opts_i_o.c:1376
int Xorriso_option_not_paths(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_i_o.c:1564
int Xorriso_option_osirrox(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_i_o.c:1761
int Xorriso_option_list_extras(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_i_o.c:202
int Xorriso_option_md5(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_i_o.c:874
int Xorriso_option_mount(struct XorrisO *xorriso, char *dev, char *adr_mode, char *adr, char *cmd, int flag)
Definition: opts_i_o.c:1036
int Xorriso_option_overwrite(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_i_o.c:1864
int Xorriso_option_list_delimiter(struct XorrisO *xorriso, char *text, int flag)
Definition: opts_i_o.c:161
int Xorriso_option_options_from_file(struct XorrisO *xorriso, char *adr, int flag)
Definition: opts_i_o.c:1663
int Xorriso_option_move(struct XorrisO *xorriso, char *origin, char *dest, int flag)
Definition: opts_i_o.c:1110
int Xorriso_option_load(struct XorrisO *xorriso, char *adr_mode, char *adr_value, int flag)
Definition: opts_i_o.c:299
int Xorriso_option_lsx(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_i_o.c:476
int Xorriso_option_mvi(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_i_o.c:1263
int Xorriso_option_not_mgt(struct XorrisO *xorriso, char *setting, int flag)
Definition: opts_i_o.c:1496
int Xorriso_option_mount_opts(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_i_o.c:1075
int Xorriso_option_iso_rr_pattern(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_i_o.c:62
int Xorriso_option_list_arg_sorting(struct XorrisO *xorriso, int flag)
Definition: opts_i_o.c:151
int Xorriso_option_list_speeds(struct XorrisO *xorriso, int flag)
Definition: opts_i_o.c:222
int Xorriso_option_lnsi(struct XorrisO *xorriso, char *target, char *path, int flag)
Definition: opts_i_o.c:259
int Xorriso_option_launch_frontend(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_i_o.c:123
int Xorriso_option_jigdo(struct XorrisO *xorriso, char *aspect, char *arg, int flag)
Definition: opts_i_o.c:80
int Xorriso_option_msg_op(struct XorrisO *xorriso, char *what, char *arg, int flag)
Definition: opts_i_o.c:1137
int Xorriso_option_lsi(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_i_o.c:373
int Xorriso_option_list_formats(struct XorrisO *xorriso, int flag)
Definition: opts_i_o.c:212
int Xorriso_option_logfile(struct XorrisO *xorriso, char *channel, char *fileadr, int flag)
Definition: opts_i_o.c:329
int Xorriso_option_not_leaf(struct XorrisO *xorriso, char *pattern, int flag)
Definition: opts_i_o.c:1389
int Xorriso_option_list_profiles(struct XorrisO *xorriso, char *which, int flag)
Definition: opts_i_o.c:232
int Xorriso_option_map_l(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_i_o.c:613
int Xorriso_option_page(struct XorrisO *xorriso, int len, int width, int flag)
Definition: opts_p_z.c:106
int Xorriso_option_rom_toc_scan(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:708
int Xorriso_option_volid(struct XorrisO *xorriso, char *volid, int flag)
Definition: opts_p_z.c:2083
int Xorriso_option_status(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:1533
int Xorriso_option_rmi(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: opts_p_z.c:592
int Xorriso_option_unregister_filter(struct XorrisO *xorriso, char *name, int flag)
Definition: opts_p_z.c:1758
int Xorriso_option_uid(struct XorrisO *xorriso, char *uid, int flag)
Definition: opts_p_z.c:1743
int Xorriso_option_truncate_overwritable(struct XorrisO *xorriso, char *adr_mode, char *adr_value, char *adjust, int flag)
Definition: opts_p_z.c:1731
int Xorriso_option_volume_date(struct XorrisO *xorriso, char *time_type, char *timestring, int flag)
Definition: opts_p_z.c:2139
int Xorriso_option_pkt_output(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:268
int Xorriso_option_toc_of(struct XorrisO *xorriso, char *which, int flag)
Definition: opts_p_z.c:1692
int Xorriso_option_setfacl_listi(struct XorrisO *xorriso, char *path, int flag)
Definition: opts_p_z.c:833
int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
Definition: opts_p_z.c:334
int Xorriso_option_stdio_sync(struct XorrisO *xorriso, char *rhythm, int flag)
Definition: opts_p_z.c:1560
int Xorriso_option_setfacli(struct XorrisO *xorriso, char *acl_text, int argc, char **argv, int *idx, int flag)
Definition: opts_p_z.c:980
int Xorriso_option_read_mkisofsrc(struct XorrisO *xorriso, int flag)
Definition: opts_p_z.c:483
int Xorriso_option_scdbackup_tag(struct XorrisO *xorriso, char *listname, char *recname, int flag)
Definition: opts_p_z.c:767
int Xorriso_option_tell_media_space(struct XorrisO *xorriso, int flag)
Definition: opts_p_z.c:1623
int Xorriso_option_report_el_torito(struct XorrisO *xorriso, char *form, int flag)
Definition: opts_p_z.c:536
int Xorriso_option_zisofs(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:2252
int Xorriso_option_xattr(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:2228
int Xorriso_option_setfattr_listi(struct XorrisO *xorriso, char *path, int flag)
Definition: opts_p_z.c:1111
int Xorriso_option_return_with(struct XorrisO *xorriso, char *in_severity, int exit_value, int flag)
Definition: opts_p_z.c:558
int Xorriso_option_split_size(struct XorrisO *xorriso, char *size, int flag)
Definition: opts_p_z.c:1515
int Xorriso_option_report_about(struct XorrisO *xorriso, char *in_severity, int flag)
Definition: opts_p_z.c:511
int Xorriso_option_preparer_id(struct XorrisO *xorriso, char *name, int flag)
Definition: opts_p_z.c:279
int Xorriso_option_prog(struct XorrisO *xorriso, char *name, int flag)
Definition: opts_p_z.c:374
int Xorriso_option_prompt(struct XorrisO *xorriso, char *text, int flag)
Definition: opts_p_z.c:403
int Xorriso_option_scsi_dev_family(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:785
int Xorriso_option_stream_recording(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:1586
int Xorriso_option_paste_in(struct XorrisO *xorriso, char *iso_rr_path, char *disk_path, char *start, char *count, int flag)
Definition: opts_p_z.c:122
int Xorriso_option_status_history_max(struct XorrisO *xorriso, int num, int flag)
Definition: opts_p_z.c:1550
int Xorriso_option_use_immed_bit(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:1983
int Xorriso_option_pacifier(struct XorrisO *xorriso, char *style, int flag)
Definition: opts_p_z.c:34
int Xorriso_option_use_readline(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:2005
int Xorriso_option_temp_mem_limit(struct XorrisO *xorriso, char *size, int flag)
Definition: opts_p_z.c:1647
int Xorriso_option_publisher(struct XorrisO *xorriso, char *name, int flag)
Definition: opts_p_z.c:417
int Xorriso_option_pathspecs(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:250
int Xorriso_option_pwdx(struct XorrisO *xorriso, int flag)
Definition: opts_p_z.c:450
int Xorriso_option_session_log(struct XorrisO *xorriso, char *path, int flag)
Definition: opts_p_z.c:824
int Xorriso_option_padding(struct XorrisO *xorriso, char *size, int flag)
Definition: opts_p_z.c:75
int Xorriso_option_pwdi(struct XorrisO *xorriso, int flag)
Definition: opts_p_z.c:436
int Xorriso_option_rr_reloc_dir(struct XorrisO *xorriso, char *name, int flag)
Definition: opts_p_z.c:747
int Xorriso_option_setfattri(struct XorrisO *xorriso, char *name, char *value, int argc, char **argv, int *idx, int flag)
Definition: opts_p_z.c:1055
int Xorriso_option_rollback(struct XorrisO *xorriso, int flag)
Definition: opts_p_z.c:677
int Xorriso_option_scsi_log(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:807
int Xorriso_option_speed(struct XorrisO *xorriso, char *speed_in, int flag)
Definition: opts_p_z.c:1414
int Xorriso_option_read_fs(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:464
int Xorriso_option_version(struct XorrisO *xorriso, int flag)
Definition: opts_p_z.c:2016
int Xorriso_option_reassure(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:493
int Xorriso_option_signal_handling(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:1343
int Xorriso_option_rockridge(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:658
int Xorriso_option_toc(struct XorrisO *xorriso, int flag)
Definition: opts_p_z.c:1668
int Xorriso_option_write_type(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:2208
int Xorriso_option_path_list(struct XorrisO *xorriso, char *adr, int flag)
Definition: opts_p_z.c:163
int Xorriso_option_sh_style_result(struct XorrisO *xorriso, char *mode, int flag)
Definition: opts_p_z.c:1322
int Xorriso_option_pvd_info(struct XorrisO *xorriso, int flag)
Definition: opts_p_z.c:429
int Xorriso_option_report_system_area(struct XorrisO *xorriso, char *form, int flag)
Definition: opts_p_z.c:547
int Xorriso_option_system_id(struct XorrisO *xorriso, char *name, int flag)
Definition: opts_p_z.c:1611
int Xorriso_option_volset_id(struct XorrisO *xorriso, char *name, int flag)
Definition: opts_p_z.c:2127
int Xorriso_option_sleep(struct XorrisO *xorriso, char *duration, int flag)
Definition: opts_p_z.c:1380
int Xorriso_option_print(struct XorrisO *xorriso, char *text, int flag)
Definition: opts_p_z.c:296
int Xorriso_option_set_filter(struct XorrisO *xorriso, char *name, int argc, char **argv, int *idx, int flag)
Definition: opts_p_z.c:1255
int Xorriso_option_update(struct XorrisO *xorriso, char *disk_path, char *iso_path, int flag)
Definition: opts_p_z.c:1778
int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv, int *count, int flag)
Definition: parse_exec.c:521
int Xorriso_normalize_command(struct XorrisO *xorriso, char *original_cmd, int argno, char *cmd_data, int sizeof_cmd_data, char **cmd, int flag)
Definition: parse_exec.c:484
int Xorriso_eval_problem_status(struct XorrisO *xorriso, int ret, int flag)
Evaluate an advise whether to abort or whether to go on with option processing.
Definition: parse_exec.c:307
int Xorriso_exec_args_sorted(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
Definition: parse_exec.c:868
int Xorriso_set_problem_status(struct XorrisO *xorriso, char *severity, int flag)
Set the current problem status of the xorriso handle.
Definition: parse_exec.c:231
char list_delimiter[81]
int arrange_args
int prepended_wd
int result_page_counter
int result_page_length
int argument_emulation
int request_not_to_ask
int result_line_counter
int Xorriso_stop_msg_watcher(struct XorrisO *xorriso, int flag)
Revoke output redirection by Xorriso_start_msg_watcher() and end the watcher thread.
Definition: text_io.c:1614
int Xorriso_start_msg_watcher(struct XorrisO *xorriso, int(*result_handler)(void *handle, char *text), void *result_handle, int(*info_handler)(void *handle, char *text), void *info_handle, int flag)
Redirect output by Xorriso_push_outlists() and start a thread which fetches this output and performs ...
Definition: text_io.c:1523
int Xorriso_peek_outlists(struct XorrisO *xorriso, int stack_handle, int timeout, int flag)
Inquire whether messages are pending in redirected result and info channel.
Definition: text_io.c:1256
int Xorriso_push_outlists(struct XorrisO *xorriso, int *stack_handle, int flag)
Enable a new redirection of info and/or result channel.
Definition: text_io.c:1174
int Xorriso_pull_outlists(struct XorrisO *xorriso, int stack_handle, struct Xorriso_lsT **result_list, struct Xorriso_lsT **info_list, int flag)
Disable the redirection given by stack_handle.
Definition: text_io.c:1309
int Xorriso_process_msg_lists(struct XorrisO *xorriso, struct Xorriso_lsT *result_list, struct Xorriso_lsT *info_list, int *line_count, int flag)
Definition: text_io.c:1416
int Xorriso_fetch_outlists(struct XorrisO *xorriso, int stack_handle, struct Xorriso_lsT **result_list, struct Xorriso_lsT **info_list, int flag)
Obtain the currently collected text messages of redirected info and result channel.
Definition: text_io.c:1206

References XorrisO::add_plainly, XorrisO::argument_emulation, XorrisO::arrange_args, XorrisO::info_text, XorrisO::is_dialog, XorrisO::list_delimiter, XorrisO::prepended_wd, XorrisO::request_not_to_ask, XorrisO::request_to_abort, XorrisO::result_line_counter, XorrisO::result_page_counter, XorrisO::result_page_length, SfileadrL, Xorriso_alloc_meM, Xorriso_as_cdrskin(), Xorriso_as_genisofs(), Xorriso_count_args(), Xorriso_eval_problem_status(), Xorriso_exec_args_sorted(), Xorriso_fetch_outlists(), Xorriso_free_meM, Xorriso_msgs_submit(), Xorriso_normalize_command(), Xorriso_option_abort_on(), Xorriso_option_abstract_file(), Xorriso_option_acl(), Xorriso_option_add(), Xorriso_option_add_plainly(), Xorriso_option_alter_date(), Xorriso_option_append_partition(), Xorriso_option_application_id(), Xorriso_option_application_use(), Xorriso_option_as(), Xorriso_option_assert_volid(), Xorriso_option_auto_charset(), Xorriso_option_backslash_codes(), Xorriso_option_ban_stdio_write(), Xorriso_option_biblio_file(), Xorriso_option_blank(), Xorriso_option_boot_image(), Xorriso_option_calm_drive(), Xorriso_option_cdi(), Xorriso_option_cdx(), Xorriso_option_changes_pending(), Xorriso_option_charset(), Xorriso_option_check_md5(), Xorriso_option_check_media(), Xorriso_option_check_media_defaults(), Xorriso_option_chgrpi(), Xorriso_option_chmodi(), Xorriso_option_chowni(), Xorriso_option_clone(), Xorriso_option_close(), Xorriso_option_close_damaged(), Xorriso_option_close_filter_list(), Xorriso_option_commit(), Xorriso_option_commit_eject(), Xorriso_option_compare(), Xorriso_option_compliance(), Xorriso_option_concat(), Xorriso_option_copyright_file(), Xorriso_option_cp_clone(), Xorriso_option_cpri(), Xorriso_option_cpx(), Xorriso_option_cut_out(), Xorriso_option_data_cache_size(), Xorriso_option_dev(), Xorriso_option_devices(), Xorriso_option_dialog(), Xorriso_option_disk_dev_ino(), Xorriso_option_disk_pattern(), Xorriso_option_displacement(), Xorriso_option_drive_access(), Xorriso_option_drive_class(), Xorriso_option_dummy(), Xorriso_option_dvd_obs(), Xorriso_option_early_stdio_test(), Xorriso_option_ecma119_map(), Xorriso_option_eject(), Xorriso_option_end(), Xorriso_option_errfile_log(), Xorriso_option_error_behavior(), Xorriso_option_external_filter(), Xorriso_option_extract(), Xorriso_option_extract_boot_images(), Xorriso_option_extract_cut(), Xorriso_option_file_name_limit(), Xorriso_option_file_size_limit(), Xorriso_option_find(), Xorriso_option_follow(), Xorriso_option_fs(), Xorriso_option_getfacli(), Xorriso_option_gid(), Xorriso_option_grow_blindly(), Xorriso_option_hardlinks(), Xorriso_option_help(), Xorriso_option_hfsplus(), Xorriso_option_hide(), Xorriso_option_history(), Xorriso_option_iso_nowtime(), Xorriso_option_iso_rr_pattern(), Xorriso_option_jigdo(), Xorriso_option_joliet(), Xorriso_option_joliet_map(), Xorriso_option_launch_frontend(), Xorriso_option_list_arg_sorting(), Xorriso_option_list_delimiter(), Xorriso_option_list_extras(), Xorriso_option_list_formats(), Xorriso_option_list_profiles(), Xorriso_option_list_speeds(), Xorriso_option_lnsi(), Xorriso_option_load(), Xorriso_option_logfile(), Xorriso_option_lsi(), Xorriso_option_lsx(), Xorriso_option_map(), Xorriso_option_map_l(), Xorriso_option_mark(), Xorriso_option_md5(), Xorriso_option_mkdiri(), Xorriso_option_modesty_on_drive(), Xorriso_option_mount(), Xorriso_option_mount_opts(), Xorriso_option_move(), Xorriso_option_msg_op(), Xorriso_option_mvi(), Xorriso_option_named_pipe_loop(), Xorriso_option_no_rc(), Xorriso_option_not_leaf(), Xorriso_option_not_list(), Xorriso_option_not_mgt(), Xorriso_option_not_paths(), Xorriso_option_options_from_file(), Xorriso_option_osirrox(), Xorriso_option_overwrite(), Xorriso_option_pacifier(), Xorriso_option_padding(), Xorriso_option_page(), Xorriso_option_paste_in(), Xorriso_option_path_list(), Xorriso_option_pathspecs(), Xorriso_option_pkt_output(), Xorriso_option_preparer_id(), Xorriso_option_print(), Xorriso_option_print_size(), Xorriso_option_prog(), Xorriso_option_prompt(), Xorriso_option_publisher(), Xorriso_option_pvd_info(), Xorriso_option_pwdi(), Xorriso_option_pwdx(), Xorriso_option_read_fs(), Xorriso_option_read_mkisofsrc(), Xorriso_option_reassure(), Xorriso_option_report_about(), Xorriso_option_report_el_torito(), Xorriso_option_report_system_area(), Xorriso_option_return_with(), Xorriso_option_rmi(), Xorriso_option_rockridge(), Xorriso_option_rollback(), Xorriso_option_rom_toc_scan(), Xorriso_option_rr_reloc_dir(), Xorriso_option_scdbackup_tag(), Xorriso_option_scsi_dev_family(), Xorriso_option_scsi_log(), Xorriso_option_session_log(), Xorriso_option_set_filter(), Xorriso_option_setfacl_listi(), Xorriso_option_setfacli(), Xorriso_option_setfattr_listi(), Xorriso_option_setfattri(), Xorriso_option_sh_style_result(), Xorriso_option_signal_handling(), Xorriso_option_sleep(), Xorriso_option_speed(), Xorriso_option_split_size(), Xorriso_option_status(), Xorriso_option_status_history_max(), Xorriso_option_stdio_sync(), Xorriso_option_stream_recording(), Xorriso_option_system_id(), Xorriso_option_tell_media_space(), Xorriso_option_temp_mem_limit(), Xorriso_option_toc(), Xorriso_option_toc_of(), Xorriso_option_truncate_overwritable(), Xorriso_option_uid(), Xorriso_option_unregister_filter(), Xorriso_option_update(), Xorriso_option_use_immed_bit(), Xorriso_option_use_readline(), Xorriso_option_version(), Xorriso_option_volid(), Xorriso_option_volset_id(), Xorriso_option_volume_date(), Xorriso_option_write_type(), Xorriso_option_xattr(), Xorriso_option_zisofs(), Xorriso_peek_outlists(), Xorriso_process_msg_lists(), Xorriso_pull_outlists(), Xorriso_push_outlists(), Xorriso_set_problem_status(), Xorriso_start_msg_watcher(), and Xorriso_stop_msg_watcher().

Referenced by main(), Xorriso_exec_args_sorted(), and Xorriso_execute_option().

◆ Xorriso_lst_destroy_all()

int Xorriso_lst_destroy_all ( struct Xorriso_lsT **  lstring,
int  flag 
)

Destroy all list items which are directly or indirectly connected to the given link item.

All pointers obtained by Xorriso_lst_get_text() become invalid by this. Apply this to each of the two list handles obtained by Xorriso_pull_outlists() when the lists are no longer needed.

Parameters
lstring*lstring will be freed and set to NULL. It is not dangerous to submit a pointer to a NULL-pointer.
flagunused yet, submit 0
Returns
-1= lstring was NULL (i.e. wrong use of this call), 0= *lstring was already NULL, 1= item actually disposed

Definition at line 591 of file aux_objects.c.

592 {
593  struct Xorriso_lsT *s,*next;
594 
595  if(lstring==NULL)
596  return(-1);
597  if((*lstring)==NULL)
598  return(0);
599  for(s= *lstring; s->prev!=NULL; s= s->prev);
600  for(;s!=NULL;s= next){
601  next= s->next;
602  Xorriso_lst_destroy(&s,0);
603  }
604  *lstring= NULL;
605  return(1);
606 }
int Xorriso_lst_destroy(struct Xorriso_lsT **lstring, int flag)
Destroy a single list item and connect its eventual list neighbors.
Definition: aux_objects.c:571
struct Xorriso_lsT * next
Definition: aux_objects.h:70
struct Xorriso_lsT * prev
Definition: aux_objects.h:70

References Xorriso_lsT::next, Xorriso_lsT::prev, and Xorriso_lst_destroy().

Referenced by Exclusions_destroy(), Xorriso_destroy(), Xorriso_destroy_di_array(), Xorriso_destroy_node_array(), Xorriso_jigdo_interpreter(), Xorriso_msg_filter_destroy(), Xorriso_msg_op_parse_bulk(), Xorriso_msg_watcher(), Xorriso_named_pipe_loop(), Xorriso_option_drive_class(), Xorriso_option_setfattr_listi(), Xorriso_sieve_clear_results(), Xorriso_start_msg_watcher(), Xorriso_stop_msg_watcher(), and Xorriso_toc_to_string().

◆ Xorriso_lst_get_next()

struct Xorriso_lsT* Xorriso_lst_get_next ( struct Xorriso_lsT entry,
int  flag 
)

Obtain the address of the next item in the chain of messages.

An iteration over the output of Xorriso_pull_outlists() starts at the returned result_list or info_list and ends when this function returns NULL.

Parameters
entryThe current list item
flagunused yet, submit 0
Returns
Pointer to the next list item or NULL if end of list. This pointer does not have to be freed.

Definition at line 624 of file aux_objects.c.

625 {
626  return(entry->next);
627 }

References Xorriso_lsT::next.

Referenced by Xorriso_destroy_all_extf(), Xorriso_dialog_input(), Xorriso_external_filter(), Xorriso_finish_hl_update(), Xorriso_get_pattern(), Xorriso_is_in_patternlist(), Xorriso_lookup_extf(), Xorriso_make_restore_path(), Xorriso_msg_op_parse_bulk(), Xorriso_perform_attr_from_list(), Xorriso_sieve_get_result(), Xorriso_status(), Xorriso_status_extf(), and Xorriso_toc_to_string().

◆ Xorriso_lst_get_prev()

struct Xorriso_lsT* Xorriso_lst_get_prev ( struct Xorriso_lsT entry,
int  flag 
)

Obtain the address of the previous item in the chain of messages.

Parameters
entryThe current list item
flagunused yet, submit 0
Returns
Pointer to the previous list item or NULL if start of list. This pointer does not have to be freed.

Definition at line 630 of file aux_objects.c.

631 {
632  return(entry->prev);
633 }

References Xorriso_lsT::prev.

Referenced by Xorriso_status().

◆ Xorriso_lst_get_text()

char* Xorriso_lst_get_text ( struct Xorriso_lsT entry,
int  flag 
)

Obtain the text message from the current list item.

Parameters
entryThe current list item
flagunused yet, submit 0
Returns
Pointer to the text content of the list item. This pointer does not have to be freed.

Definition at line 636 of file aux_objects.c.

637 {
638  return(entry->text);
639 }
char * text
Definition: aux_objects.h:69

References Xorriso_lsT::text.

Referenced by Xorriso_destroy_all_extf(), Xorriso_dialog_input(), Xorriso_external_filter(), Xorriso_finish_hl_update(), Xorriso_get_pattern(), Xorriso_is_in_patternlist(), Xorriso_lookup_extf(), Xorriso_make_restore_path(), Xorriso_msg_op_parse_bulk(), Xorriso_perform_attr_from_list(), Xorriso_process_msg_lists(), Xorriso_set_filter(), Xorriso_sieve_get_result(), Xorriso_status(), Xorriso_status_extf(), and Xorriso_toc_to_string().

◆ Xorriso_make_return_value()

int Xorriso_make_return_value ( struct XorrisO xorriso,
int  flag 
)

Definition at line 2715 of file parse_exec.c.

2716 {
2717  int exit_value= 0;
2718 
2719  if(xorriso->eternal_problem_status >= xorriso->return_with_severity)
2720  exit_value= xorriso->return_with_value;
2721  if(exit_value) {
2722  sprintf(xorriso->info_text,
2723  "-return_with %s %d triggered by problem severity %s",
2724  xorriso->return_with_text, exit_value,
2725  xorriso->eternal_problem_status_text);
2726  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
2727  }
2728  return(exit_value);
2729 }
char return_with_text[20]
int return_with_value
int return_with_severity

References XorrisO::eternal_problem_status, XorrisO::eternal_problem_status_text, XorrisO::info_text, XorrisO::return_with_severity, XorrisO::return_with_text, XorrisO::return_with_value, and Xorriso_msgs_submit().

Referenced by main().

◆ Xorriso_msgs_submit()

int Xorriso_msgs_submit ( struct XorrisO xorriso,
int  error_code,
char  msg_text[],
int  os_errno,
char  severity[],
int  flag 
)

Submit a problem message to the xorriso problem reporting and handling system.

This will eventually increase problem status rank, which may at certain stages in the program be pardoned and reset to 0. The pardon is governed by Xorriso_option_abort_on() and by the anger of the affected program part. If no pardon has been given, then the problem status reaches the caller of option functions. Problem status should be inquired by Xorriso_eval_problem_status() and be reset before next option execution by Xorriso_set_problem_status(). The problem status itself does not cause the failure of option functions. But in case of failures for other reasons, a remnant overly severe problem status can cause overly harsh program reactions.

Parameters
xorrisoThe environment handle
error_codeThe unique error code of your message. Submit 0 if you do not have reserved error codes within the libburnia project.
msg_textNot more than 8196 characters of message text. A final newline character gets appended automatically.
os_errnoEventual errno related to the message. Submit 0 if the message is not related to a operating system error.
severityOne of "ABORT", "FATAL", "FAILURE", "MISHAP", "SORRY", "WARNING", "HINT", "NOTE", "UPDATE", "DEBUG". Defaults to "FATAL".
flagBitfield for control purposes bit0= use pager (as with result) bit1= permission to suppress output
Returns
1 if message was delivered, <=0 if failure

Definition at line 2504 of file text_io.c.

2507 {
2508  int ret, lt, li, sev, i;
2509  char *sev_text= "FATAL", prefix[80], *text= NULL;
2510  static char pfx_list[20][16]= {
2511  "xorriso : ", "libisofs: ", "libburn : ", "libisoburn: ",
2512  "", "", "", "", "", "", "", "", "", "", "", "" };
2513 
2514  if(flag&128)
2515  Xorriso_process_msg_queues(xorriso, 0);
2516 
2517  if(strcmp(severity, "ERRFILE")==0)
2518  Xorriso_process_errfile(xorriso, error_code, msg_text, os_errno, 0);
2519 
2520  /* Set problem status */
2521  ret= Xorriso__text_to_sev(severity, &sev, 0);
2522  if(ret<=0)
2523  Xorriso__text_to_sev(sev_text, &sev, 0);
2524  else
2525  sev_text= severity;
2526  if(xorriso->problem_status<sev)
2527  Xorriso_set_problem_status(xorriso, sev_text, 0);
2528 
2529  /* Report problem event */
2530  if(sev<xorriso->report_about_severity && sev<xorriso->abort_on_severity)
2531  {ret= 2; goto ex;}
2532  lt= strlen(msg_text);
2533  if(!(flag & 256)) {
2534  sprintf(prefix,"%s%s : ", pfx_list[(flag>>2)&15], sev_text);
2535  li= strlen(prefix);
2536  } else {
2537  prefix[0]= 0;
2538  li= 0;
2539  }
2540  if(lt > ((int) sizeof(xorriso->info_text)) - li - 2)
2541  lt= sizeof(xorriso->info_text)-li-2;
2542 
2543 #ifdef Xorriso_fetch_with_msg_queueS
2544 
2545  Xorriso_alloc_meM(text, char, sizeof(xorriso->info_text));
2546 
2547 #else /* Xorriso_fetch_with_msg_queueS */
2548 
2549  text= xorriso->info_text;
2550 
2551 #endif /* ! Xorriso_fetch_with_msg_queueS */
2552 
2553  if(msg_text == text) {
2554  if(li > 0) {
2555  for(i= lt; i>=0; i--)
2556  msg_text[i+li]= msg_text[i];
2557  for(i=0; i<li; i++)
2558  msg_text[i]= prefix[i];
2559  }
2560  } else {
2561  if(li > 0)
2562  strcpy(text, prefix);
2563  strncpy(text + li, msg_text, lt);
2564  }
2565  if((flag&64) && os_errno<=0)
2566  text[li+lt]= '\r';
2567  else
2568  text[li+lt]= '\n';
2569  text[li+lt+1]= 0;
2570  if(os_errno>0)
2571  sprintf(text + strlen(text) - 1, " : %s\n", strerror(os_errno));
2572 
2573 #ifdef Xorriso_fetch_with_msg_queueS
2574 
2575  Xorriso_write_to_channel(xorriso, text, 2, 0);
2576 
2577 #else /* Xorriso_fetch_with_msg_queueS */
2578 
2579  Xorriso_info(xorriso,4|(flag&3));
2580 
2581 #endif /* ! Xorriso_fetch_with_msg_queueS */
2582 
2583 ex:;
2584 
2585 #ifdef Xorriso_fetch_with_msg_queueS
2586  Xorriso_free_meM(text);
2587 #endif /* ! Xorriso_fetch_with_msg_queueS */
2588 
2589  return(ret);
2590 }
int Xorriso_process_errfile(struct XorrisO *xorriso, int error_code, char msg_text[], int os_errno, int flag)
Write a message for option -errfile_log.
Definition: text_io.c:2438
int Xorriso_write_to_channel(struct XorrisO *xorriso, char *in_text, int channel_no, int flag)
Definition: text_io.c:911

References XorrisO::info_text, XorrisO::problem_status, Xorriso_lsT::text, Xorriso__text_to_sev(), Xorriso_alloc_meM, Xorriso_free_meM, Xorriso_info(), Xorriso_process_errfile(), Xorriso_process_msg_queues(), Xorriso_set_problem_status(), and Xorriso_write_to_channel().

Referenced by Permstack_pop(), Sfile_prepend_path(), Xoriso_handle_collision(), Xorriso_add_mips_boot_file(), Xorriso_add_tree(), Xorriso_adjust_session_size(), Xorriso_afile_fopen(), Xorriso_alloc_pattern_mem(), Xorriso_append_extattr_comp(), Xorriso_append_scdbackup_record(), Xorriso_apply_sort_file(), Xorriso_aquire_drive(), Xorriso_assert_volid(), Xorriso_atip(), Xorriso_attach_boot_image(), Xorriso_auto_chmod(), Xorriso_auto_driveadr(), Xorriso_auto_format(), Xorriso_blank_as_needed(), Xorriso_blank_media(), Xorriso_burn_track(), Xorriso_cannot_clone(), Xorriso_cannot_create_iter(), Xorriso_cdrskin(), Xorriso_check_burn_abort(), Xorriso_check_for_abort(), Xorriso_check_for_root_pattern(), Xorriso_check_interval(), Xorriso_check_intvl_string(), Xorriso_check_matchcount(), Xorriso_check_md5(), Xorriso_check_media(), Xorriso_check_media_setup_job(), Xorriso_check_multi(), Xorriso_check_session_md5(), Xorriso_check_temp_mem_limit(), Xorriso_check_thing_len(), Xorriso_chunk_md5(), Xorriso_clone_tree(), Xorriso_clone_under(), Xorriso_close_damaged(), Xorriso_compare_2_files(), Xorriso_concat(), Xorriso_convert_datestring(), Xorriso_convert_gidstring(), Xorriso_convert_modstring(), Xorriso_convert_uidstring(), Xorriso_coordinate_system_area(), Xorriso_copy_implicit_properties(), Xorriso_count_args(), Xorriso_cpmv_args(), Xorriso_cut_out(), Xorriso_decode_load_adr(), Xorriso_dialog_input(), Xorriso_dir_from_path(), Xorriso_execv(), Xorriso_expand_disk_pattern(), Xorriso_expand_pattern(), Xorriso_external_filter(), Xorriso_external_filter_banned(), Xorriso_extract_boot_images(), Xorriso_extract_cut(), Xorriso_fetch_outlists(), Xorriso_findi_action(), Xorriso_findi_iter(), Xorriso_findx(), Xorriso_findx_action(), Xorriso_format_media(), Xorriso_genisofs(), Xorriso_genisofs_fused_options(), Xorriso_genisofs_hide_list(), Xorriso_genisofs_ignore(), Xorriso_genisofs_platform(), Xorriso_get_attrs(), Xorriso_get_drive_handles(), Xorriso_get_volume(), Xorriso_getfacl(), Xorriso_give_up_drive(), Xorriso_gpt_crc(), Xorriso_graft_in(), Xorriso_graft_split(), Xorriso_graftable_pathspec(), Xorriso_handle_collision(), Xorriso_hfsplus_bless(), Xorriso_hfsplus_file_creator_type(), Xorriso_hop_link(), Xorriso_interpreter(), Xorriso_is_concat_target(), Xorriso_iso_file_open(), Xorriso_iso_file_to_fd(), Xorriso_jigdo_interpreter(), Xorriso_launch_frontend(), Xorriso_list_formats(), Xorriso_list_speeds(), Xorriso_list_speeds_sub(), Xorriso_ls_filev(), Xorriso_lsx_filev(), Xorriso_make_iso_write_opts(), Xorriso_make_mount_cmd(), Xorriso_make_return_value(), Xorriso_make_tmp_path(), Xorriso_make_write_options(), Xorriso_may_burn(), Xorriso_mkdir(), Xorriso_mount(), Xorriso_msgs_submit_void(), Xorriso_msinfo(), Xorriso_much_too_long(), Xorriso_named_pipe_loop(), Xorriso_no_findjob(), Xorriso_no_malloc_memory(), Xorriso_no_pattern_memory(), Xorriso_node_from_path(), Xorriso_normalize_acl_text(), Xorriso_normalize_img_path(), Xorriso_obtain_pattern_files_x(), Xorriso_open_job_data_to(), Xorriso_open_named_pipe(), Xorriso_opt_args(), Xorriso_option_abort_on(), Xorriso_option_acl(), Xorriso_option_add(), Xorriso_option_add_plainly(), Xorriso_option_append_partition(), Xorriso_option_application_use(), Xorriso_option_as(), Xorriso_option_assert_volid(), Xorriso_option_auto_charset(), Xorriso_option_backslash_codes(), Xorriso_option_blank(), Xorriso_option_boot_image(), Xorriso_option_cdi(), Xorriso_option_cdx(), Xorriso_option_changes_pending(), Xorriso_option_charset(), Xorriso_option_check_md5(), Xorriso_option_check_media(), Xorriso_option_close_damaged(), Xorriso_option_commit(), Xorriso_option_compare(), Xorriso_option_concat(), Xorriso_option_cp_clone(), Xorriso_option_cpri(), Xorriso_option_cpx(), Xorriso_option_cut_out(), Xorriso_option_dev(), Xorriso_option_devices(), Xorriso_option_dialog(), Xorriso_option_disk_dev_ino(), Xorriso_option_disk_pattern(), Xorriso_option_displacement(), Xorriso_option_drive_access(), Xorriso_option_drive_class(), Xorriso_option_dvd_obs(), Xorriso_option_early_stdio_test(), Xorriso_option_ecma119_map(), Xorriso_option_eject(), Xorriso_option_errfile_log(), Xorriso_option_error_behavior(), Xorriso_option_external_filter(), Xorriso_option_extract(), Xorriso_option_extract_boot_images(), Xorriso_option_extract_cut(), Xorriso_option_file_name_limit(), Xorriso_option_file_size_limit(), Xorriso_option_find(), Xorriso_option_follow(), Xorriso_option_fs(), Xorriso_option_hardlinks(), Xorriso_option_hfsplus(), Xorriso_option_hide(), Xorriso_option_iso_nowtime(), Xorriso_option_iso_rr_pattern(), Xorriso_option_joliet(), Xorriso_option_joliet_map(), Xorriso_option_launch_frontend(), Xorriso_option_list_delimiter(), Xorriso_option_lnsi(), Xorriso_option_load(), Xorriso_option_logfile(), Xorriso_option_lsi(), Xorriso_option_lsx(), Xorriso_option_map(), Xorriso_option_map_l(), Xorriso_option_md5(), Xorriso_option_modesty_on_drive(), Xorriso_option_mount(), Xorriso_option_mount_opts(), Xorriso_option_msg_op(), Xorriso_option_mvi(), Xorriso_option_named_pipe_loop(), Xorriso_option_not_leaf(), Xorriso_option_not_list(), Xorriso_option_not_mgt(), Xorriso_option_not_paths(), Xorriso_option_options_from_file(), Xorriso_option_osirrox(), Xorriso_option_overwrite(), Xorriso_option_pacifier(), Xorriso_option_padding(), Xorriso_option_page(), Xorriso_option_paste_in(), Xorriso_option_path_list(), Xorriso_option_pathspecs(), Xorriso_option_print(), Xorriso_option_print_size(), Xorriso_option_prog(), Xorriso_option_read_fs(), Xorriso_option_reassure(), Xorriso_option_report_about(), Xorriso_option_return_with(), Xorriso_option_rmi(), Xorriso_option_rockridge(), Xorriso_option_rom_toc_scan(), Xorriso_option_rr_reloc_dir(), Xorriso_option_scdbackup_tag(), Xorriso_option_scsi_dev_family(), Xorriso_option_scsi_log(), Xorriso_option_setfacl_listi(), Xorriso_option_setfacli(), Xorriso_option_setfattr_listi(), Xorriso_option_sh_style_result(), Xorriso_option_signal_handling(), Xorriso_option_sleep(), Xorriso_option_speed(), Xorriso_option_split_size(), Xorriso_option_stdio_sync(), Xorriso_option_tell_media_space(), Xorriso_option_temp_mem_limit(), Xorriso_option_toc_of(), Xorriso_option_update(), Xorriso_option_use_immed_bit(), Xorriso_option_volid(), Xorriso_option_volume_date(), Xorriso_option_write_type(), Xorriso_option_xattr(), Xorriso_option_zisofs(), Xorriso_overwrite_dest(), Xorriso_overwrite_iso_head(), Xorriso_pacifier_callback(), Xorriso_pacifier_loop(), Xorriso_parse_guid(), Xorriso_parse_line(), Xorriso_paste_in(), Xorriso_path_is_excluded(), Xorriso_path_is_hidden(), Xorriso_path_setfattr(), Xorriso_pipe_open(), Xorriso_prepare_expansion_pattern(), Xorriso_prepare_regex(), Xorriso_prescan_args(), Xorriso_pretend_full_disc(), Xorriso_process_msg_queues(), Xorriso_pull_outlists(), Xorriso_push_outlists(), Xorriso_read_file_data(), Xorriso_read_lines(), Xorriso_reaquire_outdev(), Xorriso_reassure(), Xorriso_reassure_restore(), Xorriso_refresh_ts_tags(), Xorriso_register_matched_adr(), Xorriso_register_node_target(), Xorriso_relax_compliance(), Xorriso_rename(), Xorriso_rename_suffix(), Xorriso_report_iso_error(), Xorriso_report_md5_outcome(), Xorriso_report_system_area(), Xorriso_resolve_link(), Xorriso_restore(), Xorriso_restore_disk_object(), Xorriso_restore_implicit_properties(), Xorriso_restore_is_identical(), Xorriso_restore_make_hl(), Xorriso_restore_node_array(), Xorriso_restore_overwrite(), Xorriso_restore_properties(), Xorriso_restore_tree(), Xorriso_retry_burn_track(), Xorriso_retry_write_session(), Xorriso_rmi(), Xorriso_rmx(), Xorriso_sanitize_image_size(), Xorriso_scan_report_lines(), Xorriso_sectormap_to_spotlist(), Xorriso_set_file_name_limit(), Xorriso_set_filter(), Xorriso_set_hfsplus_crtp(), Xorriso_set_hppa_boot_parm(), Xorriso_set_isolinux_options(), Xorriso_set_local_charset(), Xorriso_set_signal_handling(), Xorriso_set_st_mode(), Xorriso_set_system_area(), Xorriso_set_system_area_path(), Xorriso_set_volid(), Xorriso_setfacl(), Xorriso_setfattr(), Xorriso_show_devices(), Xorriso_show_dux_subs(), Xorriso_sieve_get_result(), Xorriso_sorted_node_array(), Xorriso_source_date_epoch(), Xorriso_split_report_line(), Xorriso_start_chunk_md5(), Xorriso_start_msg_watcher(), Xorriso_startup_libraries(), Xorriso_stop_msg_watcher(), Xorriso_toc(), Xorriso_tree_graft_node(), Xorriso_tree_restore_node(), Xorriso_truncate_const_find_name(), Xorriso_truncate_overwritable(), Xorriso_truncate_uniquely(), Xorriso_update_interpreter(), Xorriso_update_iso_lba0(), Xorriso_verify_sb_tag(), Xorriso_warn_of_wildcards(), Xorriso_write_application_use(), Xorriso_write_session(), and Xorriso_write_session_log().

◆ Xorriso_msgs_submit_void()

int Xorriso_msgs_submit_void ( void *  xorriso,
int  error_code,
char  msg_text[],
int  os_errno,
char  severity[],
int  flag 
)

Alternative call interface of Xorriso_msgs_submit with void* instead of struct XorrisO*.

Definition at line 2595 of file text_io.c.

2598 {
2599  int ret;
2600 
2601  ret= Xorriso_msgs_submit((struct XorrisO *) xorriso, error_code, msg_text,
2602  os_errno, severity, flag);
2603  return(ret);
2604 }

References Xorriso_msgs_submit().

Referenced by Xorriso_startup_libraries().

◆ Xorriso_new()

int Xorriso_new ( struct XorrisO **  xorriso,
char *  progname,
int  flag 
)

Definition at line 100 of file base_obj.c.

101 {
102  int i, ret;
103  struct XorrisO *m;
104  char *leafname= NULL;
105 
106  leafname= TSOB_FELD(char, SfileadrL);
107  if(leafname == NULL)
108  return(-1);
109  *xorriso= m= TSOB_FELD(struct XorrisO,1);
110  if(m==NULL) {
111  free(leafname);
112  return(-1);
113  }
114 
115  /* Base initialization by actions which must not fail */
116 
117  m->libs_are_started= 0;
118  strncpy(m->progname,progname,sizeof(m->progname)-1);
119  m->progname[sizeof(m->progname)-1]= 0;
120  if(getcwd(m->initial_wdx,sizeof(m->initial_wdx)-1)==NULL)
121  m->initial_wdx[0]= 0;
122  m->no_rc= 0;
123  m->argument_emulation= 0;
124 
126  for(i=0;i<m->rc_filename_count-1;i++)
127  strcpy(m->rc_filenames[i],Xorriso_sys_rc_nameS[i]);
128  m->rc_filenames[m->rc_filename_count-1][0]= 0;
129  m->arrange_args= 0;
130  m->mkisofsrc_done= 0;
131 
132  m->wdi[0]= 0;
133  strcpy(m->wdx, m->initial_wdx);
134  m->did_something_useful= 0;
135  m->add_plainly= 0;
136  m->split_size= 0;
137  strcpy(m->list_delimiter, "--");
138  m->ino_behavior= 1 | 2 | 4 | 32; /* off:no_lsl_count */
139  m->iso_level= 3;
140  m->iso_level_is_default= 1;
141  m->do_joliet= 0;
142  m->do_hfsplus= 0;
143  m->do_fat= 0;
144  m->do_rockridge= 1;
145  m->do_iso1999= 0;
146  m->ecma119_map= 1;
147  m->joliet_map= 1;
148  m->do_aaip= 0;
149  m->do_md5= 64;
150  m->no_emul_toc= 0;
151  m->do_old_empty= 0;
152  m->scdbackup_tag_name[0]= 0;
153  m->scdbackup_tag_time[0]= 0;
154  m->scdbackup_tag_written[0]= 0;
155  m->scdbackup_tag_listname[0]= 0;
156  m->relax_compliance= 0;
157  m->allow_dir_id_ext_dflt= 1;
158  m->rr_reloc_dir[0]= 0;
159  m->rr_reloc_flags= 1;
160  m->untranslated_name_len= 0;
161  m->do_follow_pattern= 1;
162  m->do_follow_param= 0;
163  m->do_follow_links= 0;
164  m->follow_link_limit= 100;
166  m->resolve_link_rec_limit= 100;
167  m->do_follow_concat= 0;
168  m->do_follow_mount= 1;
169  m->do_global_uid= 0;
170  m->global_uid= 0;
171  m->isofs_size= 0;
172  m->isofs_has_what= 0;
173  m->tree_loaded= 0;
174  m->rr_loaded= 0;
175  strcpy(m->volid, "ISOIMAGE");
176  m->volid_default= 1;
177  m->loaded_volid[0]= 0;
178  m->assert_volid[0]= 0;
179  m->assert_volid_sev[0]= 0;
180  m->preparer_id[0]= 0;
181  m->publisher[0]= 0;
182  m->application_id[0]= 0;
183  m->system_id[0]= 0;
184  m->volset_id[0]= 0;
185  m->copyright_file[0]= 0;
186  m->biblio_file[0]= 0;
187  m->abstract_file[0]= 0;
188  strcpy(m->application_use, " ");
189  m->session_logfile[0]= 0;
190  m->session_lba= -1;
191  m->session_blocks= 0;
192  m->do_global_gid= 0;
193  m->global_gid= 0;
194  m->do_global_mode= 0;
195  m->global_dir_mode= 0555;
196  m->global_file_mode= 0444;
197  m->do_tao= 0;
198  m->filters= NULL;
199  m->filter_list_closed= 0;
200  m->zlib_level_default= m->zlib_level= 6;
202  m->zisofs_by_magic= 0;
203  m->zisofs_v2_enabled= 0;
210  -1.0;
212  m->do_overwrite= 2;
213  m->do_reassure= 0;
214  m->drive_blacklist= NULL;
215  m->drive_greylist= NULL;
216  m->drive_whitelist= NULL;
217  m->toc_emulation_flag= 0;
218  m->image_start_mode= 0;
219  m->image_start_value[0]= 0;
220  m->displacement= 0;
221  m->displacement_sign= 0;
222  m->read_fs= 0;
223  m->drives_exclusive= 1;
224  m->drives_access= 1;
225  m->linux_scsi_dev_family= 0;
226  m->early_stdio_test= 0;
227  m->cache_num_tiles= 0;
228  m->cache_tile_blocks= 0;
229  m->cache_default= 1 | 2;
230  m->do_calm_drive= 1;
231  m->indev[0]= 0;
232  m->in_drive_handle= NULL;
233  m->in_volset_handle= NULL;
234  m->in_charset= NULL;
235  m->isofs_st_out= time(0) - 1;
236  m->indev_is_exclusive= 1;
237  m->indev_access= 1;
238  m->indev_off_adr[0]= 0;
239  m->isofs_st_in= 0;
240  m->volset_change_pending= 0;
241  m->no_volset_present= 0;
242  m->in_sector_map= NULL;
243  m->check_media_default= NULL;
245  m->outdev[0]= 0;
246  m->out_drive_handle= NULL;
247  m->out_charset= NULL;
248  m->dev_fd_1= -1;
249  m->outdev_is_exclusive= 1;
250  m->outdev_access= 1;
251  m->outdev_off_adr[0]= 0;
252  m->grow_blindly_msc2= -1;
253  m->ban_stdio_write= 0;
254  m->do_dummy= 0;
255  m->do_close= 0;
256  m->auto_close= 0;
257  m->write_speed= 0; /* max */
258  m->read_speed= -2; /* do not set */
259  m->read_speed_force= 0;
260  m->read_speed_corr= 250000; /* look back at most 0.25 seconds with _force */
261  m->fs= 4*512; /* 4 MiB */
262  m->padding= 300*1024;
264  m->alignment= 0;
265  m->do_stream_recording= 0;
266  m->dvd_obs= 0;
267  m->modesty_on_drive= 0;
268  m->min_buffer_usec= 5000;
269  m->max_buffer_usec= 25000;
270  m->buffer_timeout_sec= 120;
271  m->min_buffer_percent= 90;
272  m->max_buffer_percent= 95;
273  m->use_immed_bit= 0;
274  m->use_immed_bit_default= 0;
275  m->stdio_sync= 0;
276  m->stdio_sync_is_default= 1;
277  m->keep_boot_image= 0;
278  m->boot_image_cat_path[0]= 0;
279  m->boot_image_cat_hidden= 0;
280  m->boot_count= 0;
281  m->boot_platform_id= 0x00; /* El Torito Boot Catalog Platform ID: 0 = 80x86 */
282  m->patch_isolinux_image= 0;
283  m->boot_image_bin_path[0]= 0;
284  m->boot_image_bin_form[0]= 0;
285  m->boot_image_emul= 0;
286  m->boot_emul_default= 1;
287  m->boot_image_load_size= 4 * 512; /* hearsay out of libisofs/demo/iso.c */
288  m->boot_img_size_default= 1;
289  m->boot_img_full_size= 0;
290  memset(m->boot_id_string, 0, sizeof(m->boot_id_string));
291  memset(m->boot_selection_crit, 0, sizeof(m->boot_selection_crit));
292 
293 #ifdef Xorriso_with_isohybriD
294  m->boot_image_isohybrid= 1;
295 #else
296  m->boot_image_isohybrid= 0;
297 #endif
298 
299  m->boot_efi_default= 0;
300  m->system_area_disk_path[0]= 0;
302  m->system_area_options= 0;
303  m->patch_system_area= 0;
304  m->partition_offset= 0;
307  m->prep_partition[0]= 0;
308  m->efi_boot_partition[0]= 0;
309  for(i= 0; i < Xorriso_max_appended_partitionS; i++) {
310  m->appended_partitions[i]= NULL;
311  m->appended_part_types[i]= 0;
312  memset(m->appended_part_type_guids[i], 0, 16);
313  m->appended_part_gpt_flags[i]= 0;
314  }
315  m->appended_as_gpt= 0;
316  m->appended_as_apm= 0;
317  m->part_like_isohybrid= 0;
318  m->iso_mbr_part_type= -1;
319  memset(m->iso_gpt_type_guid, 0, 16);
320  m->iso_mbr_part_flag= 0;
321  memset(m->gpt_guid, 0, 16);
322  m->gpt_guid_mode= 0;
323  m->ascii_disc_label[0]= 0;
324  m->grub2_sparc_core[0]= 0;
325  memset(m->hfsp_serial_number, 0, 8);
326  m->hfsp_block_size= 0;
327  m->apm_block_size= 0;
328  m->vol_creation_time= 0;
329  m->vol_modification_time= 0;
330  m->vol_expiration_time= 0;
331  m->vol_effective_time= 0;
332  m->vol_uuid[0]= 0;
333  m->all_file_dates[0]= 0;
334  m->do_override_now_time= 0;
335  m->now_time_override= 0;
336 
337 #ifdef Xorriso_with_libjtE
338  m->libjte_handle= NULL;
339 #endif
340 
341  m->jigdo_params= NULL;
342  m->jigdo_values= NULL;
343  m->libjte_params_given= 0;
344  m->loaded_boot_bin_lba= 0;
345  m->loaded_boot_cat_path[0]= 0;
346  m->allow_graft_points= 0;
347  m->allow_restore= 0;
348  m->do_concat_split= 1;
349  m->do_auto_chmod= 0;
350  m->do_restore_sort_lba= 0;
351  m->do_strict_acl= 0;
352  m->dialog= 0;
353  m->buffered_dialog= NULL;
354  m->bsl_interpretation= 0;
355  m->sh_style_result= 0;
356  m->search_mode= 0;
357  m->structured_search= 1;
358  m->do_iso_rr_pattern= 1;
359  m->do_disk_pattern= 2;
360  m->temp_mem_limit= 16*1024*1024;
362  m->file_name_limit= 255;
363  m->disk_exclusions= NULL;
364  m->iso_rr_hidings= NULL;
365  m->joliet_hidings= NULL;
366  m->hfsplus_hidings= NULL;
367  m->disk_excl_mode= 1;
368  m->use_stdin= 0;
369  m->tolerate_stdin_eof= 0;
370  m->result_page_length= 0;
371  m->result_page_width= 80;
372  m->mark_text[0]= 0;
373  m->packet_output= 0;
374  for(i=0; i<4; i++) {
375  m->logfile[i][0]= 0;
376  m->logfile_fp[i]= NULL;
377  }
378  m->pktlog_fp= NULL;
379  m->stderr_fp= NULL;
380  for(i= 0; i < Xorriso_max_outlist_stacK; i++) {
381  m->result_msglists[i]= NULL;
382  m->info_msglists[i]= NULL;
383  m->msglist_flags[i]= 0;
384  }
388  m->msg_watcher_lock_ini= 0;
389  m->msg_watcher_state= 0;
390  m->msgw_result_handler= NULL;
391  m->msgw_result_handle= NULL;
392  m->msgw_info_handler= NULL;
393  m->msgw_info_handle= NULL;
394  m->msgw_stack_handle= -1;
395  m->msgw_msg_pending= 0;
396  m->msgw_fetch_lock_ini= 0;
397  m->msg_sieve= NULL;
398  m->msg_sieve_disabled= 0;
399  m->msglist_stackfill= 0;
401  m->scsi_log= 0;
402  strcpy(m->report_about_text, "UPDATE");
405  strcpy(m->abort_on_text,"FAILURE");
407  m->abort_on_is_default= 1;
408  m->problem_status= 0;
410  m->problem_status_text[0]= 0;
411  m->errfile_log[0]= 0;
412  m->errfile_mode= 0;
413  m->errfile_fp= NULL;
414 
415  m->img_read_error_mode= 1; /* abort faulty image reading with FAILURE */
416  m->extract_error_mode= 1; /* keep extracted files after read error */
417  strcpy(m->return_with_text, "SORRY");
419  m->return_with_value= 32;
422  m->re= NULL;
423  /* >>> ??? how to initialize m->match[0] ? */
424  m->re_constants= NULL;
425  m->re_count= 0;
426  m->re_fill= 0;
427  m->reg_expr[0]= 0;
428  m->run_state= 0;
429  m->is_dialog= 0;
430  m->bar_is_fresh= 0;
431  m->pending_option[0]= 0;
432  m->request_to_abort= 0;
433  m->request_not_to_ask= 0;
434  m->idle_time= 0.0;
435  m->re_failed_at= -1;
436  m->prepended_wd= 0;
437  m->insert_count= 0;
438  m->insert_bytes= 0;
439  m->error_count= 0;
441  m->pacifier_style= 0;
442  m->pacifier_interval= 1.0;
443  m->pacifier_count= 0;
444  m->pacifier_prev_count= 0;
445  m->pacifier_total= 0;
446  m->pacifier_byte_count= 0;
447  m->pacifier_fifo= NULL;
448  m->start_time= 0.0;
449  m->last_update_time= 0.0;
450  m->find_compare_result= 1;
451  m->find_check_md5_result= 0;
452  m->last_abort_file_time= 0.0;
453 
454  m->node_counter= 0;
455  m->node_array_size= 0;
456  m->node_array= NULL;
457  m->node_disk_prefixes= NULL;
458  m->node_img_prefixes= NULL;
459 
460  m->hln_count= 0;
461  m->hln_array= NULL;
462  m->hln_targets= NULL;
463  m->hln_change_pending= 0;
464  m->di_do_widen= NULL;
465  m->di_disk_paths= NULL;
466  m->di_iso_paths= NULL;
467 
468  m->node_targets_availmem= 0;
469 
470  m->di_count= 0;
471  m->di_array= NULL;
472 
473  m->perm_stack= NULL;
474 
475  m->update_flags= 0;
476 
477  m->show_hfs_cmd_flag= 0;
478  m->show_hfs_cmd_count= 0;
479  m->show_hfs_cmds= NULL;
480 
481  m->sparse_min_gap= 0;
482 
483  m->result_line[0]= 0;
484  m->result_line_counter= 0;
485  m->result_page_counter= 0;
486  m->result_open_line_len= 0;
487 
488  m->info_text[0]= 0;
489 
490 
491  /* Here begin actions which might fail */
492 
493  ret= Sfile_leafname(progname, leafname, 0);
494  if(ret<=0)
495  goto failure;
496  if(strcmp(leafname, "osirrox")==0) {
497  m->allow_restore= 1;
498  m->drives_exclusive= 0;
499  m->drives_access= 0;
500  } else if(strcmp(leafname, "xorrisofs")==0 || strcmp(leafname, "genisofs")==0 ||
501  strcmp(leafname, "mkisofs")==0 || strcmp(leafname, "genisoimage")==0) {
502  m->argument_emulation= 1;
503  m->pacifier_style= 1;
504  Xorriso_protect_stdout(*xorriso, 0);
505  } else if(strcmp(leafname, "xorrecord")==0 || strcmp(leafname, "wodim")==0 ||
506  strcmp(leafname, "cdrecord")==0 || strcmp(leafname, "cdrskin")==0) {
507  m->argument_emulation= 2;
508  m->pacifier_style= 2;
509  }
510  ret= Exclusions_new(&(m->disk_exclusions), 0);
511  if(ret<=0)
512  goto failure;
513  ret= Exclusions_new(&(m->iso_rr_hidings), 0);
514  if(ret<=0)
515  goto failure;
516  ret= Exclusions_new(&(m->joliet_hidings), 0);
517  if(ret<=0)
518  goto failure;
519  ret= Exclusions_new(&(m->hfsplus_hidings), 0);
520  if(ret<=0)
521  goto failure;
522  Xorriso_relax_compliance(m, "default", 0);
523  ret= Xorriso_lst_new(&(m->drive_greylist), "/dev", m->drive_greylist, 1);
524  if(ret <= 0)
525  goto failure;
526  Xorriso_preparer_string(m, m->preparer_id, 1); /* avoids library calls */
527  ret= pthread_mutex_init(&(m->lib_msg_queue_lock), NULL);
528  if(ret != 0)
529  goto failure;
531  ret= pthread_mutex_init(&(m->result_msglists_lock), NULL);
532  if(ret != 0)
533  goto failure;
535  ret= pthread_mutex_init(&(m->write_to_channel_lock), NULL);
536  if(ret != 0)
537  goto failure;
539  ret= pthread_mutex_init(&(m->problem_status_lock), NULL);
540  if(ret != 0)
541  goto failure;
543  ret= pthread_mutex_init(&(m->msg_watcher_lock), NULL);
544  if(ret != 0)
545  goto failure;
546  m->msg_watcher_lock_ini= 1;
547  ret= pthread_mutex_init(&(m->msgw_fetch_lock), NULL);
548  if(ret != 0)
549  goto failure;
550  m->msgw_fetch_lock_ini= 1;
551 
552  if(leafname != NULL)
553  free(leafname);
554  return(1);
555 failure:;
556  Xorriso_destroy(xorriso, 0);
557  if(leafname != NULL)
558  free(leafname);
559  return(-1);
560 }
int Xorriso_lst_new(struct Xorriso_lsT **lstring, char *text, struct Xorriso_lsT *link, int flag)
Create a new list item with a 0-terminated text as content.
Definition: aux_objects.c:557
int Exclusions_new(struct ExclusionS **o, int flag)
Definition: aux_objects.c:695
static char Xorriso_sys_rc_nameS[4][80]
Definition: base_obj.c:92
#define Xorriso_rc_nuM
The list of startup file names.
Definition: base_obj.c:90
int Xorriso_destroy(struct XorrisO **xorriso, int flag)
Definition: base_obj.c:592
#define Xorriso_read_quality_invaliD
Definition: check_media.h:89
int Xorriso_preparer_string(struct XorrisO *xorriso, char xorriso_id[129], int flag)
Definition: lib_mgt.c:683
int Sfile_leafname(char *path, char leafname[4096], int flag)
Definition: sfile.c:116
#define TSOB_FELD(typ, count)
Definition: sfile.h:15
double insert_bytes
int iso_mbr_part_type
int system_area_options
char publisher[129]
unsigned char boot_id_string[29]
char volset_id[129]
int do_strict_acl
int part_like_isohybrid
int apm_block_size
int zisofs_v2_enabled
off_t pacifier_count
int do_follow_mount
int zisofs_by_magic
int libs_are_started
int do_old_empty
void ** hln_array
int do_iso_rr_pattern
uid_t global_uid
int boot_image_cat_hidden
int do_disk_pattern
off_t file_size_limit
FILE * errfile_fp
int pacifier_style
int64_t zisofs_block_number_target
char boot_image_bin_form[16]
int result_page_width
uint8_t appended_part_gpt_flags[8]
int do_global_mode
struct Xorriso_lsT * node_img_prefixes
int linux_scsi_dev_family
int outdev_is_exclusive
FILE * pktlog_fp
mode_t global_file_mode
regex_t * re
time_t now_time_override
void * pacifier_fifo
int mkisofsrc_done
double start_time
struct Xorriso_msg_sievE * msg_sieve
int displacement_sign
int do_padding_by_libisofs
char preparer_id[129]
int do_rockridge
int session_blocks
mode_t global_dir_mode
int modesty_on_drive
char boot_image_cat_path[4096]
int zisofs_block_size_default
int read_speed_force
int allow_graft_points
int bsl_interpretation
struct Xorriso_lsT * di_disk_paths
int resolve_link_rec_count
int errfile_mode
int partition_heads_per_cyl
int allow_restore
char efi_boot_partition[4096]
int keep_boot_image
int structured_search
uint32_t isofs_size
off_t sparse_min_gap
char errfile_log[4096]
char progname[4096]
struct PermiteM * perm_stack
struct Xorriso_lsT * node_disk_prefixes
char abstract_file[38]
int library_msg_direct_print
int zisofs_v2_block_size_default
char indev_off_adr[4096]
struct Xorriso_lsT * filters
int do_follow_pattern
off_t split_size
uint8_t gpt_guid[16]
int boot_platform_id
time_t isofs_st_out
struct Xorriso_lsT * di_iso_paths
char indev[4096]
int show_hfs_cmd_count
uint64_t zisofs_max_file_blocks
void ** di_array
int boot_image_emul
off_t pacifier_byte_count
int early_stdio_test
int do_follow_links
int do_calm_drive
int appended_as_gpt
int isofs_has_what
int img_read_error_mode
int appended_as_apm
time_t vol_effective_time
int rr_reloc_flags
int re_failed_at
int cache_tile_blocks
int untranslated_name_len
int boot_efi_default
char scdbackup_tag_listname[4096]
int find_check_md5_result
char * di_do_widen
int use_immed_bit
char system_id[33]
int ban_stdio_write
int ino_behavior
uint64_t zisofs_max_total_blocks
char all_file_dates[80]
int status_history_max
int do_overwrite
time_t vol_creation_time
char reg_expr[2 *4096]
int stdio_sync_is_default
int image_start_mode
int zisofs_block_size
int cache_num_tiles
int drives_access
int min_buffer_percent
char volid[33]
int boot_img_full_size
char result_line[10 *4096]
int sh_style_result
char loaded_boot_cat_path[4096]
int boot_emul_default
char scdbackup_tag_written[512]
FILE * stderr_fp
int filter_list_closed
uint8_t hfsp_serial_number[8]
char prep_partition[4096]
gid_t global_gid
unsigned char boot_selection_crit[21]
int do_auto_chmod
int drives_exclusive
int cache_default
int do_restore_sort_lba
uint8_t appended_part_type_guids[8][16]
int do_follow_concat
void ** hln_targets
int max_buffer_usec
char ascii_disc_label[129]
int rc_filename_count
double insert_count
char system_area_disk_path[4096]
uint32_t partition_offset
int msgw_msg_pending
int grow_blindly_msc2
int do_concat_split
char vol_uuid[17]
int iso_mbr_part_flag
uint32_t displacement
int boot_img_size_default
char logfile[4][4096]
int min_buffer_usec
double zisofs_bpt_discard_free_ratio
uint8_t iso_gpt_type_guid[16]
int file_name_limit
int show_hfs_cmd_flag
int buffer_timeout_sec
int patch_system_area
char rr_reloc_dir[256]
double pacifier_interval
int do_override_now_time
int do_global_gid
void ** node_array
int follow_link_limit
int(* msgw_result_handler)(void *handle, char *text)
int libjte_params_given
int tolerate_stdin_eof
char scdbackup_tag_name[81]
char ** show_hfs_cmds
int hfsp_block_size
int volid_default
off_t pacifier_prev_count
struct Xorriso_lsT * buffered_dialog
void * in_volset_handle
int partition_secs_per_head
void * msgw_info_handle
int iso_level_is_default
char image_start_value[81]
int update_flags
int system_area_clear_loaded
off_t node_targets_availmem
int do_global_uid
char scdbackup_tag_time[19]
int msg_watcher_state
time_t vol_modification_time
int launch_frontend_banned
int outdev_access
int hln_change_pending
int max_buffer_percent
char boot_image_bin_path[4096]
int node_counter
int extract_error_mode
char ** re_constants
void * out_drive_handle
char session_logfile[4096]
uint64_t zisofs_max_total_blocks_default
time_t isofs_st_in
char loaded_volid[33]
int zlib_level_default
off_t boot_image_load_size
char assert_volid[4096]
char initial_wdx[4096]
int check_media_bad_limit
int disk_excl_mode
int resolve_link_rec_limit
int report_about_severity
char wdx[4096]
int zisofs_susp_z2
void * in_drive_handle
int packet_output
char outdev[4096]
char copyright_file[38]
int find_compare_result
int indev_access
int node_array_size
char application_use[4096]
char application_id[129]
char mark_text[4096]
double last_update_time
char report_about_text[20]
int do_follow_param
int temp_mem_limit
int zisofs_v2_block_size
int relax_compliance
char assert_volid_sev[80]
void * msgw_result_handle
char grub2_sparc_core[4096]
char rc_filenames[4][4096]
List of startupfiles.
int msglist_flags[Xorriso_max_outlist_stacK]
int allow_dir_id_ext_dflt
int patch_isolinux_image
uint64_t zisofs_max_file_blocks_default
char outdev_off_adr[4096]
int zisofs_susp_z2_default
int result_open_line_len
off_t pacifier_total
int gpt_guid_mode
int use_immed_bit_default
int toc_emulation_flag
int do_stream_recording
int(* msgw_info_handler)(void *handle, char *text)
int loaded_boot_bin_lba
char biblio_file[38]
int msgw_stack_handle
time_t vol_expiration_time
int indev_is_exclusive
uint8_t appended_part_types[8]
int msg_sieve_disabled
double last_abort_file_time
int boot_image_isohybrid
char wdi[4096]
int read_speed_corr
FILE * logfile_fp[4]
double zisofs_bpt_discard_free_ratio_default
int Xorriso_protect_stdout(struct XorrisO *xorriso, int flag)
Definition: text_io.c:63
int Xorriso_relax_compliance(struct XorrisO *xorriso, char *mode, int flag)
Definition: write_run.c:2473
#define Xorriso_max_outlist_stacK
Maximum number of stacked redirections.
Definition: xorriso.h:998
#define Xorriso_default_file_size_limiT
#define Xorriso_status_history_maX

References XorrisO::abort_on_is_default, XorrisO::abort_on_severity, XorrisO::abort_on_text, XorrisO::abstract_file, XorrisO::add_plainly, XorrisO::alignment, XorrisO::all_file_dates, XorrisO::allow_dir_id_ext_dflt, XorrisO::allow_graft_points, XorrisO::allow_restore, XorrisO::apm_block_size, XorrisO::appended_as_apm, XorrisO::appended_as_gpt, XorrisO::appended_part_gpt_flags, XorrisO::appended_part_type_guids, XorrisO::appended_part_types, XorrisO::appended_partitions, XorrisO::application_id, XorrisO::application_use, XorrisO::argument_emulation, XorrisO::arrange_args, XorrisO::ascii_disc_label, XorrisO::assert_volid, XorrisO::assert_volid_sev, XorrisO::auto_close, XorrisO::ban_stdio_write, XorrisO::bar_is_fresh, XorrisO::biblio_file, XorrisO::boot_count, XorrisO::boot_efi_default, XorrisO::boot_emul_default, XorrisO::boot_id_string, XorrisO::boot_image_bin_form, XorrisO::boot_image_bin_path, XorrisO::boot_image_cat_hidden, XorrisO::boot_image_cat_path, XorrisO::boot_image_emul, XorrisO::boot_image_isohybrid, XorrisO::boot_image_load_size, XorrisO::boot_img_full_size, XorrisO::boot_img_size_default, XorrisO::boot_platform_id, XorrisO::boot_selection_crit, XorrisO::bsl_interpretation, XorrisO::buffer_timeout_sec, XorrisO::buffered_dialog, XorrisO::cache_default, XorrisO::cache_num_tiles, XorrisO::cache_tile_blocks, XorrisO::check_media_bad_limit, XorrisO::check_media_default, XorrisO::copyright_file, XorrisO::dev_fd_1, XorrisO::di_array, XorrisO::di_count, XorrisO::di_disk_paths, XorrisO::di_do_widen, XorrisO::di_iso_paths, XorrisO::dialog, XorrisO::did_something_useful, XorrisO::disk_excl_mode, XorrisO::disk_exclusions, XorrisO::displacement, XorrisO::displacement_sign, XorrisO::do_aaip, XorrisO::do_auto_chmod, XorrisO::do_calm_drive, XorrisO::do_close, XorrisO::do_concat_split, XorrisO::do_disk_pattern, XorrisO::do_dummy, XorrisO::do_fat, XorrisO::do_follow_concat, XorrisO::do_follow_links, XorrisO::do_follow_mount, XorrisO::do_follow_param, XorrisO::do_follow_pattern, XorrisO::do_global_gid, XorrisO::do_global_mode, XorrisO::do_global_uid, XorrisO::do_hfsplus, XorrisO::do_iso1999, XorrisO::do_iso_rr_pattern, XorrisO::do_joliet, XorrisO::do_md5, XorrisO::do_old_empty, XorrisO::do_override_now_time, XorrisO::do_overwrite, XorrisO::do_padding_by_libisofs, XorrisO::do_reassure, XorrisO::do_restore_sort_lba, XorrisO::do_rockridge, XorrisO::do_stream_recording, XorrisO::do_strict_acl, XorrisO::do_tao, XorrisO::drive_blacklist, XorrisO::drive_greylist, XorrisO::drive_whitelist, XorrisO::drives_access, XorrisO::drives_exclusive, XorrisO::dvd_obs, XorrisO::early_stdio_test, XorrisO::ecma119_map, XorrisO::efi_boot_partition, XorrisO::errfile_fp, XorrisO::errfile_log, XorrisO::errfile_mode, XorrisO::error_count, XorrisO::eternal_problem_status, XorrisO::eternal_problem_status_text, Exclusions_new(), XorrisO::extract_error_mode, XorrisO::file_name_limit, XorrisO::file_size_limit, XorrisO::filter_list_closed, XorrisO::filters, XorrisO::find_check_md5_result, XorrisO::find_compare_result, XorrisO::follow_link_limit, XorrisO::fs, XorrisO::global_dir_mode, XorrisO::global_file_mode, XorrisO::global_gid, XorrisO::global_uid, XorrisO::gpt_guid, XorrisO::gpt_guid_mode, XorrisO::grow_blindly_msc2, XorrisO::grub2_sparc_core, XorrisO::hfsp_block_size, XorrisO::hfsp_serial_number, XorrisO::hfsplus_hidings, XorrisO::hln_array, XorrisO::hln_change_pending, XorrisO::hln_count, XorrisO::hln_targets, XorrisO::idle_time, XorrisO::image_start_mode, XorrisO::image_start_value, XorrisO::img_read_error_mode, XorrisO::in_charset, XorrisO::in_drive_handle, XorrisO::in_sector_map, XorrisO::in_volset_handle, XorrisO::indev, XorrisO::indev_access, XorrisO::indev_is_exclusive, XorrisO::indev_off_adr, XorrisO::info_msglists, XorrisO::info_text, XorrisO::initial_wdx, XorrisO::ino_behavior, XorrisO::insert_bytes, XorrisO::insert_count, XorrisO::is_dialog, XorrisO::iso_gpt_type_guid, XorrisO::iso_level, XorrisO::iso_level_is_default, XorrisO::iso_mbr_part_flag, XorrisO::iso_mbr_part_type, XorrisO::iso_rr_hidings, XorrisO::isofs_has_what, XorrisO::isofs_size, XorrisO::isofs_st_in, XorrisO::isofs_st_out, XorrisO::jigdo_params, XorrisO::jigdo_values, XorrisO::joliet_hidings, XorrisO::joliet_map, XorrisO::keep_boot_image, XorrisO::last_abort_file_time, XorrisO::last_update_time, XorrisO::launch_frontend_banned, XorrisO::lib_msg_queue_lock, XorrisO::lib_msg_queue_lock_ini, XorrisO::libjte_params_given, XorrisO::library_msg_direct_print, XorrisO::libs_are_started, XorrisO::linux_scsi_dev_family, XorrisO::list_delimiter, XorrisO::loaded_boot_bin_lba, XorrisO::loaded_boot_cat_path, XorrisO::loaded_volid, XorrisO::logfile, XorrisO::logfile_fp, XorrisO::mark_text, XorrisO::max_buffer_percent, XorrisO::max_buffer_usec, XorrisO::min_buffer_percent, XorrisO::min_buffer_usec, XorrisO::mkisofsrc_done, XorrisO::modesty_on_drive, XorrisO::msg_sieve, XorrisO::msg_sieve_disabled, XorrisO::msg_watcher_lock, XorrisO::msg_watcher_lock_ini, XorrisO::msg_watcher_state, XorrisO::msglist_flags, XorrisO::msglist_stackfill, XorrisO::msgw_fetch_lock, XorrisO::msgw_fetch_lock_ini, XorrisO::msgw_info_handle, XorrisO::msgw_info_handler, XorrisO::msgw_msg_pending, XorrisO::msgw_result_handle, XorrisO::msgw_result_handler, XorrisO::msgw_stack_handle, XorrisO::no_emul_toc, XorrisO::no_rc, XorrisO::no_volset_present, XorrisO::node_array, XorrisO::node_array_size, XorrisO::node_counter, XorrisO::node_disk_prefixes, XorrisO::node_img_prefixes, XorrisO::node_targets_availmem, XorrisO::now_time_override, XorrisO::out_charset, XorrisO::out_drive_handle, XorrisO::outdev, XorrisO::outdev_access, XorrisO::outdev_is_exclusive, XorrisO::outdev_off_adr, XorrisO::pacifier_byte_count, XorrisO::pacifier_count, XorrisO::pacifier_fifo, XorrisO::pacifier_interval, XorrisO::pacifier_prev_count, XorrisO::pacifier_style, XorrisO::pacifier_total, XorrisO::packet_output, XorrisO::padding, XorrisO::part_like_isohybrid, XorrisO::partition_heads_per_cyl, XorrisO::partition_offset, XorrisO::partition_secs_per_head, XorrisO::patch_isolinux_image, XorrisO::patch_system_area, XorrisO::pending_option, XorrisO::perm_stack, XorrisO::pktlog_fp, XorrisO::prep_partition, XorrisO::preparer_id, XorrisO::prepended_wd, XorrisO::problem_status, XorrisO::problem_status_lock, XorrisO::problem_status_lock_ini, XorrisO::problem_status_text, XorrisO::progname, XorrisO::publisher, XorrisO::rc_filename_count, XorrisO::rc_filenames, XorrisO::re, XorrisO::re_constants, XorrisO::re_count, XorrisO::re_failed_at, XorrisO::re_fill, XorrisO::read_fs, XorrisO::read_speed, XorrisO::read_speed_corr, XorrisO::read_speed_force, XorrisO::reg_expr, XorrisO::relax_compliance, XorrisO::report_about_severity, XorrisO::report_about_text, XorrisO::request_not_to_ask, XorrisO::request_to_abort, XorrisO::resolve_link_rec_count, XorrisO::resolve_link_rec_limit, XorrisO::result_line, XorrisO::result_line_counter, XorrisO::result_msglists, XorrisO::result_msglists_lock, XorrisO::result_msglists_lock_ini, XorrisO::result_open_line_len, XorrisO::result_page_counter, XorrisO::result_page_length, XorrisO::result_page_width, XorrisO::return_with_severity, XorrisO::return_with_text, XorrisO::return_with_value, XorrisO::rr_loaded, XorrisO::rr_reloc_dir, XorrisO::rr_reloc_flags, XorrisO::run_state, XorrisO::scdbackup_tag_listname, XorrisO::scdbackup_tag_name, XorrisO::scdbackup_tag_time, XorrisO::scdbackup_tag_written, XorrisO::scsi_log, XorrisO::search_mode, XorrisO::session_blocks, XorrisO::session_lba, XorrisO::session_logfile, Sfile_leafname(), SfileadrL, XorrisO::sh_style_result, XorrisO::show_hfs_cmd_count, XorrisO::show_hfs_cmd_flag, XorrisO::show_hfs_cmds, XorrisO::sparse_min_gap, XorrisO::split_size, XorrisO::start_time, XorrisO::status_history_max, XorrisO::stderr_fp, XorrisO::stdio_sync, XorrisO::stdio_sync_is_default, XorrisO::structured_search, XorrisO::system_area_clear_loaded, XorrisO::system_area_disk_path, XorrisO::system_area_options, XorrisO::system_id, XorrisO::temp_mem_limit, XorrisO::toc_emulation_flag, XorrisO::tolerate_stdin_eof, XorrisO::tree_loaded, TSOB_FELD, XorrisO::untranslated_name_len, XorrisO::update_flags, XorrisO::use_immed_bit, XorrisO::use_immed_bit_default, XorrisO::use_stdin, XorrisO::vol_creation_time, XorrisO::vol_effective_time, XorrisO::vol_expiration_time, XorrisO::vol_modification_time, XorrisO::vol_uuid, XorrisO::volid, XorrisO::volid_default, XorrisO::volset_change_pending, XorrisO::volset_id, XorrisO::wdi, XorrisO::wdx, XorrisO::write_speed, XorrisO::write_to_channel_lock, XorrisO::write_to_channel_lock_ini, Xorriso__text_to_sev(), Xorriso_default_file_size_limiT, Xorriso_destroy(), Xorriso_lst_new(), Xorriso_max_appended_partitionS, Xorriso_max_outlist_stacK, Xorriso_preparer_string(), Xorriso_protect_stdout(), Xorriso_rc_nuM, Xorriso_read_quality_invaliD, Xorriso_relax_compliance(), Xorriso_status_history_maX, Xorriso_sys_rc_nameS, XorrisO::zisofs_block_number_target, XorrisO::zisofs_block_size, XorrisO::zisofs_block_size_default, XorrisO::zisofs_bpt_discard_free_ratio, XorrisO::zisofs_bpt_discard_free_ratio_default, XorrisO::zisofs_by_magic, XorrisO::zisofs_max_file_blocks, XorrisO::zisofs_max_file_blocks_default, XorrisO::zisofs_max_total_blocks, XorrisO::zisofs_max_total_blocks_default, XorrisO::zisofs_susp_z2, XorrisO::zisofs_susp_z2_default, XorrisO::zisofs_v2_block_size, XorrisO::zisofs_v2_block_size_default, XorrisO::zisofs_v2_enabled, XorrisO::zlib_level, and XorrisO::zlib_level_default.

Referenced by main().

◆ Xorriso_option_abort_on()

int Xorriso_option_abort_on ( struct XorrisO xorriso,
char *  severity,
int  flag 
)

Definition at line 39 of file opts_a_c.c.

41 {
42  int ret, sev;
43  char severity[20], *official;
44 
45  Xorriso__to_upper(in_severity, severity, (int) sizeof(severity), 0);
46  ret= Xorriso__text_to_sev(severity, &sev, 0);
47  if(ret<=0) {
48  sprintf(xorriso->info_text, "-abort_on: Not a known severity name : ");
49  Text_shellsafe(in_severity, xorriso->info_text, 1);
50  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
51  return(ret);
52  }
53  ret= Xorriso__sev_to_text(sev, &official, 0);
54  if(ret <= 0)
55  official= severity;
56  if(Sfile_str(xorriso->abort_on_text, official, 0) <= 0)
57  return(-1);
58  xorriso->abort_on_severity= sev;
59  xorriso->abort_on_is_default= 0;
60  Xorriso_set_abort_severity(xorriso, 0);
61  return(1);
62 }
int Xorriso_set_abort_severity(struct XorrisO *xorriso, int flag)
Definition: lib_mgt.c:306
int Xorriso__sev_to_text(int severity, char **severity_name, int flag)
Definition: lib_mgt.c:371
char * Text_shellsafe(char *in_text, char *out_text, int flag)
Definition: misc_funct.c:1044
int Xorriso__to_upper(char *in, char *out, int out_size, int flag)
Definition: misc_funct.c:1301
int Sfile_str(char target[4096], char *source, int flag)
Definition: sfile.c:836

References XorrisO::abort_on_is_default, XorrisO::abort_on_severity, XorrisO::abort_on_text, XorrisO::info_text, Sfile_str(), Text_shellsafe(), Xorriso__sev_to_text(), Xorriso__text_to_sev(), Xorriso__to_upper(), Xorriso_msgs_submit(), and Xorriso_set_abort_severity().

Referenced by Xorriso_dialog(), Xorriso_interpreter(), and Xorriso_prescan_args().

◆ Xorriso_option_abstract_file()

int Xorriso_option_abstract_file ( struct XorrisO xorriso,
char *  name,
int  flag 
)

Definition at line 66 of file opts_a_c.c.

67 {
68  if(Xorriso_check_name_len(xorriso, name,
69  (int) sizeof(xorriso->abstract_file),
70  "-abstract_file", 0) <= 0)
71  return(0);
72  strcpy(xorriso->abstract_file, name);
73  Xorriso_set_change_pending(xorriso, 1);
74  return(1);
75 }
int Xorriso_set_change_pending(struct XorrisO *xorriso, int flag)
Definition: iso_img.c:1004
int Xorriso_check_name_len(struct XorrisO *xorriso, char *name, int size, char *cmd, int flag)
Definition: parse_exec.c:475

References XorrisO::abstract_file, Xorriso_check_name_len(), and Xorriso_set_change_pending().

Referenced by Xorriso_genisofs(), Xorriso_interpreter(), and Xorriso_read_as_mkisofsrc().

◆ Xorriso_option_acl()

int Xorriso_option_acl ( struct XorrisO xorriso,
char *  mode,
int  flag 
)

Definition at line 78 of file opts_a_c.c.

79 {
80  int ret;
81 
82  if(strcmp(mode, "off")==0)
83  xorriso->do_aaip&= ~3;
84  else if(strcmp(mode, "on")==0)
85  xorriso->do_aaip|= (1 | 2);
86  else {
87  sprintf(xorriso->info_text, "-acl: unknown mode '%s'", mode);
88  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
89  return(0);
90  }
91  ret= Xorriso_set_ignore_aclea(xorriso, 0);
92  if(ret <= 0)
93  return(ret);
94  return(1);
95 }
int Xorriso_set_ignore_aclea(struct XorrisO *xorriso, int flag)
Definition: iso_img.c:39

References XorrisO::do_aaip, XorrisO::info_text, Xorriso_msgs_submit(), and Xorriso_set_ignore_aclea().

Referenced by Xorriso_genisofs(), and Xorriso_interpreter().

◆ Xorriso_option_add()

int Xorriso_option_add ( struct XorrisO xorriso,
int  argc,
char **  argv,
int *  idx,
int  flag 
)

Definition at line 123 of file opts_a_c.c.

125 {
126  int i, end_idx, ret, was_failure= 0, fret, optc= 0, split, as_mkisofs= 0;
127  char *target= NULL, *source= NULL, *ept, *eff_path= NULL;
128  char **optv= NULL;
129 
130  ret= Xorriso_opt_args(xorriso, "-add", argc, argv, *idx, &end_idx,
131  &optc, &optv, ((!!xorriso->allow_graft_points)<<2)|2);
132  if(ret<=0)
133  goto ex;
134 
135  Xorriso_alloc_meM(target, char, SfileadrL);
136  Xorriso_alloc_meM(source, char, SfileadrL);
137  Xorriso_alloc_meM(eff_path, char, SfileadrL);
138 
139  if(xorriso->allow_graft_points & 2)
140  as_mkisofs= 8;
141  if(!(flag&2))
142  Xorriso_pacifier_reset(xorriso, 0);
143  for(i= 0; i<optc; i++) {
144  if(Sfile_str(target,optv[i],0)<=0)
145  {ret= -1; goto ex;}
146  strcpy(source, optv[i]);
147  split= 0;
148  if(xorriso->allow_graft_points) {
149  ret= Fileliste__target_source_limit(target, '=', &ept,
150  !(xorriso->allow_graft_points & 2));
151  if(ret>0) {
152  *ept= 0;
153  strcpy(source, ept+1);
154  split= 1;
155  }
156  /* unescape \= */;
157  if(split) {
158  unescape_pathspec_part(target, as_mkisofs);
159  if(as_mkisofs)
160  unescape_pathspec_part(source, as_mkisofs);
161  } else {
162  unescape_pathspec_part(source, as_mkisofs);
163  }
164  }
165  if(split==0)
166  strcpy(target, source);
167  if(flag & 4) {
168  ret= Sfile_prepend_path(xorriso->wdi, target, 0);
169  if(ret<=0) {
170  sprintf(xorriso->info_text, "Effective path gets much too long (%d)",
171  (int) (strlen(xorriso->wdi)+strlen(target)+1));
172  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
173  goto problem_handler;
174  }
175  }
176 
177  ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, target, eff_path, 2);
178  if(ret<=0)
179  goto problem_handler;
180  strcpy(target, eff_path);
181  ret= Xorriso_normalize_img_path(xorriso, xorriso->wdx, source,eff_path,2|4);
182  if(ret<=0)
183  goto problem_handler;
184  strcpy(source, eff_path);
185 
186  ret= Xorriso_graft_in(xorriso, NULL, source, target, (off_t)0, (off_t)0, 0);
187  if(ret<=0 || xorriso->request_to_abort)
188  goto problem_handler;
189  sprintf(xorriso->info_text, "Added to ISO image: %s '%s'='%s'\n",
190  (ret>1 ? "directory" : "file"), (target[0] ? target : "/"), source);
191  if(!(flag&1))
192  Xorriso_info(xorriso, 0);
193 
194  continue; /* regular bottom of loop */
195 problem_handler:;
196  was_failure= 1;
197  fret= Xorriso_eval_problem_status(xorriso, ret, 1|2);
198  if(fret>=0)
199  continue;
200  goto ex;
201  }
202  if(!(flag&2))
203  Xorriso_pacifier_callback(xorriso, "files added", xorriso->pacifier_count,
204  xorriso->pacifier_total, "", 1);
205  ret= 1;
206 ex:;
207  (*idx)= end_idx;
208  Xorriso_free_meM(target);
209  Xorriso_free_meM(source);
210  Xorriso_free_meM(eff_path);
211  Xorriso_opt_args(xorriso, "-add", argc, argv, *idx, &end_idx, &optc, &optv,
212  256);
213  if(ret<=0)
214  return(ret);
215  return(!was_failure);
216 }
int Xorriso_graft_in(struct XorrisO *xorriso, void *boss_iter, char *disk_path, char *img_path, off_t offset, off_t cut_size, int flag)
Definition: iso_manip.c:789
int Xorriso_normalize_img_path(struct XorrisO *xorriso, char *wd, char *img_path, char eff_path[], int flag)
Definition: iso_tree.c:55
int Fileliste__target_source_limit(char *line, char sep, char **limit_pt, int flag)
Definition: misc_funct.c:1119
static void unescape_pathspec_part(char *rpt, int flag)
Definition: opts_a_c.c:100
int Xorriso_opt_args(struct XorrisO *xorriso, char *cmd, int argc, char **argv, int idx, int *end_idx, int *optc, char ***optv, int flag)
Definition: parse_exec.c:87
int Sfile_prepend_path(char *prefix, char path[4096], int flag)
Definition: sfile.c:161
int Xorriso_pacifier_callback(struct XorrisO *xorriso, char *what_done, off_t count, off_t todo, char *current_object, int flag)
Definition: text_io.c:3969
int Xorriso_pacifier_reset(struct XorrisO *xorriso, int flag)
Definition: text_io.c:3937

References XorrisO::allow_graft_points, Fileliste__target_source_limit(), XorrisO::info_text, XorrisO::pacifier_count, XorrisO::pacifier_total, Sfile_prepend_path(), Sfile_str(), SfileadrL, unescape_pathspec_part(), XorrisO::wdi, XorrisO::wdx, Xorriso_alloc_meM, Xorriso_eval_problem_status(), Xorriso_free_meM, Xorriso_graft_in(), Xorriso_info(), Xorriso_msgs_submit(), Xorriso_normalize_img_path(), Xorriso_opt_args(), Xorriso_pacifier_callback(), and Xorriso_pacifier_reset().

Referenced by Xorriso_genisofs(), Xorriso_interpreter(), and Xorriso_option_path_list().

◆ Xorriso_option_add_plainly()

int Xorriso_option_add_plainly ( struct XorrisO xorriso,
char *  mode,
int  flag 
)

Definition at line 220 of file opts_a_c.c.

221 {
222  if(strcmp(mode, "none")==0)
223  xorriso->add_plainly= 0;
224  if(strcmp(mode, "unknown")==0)
225  xorriso->add_plainly= 1;
226  else if(strcmp(mode, "dashed")==0)
227  xorriso->add_plainly= 2;
228  else if(strcmp(mode, "any")==0)
229  xorriso->add_plainly= 3;
230  else {
231  sprintf(xorriso->info_text, "-add_plainly: unknown mode '%s'", mode);
232  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
233  return(0);
234  }
235  return(1);
236 }

References XorrisO::add_plainly, XorrisO::info_text, and Xorriso_msgs_submit().

Referenced by Xorriso_interpreter(), and Xorriso_prescan_args().

◆ Xorriso_option_alter_date()

int Xorriso_option_alter_date ( struct XorrisO xorriso,
char *  time_type,
char *  timestring,
int  argc,
char **  argv,
int *  idx,
int  flag 
)

Definition at line 242 of file opts_a_c.c.

245 {
246  int i, ret, was_failure= 0, t_type= 0, end_idx, fret;
247  time_t t;
248  int optc= 0;
249  char **optv= NULL;
250  struct FindjoB *job= NULL;
251  struct stat dir_stbuf;
252 
253  ret= Xorriso_opt_args(xorriso, "-alter_date", argc, argv, *idx, &end_idx,
254  &optc, &optv, 0);
255  if(ret<=0)
256  goto ex;
257  ret= Xorriso_convert_datestring(xorriso, "-alter_date", time_type, timestring,
258  &t_type, &t, 0);
259  if(ret<=0)
260  goto ex;
261  for(i= 0; i<optc; i++) {
262  if(flag&1) {
263  ret= Findjob_new(&job, optv[i], 0);
264  if(ret<=0) {
265  Xorriso_no_findjob(xorriso, "-alter_date", 0);
266  {ret= -1; goto ex;}
267  }
268  Findjob_set_action_ad(job, t_type, t, 0);
269  ret= Xorriso_findi(xorriso, job, NULL, (off_t) 0,
270  NULL, optv[i], &dir_stbuf, 0, 0);
271  Findjob_destroy(&job, 0);
272  } else
273  ret= Xorriso_set_time(xorriso, optv[i], t, t_type);
274  if(ret>0 && !xorriso->request_to_abort)
275  continue; /* regular bottom of loop */
276  was_failure= 1;
277  fret= Xorriso_eval_problem_status(xorriso, ret, 1|2);
278  if(fret>=0)
279  continue;
280  goto ex;
281  }
282  ret= 1;
283 ex:;
284  (*idx)= end_idx;
285  Xorriso_opt_args(xorriso, "-alter_date", argc, argv, *idx, &end_idx, &optc,
286  &optv, 256);
287  Findjob_destroy(&job, 0);
288  if(ret<=0)
289  return(ret);
290  return(!was_failure);
291 }
int Findjob_destroy(struct FindjoB **o, int flag)
Definition: findjob.c:401
int Findjob_new(struct FindjoB **o, char *start_path, int flag)
Definition: findjob.c:355
int Findjob_set_action_ad(struct FindjoB *o, int type, time_t date, int flag)
Definition: findjob.c:1261
int Xorriso_set_time(struct XorrisO *xorriso, char *in_path, time_t t, int flag)
Definition: iso_manip.c:2043
int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job, void *boss_iter, off_t boss_mem, void *dir_node_generic, char *dir_path, struct stat *dir_stbuf, int depth, int flag)
Definition: iso_manip.c:3355
int Xorriso_convert_datestring(struct XorrisO *xorriso, char *cmd, char *time_type, char *timestring, int *t_type, time_t *t, int flag)
Definition: parse_exec.c:2852
int Xorriso_no_findjob(struct XorrisO *xorriso, char *cmd, int flag)
Definition: text_io.c:4110

References Findjob_destroy(), Findjob_new(), Findjob_set_action_ad(), XorrisO::request_to_abort, Xorriso_convert_datestring(), Xorriso_eval_problem_status(), Xorriso_findi(), Xorriso_no_findjob(), Xorriso_opt_args(), and Xorriso_set_time().

Referenced by Xorriso_interpreter(), and Xorriso_set_all_file_dates().

◆ Xorriso_option_append_partition()

int Xorriso_option_append_partition ( struct XorrisO xorriso,
char *  partno_text,
char *  type_text,
char *  image_path,
int  flag 
)

Definition at line 295 of file opts_a_c.c.

297 {
298  int partno = 0, type_code= -1, i, guid_valid= 0, ret;
299  unsigned int unum;
300  char *tpt;
301  uint8_t guid[16];
302  static char *part_type_names[] = {"FAT12", "FAT16", "Linux", "", NULL};
303  static int part_type_codes[] = { 0x01, 0x06, 0x83, 0x00};
304 
305  sscanf(partno_text, "%d", &partno);
306  if(partno < 1 || partno > Xorriso_max_appended_partitionS) {
307  sprintf(xorriso->info_text,
308  "-append_partition: Partition number '%s' is out of range (1...%d)",
309  partno_text, Xorriso_max_appended_partitionS);
310  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
311  return(0);
312  }
313  for(i= 0; part_type_names[i] != NULL; i++)
314  if(strcmp(part_type_names[i], type_text) == 0)
315  break;
316  if(part_type_names[i] != NULL)
317  type_code= part_type_codes[i];
318  if(type_code < 0) {
319  ret= Xorriso_parse_type_guid(xorriso, type_text, guid, &type_code, 0);
320  if(ret > 0)
321  guid_valid= 1;
322  }
323 
324  if(type_code < 0) {
325  tpt= type_text;
326  if(strncmp(tpt, "0x", 2) == 0)
327  tpt+= 2;
328  else
329  goto bad_type;
330  unum= 0xffffffff;
331  sscanf(tpt, "%X", &unum);
332  if(unum > 0xff) {
333 bad_type:;
334  sprintf(xorriso->info_text,
335 "-append_partition: Partition type '%s' is out of range (0x00...0xff or GUID)",
336  type_text);
337  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
338  return(0);
339  }
340  type_code= unum;
341  }
342 
343  if(xorriso->appended_partitions[partno - 1] != NULL)
344  free(xorriso->appended_partitions[partno - 1]);
345  xorriso->appended_partitions[partno - 1]= strdup(image_path);
346  if(xorriso->appended_partitions[partno - 1] == NULL) {
347  Xorriso_no_malloc_memory(xorriso, NULL, 0);
348  return(-1);
349  }
350  xorriso->appended_part_types[partno - 1]= type_code;
351  if(guid_valid) {
352  memcpy(xorriso->appended_part_type_guids[partno - 1], guid, 16);
353  xorriso->appended_part_gpt_flags[partno - 1]|= 1;
354  } else {
355  xorriso->appended_part_gpt_flags[partno - 1]&= ~1;
356  }
357  return(1);
358 }
int Xorriso_no_malloc_memory(struct XorrisO *xorriso, char **to_free, int flag)
Definition: text_io.c:4077
int Xorriso_parse_type_guid(struct XorrisO *xorriso, char *text, uint8_t guid[16], int *mbr_type, int flag)
Definition: write_run.c:3841

References XorrisO::appended_part_gpt_flags, XorrisO::appended_part_type_guids, XorrisO::appended_part_types, XorrisO::appended_partitions, XorrisO::info_text, Xorriso_max_appended_partitionS, Xorriso_msgs_submit(), Xorriso_no_malloc_memory(), and Xorriso_parse_type_guid().

Referenced by Xorriso_genisofs(), and Xorriso_interpreter().

◆ Xorriso_option_application_id()

int Xorriso_option_application_id ( struct XorrisO xorriso,
char *  name,
int  flag 
)

Definition at line 362 of file opts_a_c.c.

364 {
365  if(Xorriso_check_name_len(xorriso, name,
366  (int) sizeof(xorriso->application_id),
367  "-application_id", 0) <= 0)
368  return(0);
369  if(strcmp(name, "@xorriso@") == 0)
370  Xorriso_preparer_string(xorriso, xorriso->application_id, 0);
371  else
372  strcpy(xorriso->application_id,name);
373  Xorriso_set_change_pending(xorriso, 1);
374  return(1);
375 }

References XorrisO::application_id, Xorriso_check_name_len(), Xorriso_preparer_string(), and Xorriso_set_change_pending().

Referenced by Xorriso_genisofs(), Xorriso_interpreter(), and Xorriso_read_as_mkisofsrc().

◆ Xorriso_option_application_use()

int Xorriso_option_application_use ( struct XorrisO xorriso,
char *  path,
int  flag 
)

Definition at line 379 of file opts_a_c.c.

381 {
382  if(Sfile_str(xorriso->application_use, path, 0) <= 0) {
383  sprintf(xorriso->info_text,
384  "-application_use: parameter string is much too long (%d)",
385  (int) strlen(path));
386  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
387  return(0);
388  }
389  return(1);
390 }

References XorrisO::application_use, XorrisO::info_text, Sfile_str(), and Xorriso_msgs_submit().

Referenced by Xorriso_genisofs(), and Xorriso_interpreter().

◆ Xorriso_option_as()

int Xorriso_option_as ( struct XorrisO xorriso,
int  argc,
char **  argv,
int *  idx,
int  flag 
)

Definition at line 397 of file opts_a_c.c.

399 {
400  int end_idx, ret, idx_count;
401 
402  end_idx= Xorriso_end_idx(xorriso, argc, argv, *idx, 1);
403  idx_count= end_idx-(*idx);
404  if(end_idx<=0 || (*idx)>=argc) {
405  if(idx_count<1)
406  sprintf(xorriso->info_text,
407  "-as : Not enough arguments given. Needed: whom do_what %s",
408  xorriso->list_delimiter);
409  else
410  sprintf(xorriso->info_text,
411  "-as %s : Not enough arguments given. Needed: do_what %s",
412  argv[*idx], xorriso->list_delimiter);
413  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
414  ret= 0; goto ex;
415  }
416  if(strcmp(argv[*idx], "cdrecord")==0 || strcmp(argv[*idx], "wodim")==0 ||
417  strcmp(argv[*idx], "cdrskin")==0 || strcmp(argv[*idx], "xorrecord")==0) {
418  ret= Xorriso_cdrskin(xorriso, argv[*idx], end_idx-(*idx)-1, argv+(*idx)+1,
419  0);
420  if(ret<=0)
421  goto ex;
422  } else if(strcmp(argv[*idx], "mkisofs")==0 ||
423  strcmp(argv[*idx], "genisoimage")==0 ||
424  strcmp(argv[*idx], "genisofs")==0 ||
425  strcmp(argv[*idx], "xorrisofs")==0) {
426  ret= Xorriso_genisofs(xorriso, argv[*idx], end_idx-(*idx)-1, argv+(*idx)+1,
427  0);
428  if(ret<=0)
429  goto ex;
430  } else {
431  sprintf(xorriso->info_text,
432  "-as : Not a known emulation personality: '%s'", argv[*idx]);
433  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
434  ret= 0; goto ex;
435  }
436 
437  ret= 1;
438 ex:;
439  (*idx)= end_idx;
440  return(ret);
441 }
int Xorriso_cdrskin(struct XorrisO *xorriso, char *whom, int argc, char **argv, int flag)
Definition: emulators.c:119
int Xorriso_genisofs(struct XorrisO *xorriso, char *whom, int argc, char **argv, int flag)
Definition: emulators.c:1346
int Xorriso_end_idx(struct XorrisO *xorriso, int argc, char **argv, int idx, int flag)
Definition: parse_exec.c:46

References XorrisO::info_text, XorrisO::list_delimiter, Xorriso_cdrskin(), Xorriso_end_idx(), Xorriso_genisofs(), and Xorriso_msgs_submit().

Referenced by Xorriso_interpreter().

◆ Xorriso_option_assert_volid()

int Xorriso_option_assert_volid ( struct XorrisO xorriso,
char *  pattern,
char *  severity,
int  flag 
)

Definition at line 445 of file opts_a_c.c.

447 {
448  int ret, sev;
449  char *sev_text= "", off_severity[20];
450 
451  if(strlen(pattern)>=sizeof(xorriso->assert_volid)) {
452  sprintf(xorriso->info_text,
453  "Name too long with option -application_id (%d > %d)",
454  (int) strlen(pattern), (int) sizeof(xorriso->assert_volid)-1);
455  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
456  return(0);
457  }
458  if(pattern[0]) {
459  ret= Sregex_match(pattern, "", 1);
460  if(ret <= 0) {
461  sprintf(xorriso->info_text, "-assert_volid: Cannot use given pattern.");
462  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
463  return(0);
464  }
465  }
466  if(severity[0] != 0 || pattern[0] != 0) {
467  if(severity[0] == 0)
468  sev_text= xorriso->abort_on_text;
469  else
470  sev_text= severity;
471  if(strcmp(sev_text, "NEVER") == 0)
472  sev_text= "ABORT";
473  Xorriso__to_upper(sev_text, off_severity, (int) sizeof(off_severity), 0);
474  sev_text= off_severity;
475  ret= Xorriso__text_to_sev(sev_text, &sev, 0);
476  if(ret<=0) {
477  sprintf(xorriso->info_text, "-assert_volid: Not a known severity name : ");
478  Text_shellsafe(severity, xorriso->info_text, 1);
479  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
480  return(ret);
481  }
482  }
483  if(Sfile_str(xorriso->assert_volid, pattern,0) <= 0)
484  return(-1);
485  strcpy(xorriso->assert_volid_sev, sev_text);
486  return(1);
487 }
int Sregex_match(char *pattern, char *text, int flag)
Definition: misc_funct.c:1006

References XorrisO::abort_on_text, XorrisO::assert_volid, XorrisO::assert_volid_sev, XorrisO::info_text, Sfile_str(), Sregex_match(), Text_shellsafe(), Xorriso__text_to_sev(), Xorriso__to_upper(), and Xorriso_msgs_submit().

Referenced by Xorriso_interpreter().

◆ Xorriso_option_auto_charset()

int Xorriso_option_auto_charset ( struct XorrisO xorriso,
char *  mode,
int  flag 
)

Definition at line 491 of file opts_a_c.c.

492 {
493  if(strcmp(mode, "off")==0)
494  xorriso->do_aaip&= ~(256 | 512);
495  else if(strcmp(mode, "on")==0)
496  xorriso->do_aaip|= (256 | 512);
497  else {
498  sprintf(xorriso->info_text, "-auto_charset: unknown mode '%s'", mode);
499  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
500  return(0);
501  }
502  return(1);
503 }

References XorrisO::do_aaip, XorrisO::info_text, and Xorriso_msgs_submit().

Referenced by Xorriso_interpreter().

◆ Xorriso_option_backslash_codes()

int Xorriso_option_backslash_codes ( struct XorrisO xorriso,
char *  mode,
int  flag 
)

Definition at line 507 of file opts_a_c.c.

509 {
510  char *npt, *cpt;
511  int l, was;
512 
513  was= xorriso->bsl_interpretation;
514  xorriso->bsl_interpretation= 0;
515  npt= cpt= mode;
516  for(; npt!=NULL; cpt= npt+1) {
517  npt= strchr(cpt,':');
518  if(npt==NULL)
519  l= strlen(cpt);
520  else
521  l= npt-cpt;
522  if(l == 0)
523  continue;
524  if(l == 3 && strncmp(cpt, "off", l)==0) {
525  xorriso->bsl_interpretation= 0;
526  } else if(l == 16 && strncmp(cpt, "in_double_quotes", l)==0) {
527  xorriso->bsl_interpretation= (xorriso->bsl_interpretation & ~3) | 1;
528  } else if(l == 9 && strncmp(cpt, "in_quotes", l)==0) {
529  xorriso->bsl_interpretation= (xorriso->bsl_interpretation & ~3) | 2;
530  } else if(l == 17 && strncmp(cpt, "with_quoted_input", l)==0) {
531  xorriso->bsl_interpretation= (xorriso->bsl_interpretation & ~3) | 3;
532  } else if(l == 22 && strncmp(cpt, "with_program_arguments", l)==0) {
533  xorriso->bsl_interpretation= xorriso->bsl_interpretation | 16;
534  } else if(l == 13 && strncmp(cpt, "encode_output", l)==0) {
535  xorriso->bsl_interpretation= xorriso->bsl_interpretation | 32 | 64;
536  } else if(l == 14 && strncmp(cpt, "encode_results", l)==0) {
537  xorriso->bsl_interpretation= xorriso->bsl_interpretation | 32;
538  } else if(l == 12 && strncmp(cpt, "encode_infos", l)==0) {
539  xorriso->bsl_interpretation= xorriso->bsl_interpretation | 64;
540  } else if(l == 2 && strncmp(cpt, "on", l)==0) {
541  xorriso->bsl_interpretation= 3 | 16 | 32 | 64;
542  } else {
543  if(l<SfileadrL)
544  sprintf(xorriso->info_text, "-backslash_codes: unknown mode '%s'", cpt);
545  else
546  sprintf(xorriso->info_text,
547  "-backslash_codes: oversized mode parameter (%d)", l);
548  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
549  xorriso->bsl_interpretation= was;
550  return(0);
551  }
552  }
553  return(1);
554 }

References XorrisO::bsl_interpretation, XorrisO::info_text, SfileadrL, and Xorriso_msgs_submit().

Referenced by Xorriso_interpreter(), Xorriso_prescan_args(), and Xorriso_program_arg_bsl().

◆ Xorriso_option_ban_stdio_write()

int Xorriso_option_ban_stdio_write ( struct XorrisO xorriso,
int  flag 
)

Definition at line 558 of file opts_a_c.c.

559 {
560  xorriso->ban_stdio_write= 1;
561  return(1);
562 }

References XorrisO::ban_stdio_write.

Referenced by Xorriso_interpreter().

◆ Xorriso_option_biblio_file()

int Xorriso_option_biblio_file ( struct XorrisO xorriso,
char *  name,
int  flag 
)

Definition at line 566 of file opts_a_c.c.

567 {
568  if(Xorriso_check_name_len(xorriso, name, (int) sizeof(xorriso->biblio_file),
569  "-biblio_file", 0) <= 0)
570  return(0);
571  strcpy(xorriso->biblio_file, name);
572  Xorriso_set_change_pending(xorriso, 1);
573  return(1);
574 }

References XorrisO::biblio_file, Xorriso_check_name_len(), and Xorriso_set_change_pending().

Referenced by Xorriso_genisofs(), Xorriso_interpreter(), and Xorriso_read_as_mkisofsrc().

◆ Xorriso_option_blank()

int Xorriso_option_blank ( struct XorrisO xorriso,
char *  mode,
int  flag 
)

Definition at line 581 of file opts_a_c.c.

582 {
583  char *cmd= "-blank", *mode;
584  int aq_ret, ret, mode_flag= 0, as_needed= 0, idx, do_force= 0;
585  off_t size= 0;
586 
587  if(flag&1)
588  cmd= "-format";
589  if(xorriso->out_drive_handle == NULL) {
590  sprintf(xorriso->info_text,
591  "%s: No output drive set by -dev -or -outdev", cmd);
592  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
593  return(0);
594  }
595  if(xorriso->in_drive_handle == xorriso->out_drive_handle) {
596  if(Xorriso_change_is_pending(xorriso, 0)) {
597  sprintf(xorriso->info_text,
598  "%s: Image changes pending. -commit or -rollback first.", cmd);
599  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
600  return(0);
601  }
602  }
603  ret= Xorriso_reassure(xorriso, cmd,
604  "possibly make unreadable data on outdev", 0);
605  if(ret<=0)
606  return(2);
607 
608  if(strncmp(in_mode, "force:", 6) == 0) {
609  do_force= 1;
610  mode= in_mode + 6;
611  } else
612  mode= in_mode;
613  if(strcmp(mode, "as_needed")==0 || mode[0]==0)
614  as_needed= 1;
615  else if(strcmp(mode, "all")==0 || strcmp(mode, "full")==0)
616  mode_flag= 0;
617  else if((strcmp(mode, "deformat")==0 ||
618  strcmp(mode, "deformat_sequential")==0) && !(flag&1))
619  mode_flag= 2;
620  else if((strcmp(mode, "deformat_quickest")==0 ||
621  strcmp(mode, "deformat_sequential_quickest")==0) && !(flag&1))
622  mode_flag= 3;
623  else if(strcmp(mode, "fast")==0)
624  mode_flag= 1;
625  else if(strncmp(mode, "by_index_", 9)==0 && (flag&1)) {
626  mode_flag= 128;
627  idx= -1;
628  if(strlen(mode)>9)
629  sscanf(mode+9, "%d", &idx);
630  if(idx<0 || idx>255) {
631 unusable_index:;
632  sprintf(xorriso->info_text,
633  "-format: mode '%s' provides unusable index number", mode);
634  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
635  return(0);
636  }
637  mode_flag|= (idx<<8);
638  } else if(strncmp(mode, "fast_by_index_", 14)==0 && (flag&1)) {
639  mode_flag= 1 | 128;
640  idx= -1;
641  if(strlen(mode)>14)
642  sscanf(mode+14, "%d", &idx);
643  if(idx<0 || idx>255)
644  goto unusable_index;
645  mode_flag|= (idx<<8);
646  } else if(strncmp(mode, "by_size_", 8) == 0 && (flag & 1)) {
647  size= (off_t) Scanf_io_size(mode + 8, 0);
648  if(size <= 0) {
649 unusable_size:;
650  sprintf(xorriso->info_text,
651  "-format: mode '%s' provides unusable size value", mode);
652  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
653  return(0);
654  }
655  mode_flag= 2;
656  } else if(strncmp(mode, "fast_by_size_", 13) == 0 && (flag & 1)) {
657  size= (off_t) Scanf_io_size(mode + 13, 0);
658  if(size <= 0)
659  goto unusable_size;
660  mode_flag= 3;
661  } else if(strcmp(mode, "without_spare") == 0 && (flag & 1)) {
662  mode_flag= 32;
663  } else {
664  sprintf(xorriso->info_text,
665  "%s: Unknown %s mode '%s'",
666  cmd, ((flag&1) ? "-format" : "-blank"), mode);
667  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
668  return(0);
669  }
670  if(do_force) {
671  ret= Xorriso_pretend_full_disc(xorriso, 0);
672  if(ret <= 0)
673  return(ret);
674  }
675  if(as_needed)
676  ret= Xorriso_blank_as_needed(xorriso, (flag&1)<<2);
677  else if(flag&1)
678  ret= Xorriso_format_media(xorriso, size, mode_flag & 0xffa7);
679  else
680  ret= Xorriso_blank_media(xorriso, mode_flag&3);
681  if(ret==0)
682  return(ret);
683  if(ret <= 0) { /* in case of success, above functions will have re-acquired */
684  aq_ret= Xorriso_reaquire_outdev(xorriso, 0); /* actually give up drive */
685  if(ret<aq_ret)
686  return(ret);
687  if(aq_ret<=0)
688  return(aq_ret);
689  }
690  return(1);
691 }
int Xorriso_pretend_full_disc(struct XorrisO *xorriso, int flag)
Definition: drive_mgt.c:3544
int Xorriso_reaquire_outdev(struct XorrisO *xorriso, int flag)
Definition: drive_mgt.c:907
int Xorriso_change_is_pending(struct XorrisO *xorriso, int flag)
Definition: iso_img.c:995
double Scanf_io_size(char *text, int flag)
Convert a text into a number of type double and multiply it by unit code [kmgtpe] (2^10 to 2^60) or [...
Definition: misc_funct.c:182
int Xorriso_reassure(struct XorrisO *xorriso, char *cmd, char *which_will, int flag)
Definition: text_io.c:2609
int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
Definition: write_run.c:1763
int Xorriso_blank_as_needed(struct XorrisO *xorriso, int flag)
Definition: write_run.c:2071
int Xorriso_format_media(struct XorrisO *xorriso, off_t in_size, int flag)
Definition: write_run.c:1895

References XorrisO::in_drive_handle, XorrisO::info_text, XorrisO::out_drive_handle, Scanf_io_size(), Xorriso_blank_as_needed(), Xorriso_blank_media(), Xorriso_change_is_pending(), Xorriso_format_media(), Xorriso_msgs_submit(), Xorriso_pretend_full_disc(), Xorriso_reaquire_outdev(), and Xorriso_reassure().

Referenced by Xorriso_cdrskin(), and Xorriso_interpreter().

◆ Xorriso_option_boot_image()

int Xorriso_option_boot_image ( struct XorrisO xorriso,
char *  form,
char *  treatment,
int  flag 
)

Definition at line 695 of file opts_a_c.c.

697 {
698  int was_ok= 1, ret, isolinux_grub= 0, count, bin_count, parm_len;
699  int palohdrversion, type_code;
700  unsigned int u;
701  char *formpt, *treatpt, *eff_path= NULL, *eqpt, parm[20];
702  uint8_t sn[8];
703  double num;
704 
705  Xorriso_alloc_meM(eff_path, char, SfileadrL);
706  formpt= form;
707  if(formpt[0]=='-')
708  formpt++;
709  treatpt= treatment;
710  if(treatpt[0]=='-')
711  treatpt++;
712 
713  if(strcmp(formpt, "isolinux")==0 || strcmp(formpt, "grub") == 0)
714  isolinux_grub= 1;
715  if(strcmp(treatpt, "keep")==0) {
716  if(xorriso->boot_count > 0) {
717 cannot_keep_or_patch:;
718  sprintf(xorriso->info_text,
719  "Loaded boot image has already been replaced. Cannot keep or patch it.");
720  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
721  {ret= 0; goto ex;}
722  }
723  if(isolinux_grub)
724  goto treatment_patch;
725  xorriso->keep_boot_image= 1;
726  xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 0;
727  xorriso->boot_image_bin_path[0]= 0;
728  xorriso->patch_system_area= 0;
729 
730  } else if(strcmp(treatpt, "patch")==0) {
731 treatment_patch:;
732  if(xorriso->boot_count > 0)
733  goto cannot_keep_or_patch;
734  xorriso->keep_boot_image= 0;
735  xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 1;
736  xorriso->boot_image_bin_path[0]= 0;
737  if(strcmp(formpt, "grub") == 0) {
738  xorriso->patch_isolinux_image|= 2;
739  xorriso->patch_system_area= 1;
740  } else if(strcmp(formpt, "isolinux") == 0)
741  xorriso->patch_system_area= 2;
742  else
743  xorriso->patch_system_area= 0;
744 
745  } else if(strcmp(treatpt, "replay")==0) {
746  ret= Xorriso_report_system_area(xorriso, "cmd", 2);
747  if(ret <= 0)
748  goto ex;
749 
750  } else if(strcmp(treatpt, "discard")==0) {
751  xorriso->keep_boot_image= 0;
752  xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~0x3ff) | 0;
753  xorriso->boot_image_bin_path[0]= 0;
754  xorriso->patch_system_area= 0;
755  if((xorriso->system_area_options & 0xfc ) == 0)
756  xorriso->system_area_options= 0; /* Reset eventual type 0 flags */
757  if(xorriso->boot_count > 0) {
758  ret= Xorriso_attach_boot_image(xorriso, 2); /* dispose boot images */
759  if(ret <= 0)
760  goto ex;
761  }
762 
763  } else if(strcmp(treatpt, "next") == 0) {
764  ret= Xorriso_attach_boot_image(xorriso, 0);
765  if(ret <= 0)
766  goto ex;
767 
768  } else if(strcmp(treatpt, "show_status")==0) {
769  sprintf(xorriso->result_line, "------------------------------------\n");
770  Xorriso_result(xorriso, 0);
771  sprintf(xorriso->result_line, "Status of loaded boot image :\n");
772  Xorriso_result(xorriso, 0);
773  sprintf(xorriso->result_line, "------------------------------------\n");
774  Xorriso_result(xorriso, 0);
775  Xorriso_show_boot_info(xorriso, 0);
776  sprintf(xorriso->result_line, "------------------------------------\n");
777  Xorriso_result(xorriso, 0);
778  sprintf(xorriso->result_line, "Boot image settings for next commit:\n");
779  Xorriso_result(xorriso, 0);
780  sprintf(xorriso->result_line, "------------------------------------\n");
781  Xorriso_result(xorriso, 0);
782  Xorriso_status(xorriso, "-boot_image", NULL, 0);
783  sprintf(xorriso->result_line, "------------------------------------\n");
784  Xorriso_result(xorriso, 0);
785 
786  } else if(strcmp(treatpt, "cat_path=") == 0) {
787  xorriso->boot_image_cat_path[0] = 0;
788  } else if(strncmp(treatpt, "cat_path=", 9) == 0) {
789  ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 9,
790  xorriso->boot_image_cat_path, 2);
791  if(ret <= 0)
792  goto ex;
793 
794  } else if(strncmp(treatpt, "cat_hidden=", 11) == 0) {
795  ret= Xorriso__hide_mode(treatpt + 11, 0);
796  if(ret >= 0)
797  xorriso->boot_image_cat_hidden= ret;
798  else
799  was_ok= 0;
800 
801  } else if(strncmp(treatpt, "dir=", 4) == 0) {
802  if(strcmp(formpt, "isolinux")==0) {
803  /* ISOLINUX */
804  /* The three locations mentioned in http://syslinux.zytor.com/iso.php */
805  if(strcmp(treatpt + 4, "/") == 0)
806  strcpy(xorriso->boot_image_bin_path, "/");
807  else if(strcmp(treatpt + 4, "isolinux") == 0
808  || strcmp(treatpt + 4, "/isolinux") == 0)
809  strcpy(xorriso->boot_image_bin_path, "/isolinux/");
810  else if(strcmp(treatpt + 4, "boot/isolinux") == 0
811  || strcmp(treatpt + 4, "/boot/isolinux") == 0
812  || strcmp(treatpt + 4, "boot") == 0
813  || strcmp(treatpt + 4, "/boot") == 0)
814  strcpy(xorriso->boot_image_bin_path, "/boot/isolinux/");
815  else {
816  sprintf(xorriso->info_text,
817  "Unrecognized keyword with -boot_image %s %s",
818  form, treatment);
819  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
820  sprintf(xorriso->info_text,
821  "Allowed with dir= are / , /isolinux . /boot/isolinux");
822  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
823  {ret= 0; goto ex;}
824  }
825  strcpy(xorriso->boot_image_cat_path, xorriso->boot_image_bin_path);
826  strcat(xorriso->boot_image_bin_path, "isolinux.bin");
827  strcat(xorriso->boot_image_cat_path, "boot.cat");
828  xorriso->boot_image_load_size= 4 * 512;
829  xorriso->boot_img_size_default= 0;
830  xorriso->keep_boot_image= 0;
831  xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 1;
832  strcpy(xorriso->boot_image_bin_form, formpt);
833  {ret= 1; goto ex;}
834 
835  } else if(strcmp(formpt, "grub") == 0) {
836 
837  /* >>> GRUB */
838  was_ok= 0;
839 
840  strcpy(xorriso->boot_image_bin_form, formpt);
841 
842  } else
843  was_ok= 0;
844 
845  } else if(strcmp(treatpt, "bin_path=") == 0) {
846  xorriso->boot_image_bin_path[0] = 0;
847  xorriso->boot_efi_default= 0;
848  } else if(strncmp(treatpt, "bin_path=", 9) == 0) {
849  if(strncmp(treatpt + 9, "--interval:appended_partition_", 30) == 0) {
850  if(strlen(treatpt + 9) >= sizeof(xorriso->boot_image_bin_path)) {
851 interval_text_long:;
852  sprintf(xorriso->info_text,
853  "-boot_image: --interval text is much too long (%d)",
854  (int) strlen(treatpt + 9));
855  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
856  ret= 0; goto ex;
857  }
858  strcpy(xorriso->boot_image_bin_path, treatpt + 9);
859  } else {
860  ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 9,
861  xorriso->boot_image_bin_path, 2);
862  if(ret <= 0)
863  goto ex;
864  }
865  xorriso->keep_boot_image= 0;
866  if(isolinux_grub) {
867  xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 1;
868  if(xorriso->boot_image_bin_path[0]) {
869  xorriso->boot_image_load_size= 4 * 512;
870  xorriso->boot_img_size_default= 0;
871  }
872  strcpy(xorriso->boot_image_bin_form, formpt);
873  } else
874  strcpy(xorriso->boot_image_bin_form, "any");
875  xorriso->boot_efi_default= 0;
876 
877  } else if(strcmp(treatpt, "efi_path=") == 0) {
878  xorriso->boot_image_bin_path[0] = 0;
879  xorriso->boot_efi_default= 0;
880  } else if(strncmp(treatpt, "efi_path=", 9) == 0) {
881  if(strncmp(treatpt + 9, "--interval:appended_partition_", 30) == 0) {
882  if(strlen(treatpt + 9) >= sizeof(xorriso->boot_image_bin_path))
883  goto interval_text_long;
884  strcpy(xorriso->boot_image_bin_path, treatpt + 9);
885  } else {
886  ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 9,
887  xorriso->boot_image_bin_path, 2);
888  if(ret <= 0)
889  goto ex;
890  }
891  xorriso->keep_boot_image= 0;
892  xorriso->boot_efi_default= 1;
893 
894  } else if(strncmp(treatpt, "mips_path=", 10) == 0) {
895  sprintf(eff_path, "-boot_image %s mips_path=", formpt);
896  ret= Xorriso_coordinate_system_area(xorriso, 1, 0, eff_path, 0);
897  if(ret <= 0)
898  goto ex;
899  ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 10,
900  eff_path, 2);
901  if(ret <= 0)
902  goto ex;
903  ret= Xorriso_add_mips_boot_file(xorriso, eff_path, 0);
904  if(ret <= 0)
905  goto ex;
906 
907  } else if(strncmp(treatpt, "mipsel_path=", 12) == 0) {
908  sprintf(eff_path, "-boot_image %s mipsel_path=", formpt);
909  ret= Xorriso_coordinate_system_area(xorriso, 2, 0, eff_path, 0);
910  if(ret <= 0)
911  goto ex;
912  ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 12,
913  eff_path, 2);
914  if(ret <= 0)
915  goto ex;
916  ret= Xorriso_add_mips_boot_file(xorriso, eff_path, 2);
917  if(ret <= 0)
918  goto ex;
919 
920  } else if(strcmp(treatpt, "mips_discard") == 0 ||
921  strcmp(treatpt, "mipsel_discard") == 0 ||
922  strcmp(treatpt, "sparc_discard") == 0 ||
923  strcmp(treatpt, "hppa_discard") == 0 ||
924  strcmp(treatpt, "alpha_discard") == 0) {
925  xorriso->system_area_options&= ~0xfc; /* system area type 0 */
926  Xorriso_add_mips_boot_file(xorriso, "", 1); /* give up MIPS boot files */
927  Xorriso_set_hppa_boot_parm(xorriso, "", "", 1); /* give up HP-PA files */
928  Xorriso_set_alpha_boot(xorriso, "", 1); /* give up DEC Alpha loader */
929 
930  } else if(strncmp(treatpt, "sparc_label=", 12) == 0) {
931  sprintf(eff_path, "-boot_image %s sparc_label=", formpt);
932  ret= Xorriso_coordinate_system_area(xorriso, 3, 0, eff_path, 0);
933  if(ret <= 0)
934  goto ex;
935  strncpy(xorriso->ascii_disc_label, treatpt + 12,
937  xorriso->ascii_disc_label[Xorriso_disc_label_sizE - 1] = 0;
938 
939  } else if(strncmp(treatpt, "grub2_sparc_core=", 17) == 0) {
940  ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 17,
941  xorriso->grub2_sparc_core, 2);
942  if(ret <= 0)
943  goto ex;
944 
945  } else if(strncmp(treatpt, "hppa_", 5) == 0) {
946  sprintf(eff_path, "-boot_image %s %s", formpt, treatpt);
947  palohdrversion= (xorriso->system_area_options >> 2) & 0x3f;
948  if(palohdrversion != 4)
949  palohdrversion= 5;
950  ret= Xorriso_coordinate_system_area(xorriso, palohdrversion, 0, eff_path,
951  0);
952  if(ret <= 0)
953  goto ex;
954  eqpt= strchr(treatpt, '=');
955  if(eqpt == NULL) {
956  sprintf(xorriso->info_text,
957  "No equal sign found in -boot_image %s %s", form, treatment);
958  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
959  ret= 0; goto ex;
960  }
961  parm_len= (eqpt - treatpt) - 5;
962  if(parm_len > (int) sizeof(parm) - 1)
963  parm_len= sizeof(parm) - 1;
964  strncpy(parm, treatpt + 5, parm_len);
965  parm[parm_len]= 0;
966  ret= Xorriso_set_hppa_boot_parm(xorriso, eqpt + 1, parm, 0);
967  if(ret <= 0)
968  goto ex;
969 
970  } else if(strncmp(treatpt, "alpha_boot=", 11) == 0) {
971  sprintf(eff_path, "-boot_image %s %s", formpt, treatpt);
972  ret= Xorriso_coordinate_system_area(xorriso, 6, 0, eff_path, 0);
973  if(ret <= 0)
974  goto ex;
975  ret = Xorriso_set_alpha_boot(xorriso, treatpt + 11, 0);
976  if(ret <= 0)
977  goto ex;
978 
979  } else if(strncmp(treatpt, "boot_info_table=", 16)==0) {
980  if(strcmp(treatpt + 16, "off") == 0)
981  xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 0;
982  else if(strcmp(treatpt + 16, "on") == 0)
983  xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) |
984  1 | (2 * (strcmp(treatpt, "grub") == 0));
985  else
986  was_ok= 0;
987 
988  } else if(strncmp(treatpt, "grub2_boot_info=", 16)==0) {
989  if(strcmp(treatpt + 16, "off") == 0)
990  xorriso->patch_isolinux_image= xorriso->patch_isolinux_image & ~512;
991  else if(strcmp(treatpt + 16, "on") == 0)
992  xorriso->patch_isolinux_image= xorriso->patch_isolinux_image | 512;
993  else
994  was_ok= 0;
995 
996  } else if(strncmp(treatpt, "load_size=", 10) == 0) {
997  if(strcmp(treatpt + 10, "full") == 0) {
998  xorriso->boot_img_full_size= 1;
999  } else {
1000  num= Scanf_io_size(treatpt + 10, 0);
1001  if(num < 512 && isolinux_grub) {
1002  sprintf(xorriso->info_text,
1003  "-boot_image %s : load_size too small (%s < 512)",
1004  formpt, treatpt + 10);
1005  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text<