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.
![]() ![]() |
#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 "xorriso.h"
#include "xorriso_private.h"
#include "xorrisoburn.h"
Go to the source code of this file.
Data Structures | |
struct | DirentrY |
Macros | |
#define | O_BINARY 0 |
Functions | |
int | Xorriso_resolve_link (struct XorrisO *xorriso, char *link_path, char result_path[4096], int flag) |
int | Xorriso_convert_uidstring (struct XorrisO *xorriso, char *uid_string, uid_t *uid, int flag) |
int | Xorriso_convert_gidstring (struct XorrisO *xorriso, char *gid_string, gid_t *gid, int flag) |
int | Xorriso_convert_modstring (struct XorrisO *xorriso, char *cmd, char *mode, mode_t *mode_and, mode_t *mode_or, int flag) |
int | Xorriso_hop_link (struct XorrisO *xorriso, char *link_path, struct LinkiteM **link_stack, struct stat *stbuf, int flag) |
int | Xorriso_show_dux_subs (struct XorrisO *xorriso, char *abs_path, char *rel_path, off_t *size, off_t boss_mem, struct LinkiteM *link_stack, int flag) |
int | Xorriso__mode_to_perms (mode_t st_mode, char perms[11], int flag) |
int | Xorriso_format_ls_l (struct XorrisO *xorriso, struct stat *stbuf, int flag) |
int | Xorriso_sorted_dir_x (struct XorrisO *xorriso, char *dir_path, int *filec, char ***filev, off_t boss_mem, int flag) |
int | Xorriso_lsx_filev (struct XorrisO *xorriso, char *wd, int filec, char **filev, off_t boss_mem, int flag) |
int | Xorriso_rmx (struct XorrisO *xorriso, off_t boss_mem, char *path, int flag) |
int | Xorriso_findx_action (struct XorrisO *xorriso, struct FindjoB *job, char *abs_path, char *show_path, int depth, int flag) |
int | Xorriso_findx (struct XorrisO *xorriso, struct FindjoB *job, char *abs_dir_parm, char *dir_path, struct stat *dir_stbuf, int depth, struct LinkiteM *link_stack, int flag) |
int | Xorriso_restore_sorted (struct XorrisO *xorriso, int count, char **src_array, char **tgt_array, int *problem_count, int flag) |
int | Xorriso_reassure_restore (struct XorrisO *xorriso, char *path, int flag) |
int | Xorriso_make_tmp_path (struct XorrisO *xorriso, char *orig_path, char *tmp_path, int *fd, int flag) |
int | Xorriso_auto_chmod (struct XorrisO *xorriso, char *disk_path, int flag) |
int | Xorriso_make_accessible (struct XorrisO *xorriso, char *disk_path, int flag) |
int | Xorriso_make_restore_path (struct XorrisO *xorriso, struct Xorriso_lsT **img_prefixes, struct Xorriso_lsT **disk_prefixes, char img_path[4096], char disk_path[4096], int flag) |
int | Xorriso_restore_make_hl (struct XorrisO *xorriso, char *old_path, char *new_path, int flag) |
int | Xorriso_afile_fopen (struct XorrisO *xorriso, char *filename, char *mode, FILE **ret_fp, int flag) |
int | Xorriso_make_mount_cmd (struct XorrisO *xorriso, char *cmd, int lba, int track, int session, char *volid, char *devadr, char result[4096], int flag) |
int | Xorriso_append_scdbackup_record (struct XorrisO *xorriso, int flag) |
int | Xorriso_is_concat_target (struct XorrisO *xorriso, char *target, int *ftype, int *fd, int flag) |
int | Xorriso_concat (struct XorrisO *xorriso, char *mode, char *target, int progc, char **progv, int filec, char **filev, int flag) |
#define O_BINARY 0 |
Definition at line 32 of file disk_ops.c.
int Xorriso__mode_to_perms | ( | mode_t | st_mode, |
char | perms[11], | ||
int | flag | ||
) |
int Xorriso_afile_fopen | ( | struct XorrisO * | xorriso, |
char * | filename, | ||
char * | mode, | ||
FILE ** | ret_fp, | ||
int | flag | ||
) |
Definition at line 1780 of file disk_ops.c.
References XorrisO::info_text, and Xorriso_msgs_submit().
Referenced by Xorriso_apply_sort_file(), Xorriso_genisofs_hide_list(), Xorriso_gpt_crc(), Xorriso_option_not_list(), Xorriso_option_options_from_file(), Xorriso_option_path_list(), Xorriso_option_setfacl_listi(), Xorriso_option_setfattr_listi(), Xorriso_read_as_mkisofsrc(), Xorriso_set_system_area(), and Xorriso_write_application_use().
int Xorriso_append_scdbackup_record | ( | struct XorrisO * | xorriso, |
int | flag | ||
) |
Definition at line 1964 of file disk_ops.c.
References XorrisO::info_text, XorrisO::scdbackup_tag_listname, XorrisO::scdbackup_tag_written, Text_shellsafe(), and Xorriso_msgs_submit().
Referenced by Xorriso_write_session().
int Xorriso_auto_chmod | ( | struct XorrisO * | xorriso, |
char * | disk_path, | ||
int | flag | ||
) |
Definition at line 1609 of file disk_ops.c.
References XorrisO::do_auto_chmod, XorrisO::info_text, XorrisO::perm_stack, Permstack_push(), SfileadrL, Text_shellsafe(), Xorriso_alloc_meM, Xorriso_free_meM, Xorriso_msgs_submit(), and Xorriso_resolve_link().
Referenced by Xorriso_make_accessible(), Xorriso_restore(), and Xorriso_restore_tree().
int Xorriso_concat | ( | struct XorrisO * | xorriso, |
char * | mode, | ||
char * | target, | ||
int | progc, | ||
char ** | progv, | ||
int | filec, | ||
char ** | filev, | ||
int | flag | ||
) |
Definition at line 2074 of file disk_ops.c.
References XorrisO::info_text, O_BINARY, Text_shellsafe(), Xorriso_eval_problem_status(), Xorriso_is_concat_target(), Xorriso_iso_file_to_fd(), Xorriso_iso_lstat(), Xorriso_msgs_submit(), Xorriso_pipe_open(), and Xorriso_wait_child_end().
Referenced by Xorriso_option_concat().
int Xorriso_convert_gidstring | ( | struct XorrisO * | xorriso, |
char * | gid_string, | ||
gid_t * | gid, | ||
int | flag | ||
) |
Definition at line 178 of file disk_ops.c.
References XorrisO::info_text, and Xorriso_msgs_submit().
Referenced by Xorriso_option_chgrpi(), Xorriso_option_find(), Xorriso_option_gid(), and Xorriso_perform_acl_from_list().
int Xorriso_convert_modstring | ( | struct XorrisO * | xorriso, |
char * | cmd, | ||
char * | mode, | ||
mode_t * | mode_and, | ||
mode_t * | mode_or, | ||
int | flag | ||
) |
Definition at line 202 of file disk_ops.c.
References XorrisO::info_text, Text_shellsafe(), and Xorriso_msgs_submit().
Referenced by Xorriso_genisofs(), Xorriso_option_chmodi(), and Xorriso_option_find().
int Xorriso_convert_uidstring | ( | struct XorrisO * | xorriso, |
char * | uid_string, | ||
uid_t * | uid, | ||
int | flag | ||
) |
Definition at line 154 of file disk_ops.c.
References XorrisO::info_text, and Xorriso_msgs_submit().
Referenced by Xorriso_option_chowni(), Xorriso_option_find(), Xorriso_option_uid(), and Xorriso_perform_acl_from_list().
int Xorriso_findx | ( | struct XorrisO * | xorriso, |
struct FindjoB * | job, | ||
char * | abs_dir_parm, | ||
char * | dir_path, | ||
struct stat * | dir_stbuf, | ||
int | depth, | ||
struct LinkiteM * | link_stack, | ||
int | flag | ||
) |
Definition at line 1268 of file disk_ops.c.
References FindjoB::depth, Dirseq_destroy(), Dirseq_new(), Dirseq_next_adr(), XorrisO::do_follow_links, XorrisO::do_follow_mount, XorrisO::do_follow_param, Findjob_test_2(), XorrisO::info_text, Linkitem_reset_stack(), XorrisO::request_to_abort, SfileadrL, XorrisO::wdx, Xorriso_alloc_meM, Xorriso_eval_problem_status(), Xorriso_findx_action(), Xorriso_free_meM, Xorriso_hop_link(), Xorriso_make_abs_adr(), Xorriso_msgs_submit(), and Xorriso_path_is_excluded().
Referenced by Xorriso_option_find().
int Xorriso_findx_action | ( | struct XorrisO * | xorriso, |
struct FindjoB * | job, | ||
char * | abs_path, | ||
char * | show_path, | ||
int | depth, | ||
int | flag | ||
) |
Definition at line 1141 of file disk_ops.c.
References XorrisO::find_compare_result, Findjob_get_action_parms(), Findjob_get_start_path(), XorrisO::info_text, XorrisO::no_volset_present, XorrisO::request_to_abort, XorrisO::result_line, SfileadrL, FindjoB::subjob, Text_shellsafe(), XorrisO::wdi, Xorriso_alloc_meM, Xorriso_compare_2_files(), Xorriso_esc_filepath(), Xorriso_estimate_file_size(), Xorriso_free_meM, Xorriso_iso_lstat(), Xorriso_list_extattr(), Xorriso_ls(), Xorriso_make_abs_adr(), Xorriso_msgs_submit(), Xorriso_no_malloc_memory(), Xorriso_result(), Xorriso_rmi(), and Xorriso_update_interpreter().
Referenced by Xorriso_findx().
int Xorriso_format_ls_l | ( | struct XorrisO * | xorriso, |
struct stat * | stbuf, | ||
int | flag | ||
) |
Definition at line 661 of file disk_ops.c.
References Ftimetxt(), XorrisO::result_line, Xorriso__mode_to_perms(), and Xorriso_IFBOOT.
Referenced by Xorriso_ls(), Xorriso_ls_filev(), and Xorriso_lsx_filev().
int Xorriso_hop_link | ( | struct XorrisO * | xorriso, |
char * | link_path, | ||
struct LinkiteM ** | link_stack, | ||
struct stat * | stbuf, | ||
int | flag | ||
) |
Definition at line 304 of file disk_ops.c.
References XorrisO::follow_link_limit, XorrisO::info_text, LinkiteM::link_path, Linkitem_find(), Linkitem_get_link_count(), Linkitem_new(), Text_shellsafe(), and Xorriso_msgs_submit().
Referenced by Xorriso_add_tree(), Xorriso_findx(), Xorriso_restore_tree(), and Xorriso_show_dux_subs().
int Xorriso_is_concat_target | ( | struct XorrisO * | xorriso, |
char * | target, | ||
int * | ftype, | ||
int * | fd, | ||
int | flag | ||
) |
Definition at line 1996 of file disk_ops.c.
References XorrisO::do_follow_concat, XorrisO::do_overwrite, XorrisO::info_text, Sfile_get_dev_fd_no(), Sfile_type(), Text_shellsafe(), Xorriso_msgs_submit(), and Xorriso_reassure_restore().
Referenced by Xorriso_concat().
int Xorriso_lsx_filev | ( | struct XorrisO * | xorriso, |
char * | wd, | ||
int | filec, | ||
char ** | filev, | ||
off_t | boss_mem, | ||
int | flag | ||
) |
Definition at line 809 of file disk_ops.c.
References XorrisO::do_follow_links, XorrisO::do_follow_param, XorrisO::info_text, XorrisO::request_to_abort, XorrisO::result_line, Sfile_destroy_argv(), SfileadrL, XorrisO::sh_style_result, Sort_argv(), Text_shellsafe(), Xorriso_alloc_meM, Xorriso_esc_filepath(), Xorriso_format_ls_l(), Xorriso_free_meM, Xorriso_info(), Xorriso_local_getfacl(), Xorriso_make_abs_adr(), Xorriso_msgs_submit(), Xorriso_resolve_link(), Xorriso_result(), Xorriso_show_dux_subs(), and Xorriso_sorted_dir_x().
Referenced by Xorriso_option_lsx(), and Xorriso_reassure_restore().
int Xorriso_make_accessible | ( | struct XorrisO * | xorriso, |
char * | disk_path, | ||
int | flag | ||
) |
Definition at line 1666 of file disk_ops.c.
References SfileadrL, Xorriso_alloc_meM, Xorriso_auto_chmod(), and Xorriso_free_meM.
Referenced by Xorriso_handle_collision(), Xorriso_restore_make_hl(), Xorriso_restore_node_array(), and Xorriso_rmx().
int Xorriso_make_mount_cmd | ( | struct XorrisO * | xorriso, |
char * | cmd, | ||
int | lba, | ||
int | track, | ||
int | session, | ||
char * | volid, | ||
char * | devadr, | ||
char | result[4096], | ||
int | flag | ||
) |
Definition at line 1831 of file disk_ops.c.
References XorrisO::info_text, XorrisO::mount_opts_flag, SfileadrL, Sregex_resolve_var(), System_uname(), Text_shellsafe(), Xorriso_alloc_meM, Xorriso_free_meM, and Xorriso_msgs_submit().
Referenced by Xorriso_mount().
int Xorriso_make_restore_path | ( | struct XorrisO * | xorriso, |
struct Xorriso_lsT ** | img_prefixes, | ||
struct Xorriso_lsT ** | disk_prefixes, | ||
char | img_path[4096], | ||
char | disk_path[4096], | ||
int | flag | ||
) |
Definition at line 1700 of file disk_ops.c.
References SfileadrL, Xorriso_lst_get_next(), and Xorriso_lst_get_text().
Referenced by Xorriso_restore_node_array(), and Xorriso_restore_prefix_hl().
int Xorriso_make_tmp_path | ( | struct XorrisO * | xorriso, |
char * | orig_path, | ||
char * | tmp_path, | ||
int * | fd, | ||
int | flag | ||
) |
Definition at line 1578 of file disk_ops.c.
References XorrisO::info_text, Text_shellsafe(), and Xorriso_msgs_submit().
Referenced by Xorriso_tree_restore_node().
int Xorriso_reassure_restore | ( | struct XorrisO * | xorriso, |
char * | path, | ||
int | flag | ||
) |
Definition at line 1518 of file disk_ops.c.
References XorrisO::do_reassure, XorrisO::info_text, XorrisO::request_not_to_ask, XorrisO::request_to_abort, Text_shellsafe(), XorrisO::wdx, Xorriso_info(), Xorriso_lsx_filev(), Xorriso_msgs_submit(), and Xorriso_request_confirmation().
Referenced by Xorriso_is_concat_target(), Xorriso_restore_overwrite(), and Xorriso_rmx().
int Xorriso_resolve_link | ( | struct XorrisO * | xorriso, |
char * | link_path, | ||
char | result_path[4096], | ||
int | flag | ||
) |
Definition at line 45 of file disk_ops.c.
References XorrisO::info_text, XorrisO::resolve_link_rec_count, XorrisO::resolve_link_rec_limit, Sfile_str(), SfileadrL, Text_shellsafe(), Xorriso_alloc_meM, Xorriso_free_meM, Xorriso_msgs_submit(), and Xorriso_normalize_img_path().
Referenced by Xorriso_add_tree(), Xorriso_auto_chmod(), Xorriso_graft_in(), Xorriso_lsx_filev(), Xorriso_normalize_img_path(), Xorriso_restore_disk_object(), and Xorriso_restore_tree().
int Xorriso_restore_make_hl | ( | struct XorrisO * | xorriso, |
char * | old_path, | ||
char * | new_path, | ||
int | flag | ||
) |
Definition at line 1749 of file disk_ops.c.
References XorrisO::info_text, XorrisO::perm_stack, Permstack_pop(), Text_shellsafe(), Xorriso_make_accessible(), and Xorriso_msgs_submit().
Referenced by Xorriso_restore_prefix_hl(), and Xorriso_restore_target_hl().
int Xorriso_restore_sorted | ( | struct XorrisO * | xorriso, |
int | count, | ||
char ** | src_array, | ||
char ** | tgt_array, | ||
int * | problem_count, | ||
int | flag | ||
) |
Definition at line 1427 of file disk_ops.c.
References XorrisO::do_restore_sort_lba, XorrisO::ino_behavior, XorrisO::node_counter, XorrisO::temp_mem_limit, Xorriso_destroy_node_array(), Xorriso_eval_problem_status(), Xorriso_make_hln_array(), Xorriso_new_node_array(), Xorriso_restore(), and Xorriso_restore_node_array().
Referenced by Xorriso_option_cpx(), Xorriso_option_extract(), and Xorriso_option_map_l().
int Xorriso_rmx | ( | struct XorrisO * | xorriso, |
off_t | boss_mem, | ||
char * | path, | ||
int | flag | ||
) |
Definition at line 954 of file disk_ops.c.
References Dirseq_destroy(), Dirseq_new(), Dirseq_next_adr(), XorrisO::do_reassure, XorrisO::info_text, XorrisO::pacifier_count, XorrisO::perm_stack, Permstack_pop(), XorrisO::request_not_to_ask, XorrisO::request_to_abort, SfileadrL, Text_shellsafe(), Xorriso_cannot_create_iter(), Xorriso_eval_problem_status(), Xorriso_findi_iter(), Xorriso_make_accessible(), Xorriso_msgs_submit(), Xorriso_much_too_long(), Xorriso_no_malloc_memory(), Xorriso_reassure_restore(), and Xorriso_rmi().
Referenced by Xorriso_restore_overwrite().
int Xorriso_show_dux_subs | ( | struct XorrisO * | xorriso, |
char * | abs_path, | ||
char * | rel_path, | ||
off_t * | size, | ||
off_t | boss_mem, | ||
struct LinkiteM * | link_stack, | ||
int | flag | ||
) |
Definition at line 349 of file disk_ops.c.
References Dirseq_destroy(), Dirseq_new(), Dirseq_next_adr(), Dirseq_rewind(), XorrisO::do_follow_links, XorrisO::do_follow_mount, XorrisO::do_follow_param, XorrisO::info_text, Linkitem_reset_stack(), XorrisO::request_to_abort, XorrisO::result_line, Sfile_add_to_path(), SfileadrL, XorrisO::sh_style_result, Sort_argv(), Xorriso_alloc_meM, Xorriso_check_temp_mem_limit(), Xorriso_esc_filepath(), Xorriso_free_meM, Xorriso_hop_link(), Xorriso_msgs_submit(), Xorriso_much_too_long(), and Xorriso_result().
Referenced by Xorriso_lsx_filev().
int Xorriso_sorted_dir_x | ( | struct XorrisO * | xorriso, |
char * | dir_path, | ||
int * | filec, | ||
char *** | filev, | ||
off_t | boss_mem, | ||
int | flag | ||
) |
Definition at line 734 of file disk_ops.c.
References DirentrY::adr, Dirseq_destroy(), Dirseq_new(), Dirseq_next_adr(), DirentrY::next, SfileadrL, Sort_argv(), XorrisO::temp_mem_limit, Xorriso_alloc_meM, Xorriso_free_meM, and Xorriso_no_malloc_memory().
Referenced by Xorriso_lsx_filev().