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)  

iso_manip.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 <errno.h>
#include "xorriso.h"
#include "xorriso_private.h"
#include "xorrisoburn.h"
#include "lib_mgt.h"
#include "iso_img.h"
#include "iso_tree.h"
#include "iso_manip.h"
#include "sort_cmp.h"
#include "parse_exec.h"
#include "write_run.h"
Include dependency graph for iso_manip.c:

Go to the source code of this file.

Macros

#define Xorriso_add_handle_collisioN   1
 
#define Xorriso_optimistic_add_treE   1
 
#define Xorriso_graft_handle_collisioN   1
 
#define Xorriso_optimistic_graft_iN   1
 

Functions

int Xorriso_transfer_properties (struct XorrisO *xorriso, struct stat *stbuf, char *disk_path, IsoNode *node, int flag)
 
int Xorriso_graft_split (struct XorrisO *xorriso, IsoImage *volume, IsoDir *dir, char *disk_path, char *img_name, char *nominal_source, char *nominal_target, off_t size, IsoNode **node, int flag)
 
int Xorriso_tree_graft_node (struct XorrisO *xorriso, IsoImage *volume, IsoDir *dir, char *disk_path, char *img_name, char *nominal_source, char *nominal_target, off_t offset, off_t cut_size, IsoNode **node, int flag)
 
int Xoriso_handle_collision (struct XorrisO *xorriso, void *boss_iter, IsoNode **node, char *img_path, char *full_img_path, char *disk_path, char *show_path, int flag)
 
int Xorriso_add_tree (struct XorrisO *xorriso, IsoDir *dir, char *img_dir_path, char *disk_dir_path, struct LinkiteM *link_stack, int flag)
 
int Xorriso_copy_implicit_properties (struct XorrisO *xorriso, IsoDir *dir, char *full_img_path, char *img_path, char *full_disk_path, int flag)
 
int Xorriso_copy_properties (struct XorrisO *xorriso, char *disk_path, char *img_path, int flag)
 
int Xorriso_add_symlink (struct XorrisO *xorriso, IsoDir *parent, char *link_target, char *leaf_name, char *nominal_path, int flag)
 
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)
 
int Xorriso_cut_out (struct XorrisO *xorriso, char *disk_path, off_t startbyte, off_t bytecount, char *iso_rr_path, int flag)
 
int Xorriso_mkdir (struct XorrisO *xorriso, char *path, int flag)
 
int Xorriso_rmi (struct XorrisO *xorriso, void *boss_iter, off_t boss_mem, char *path, int flag)
 
int Xorriso_overwrite_dest (struct XorrisO *xorriso, void *boss_iter, char *eff_dest, int dest_ret, char *activity, int flag)
 
int Xorriso_rename (struct XorrisO *xorriso, void *boss_iter, char *origin, char *dest, int flag)
 
int Xorriso_cannot_clone (struct XorrisO *xorriso, char *eff_origin, char *eff_dest, int iso_error, int flag)
 
int Xorriso_clone_tree (struct XorrisO *xorriso, void *boss_iter, char *origin, char *dest, int flag)
 
int Xorriso_clone_under (struct XorrisO *xorriso, char *origin, char *dest, int flag)
 
int Xorriso_set_st_mode (struct XorrisO *xorriso, char *in_path, mode_t mode_and, mode_t mode_or, int flag)
 
int Xorriso_set_uid (struct XorrisO *xorriso, char *in_path, uid_t uid, int flag)
 
int Xorriso_set_gid (struct XorrisO *xorriso, char *in_path, gid_t gid, int flag)
 
int Xorriso_set_time (struct XorrisO *xorriso, char *in_path, time_t t, int flag)
 
int Xorriso_mkisofs_lower_r (struct XorrisO *xorriso, IsoNode *node, int flag)
 
int Xorriso_setfacl (struct XorrisO *xorriso, void *in_node, char *path, char *access_text, char *default_text, int flag)
 
int Xorriso_setfattr (struct XorrisO *xorriso, void *in_node, char *path, size_t in_num_attrs, char **in_names, size_t *in_value_lengths, char **in_values, int flag)
 
int Xorriso_record_dev_inode (struct XorrisO *xorriso, char *disk_path, dev_t dev, ino_t ino, void *in_node, char *iso_path, int flag)
 
int Xorriso_widen_hardlink (struct XorrisO *xorriso, void *boss_iter, IsoNode *node, char *abs_path, char *iso_prefix, char *disk_prefix, int flag)
 
int Xorriso_set_hidden (struct XorrisO *xorriso, void *in_node, char *path, int hide_state, int flag)
 
int Xorriso_estimate_file_size (struct XorrisO *xorriso, struct FindjoB *job, char *basename, mode_t st_mode, off_t st_size, int flag)
 
int Xorriso_test_outchar (struct XorrisO *xorriso, void *node_pt, int name_space, int flag)
 
int Xorriso_set_to_mtime (struct XorrisO *xorriso, char *show_path, IsoNode *node, int flag)
 
int Xorriso_cannot_create_iter (struct XorrisO *xorriso, int iso_error, int flag)
 
int Xorriso_findi_iter (struct XorrisO *xorriso, IsoDir *dir_node, off_t *mem, IsoDirIter **iter, IsoNode ***node_array, int *node_count, int *node_idx, IsoNode **iterated_node, int flag)
 
int Xorriso_findi_action (struct XorrisO *xorriso, struct FindjoB *job, IsoDirIter *boss_iter, off_t boss_mem, char *abs_path, char *show_path, IsoNode *node, int depth, int flag)
 
int Exprtest_match_disk_name (struct XorrisO *xorriso, struct ExprtesT *ftest, IsoNode *node, int flag)
 
int Exprtest_match (struct XorrisO *xorriso, struct ExprtesT *ftest, void *node_pt, char *name, char *path, struct stat *boss_stbuf, struct stat *stbuf, int flag)
 
int Xorriso_findi_test (struct XorrisO *xorriso, struct FindjoB *job, IsoNode *node, char *name, char *path, struct stat *boss_stbuf, struct stat *stbuf, int depth, int flag)
 
int Xorriso_findi_headline (struct XorrisO *xorriso, struct FindjoB *job, int flag)
 
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)
 
int Xorriso_findi_sorted (struct XorrisO *xorriso, struct FindjoB *job, off_t boss_mem, int filec, char **filev, int flag)
 
int Xorriso_all_node_array (struct XorrisO *xorriso, int addon_nodes, int flag)
 
int Xorriso_perform_acl_from_list (struct XorrisO *xorriso, char *file_path, char *uid, char *gid, char *acl, int flag)
 
int Xorriso_path_setfattr (struct XorrisO *xorriso, void *in_node, char *path, char *name, size_t value_length, char *value, int flag)
 
int Xorriso_perform_attr_from_list (struct XorrisO *xorriso, char *path, struct Xorriso_lsT *lst_start, int flag)
 
int Xorriso__mark_update_xinfo (void *data, int flag)
 
int Xorriso__mark_update_cloner (void *old_data, void **new_data, int flag)
 
int Xorriso_mark_update_merge (struct XorrisO *xorriso, char *path, void *in_node, int flag)
 
static int Xorriso_remove_hfsplus_crtp (struct XorrisO *xorriso, IsoNode *node, char *path, int flag)
 
static int Xorriso_set_hfsplus_crtp (struct XorrisO *xorriso, IsoNode *node, char *path, char *creator, char *hfs_type, int flag)
 
int Xorriso_hfsplus_file_creator_type (struct XorrisO *xorriso, char *path, void *in_node, char *creator, char *hfs_type, int flag)
 
int Xorriso_hfsplus_bless (struct XorrisO *xorriso, char *path, void *in_node, char *blessing, int flag)
 
int Xorriso_get_blessing (struct XorrisO *xorriso, IsoNode *node, int *bless_idx, char bless_code[17], int flag)
 
int Xorriso_apply_sort_file (struct XorrisO *xorriso, char *path, int flag)
 
int Xorriso_set_file_name_limit (struct XorrisO *xorriso, int value, int flag)
 
int Xorriso_truncate_uniquely (struct XorrisO *xorriso, int length, IsoNode *node, char *abs_path, char *show_path, int flag)
 

Macro Definition Documentation

◆ Xorriso_add_handle_collisioN

#define Xorriso_add_handle_collisioN   1

◆ Xorriso_graft_handle_collisioN

#define Xorriso_graft_handle_collisioN   1

◆ Xorriso_optimistic_add_treE

#define Xorriso_optimistic_add_treE   1

◆ Xorriso_optimistic_graft_iN

#define Xorriso_optimistic_graft_iN   1

Function Documentation

◆ Exprtest_match()

◆ Exprtest_match_disk_name()

int Exprtest_match_disk_name ( struct XorrisO xorriso,
struct ExprtesT ftest,
IsoNode node,
int  flag 
)

◆ Xoriso_handle_collision()

int Xoriso_handle_collision ( struct XorrisO xorriso,
void *  boss_iter,
IsoNode **  node,
char *  img_path,
char *  full_img_path,
char *  disk_path,
char *  show_path,
int  flag 
)

◆ Xorriso__mark_update_cloner()

int Xorriso__mark_update_cloner ( void *  old_data,
void **  new_data,
int  flag 
)

Definition at line 3897 of file iso_manip.c.

References ISO_XINFO_NO_CLONE.

Referenced by Xorriso_startup_libraries().

◆ Xorriso__mark_update_xinfo()

int Xorriso__mark_update_xinfo ( void *  data,
int  flag 
)

Definition at line 3890 of file iso_manip.c.

Referenced by Xorriso_mark_update_merge(), and Xorriso_startup_libraries().

◆ Xorriso_add_symlink()

int Xorriso_add_symlink ( struct XorrisO xorriso,
IsoDir parent,
char *  link_target,
char *  leaf_name,
char *  nominal_path,
int  flag 
)

◆ Xorriso_add_tree()

◆ Xorriso_all_node_array()

◆ Xorriso_apply_sort_file()

◆ Xorriso_cannot_clone()

int Xorriso_cannot_clone ( struct XorrisO xorriso,
char *  eff_origin,
char *  eff_dest,
int  iso_error,
int  flag 
)

◆ Xorriso_cannot_create_iter()

◆ Xorriso_clone_tree()

◆ Xorriso_clone_under()

◆ Xorriso_copy_implicit_properties()

int Xorriso_copy_implicit_properties ( struct XorrisO xorriso,
IsoDir dir,
char *  full_img_path,
char *  img_path,
char *  full_disk_path,
int  flag 
)

◆ Xorriso_copy_properties()

int Xorriso_copy_properties ( struct XorrisO xorriso,
char *  disk_path,
char *  img_path,
int  flag 
)

◆ Xorriso_cut_out()

int Xorriso_cut_out ( struct XorrisO xorriso,
char *  disk_path,
off_t  startbyte,
off_t  bytecount,
char *  iso_rr_path,
int  flag 
)

◆ Xorriso_estimate_file_size()

int Xorriso_estimate_file_size ( struct XorrisO xorriso,
struct FindjoB job,
char *  basename,
mode_t  st_mode,
off_t  st_size,
int  flag 
)

◆ Xorriso_findi()

◆ Xorriso_findi_action()

int Xorriso_findi_action ( struct XorrisO xorriso,
struct FindjoB job,
IsoDirIter boss_iter,
off_t  boss_mem,
char *  abs_path,
char *  show_path,
IsoNode node,
int  depth,
int  flag 
)

Definition at line 2635 of file iso_manip.c.

References iso_hfsplus_xinfo_data::creator_code, XorrisO::file_name_limit, XorrisO::find_check_md5_result, Findjob_get_action_parms(), Findjob_get_start_path(), Findjob_set_found_path(), Findjob_set_start_path(), XorrisO::info_text, iso_hfsplus_xinfo_func(), iso_node_get_xinfo(), iso_node_ref(), iso_node_set_sort_weight(), FindjoB::last_data_file_block, FindjoB::match_count, XorrisO::node_array, XorrisO::node_array_size, XorrisO::node_counter, XorrisO::result_line, XorrisO::show_hfs_cmd_count, XorrisO::show_hfs_cmd_flag, XorrisO::show_hfs_cmds, FindjoB::subjob, Text_shellsafe(), iso_hfsplus_xinfo_data::type_code, Xorriso_check_md5(), Xorriso_esc_filepath(), Xorriso_estimate_file_size(), Xorriso_fake_stbuf(), Xorriso_find_compare(), Xorriso_findi(), Xorriso_get_attr_value(), Xorriso_get_blessing(), Xorriso_get_md5(), Xorriso_getfacl(), Xorriso_getfattr(), Xorriso_hfsplus_bless(), Xorriso_hfsplus_file_creator_type(), Xorriso_list_extattr(), Xorriso_ls_filev(), Xorriso_make_md5(), Xorriso_mark_update_merge(), Xorriso_mkisofs_lower_r(), Xorriso_msgs_submit(), Xorriso_path_setfattr(), Xorriso_process_msg_queues(), Xorriso_record_cmd_line(), Xorriso_report_damage(), Xorriso_report_lba(), Xorriso_result(), Xorriso_rmi(), Xorriso_set_change_pending(), Xorriso_set_filter(), Xorriso_set_gid(), Xorriso_set_hidden(), Xorriso_set_st_mode(), Xorriso_set_time(), Xorriso_set_to_mtime(), Xorriso_set_uid(), Xorriso_setfacl(), Xorriso_show_stream(), Xorriso_test_outchar(), Xorriso_truncate_uniquely(), and Xorriso_widen_hardlink().

Referenced by Xorriso_findi(), and Xorriso_findi_sorted().

◆ Xorriso_findi_headline()

int Xorriso_findi_headline ( struct XorrisO xorriso,
struct FindjoB job,
int  flag 
)

Definition at line 3327 of file iso_manip.c.

References Findjob_get_action(), XorrisO::result_line, and Xorriso_result().

Referenced by Xorriso_findi(), and Xorriso_findi_sorted().

◆ Xorriso_findi_iter()

int Xorriso_findi_iter ( struct XorrisO xorriso,
IsoDir dir_node,
off_t *  mem,
IsoDirIter **  iter,
IsoNode ***  node_array,
int *  node_count,
int *  node_idx,
IsoNode **  iterated_node,
int  flag 
)

◆ Xorriso_findi_sorted()

◆ Xorriso_findi_test()

int Xorriso_findi_test ( struct XorrisO xorriso,
struct FindjoB job,
IsoNode node,
char *  name,
char *  path,
struct stat *  boss_stbuf,
struct stat *  stbuf,
int  depth,
int  flag 
)

Definition at line 3312 of file iso_manip.c.

References Findjob_test_2(), and FindjoB::prune.

Referenced by Xorriso_findi().

◆ Xorriso_get_blessing()

◆ Xorriso_graft_in()

◆ Xorriso_graft_split()

int Xorriso_graft_split ( struct XorrisO xorriso,
IsoImage volume,
IsoDir dir,
char *  disk_path,
char *  img_name,
char *  nominal_source,
char *  nominal_target,
off_t  size,
IsoNode **  node,
int  flag 
)

◆ Xorriso_hfsplus_bless()

◆ Xorriso_hfsplus_file_creator_type()

int Xorriso_hfsplus_file_creator_type ( struct XorrisO xorriso,
char *  path,
void *  in_node,
char *  creator,
char *  hfs_type,
int  flag 
)

◆ Xorriso_mark_update_merge()

◆ Xorriso_mkdir()

◆ Xorriso_mkisofs_lower_r()

int Xorriso_mkisofs_lower_r ( struct XorrisO xorriso,
IsoNode node,
int  flag 
)

◆ Xorriso_overwrite_dest()

int Xorriso_overwrite_dest ( struct XorrisO xorriso,
void *  boss_iter,
char *  eff_dest,
int  dest_ret,
char *  activity,
int  flag 
)

◆ Xorriso_path_setfattr()

int Xorriso_path_setfattr ( struct XorrisO xorriso,
void *  in_node,
char *  path,
char *  name,
size_t  value_length,
char *  value,
int  flag 
)

◆ Xorriso_perform_acl_from_list()

int Xorriso_perform_acl_from_list ( struct XorrisO xorriso,
char *  file_path,
char *  uid,
char *  gid,
char *  acl,
int  flag 
)

◆ Xorriso_perform_attr_from_list()

int Xorriso_perform_attr_from_list ( struct XorrisO xorriso,
char *  path,
struct Xorriso_lsT lst_start,
int  flag 
)

◆ Xorriso_record_dev_inode()

int Xorriso_record_dev_inode ( struct XorrisO xorriso,
char *  disk_path,
dev_t  dev,
ino_t  ino,
void *  in_node,
char *  iso_path,
int  flag 
)

◆ Xorriso_remove_hfsplus_crtp()

static int Xorriso_remove_hfsplus_crtp ( struct XorrisO xorriso,
IsoNode node,
char *  path,
int  flag 
)
static

◆ Xorriso_rename()

◆ Xorriso_rmi()

◆ Xorriso_set_file_name_limit()

◆ Xorriso_set_gid()

int Xorriso_set_gid ( struct XorrisO xorriso,
char *  in_path,
gid_t  gid,
int  flag 
)

◆ Xorriso_set_hfsplus_crtp()

◆ Xorriso_set_hidden()

int Xorriso_set_hidden ( struct XorrisO xorriso,
void *  in_node,
char *  path,
int  hide_state,
int  flag 
)

◆ Xorriso_set_st_mode()

◆ Xorriso_set_time()

int Xorriso_set_time ( struct XorrisO xorriso,
char *  in_path,
time_t  t,
int  flag 
)

◆ Xorriso_set_to_mtime()

int Xorriso_set_to_mtime ( struct XorrisO xorriso,
char *  show_path,
IsoNode node,
int  flag 
)

◆ Xorriso_set_uid()

int Xorriso_set_uid ( struct XorrisO xorriso,
char *  in_path,
uid_t  uid,
int  flag 
)

◆ Xorriso_setfacl()

int Xorriso_setfacl ( struct XorrisO xorriso,
void *  in_node,
char *  path,
char *  access_text,
char *  default_text,
int  flag 
)

◆ Xorriso_setfattr()

◆ Xorriso_test_outchar()

◆ Xorriso_transfer_properties()

◆ Xorriso_tree_graft_node()

◆ Xorriso_truncate_uniquely()

◆ Xorriso_widen_hardlink()

int Xorriso_widen_hardlink ( struct XorrisO xorriso,
void *  boss_iter,
IsoNode node,
char *  abs_path,
char *  iso_prefix,
char *  disk_prefix,
int  flag 
)