xorriso  1.5.4.pl02
About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.
  Fossies Dox: xorriso-1.5.4.pl02.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

parse_exec.c File Reference
#include <ctype.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <time.h>
#include <fcntl.h>
#include <errno.h>
#include <pwd.h>
#include <grp.h>
#include <sys/resource.h>
#include <sys/wait.h>
#include "xorriso.h"
#include "xorriso_private.h"
#include "xorrisoburn.h"
#include <pthread.h>
Include dependency graph for parse_exec.c:

Go to the source code of this file.

Functions

int Xorriso_end_idx (struct XorrisO *xorriso, int argc, char **argv, int idx, int flag)
 
int Xorriso_opt_args (struct XorrisO *xorriso, char *cmd, int argc, char **argv, int idx, int *end_idx, int *optc, char ***optv, int flag)
 
int Xorriso_get_problem_status (struct XorrisO *xorriso, char severity[80], int flag)
 
int Xorriso_set_problem_status (struct XorrisO *xorriso, char *severity, int flag)
 
int Xorriso_eval_problem_status (struct XorrisO *xorriso, int ret, int flag)
 
int Xorriso_cpmv_args (struct XorrisO *xorriso, char *cmd, int argc, char **argv, int *idx, int *optc, char ***optv, char eff_dest[4096], int flag)
 
int Xorriso_decode_load_adr (struct XorrisO *xorriso, char *cmd, char *adr_mode, char *adr_value, int *entity_code, char entity_id[81], int flag)
 
int Xorriso_check_thing_len (struct XorrisO *xorriso, char *name, int size, char *cmd, char *thing, int flag)
 
int Xorriso_check_name_len (struct XorrisO *xorriso, char *name, int size, char *cmd, int flag)
 
int Xorriso_normalize_command (struct XorrisO *xorriso, char *original_cmd, int argno, char *cmd_data, int sizeof_cmd_data, char **cmd, int flag)
 
int Xorriso_count_args (struct XorrisO *xorriso, int argc, char **argv, int *count, int flag)
 
int Xorriso_cmd_sorting_rank (struct XorrisO *xorriso, int argc, char **argv, int idx, int flag)
 
int Xorriso__cmp_cmd_rank (const void *a, const void *b)
 
int Xorriso_exec_args_sorted (struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag)
 
int Xorriso_interpreter (struct XorrisO *xorriso, int argc, char **argv, int *idx, 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_execute_option (struct XorrisO *xorriso, char *line, int flag)
 
int Xorriso_dialog (struct XorrisO *xorriso, int flag)
 
int Xorriso_replace_arg_by_bsl (struct XorrisO *xorriso, char **arg, char **argpt, int flag)
 
int Xorriso_prescan_args (struct XorrisO *xorriso, int argc, char **argv, int flag)
 
int Xorriso_read_as_mkisofsrc (struct XorrisO *xorriso, char *path, int flag)
 
int Xorriso_read_mkisofsrc (struct XorrisO *xorriso, int flag)
 
int Xorriso_source_date_epoch (struct XorrisO *xorriso, int flag)
 
int Xorriso_read_rc (struct XorrisO *xorriso, int flag)
 
int Xorriso_make_return_value (struct XorrisO *xorriso, int flag)
 
int Xorriso_program_arg_bsl (struct XorrisO *xorriso, int argc, char ***argv, int flag)
 
int Xorriso_make_abs_adr (struct XorrisO *xorriso, char *wd, char *name, char adr[], int flag)
 
int Xorriso_convert_datestring (struct XorrisO *xorriso, char *cmd, char *time_type, char *timestring, int *t_type, time_t *t, int flag)
 
int Xorriso_check_temp_mem_limit (struct XorrisO *xorriso, off_t mem, int flag)
 
int Xorriso_wait_child_end (struct XorrisO *xorriso, pid_t child_pid, int *status, int flag)
 
int Xorriso_make_argv_with_null (struct XorrisO *xorriso, int in_argc, char **in_argv, int *argc, char ***argv, int flag)
 
int Xorriso_execv (struct XorrisO *xorriso, char *cmd, int in_argc, char **in_argv, char *env_path, int *stdin_pipe, int *stdout_pipe, pid_t *forked_pid, int *status, int flag)
 
int Xorriso_pipe_open (struct XorrisO *xorriso, char *purpose, char *cmd, int in_argc, char **in_argv, char *env_path, int *fd, pid_t *forked_pid, int flag)
 
int Xorriso_path_is_excluded (struct XorrisO *xorriso, char *path, int flag)
 
int Xorriso_path_is_hidden (struct XorrisO *xorriso, char *path, int flag)
 
int Xorriso_normalize_acl_text (struct XorrisO *xorriso, char *in_text, char **access_acl_text, char **default_acl_text, int flag)
 

Function Documentation

◆ Xorriso__cmp_cmd_rank()

int Xorriso__cmp_cmd_rank ( const void *  a,
const void *  b 
)

Definition at line 844 of file parse_exec.c.

Referenced by Xorriso_exec_args_sorted().

◆ Xorriso__dispose_words()

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

◆ Xorriso_check_name_len()

int Xorriso_check_name_len ( struct XorrisO xorriso,
char *  name,
int  size,
char *  cmd,
int  flag 
)

◆ Xorriso_check_temp_mem_limit()

int Xorriso_check_temp_mem_limit ( struct XorrisO xorriso,
off_t  mem,
int  flag 
)

◆ Xorriso_check_thing_len()

int Xorriso_check_thing_len ( struct XorrisO xorriso,
char *  name,
int  size,
char *  cmd,
char *  thing,
int  flag 
)

Definition at line 461 of file parse_exec.c.

References XorrisO::info_text, and Xorriso_msgs_submit().

Referenced by Xorriso_check_name_len(), and Xorriso_option_concat().

◆ Xorriso_cmd_sorting_rank()

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

◆ Xorriso_convert_datestring()

int Xorriso_convert_datestring ( struct XorrisO xorriso,
char *  cmd,
char *  time_type,
char *  timestring,
int *  t_type,
time_t *  t,
int  flag 
)

◆ Xorriso_count_args()

int Xorriso_count_args ( struct XorrisO xorriso,
int  argc,
char **  argv,
int *  count,
int  flag 
)

◆ Xorriso_cpmv_args()

int Xorriso_cpmv_args ( struct XorrisO xorriso,
char *  cmd,
int  argc,
char **  argv,
int *  idx,
int *  optc,
char ***  optv,
char  eff_dest[4096],
int  flag 
)

◆ Xorriso_decode_load_adr()

int Xorriso_decode_load_adr ( struct XorrisO xorriso,
char *  cmd,
char *  adr_mode,
char *  adr_value,
int *  entity_code,
char  entity_id[81],
int  flag 
)

◆ Xorriso_dialog()

◆ Xorriso_end_idx()

◆ Xorriso_eval_problem_status()

int Xorriso_eval_problem_status ( struct XorrisO xorriso,
int  ret,
int  flag 
)
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.

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_exec_args_sorted()

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

◆ Xorriso_execute_option()

◆ Xorriso_execv()

int Xorriso_execv ( struct XorrisO xorriso,
char *  cmd,
int  in_argc,
char **  in_argv,
char *  env_path,
int *  stdin_pipe,
int *  stdout_pipe,
pid_t *  forked_pid,
int *  status,
int  flag 
)

◆ 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.

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.

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_make_abs_adr()

◆ Xorriso_make_argv_with_null()

int Xorriso_make_argv_with_null ( struct XorrisO xorriso,
int  in_argc,
char **  in_argv,
int *  argc,
char ***  argv,
int  flag 
)

Definition at line 2942 of file parse_exec.c.

References Sfile_destroy_argv(), and Xorriso_alloc_meM.

Referenced by Xorriso_execv().

◆ Xorriso_make_return_value()

int Xorriso_make_return_value ( struct XorrisO xorriso,
int  flag 
)

◆ Xorriso_normalize_acl_text()

int Xorriso_normalize_acl_text ( struct XorrisO xorriso,
char *  in_text,
char **  access_acl_text,
char **  default_acl_text,
int  flag 
)

◆ Xorriso_normalize_command()

int Xorriso_normalize_command ( struct XorrisO xorriso,
char *  original_cmd,
int  argno,
char *  cmd_data,
int  sizeof_cmd_data,
char **  cmd,
int  flag 
)

◆ Xorriso_opt_args()

◆ Xorriso_parse_line()

int Xorriso_parse_line ( struct XorrisO xorriso,
char *  line,
char *  prefix,
char *  separators,
int  max_words,
int *  argc,
char ***  argv,
int  flag 
)

◆ Xorriso_path_is_excluded()

◆ Xorriso_path_is_hidden()

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

◆ Xorriso_pipe_open()

int Xorriso_pipe_open ( struct XorrisO xorriso,
char *  purpose,
char *  cmd,
int  in_argc,
char **  in_argv,
char *  env_path,
int *  fd,
pid_t *  forked_pid,
int  flag 
)

◆ Xorriso_prescan_args()

◆ Xorriso_program_arg_bsl()

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

◆ Xorriso_read_as_mkisofsrc()

◆ Xorriso_read_mkisofsrc()

int Xorriso_read_mkisofsrc ( struct XorrisO xorriso,
int  flag 
)

◆ Xorriso_read_rc()

◆ Xorriso_replace_arg_by_bsl()

int Xorriso_replace_arg_by_bsl ( struct XorrisO xorriso,
char **  arg,
char **  argpt,
int  flag 
)

◆ Xorriso_set_problem_status()

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

Set the current problem status of the xorriso handle.

Parameters
xorrisoThe environment handle
severityA severity text. Empty text resets to "No Problem".
flagUnused yet. Submit 0.
Returns
<=0 failure (e.g. wrong severity text), 1 success.

Definition at line 231 of file parse_exec.c.

References XorrisO::eternal_problem_status, XorrisO::eternal_problem_status_text, XorrisO::problem_status, XorrisO::problem_status_lock, XorrisO::problem_status_text, and Xorriso__text_to_sev().

Referenced by Xorriso_interpreter(), Xorriso_msgs_submit(), Xorriso_no_malloc_memory(), and Xorriso_option_commit().

◆ Xorriso_source_date_epoch()

◆ Xorriso_wait_child_end()

int Xorriso_wait_child_end ( struct XorrisO xorriso,
pid_t  child_pid,
int *  status,
int  flag 
)

Definition at line 2918 of file parse_exec.c.

Referenced by Xorriso_concat(), and Xorriso_execv().