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)  

fs_image.c File Reference
#include "libisofs.h"
#include "ecma119.h"
#include "messages.h"
#include "rockridge.h"
#include "image.h"
#include "tree.h"
#include "eltorito.h"
#include "node.h"
#include "aaip_0_2.h"
#include "system_area.h"
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <langinfo.h>
#include <limits.h>
#include <stdio.h>
#include <ctype.h>
Include dependency graph for fs_image.c:

Go to the source code of this file.

Data Structures

struct  iso_read_opts
 
struct  iso_read_image_features
 
struct  _ImageFsData
 
struct  image_fs_data
 
struct  child_list
 
struct  iso_impsysa_result
 

Macros

#define Libisofs_boot_image_max_sizE   (4096*1024)
 

Typedefs

typedef struct image_fs_data ImageFileSourceData
 

Enumerations

enum  read_rr_ext { RR_EXT_NO = 0 , RR_EXT_110 = 1 , RR_EXT_112 = 2 }
 

Functions

static int ifs_fs_open (IsoImageFilesystem *fs)
 
static int ifs_fs_close (IsoImageFilesystem *fs)
 
static int iso_file_source_new_ifs (IsoImageFilesystem *fs, IsoFileSource *parent, struct ecma119_dir_record *record, IsoFileSource **src, int flag)
 
void child_list_free (struct child_list *list)
 
static char * ifs_get_path (IsoFileSource *src)
 
static char * ifs_get_name (IsoFileSource *src)
 
static int ifs_lstat (IsoFileSource *src, struct stat *info)
 
static int ifs_stat (IsoFileSource *src, struct stat *info)
 
static int ifs_access (IsoFileSource *src)
 
static int read_dir (ImageFileSourceData *data)
 
static int ifs_open (IsoFileSource *src)
 
static int ifs_close (IsoFileSource *src)
 
static uint32_t block_from_offset (int nsections, struct iso_file_section *sections, off_t offset)
 
static uint32_t size_available (int nsections, struct iso_file_section *sections, off_t offset)
 
static uint32_t block_offset (int nsections, struct iso_file_section *sections, off_t offset)
 
static int ifs_read (IsoFileSource *src, void *buf, size_t count)
 
static off_t ifs_lseek (IsoFileSource *src, off_t offset, int flag)
 
static int ifs_readdir (IsoFileSource *src, IsoFileSource **child)
 
static int ifs_readlink (IsoFileSource *src, char *buf, size_t bufsiz)
 
static IsoFilesystemifs_get_filesystem (IsoFileSource *src)
 
static void ifs_free (IsoFileSource *src)
 
static int ifs_get_aa_string (IsoFileSource *src, unsigned char **aa_string, int flag)
 
static int ifs_clone_src (IsoFileSource *old_source, IsoFileSource **new_source, int flag)
 
int iso_ifs_source_get_zf (IsoFileSource *src, uint8_t zisofs_algo[2], int *header_size_div4, int *block_size_log2, uint64_t *uncompressed_size, int flag)
 
static int make_hopefully_unique_name (_ImageFsData *fsdata, char *str, size_t len, char **name)
 
static char * get_name (_ImageFsData *fsdata, char *str, size_t len)
 
static int iso_rr_msg_submit (_ImageFsData *fsdata, int rr_err_bit, int errcode, int causedby, const char *msg)
 
static int ifs_get_root (IsoFilesystem *fs, IsoFileSource **root)
 
static int ifs_get_file (IsoFileSource *dir, const char *name, IsoFileSource **file)
 
static int ifs_get_by_path (IsoFilesystem *fs, const char *path, IsoFileSource **file)
 
unsigned int ifs_get_id (IsoFilesystem *fs)
 
static void ifs_fs_free (IsoFilesystem *fs)
 
static int read_root_susp_entries (_ImageFsData *data, uint32_t block)
 
static int read_pvd_block (IsoDataSource *src, uint32_t block, uint8_t *buffer, uint32_t *image_size)
 
static int read_pvm (_ImageFsData *data, uint32_t block)
 
static int read_el_torito_boot_catalog (_ImageFsData *data, uint32_t block)
 
static int iso_src_check_sb_tree (IsoDataSource *src, uint32_t start_lba, int flag)
 
int iso_image_filesystem_new (IsoDataSource *src, struct iso_read_opts *opts, int msgid, IsoImageFilesystem **fs)
 
static int src_aa_to_node (IsoFileSource *src, IsoNode *node, int flag)
 
static int image_builder_create_node (IsoNodeBuilder *builder, IsoImage *image, IsoFileSource *src, char *in_name, IsoNode **node)
 
static int iso_image_builder_new (IsoNodeBuilder *old, IsoNodeBuilder **builder)
 
static int create_boot_img_filesrc (IsoImageFilesystem *fs, IsoImage *image, int idx, IsoFileSource **src)
 
static int iso_image_eval_boot_info_table (IsoImage *image, struct iso_read_opts *opts, IsoDataSource *src, uint32_t iso_image_size, int flag)
 
static void issue_collision_warning_summary (size_t failures)
 
static void iso_scan_hc_sh (uint32_t lba, int c, int h, int s, uint8_t *matches)
 
static void iso_get_hc_sh (uint8_t *matches, uint32_t iso_image_size, int *hc, int *sh, int flag)
 
static int iso_analyze_mbr_ptable (IsoImage *image, int flag)
 
static int iso_analyze_isohybrid (IsoImage *image, int flag)
 
static int iso_analyze_partition_offset (IsoImage *image, IsoDataSource *src, uint64_t start_block, uint64_t block_count, int flag)
 
static int iso_analyze_mbr (IsoImage *image, IsoDataSource *src, int flag)
 
static int iso_seems_usable_gpt_head (uint8_t *head, int flag)
 
static int iso_analyze_gpt_backup (IsoImage *image, IsoDataSource *src, int flag)
 
static int iso_analyze_gpt_head (IsoImage *image, IsoDataSource *src, int flag)
 
static int iso_analyze_gpt (IsoImage *image, IsoDataSource *src, int flag)
 
static int iso_analyze_apm_head (IsoImage *image, IsoDataSource *src, int flag)
 
static int iso_analyze_apm (IsoImage *image, IsoDataSource *src, int flag)
 
static int iso_analyze_mips (IsoImage *image, IsoDataSource *src, int flag)
 
static int iso_analyze_mipsel (IsoImage *image, IsoDataSource *src, int flag)
 
static int iso_analyze_sun (IsoImage *image, IsoDataSource *src, int flag)
 
static int iso_analyze_hppa (IsoImage *image, IsoDataSource *src, int flag)
 
static int iso_analyze_alpha_boot (IsoImage *image, IsoDataSource *src, int flag)
 
static int iso_impsysa_result_new (struct iso_impsysa_result **r, int flag)
 
static void iso_impsysa_result_destroy (struct iso_impsysa_result **r, int flag)
 
static void iso_impsysa_line (struct iso_impsysa_result *target, char *msg)
 
static void iso_impsysa_report_text (struct iso_impsysa_result *target, char *msg, char *path, int flag)
 
static void iso_impsysa_reduce_na (uint32_t block, uint32_t *na, uint32_t claim)
 
static int iso_impsysa_reduce_next_above (IsoImage *image, uint32_t block, uint32_t *next_above, int flag)
 
static void iso_impsysa_report_blockpath (IsoImage *image, struct iso_impsysa_result *target, char *msg, uint32_t start_block, int flag)
 
static int iso_impsysa_report (IsoImage *image, struct iso_impsysa_result *target, int flag)
 
static int iso_report_result_destroy (char ***result, int flag)
 
static int iso_report_help (char **doc, char ***result, int *line_count, int flag)
 
static uint32_t iso_impsysa_hdd_emul_size (IsoImage *image, IsoDataSource *src, uint32_t lba, int flag)
 
static int iso_eltorito_report (IsoImage *image, struct iso_impsysa_result *target, int flag)
 
static int iso_image_report_boot_eqp (IsoImage *image, int what, char ***result, int *line_count, int flag)
 
int iso_image_report_system_area (IsoImage *image, char ***result, int *line_count, int flag)
 
static int iso_record_pvd_blocks (IsoImage *image, IsoDataSource *src, uint32_t block, int flag)
 
static int iso_record_meta_struct_blocks (IsoImage *image, IsoDataSource *src, int flag)
 
static int iso_analyze_system_area (IsoImage *image, IsoDataSource *src, struct iso_read_opts *opts, uint32_t image_size, int flag)
 
int iso_image_report_el_torito (IsoImage *image, char ***reply, int *line_count, int flag)
 
int iso_image_import (IsoImage *image, IsoDataSource *src, struct iso_read_opts *opts, IsoReadImageFeatures **features)
 
const char * iso_image_fs_get_volset_id (IsoImageFilesystem *fs)
 
const char * iso_image_fs_get_volume_id (IsoImageFilesystem *fs)
 
const char * iso_image_fs_get_publisher_id (IsoImageFilesystem *fs)
 
const char * iso_image_fs_get_data_preparer_id (IsoImageFilesystem *fs)
 
const char * iso_image_fs_get_system_id (IsoImageFilesystem *fs)
 
const char * iso_image_fs_get_application_id (IsoImageFilesystem *fs)
 
const char * iso_image_fs_get_copyright_file_id (IsoImageFilesystem *fs)
 
const char * iso_image_fs_get_abstract_file_id (IsoImageFilesystem *fs)
 
const char * iso_image_fs_get_biblio_file_id (IsoImageFilesystem *fs)
 
int iso_read_opts_new (IsoReadOpts **opts, int profile)
 
void iso_read_opts_free (IsoReadOpts *opts)
 
int iso_read_opts_set_start_block (IsoReadOpts *opts, uint32_t block)
 
int iso_read_opts_set_no_rockridge (IsoReadOpts *opts, int norr)
 
int iso_read_opts_set_no_joliet (IsoReadOpts *opts, int nojoliet)
 
int iso_read_opts_set_no_iso1999 (IsoReadOpts *opts, int noiso1999)
 
int iso_read_opts_set_no_aaip (IsoReadOpts *opts, int noaaip)
 
int iso_read_opts_set_no_md5 (IsoReadOpts *opts, int no_md5)
 
int iso_read_opts_set_new_inos (IsoReadOpts *opts, int new_inos)
 
int iso_read_opts_set_preferjoliet (IsoReadOpts *opts, int preferjoliet)
 
int iso_read_opts_set_ecma119_map (IsoReadOpts *opts, int ecma119_map)
 
int iso_read_opts_set_joliet_map (IsoReadOpts *opts, int joliet_map)
 
int iso_read_opts_set_default_uid (IsoReadOpts *opts, uid_t uid)
 
int iso_read_opts_set_default_gid (IsoReadOpts *opts, gid_t gid)
 
int iso_read_opts_set_default_permissions (IsoReadOpts *opts, mode_t file_perm, mode_t dir_perm)
 
int iso_read_opts_set_input_charset (IsoReadOpts *opts, const char *charset)
 
int iso_read_opts_auto_input_charset (IsoReadOpts *opts, int mode)
 
int iso_read_opts_load_system_area (IsoReadOpts *opts, int mode)
 
int iso_read_opts_keep_import_src (IsoReadOpts *opts, int mode)
 
void iso_read_image_features_destroy (IsoReadImageFeatures *f)
 
uint32_t iso_read_image_features_get_size (IsoReadImageFeatures *f)
 
int iso_read_image_features_has_rockridge (IsoReadImageFeatures *f)
 
int iso_read_image_features_has_joliet (IsoReadImageFeatures *f)
 
int iso_read_image_features_has_iso1999 (IsoReadImageFeatures *f)
 
int iso_read_image_features_has_eltorito (IsoReadImageFeatures *f)
 
int iso_read_image_features_tree_loaded (IsoReadImageFeatures *f)
 
int iso_read_image_features_rr_loaded (IsoReadImageFeatures *f)
 
int iso_file_get_old_image_sections (IsoFile *file, int *section_count, struct iso_file_section **sections, int flag)
 
int iso_ifs_sections_cmp (IsoFileSource *s1, IsoFileSource *s2, int *cmp_ret, int flag)
 

Variables

unsigned int fs_dev_id = 0
 
IsoFileSourceIface ifs_class
 

Macro Definition Documentation

◆ Libisofs_boot_image_max_sizE

#define Libisofs_boot_image_max_sizE   (4096*1024)

??? >>> ts B00428 : should the max size become public ?

Definition at line 3585 of file fs_image.c.

Typedef Documentation

◆ ImageFileSourceData

Definition at line 209 of file fs_image.c.

Enumeration Type Documentation

◆ read_rr_ext

Should the RR extensions be read?

Enumerator
RR_EXT_NO 
RR_EXT_110 
RR_EXT_112 

Definition at line 214 of file fs_image.c.

Function Documentation

◆ block_from_offset()

static uint32_t block_from_offset ( int  nsections,
struct iso_file_section sections,
off_t  offset 
)
static

Computes the block where the given offset should start.

Definition at line 815 of file fs_image.c.

References iso_file_section::block, and BLOCK_SIZE.

Referenced by ifs_lseek(), and ifs_read().

◆ block_offset()

static uint32_t block_offset ( int  nsections,
struct iso_file_section sections,
off_t  offset 
)
static

Get the block offset for reading the given file offset

Definition at line 862 of file fs_image.c.

References BLOCK_SIZE.

Referenced by ifs_lseek(), ifs_read(), susp_add_CE(), and susp_make_CE().

◆ child_list_free()

void child_list_free ( struct child_list list)

Definition at line 479 of file fs_image.c.

References child_list::file, iso_file_source_unref(), and child_list::next.

Referenced by ifs_close(), and ifs_open().

◆ create_boot_img_filesrc()

static int create_boot_img_filesrc ( IsoImageFilesystem fs,
IsoImage image,
int  idx,
IsoFileSource **  src 
)
static

◆ get_name()

static char* get_name ( _ImageFsData fsdata,
char *  str,
size_t  len 
)
static

◆ ifs_access()

static int ifs_access ( IsoFileSource src)
static

Definition at line 565 of file fs_image.c.

References ISO_SUCCESS.

◆ ifs_clone_src()

◆ ifs_close()

◆ ifs_free()

◆ ifs_fs_close()

◆ ifs_fs_free()

◆ ifs_fs_open()

◆ ifs_get_aa_string()

static int ifs_get_aa_string ( IsoFileSource src,
unsigned char **  aa_string,
int  flag 
)
static

◆ ifs_get_by_path()

◆ ifs_get_file()

static int ifs_get_file ( IsoFileSource dir,
const char *  name,
IsoFileSource **  file 
)
static

Find a file inside a node.

Parameters
fileit is not modified if requested file is not found
Returns
1 success, 0 not found, < 0 error

Definition at line 2223 of file fs_image.c.

References iso_file_source_close(), iso_file_source_get_name(), iso_file_source_open(), iso_file_source_readdir(), iso_file_source_unref(), and ISO_SUCCESS.

Referenced by ifs_get_by_path().

◆ ifs_get_filesystem()

static IsoFilesystem* ifs_get_filesystem ( IsoFileSource src)
static

Definition at line 1112 of file fs_image.c.

References iso_file_source::data, and image_fs_data::fs.

◆ ifs_get_id()

unsigned int ifs_get_id ( IsoFilesystem fs)

Definition at line 2324 of file fs_image.c.

References ISO_IMAGE_FS_ID.

Referenced by iso_image_filesystem_new().

◆ ifs_get_name()

static char* ifs_get_name ( IsoFileSource src)
static

Definition at line 522 of file fs_image.c.

References iso_file_source::data, and image_fs_data::name.

◆ ifs_get_path()

static char* ifs_get_path ( IsoFileSource src)
static

Definition at line 492 of file fs_image.c.

References iso_file_source::data, image_fs_data::name, and image_fs_data::parent.

◆ ifs_get_root()

◆ ifs_lseek()

◆ ifs_lstat()

static int ifs_lstat ( IsoFileSource src,
struct stat *  info 
)
static

Definition at line 530 of file fs_image.c.

References iso_file_source::data, image_fs_data::info, ISO_NULL_POINTER, and ISO_SUCCESS.

◆ ifs_open()

◆ ifs_read()

static int ifs_read ( IsoFileSource src,
void *  buf,
size_t  count 
)
static

Attempts to read up to count bytes from the given source into the buffer starting at buf.

The file src must be open() before calling this, and close() when no more needed. Not valid for dirs. On symlinks it reads the destination file.

Returns
number of bytes read, 0 if EOF, < 0 on error Error codes: ISO_FILE_ERROR ISO_NULL_POINTER ISO_FILE_NOT_OPENED ISO_FILE_IS_DIR ISO_OUT_OF_MEM ISO_INTERRUPTED

Definition at line 900 of file fs_image.c.

References block_from_offset(), block_offset(), image_fs_data::content, image_fs_data::data, iso_filesystem::data, iso_file_source::data, image_fs_data::fs, image_fs_data::info, ISO_FILE_IS_DIR, ISO_FILE_NOT_OPENED, ISO_NULL_POINTER, ISO_WRONG_ARG_VALUE, MIN, image_fs_data::nsections, image_fs_data::offset, image_fs_data::opened, iso_data_source::read_block, image_fs_data::sections, size_available(), and _ImageFsData::src.

◆ ifs_readdir()

◆ ifs_readlink()

static int ifs_readlink ( IsoFileSource src,
char *  buf,
size_t  bufsiz 
)
static

Read the destination of a symlink. You don't need to open the file to call this.

Parameters
bufallocated buffer of at least bufsiz bytes. The dest. will be copied there, and it will be NULL-terminated
bufsizcharacters to be copied. Destination link will be truncated if it is larger than given size. This include the \0 character.
Returns
1 on success, < 0 on error Error codes: ISO_FILE_ERROR ISO_NULL_POINTER ISO_WRONG_ARG_VALUE -> if bufsiz <= 0 ISO_FILE_IS_NOT_SYMLINK ISO_OUT_OF_MEM ISO_FILE_BAD_PATH ISO_FILE_DOESNT_EXIST

Definition at line 1077 of file fs_image.c.

References image_fs_data::content, image_fs_data::data, iso_file_source::data, image_fs_data::info, ISO_FILE_IS_NOT_SYMLINK, ISO_NULL_POINTER, ISO_RR_PATH_TOO_LONG, ISO_SUCCESS, and ISO_WRONG_ARG_VALUE.

◆ ifs_stat()

static int ifs_stat ( IsoFileSource src,
struct stat *  info 
)
static

◆ image_builder_create_node()

static int image_builder_create_node ( IsoNodeBuilder builder,
IsoImage image,
IsoFileSource src,
char *  in_name,
IsoNode **  node 
)
static

◆ iso_analyze_alpha_boot()

◆ iso_analyze_apm()

◆ iso_analyze_apm_head()

static int iso_analyze_apm_head ( IsoImage image,
IsoDataSource src,
int  flag 
)
static

◆ iso_analyze_gpt()

◆ iso_analyze_gpt_backup()

◆ iso_analyze_gpt_head()

◆ iso_analyze_hppa()

◆ iso_analyze_isohybrid()

◆ iso_analyze_mbr()

◆ iso_analyze_mbr_ptable()

◆ iso_analyze_mips()

◆ iso_analyze_mipsel()

◆ iso_analyze_partition_offset()

◆ iso_analyze_sun()

◆ iso_analyze_system_area()

◆ iso_eltorito_report()

◆ iso_file_get_old_image_sections()

int iso_file_get_old_image_sections ( IsoFile file,
int *  section_count,
struct iso_file_section **  sections,
int  flag 
)

Get the start addresses and the sizes of the data extents of a file node if it was imported from an old image.

Parameters
fileThe file
section_countReturns the number of extent entries in sections arrays
sectionsReturns the array of file sections. Apply free() to dispose it.
flagReserved for future usage, submit 0
Returns
1 if there are valid extents (file comes from old image), 0 if file was newly added, i.e. it does not come from an old image, < 0 error

Definition at line 6565 of file fs_image.c.

References iso_stream::class, iso_file_source::data, iso_stream::data, Iso_File::from_old_session, ISO_NULL_POINTER, ISO_OUT_OF_MEM, iso_stream_get_input_stream(), ISO_WRONG_ARG_VALUE, image_fs_data::nsections, image_fs_data::sections, FSrcStreamData::src, Iso_File::stream, and IsoStream_Iface::type.

Referenced by iso_analyze_alpha_boot(), iso_analyze_isohybrid(), iso_analyze_mipsel(), iso_eltorito_report(), iso_file_get_old_image_lba(), iso_file_src_create(), iso_image_eval_boot_info_table(), iso_impsysa_reduce_next_above(), iso_tree_get_node_of_block(), and Xorriso__start_end_lbas().

◆ iso_file_source_new_ifs()

static int iso_file_source_new_ifs ( IsoImageFilesystem fs,
IsoFileSource parent,
struct ecma119_dir_record record,
IsoFileSource **  src,
int  flag 
)
static
Parameters
srcif not-NULL, it points to a multi-extent file returned by a previous call to this function.
flagbit0= this is the root node attribute load call (parameter parent is not reliable for this) bit1= this is a call caused by CL. Do not obey CL again.
Returns
2 node is still incomplete (multi-extent) 1 success, 0 record ignored (not an error, can be a relocated dir), < 0 error

Definition at line 1453 of file fs_image.c.

References ecma119_dir_record::block, iso_file_section::block, image_fs_data::data, iso_filesystem::data, iso_file_source::data, ecma119_dir_record::file_id, ecma119_dir_record::file_unit_size, ecma119_dir_record::flags, get_name(), image_fs_data::info, ecma119_dir_record::interleave_gap_size, iso_msg_debug(), iso_msg_submit(), ISO_NULL_POINTER, ISO_OUT_OF_MEM, iso_read_bb(), ISO_UNSUPPORTED_ECMA119, ISO_WRONG_ECMA119, ecma119_dir_record::len_fi, ecma119_dir_record::len_xa, ecma119_dir_record::length, _ImageFsData::msgid, image_fs_data::name, image_fs_data::nsections, image_fs_data::sections, and iso_file_section::size.

Referenced by ifs_get_root(), and read_dir().

◆ iso_get_hc_sh()

static void iso_get_hc_sh ( uint8_t *  matches,
uint32_t  iso_image_size,
int *  hc,
int *  sh,
int  flag 
)
static

Definition at line 3763 of file fs_image.c.

Referenced by iso_analyze_mbr_ptable().

◆ iso_ifs_sections_cmp()

int iso_ifs_sections_cmp ( IsoFileSource s1,
IsoFileSource s2,
int *  cmp_ret,
int  flag 
)

◆ iso_ifs_source_get_zf()

int iso_ifs_source_get_zf ( IsoFileSource src,
uint8_t  zisofs_algo[2],
int *  header_size_div4,
int *  block_size_log2,
uint64_t *  uncompressed_size,
int  flag 
)

Definition at line 1275 of file fs_image.c.

References iso_file_source::class, iso_file_source::data, and ifs_class.

Referenced by iso_stream_get_src_zf().

◆ iso_image_builder_new()

static int iso_image_builder_new ( IsoNodeBuilder old,
IsoNodeBuilder **  builder 
)
static

Create a new builder, that is exactly a copy of an old builder, but where create_node() function has been replaced by image_builder_create_node.

Definition at line 3481 of file fs_image.c.

References Iso_Node_Builder::create_file, Iso_Node_Builder::create_file_data, Iso_Node_Builder::create_node, Iso_Node_Builder::create_node_data, Iso_Node_Builder::free, image_builder_create_node(), ISO_NULL_POINTER, ISO_OUT_OF_MEM, ISO_SUCCESS, and Iso_Node_Builder::refcount.

Referenced by iso_image_import().

◆ iso_image_eval_boot_info_table()

◆ iso_image_filesystem_new()

int iso_image_filesystem_new ( IsoDataSource src,
IsoReadOpts opts,
int  msgid,
IsoImageFilesystem **  fs 
)

Create a new IsoFilesystem to access a existent ISO image.

Parameters
srcData source to access data.
optsImage read options
msgidAn image identifier, obtained with iso_image_get_msg_id(), used to associated messages issued by the filesystem implementation with an existent image. If you are not using this filesystem in relation with any image context, just use 0x1fffff as the value for this parameter.
fsWill be filled with a pointer to the filesystem that can be used to access image contents.
Returns
1 on success, < 0 on error
Since
0.6.2

Definition at line 2887 of file fs_image.c.

References _ImageFsData::aaip_load, _ImageFsData::aaip_version, iso_read_opts::auto_input_charset, _ImageFsData::auto_input_charset, ecma119_dir_record::block, el_torito_section_entry::block, iso_read_opts::block, BLOCK_SIZE, ecma119_boot_rec_vol_desc::boot_catalog, ecma119_boot_rec_vol_desc::boot_sys_id, _ImageFsData::bootblocks, _ImageFsData::catblock, _ImageFsData::catcontent, iso_filesystem::close, iso_filesystem::data, iso_read_opts::dir_mode, _ImageFsData::dir_mode, iso_read_opts::ecma119_map, _ImageFsData::ecma119_map, ecma119_sup_vol_desc::esc_sequences, _ImageFsData::evd_root_block, iso_read_opts::file_mode, _ImageFsData::file_mode, iso_filesystem::free, fs_dev_id, iso_filesystem::get_by_path, iso_filesystem::get_id, iso_filesystem::get_root, iso_read_opts::gid, _ImageFsData::gid, _ImageFsData::id, ifs_fs_close(), ifs_fs_free(), ifs_fs_open(), ifs_get_by_path(), ifs_get_id(), ifs_get_root(), _ImageFsData::inode_counter, iso_read_opts::input_charset, _ImageFsData::input_charset, _ImageFsData::iso1999, iso_data_source_ref(), iso_get_local_charset(), iso_msg_debug(), iso_msg_submit(), iso_msgs_submit(), ISO_NULL_POINTER, ISO_OUT_OF_MEM, iso_read_bb(), iso_read_lsb(), _ImageFsData::iso_root_block, iso_src_check_sb_tree(), ISO_SUCCESS, ISO_UNSUPPORTED_EL_TORITO, ISO_UNSUPPORTED_VD, ISO_WRONG_EL_TORITO, _ImageFsData::joliet, iso_read_opts::joliet_map, _ImageFsData::joliet_map, _ImageFsData::joliet_ucs2_failures, ecma119_dir_record::len_xa, LIBISO_ALLOC_MEM, LIBISO_FREE_MEM, Libisofs_max_boot_imageS, _ImageFsData::local_charset, iso_read_opts::make_new_ino, _ImageFsData::make_new_ino, _ImageFsData::md5_load, _ImageFsData::msgid, iso_read_opts::noaaip, iso_read_opts::noiso1999, iso_read_opts::nojoliet, iso_read_opts::nomd5, iso_read_opts::norock, _ImageFsData::num_bootimgs, iso_filesystem::open, _ImageFsData::open_count, iso_read_opts::preferjoliet, _ImageFsData::pvd_root_block, _ImageFsData::px_ino_status, iso_data_source::read_block, read_el_torito_boot_catalog(), read_pvm(), read_root_susp_entries(), iso_filesystem::refcount, ecma119_sup_vol_desc::root_dir_record, _ImageFsData::rr, _ImageFsData::rr_err_repeated, _ImageFsData::rr_err_reported, RR_EXT_NO, _ImageFsData::rr_version, _ImageFsData::src, ecma119_boot_rec_vol_desc::std_identifier, _ImageFsData::svd_root_block, iso_read_opts::truncate_length, _ImageFsData::truncate_length, iso_read_opts::truncate_mode, _ImageFsData::truncate_mode, iso_filesystem::type, iso_read_opts::uid, _ImageFsData::uid, iso_filesystem::version, ecma119_sup_vol_desc::vol_desc_version, and ecma119_boot_rec_vol_desc::vol_desc_version.

Referenced by iso_image_import().

◆ iso_image_fs_get_abstract_file_id()

const char* iso_image_fs_get_abstract_file_id ( IsoImageFilesystem fs)

Get the abstract file identifier for an existent image. The returned string belong to the IsoImageFilesystem and shouldn't be free() nor modified.

Since
0.6.2

Definition at line 6267 of file fs_image.c.

References _ImageFsData::abstract_file_id, and iso_filesystem::data.

◆ iso_image_fs_get_application_id()

const char* iso_image_fs_get_application_id ( IsoImageFilesystem fs)

Get the application identifier for an existent image. The returned string belong to the IsoImageFilesystem and shouldn't be free() nor modified.

Since
0.6.2

Definition at line 6255 of file fs_image.c.

References _ImageFsData::application_id, and iso_filesystem::data.

◆ iso_image_fs_get_biblio_file_id()

const char* iso_image_fs_get_biblio_file_id ( IsoImageFilesystem fs)

Get the biblio file identifier for an existent image. The returned string belong to the IsoImageFilesystem and shouldn't be free() nor modified.

Since
0.6.2

Definition at line 6274 of file fs_image.c.

References _ImageFsData::biblio_file_id, and iso_filesystem::data.

◆ iso_image_fs_get_copyright_file_id()

const char* iso_image_fs_get_copyright_file_id ( IsoImageFilesystem fs)

Get the copyright file identifier for an existent image. The returned string belong to the IsoImageFilesystem and shouldn't be free() nor modified.

Since
0.6.2

Definition at line 6261 of file fs_image.c.

References _ImageFsData::copyright_file_id, and iso_filesystem::data.

◆ iso_image_fs_get_data_preparer_id()

const char* iso_image_fs_get_data_preparer_id ( IsoImageFilesystem fs)

Get the data preparer identifier for an existent image. The returned string belong to the IsoImageFilesystem and shouldn't be free() nor modified.

Since
0.6.2

Definition at line 6243 of file fs_image.c.

References iso_filesystem::data, and _ImageFsData::data_preparer_id.

◆ iso_image_fs_get_publisher_id()

const char* iso_image_fs_get_publisher_id ( IsoImageFilesystem fs)

Get the publisher identifier for an existent image. The returned string belong to the IsoImageFilesystem and shouldn't be free() nor modified.

Since
0.6.2

Definition at line 6237 of file fs_image.c.

References iso_filesystem::data, and _ImageFsData::publisher_id.

◆ iso_image_fs_get_system_id()

const char* iso_image_fs_get_system_id ( IsoImageFilesystem fs)

Get the system identifier for an existent image. The returned string belong to the IsoImageFilesystem and shouldn't be free() nor modified.

Since
0.6.2

Definition at line 6249 of file fs_image.c.

References iso_filesystem::data, and _ImageFsData::system_id.

◆ iso_image_fs_get_volset_id()

const char* iso_image_fs_get_volset_id ( IsoImageFilesystem fs)

Get the volset identifier for an existent image. The returned string belong to the IsoImageFilesystem and shouldn't be free() nor modified.

Since
0.6.2

Definition at line 6225 of file fs_image.c.

References iso_filesystem::data, and _ImageFsData::volset_id.

◆ iso_image_fs_get_volume_id()

const char* iso_image_fs_get_volume_id ( IsoImageFilesystem fs)

Get the volume identifier for an existent image. The returned string belong to the IsoImageFilesystem and shouldn't be free() nor modified.

Since
0.6.2

Definition at line 6231 of file fs_image.c.

References iso_filesystem::data, and _ImageFsData::volume_id.

◆ iso_image_import()

int iso_image_import ( IsoImage image,
IsoDataSource src,
IsoReadOpts opts,
IsoReadImageFeatures **  features 
)

Import a previous session or image, for growing or modify.

Parameters
imageThe image context to which old image will be imported. Note that all files added to image, and image attributes, will be replaced with the contents of the old image. TODO #00025 support for merging old image files
srcData Source from which old image will be read. A extra reference is added, so you still need to iso_data_source_unref() yours.
optsOptions for image import. All needed data will be copied, so you can free the given struct once this function returns.
featuresIf not NULL, a new IsoReadImageFeatures will be allocated and filled with the features of the old image. It should be freed with iso_read_image_features_destroy() when no more needed. You can pass NULL if you're not interested on them.
Returns
1 on success, < 0 on error
Since
0.6.2

Definition at line 5770 of file fs_image.c.

References _ImageFsData::abstract_file_id, el_torito_boot_image::appended_idx, el_torito_boot_image::appended_start, _ImageFsData::application_id, Iso_Node::atime, _ImageFsData::auto_input_charset, _ImageFsData::biblio_file_id, iso_read_opts::block, _ImageFsData::boot_flags, el_torito_boot_image::bootable, _ImageFsData::bootblocks, Iso_Image::bootcat, el_torito_boot_catalog::bootimages, Iso_Image::builder, _ImageFsData::catblock, _ImageFsData::catcontent, _ImageFsData::catsize, Iso_Image::checksum_array, Iso_Image::checksum_end_lba, Iso_Image::checksum_idx_count, Iso_Image::checksum_start_lba, iso_filesystem::close, Iso_Image::collision_warnings, Iso_Boot::content, _ImageFsData::copyright_file_id, create_boot_img_filesrc(), _ImageFsData::creation_time, Iso_Node::ctime, iso_filesystem::data, _ImageFsData::data_preparer_id, _ImageFsData::effective_time, el_torito_boot_catalog_free(), _ImageFsData::eltorito, el_torito_boot_image::emul_hdd_size, _ImageFsData::evd_root_block, _ImageFsData::expiration_time, Iso_Image::fs, iso_filesystem::get_root, Iso_Node::gid, Iso_Image::id, el_torito_boot_image::id_string, _ImageFsData::id_strings, el_torito_boot_image::image, image_builder_create_node(), img_make_inos(), Iso_Image::import_src, _ImageFsData::inode_counter, Iso_Image::inode_counter, _ImageFsData::input_charset, _ImageFsData::iso1999, iso_aa_lookup_attr(), iso_add_dir_src_rec(), iso_analyze_system_area(), iso_data_source_ref(), ISO_EL_TORITO_HIDDEN, ISO_ELTO_EFI_HIDDEN, iso_error_to_msg(), iso_file_source_get_aa_string(), iso_file_source_lstat(), iso_file_source_unref(), iso_filesystem_unref(), ISO_GENERAL_NOTE, iso_image_builder_new(), iso_image_eval_boot_info_table(), iso_image_filesystem_new(), iso_image_set_abstract_file_id(), iso_image_set_application_id(), iso_image_set_biblio_file_id(), iso_image_set_copyright_file_id(), iso_image_set_data_preparer_id(), iso_image_set_publisher_id(), iso_image_set_pvd_times(), iso_image_set_system_id(), iso_image_set_volset_id(), iso_image_set_volume_id(), iso_impsysa_hdd_emul_size(), ISO_MD5_AREA_CORRUPTED, iso_md5_compute(), iso_md5_end(), iso_md5_start(), iso_msg_submit(), ISO_NO_ROOT_DIR, iso_node_builder_unref(), iso_node_new_root(), iso_node_set_ino(), iso_node_unref(), ISO_NULL_POINTER, ISO_OUT_OF_MEM, _ImageFsData::iso_root_block, iso_root_get_isofsca(), iso_root_get_isofsnt(), ISO_SUCCESS, ISO_SYSAREA_PROBLEMS, ISO_TRUNCATE_ISOFSNT, issue_collision_warning_summary(), issue_ucs2_warning_summary(), _ImageFsData::joliet, _ImageFsData::joliet_ucs2_failures, iso_read_opts::keep_import_src, Iso_Boot::lba, LIBISO_BOOT, Libisofs_max_boot_imageS, el_torito_boot_image::load_seg, _ImageFsData::load_segs, el_torito_boot_image::load_size, _ImageFsData::load_sizes, iso_read_opts::load_system_area, iso_read_opts::make_new_ino, _ImageFsData::make_new_ino, _ImageFsData::md5_load, _ImageFsData::media_types, Iso_Node::mode, _ImageFsData::modification_time, Iso_Node::mtime, _ImageFsData::nblocks, el_torito_boot_catalog::node, Iso_Dir::node, el_torito_boot_catalog::num_bootimages, _ImageFsData::num_bootimgs, el_torito_boot_image::partition_type, _ImageFsData::partition_types, el_torito_boot_image::platform_id, _ImageFsData::platform_ids, _ImageFsData::publisher_id, _ImageFsData::pvd_root_block, _ImageFsData::px_ino_status, iso_data_source::read_block, Iso_Node::refcount, Iso_Image::root, _ImageFsData::rr, RR_EXT_NO, _ImageFsData::rr_version, el_torito_boot_image::selection_crit, _ImageFsData::selection_crits, Iso_Boot::size, src_aa_to_node(), _ImageFsData::svd_root_block, Iso_Image::system_area_data, Iso_Image::system_area_options, _ImageFsData::system_id, iso_read_opts::truncate_length, _ImageFsData::truncate_length, Iso_Image::truncate_length, iso_read_opts::truncate_mode, _ImageFsData::truncate_mode, Iso_Image::truncate_mode, el_torito_boot_image::type, Iso_Node::type, Iso_Node::uid, _ImageFsData::volset_id, and _ImageFsData::volume_id.

Referenced by isoburn_read_image().

◆ iso_image_report_boot_eqp()

◆ iso_image_report_el_torito()

int iso_image_report_el_torito ( IsoImage image,
char ***  reply,
int *  line_count,
int  flag 
)

Obtain an array of texts describing the detected properties of the eventually loaded El Torito boot information. The array will be NULL if no El Torito info was loaded. Else it will consist of lines as described in ISO_ELTORITO_REPORT_DOC above.

The lines have the same length restrictions and whitespace rules as the ones returned by iso_image_report_system_area().

Parameters
imageThe image to be inquired.
replyWill return an array of pointers to the result text lines or NULL. Dispose a non-NULL reply by a call to iso_image_report_el_torito() with flag bit15, when no longer needed. Be prepared for a long text with up to ISO_MAX_SYSAREA_LINE_LENGTH characters per line.
line_countWill return the number of valid pointers in reply.
flagBitfield for control purposes bit0= do not report system area but rather reply a copy of above text line array ISO_ELTORITO_REPORT_DOC. With this bit it is permissible to submit image as NULL. bit15= dispose result from previous call.
Returns
1 on success, 0 if no El Torito information was loaded, < 0 error.
Since
1.3.8

Definition at line 5763 of file fs_image.c.

References iso_image_report_boot_eqp().

Referenced by Xorriso_list_boot_images(), and Xorriso_report_system_area().

◆ iso_image_report_system_area()

int iso_image_report_system_area ( IsoImage image,
char ***  reply,
int *  line_count,
int  flag 
)

Obtain an array of texts describing the detected properties of the eventually loaded System Area. The array will be NULL if no System Area was loaded. It will be non-NULL with zero line count if the System Area was loaded and contains only 0-bytes. Else it will consist of lines as described in ISO_SYSAREA_REPORT_DOC above.

File paths and other long texts are reported as "(too long to show here)" if their length plus preceding text plus trailing 0-byte exceeds the line length limit of ISO_MAX_SYSAREA_LINE_LENGTH bytes. Texts which may contain whitespace or unprintable characters will start at fixed positions and extend to the end of the line. Note that newline characters may well appearing in the middle of a "line".

Parameters
imageThe image to be inquired.
replyWill return an array of pointers to the result text lines or NULL. Dispose a non-NULL reply by a call to iso_image_report_system_area() with flag bit15, when no longer needed. Be prepared for a long text with up to ISO_MAX_SYSAREA_LINE_LENGTH characters per line.
line_countWill return the number of valid pointers in reply.
flagBitfield for control purposes bit0= do not report system area but rather reply a copy of above text line arrays ISO_SYSAREA_REPORT_DOC*. With this bit it is permissible to submit image as NULL. bit15= dispose result from previous call.
Returns
1 on success, 0 if no System Area was loaded, < 0 error.
Since
1.3.8

Definition at line 5615 of file fs_image.c.

References iso_image_report_boot_eqp(), and iso_impsysa_result::line_count.

Referenced by Xorriso_list_boot_images(), Xorriso_report_system_area(), and Xorriso_show_boot_info().

◆ iso_impsysa_hdd_emul_size()

static uint32_t iso_impsysa_hdd_emul_size ( IsoImage image,
IsoDataSource src,
uint32_t  lba,
int  flag 
)
static

◆ iso_impsysa_line()

static void iso_impsysa_line ( struct iso_impsysa_result target,
char *  msg 
)
static

◆ iso_impsysa_reduce_na()

static void iso_impsysa_reduce_na ( uint32_t  block,
uint32_t *  na,
uint32_t  claim 
)
static

Definition at line 4889 of file fs_image.c.

Referenced by iso_impsysa_reduce_next_above().

◆ iso_impsysa_reduce_next_above()

◆ iso_impsysa_report()

static int iso_impsysa_report ( IsoImage image,
struct iso_impsysa_result target,
int  flag 
)
static

Definition at line 5008 of file fs_image.c.

References iso_imported_sys_area::alpha_boot_image, iso_imported_sys_area::alpha_boot_image_adr, iso_imported_sys_area::alpha_boot_image_size, iso_imported_sys_area::apm_block_size, iso_imported_sys_area::apm_gap_count, iso_imported_sys_area::apm_req, iso_imported_sys_area::apm_req_count, iso_mbr_partition_request::block_count, iso_apm_partition_request::block_count, iso_gpt_partition_request::block_count, iso_mips_voldir_entry::boot_block, iso_mips_voldir_entry::boot_bytes, iso_mbr_partition_request::desired_slot, iso_gpt_partition_request::flags, iso_imported_sys_area::gpt_array_crc_found, iso_imported_sys_area::gpt_array_crc_should, iso_imported_sys_area::gpt_backup_comments, iso_imported_sys_area::gpt_backup_lba, iso_imported_sys_area::gpt_disk_guid, iso_imported_sys_area::gpt_first_lba, iso_imported_sys_area::gpt_head_crc_found, iso_imported_sys_area::gpt_head_crc_should, iso_imported_sys_area::gpt_last_lba, iso_imported_sys_area::gpt_max_entries, iso_imported_sys_area::gpt_part_start, iso_imported_sys_area::gpt_req, iso_imported_sys_area::gpt_req_count, iso_imported_sys_area::gpt_req_flags, iso_imported_sys_area::hppa_bootloader, iso_imported_sys_area::hppa_bootloader_adr, iso_imported_sys_area::hppa_bootloader_len, iso_imported_sys_area::hppa_cmdline, iso_imported_sys_area::hppa_hdrversion, iso_imported_sys_area::hppa_kern32_adr, iso_imported_sys_area::hppa_kern32_len, iso_imported_sys_area::hppa_kern64_adr, iso_imported_sys_area::hppa_kern64_len, iso_imported_sys_area::hppa_kernel_32, iso_imported_sys_area::hppa_kernel_64, iso_imported_sys_area::hppa_ramdisk, iso_imported_sys_area::hppa_ramdisk_adr, iso_imported_sys_area::hppa_ramdisk_len, iso_sun_disk_label_entry::id_tag, iso_gpt_partition_request::idx, iso_sun_disk_label_entry::idx, iso_imported_sys_area::image_size, Iso_Image::imported_sa_info, iso_imported_sys_area::is_not_zero, iso_conv_name_chars(), iso_impsysa_line(), iso_impsysa_report_blockpath(), iso_impsysa_report_text(), ISO_MAX_SYSAREA_LINE_LENGTH, iso_tree_get_node_path(), iso_util_bin_to_hex(), iso_write_opts_free(), iso_write_opts_new(), iso_write_opts_set_output_charset(), LIBISO_ALLOC_MEM, LIBISO_FREE_MEM, iso_imported_sys_area::mbr_req, iso_imported_sys_area::mbr_req_count, iso_imported_sys_area::mips_boot_file_paths, iso_imported_sys_area::mips_vd_entries, iso_imported_sys_area::mipsel_boot_file_path, iso_imported_sys_area::mipsel_e_entry, iso_imported_sys_area::mipsel_p_filesz, iso_imported_sys_area::mipsel_p_offset, iso_imported_sys_area::mipsel_p_vaddr, iso_imported_sys_area::mipsel_seg_start, iso_apm_partition_request::name, iso_gpt_partition_request::name, iso_mips_voldir_entry::name, iso_sun_disk_label_entry::num_blocks, iso_imported_sys_area::num_mips_boot_files, iso_gpt_partition_request::partition_guid, iso_imported_sys_area::partition_heads_per_cyl, iso_imported_sys_area::partition_offset, iso_imported_sys_area::partition_secs_per_head, iso_sun_disk_label_entry::permissions, iso_imported_sys_area::prep_part_size, iso_imported_sys_area::prep_part_start, iso_imported_sys_area::sparc_core_node, iso_imported_sys_area::sparc_disc_label, iso_imported_sys_area::sparc_entries, iso_imported_sys_area::sparc_entry_count, iso_imported_sys_area::sparc_grub2_core_adr, iso_imported_sys_area::sparc_grub2_core_size, iso_imported_sys_area::sparc_heads_per_cyl, iso_imported_sys_area::sparc_secs_per_head, iso_mbr_partition_request::start_block, iso_apm_partition_request::start_block, iso_gpt_partition_request::start_block, iso_sun_disk_label_entry::start_cyl, iso_mbr_partition_request::status_byte, iso_imported_sys_area::system_area_options, iso_apm_partition_request::type, iso_mbr_partition_request::type_byte, and iso_gpt_partition_request::type_guid.

Referenced by iso_image_report_boot_eqp().

◆ iso_impsysa_report_blockpath()

static void iso_impsysa_report_blockpath ( IsoImage image,
struct iso_impsysa_result target,
char *  msg,
uint32_t  start_block,
int  flag 
)
static

◆ iso_impsysa_report_text()

static void iso_impsysa_report_text ( struct iso_impsysa_result target,
char *  msg,
char *  path,
int  flag 
)
static

◆ iso_impsysa_result_destroy()

static void iso_impsysa_result_destroy ( struct iso_impsysa_result **  r,
int  flag 
)
static

Definition at line 4854 of file fs_image.c.

Referenced by iso_image_report_boot_eqp().

◆ iso_impsysa_result_new()

static int iso_impsysa_result_new ( struct iso_impsysa_result **  r,
int  flag 
)
static

Definition at line 4837 of file fs_image.c.

References LIBISO_ALLOC_MEM, and LIBISO_FREE_MEM.

Referenced by iso_image_report_boot_eqp().

◆ iso_read_image_features_destroy()

void iso_read_image_features_destroy ( IsoReadImageFeatures f)

Destroy an IsoReadImageFeatures object obtained with iso_image_import.

Definition at line 6483 of file fs_image.c.

Referenced by isoburn_read_image().

◆ iso_read_image_features_get_size()

uint32_t iso_read_image_features_get_size ( IsoReadImageFeatures f)

Get the size (in 2048 byte block) of the image, as reported in the PVM.

Definition at line 6493 of file fs_image.c.

References iso_read_image_features::size.

Referenced by isoburn_read_image().

◆ iso_read_image_features_has_eltorito()

int iso_read_image_features_has_eltorito ( IsoReadImageFeatures f)

Whether El-Torito boot record is present present in the image imported.

Definition at line 6526 of file fs_image.c.

References iso_read_image_features::hasElTorito.

Referenced by isoburn_read_image().

◆ iso_read_image_features_has_iso1999()

int iso_read_image_features_has_iso1999 ( IsoReadImageFeatures f)

Whether the image is recorded according to ISO 9660:1999, i.e. it has a version 2 Enhanced Volume Descriptor.

Definition at line 6518 of file fs_image.c.

References iso_read_image_features::hasIso1999.

Referenced by isoburn_read_image().

◆ iso_read_image_features_has_joliet()

int iso_read_image_features_has_joliet ( IsoReadImageFeatures f)

Whether Joliet extensions are present in the image imported.

Definition at line 6509 of file fs_image.c.

References iso_read_image_features::hasJoliet.

Referenced by isoburn_read_image().

◆ iso_read_image_features_has_rockridge()

int iso_read_image_features_has_rockridge ( IsoReadImageFeatures f)

Whether RockRidge extensions are present in the image imported.

Definition at line 6501 of file fs_image.c.

References iso_read_image_features::hasRR.

Referenced by isoburn_read_image().

◆ iso_read_image_features_rr_loaded()

int iso_read_image_features_rr_loaded ( IsoReadImageFeatures f)

Tells whether Rock Ridge information was used while loading the tree.

Definition at line 6543 of file fs_image.c.

References iso_read_image_features::rr_loaded.

Referenced by isoburn_read_image().

◆ iso_read_image_features_tree_loaded()

int iso_read_image_features_tree_loaded ( IsoReadImageFeatures f)

Tells what directory tree was loaded: 0= ISO 9660 , 1 = Joliet , 2 = ISO 9660:1999

Definition at line 6535 of file fs_image.c.

References iso_read_image_features::tree_loaded.

Referenced by isoburn_read_image().

◆ iso_read_opts_auto_input_charset()

int iso_read_opts_auto_input_charset ( IsoReadOpts opts,
int  mode 
)

Enable or disable methods to automatically choose an input charset. This eventually overrides the name set via iso_read_opts_set_input_charset()

Parameters
optsThe option set to be manipulated
modeBitfield for control purposes: bit0= Allow to use the input character set name which is eventually stored in attribute "isofs.cs" of the root directory. Applications may attach this xattr by iso_node_set_attrs() to the root node, call iso_write_opts_set_output_charset() with the same name and enable iso_write_opts_set_aaip() when writing an image. Submit any other bits with value 0.
Since
0.6.18

Definition at line 6453 of file fs_image.c.

References iso_read_opts::auto_input_charset, ISO_NULL_POINTER, and ISO_SUCCESS.

Referenced by isoburn_read_image().

◆ iso_read_opts_free()

void iso_read_opts_free ( IsoReadOpts opts)

Free an IsoReadOpts previously allocated with iso_read_opts_new().

Since
0.6.2

Definition at line 6311 of file fs_image.c.

References iso_read_opts::input_charset.

Referenced by isoburn_read_image().

◆ iso_read_opts_keep_import_src()

int iso_read_opts_keep_import_src ( IsoReadOpts opts,
int  mode 
)

Control whether to keep a reference to the IsoDataSource object which allows access to the blocks of the imported ISO 9660 filesystem. This is needed if the interval reader shall read from "imported_iso".

Parameters
optsThe option set to be manipulated
modeBitfield for control purposes: bit0= Keep a reference to the IsoDataSource until the IsoImage object gets disposed by its final iso_image_unref(). Submit any other bits with value 0.
Since
1.4.0

Definition at line 6471 of file fs_image.c.

References ISO_NULL_POINTER, ISO_SUCCESS, and iso_read_opts::keep_import_src.

Referenced by isoburn_read_image().

◆ iso_read_opts_load_system_area()

int iso_read_opts_load_system_area ( IsoReadOpts opts,
int  mode 
)

Enable or disable loading of the first 32768 bytes of the session.

Parameters
optsThe option set to be manipulated
modeBitfield for control purposes: bit0= Load System Area data and attach them to the image so that they get written by the next session, if not overridden by iso_write_opts_set_system_area(). Submit any other bits with value 0.
Since
0.6.30

Definition at line 6462 of file fs_image.c.

References ISO_NULL_POINTER, ISO_SUCCESS, and iso_read_opts::load_system_area.

Referenced by isoburn_read_image().

◆ iso_read_opts_new()

int iso_read_opts_new ( IsoReadOpts **  opts,
int  profile 
)

Creates an IsoReadOpts for reading an existent image. You should set the options desired with the correspondent setters. Note that you may want to set the start block value.

Options by default are determined by the selected profile.

Parameters
optsPointer to the location where the newly created IsoReadOpts will be stored. You should free it with iso_read_opts_free() when no more needed.
profileDefault profile for image reading. For now the following values are defined: —> 0 [STANDARD] Suitable for most situations. Most extension are read. When both Joliet and RR extension are present, RR is used. AAIP for ACL and xattr is not enabled by default.
Returns
1 success, < 0 error
Since
0.6.2

Definition at line 6280 of file fs_image.c.

References iso_read_opts::dir_mode, iso_read_opts::ecma119_map, iso_read_opts::file_mode, ISO_NULL_POINTER, ISO_OUT_OF_MEM, ISO_SUCCESS, ISO_WRONG_ARG_VALUE, iso_read_opts::joliet_map, iso_read_opts::keep_import_src, LIBISOFS_NODE_NAME_MAX, iso_read_opts::load_system_area, iso_read_opts::noaaip, iso_read_opts::nomd5, iso_read_opts::truncate_length, and iso_read_opts::truncate_mode.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_default_gid()

int iso_read_opts_set_default_gid ( IsoReadOpts opts,
gid_t  gid 
)

Set default gid for files when RR extensions are not present.

Since
0.6.2

Definition at line 6424 of file fs_image.c.

References iso_read_opts::gid, ISO_NULL_POINTER, and ISO_SUCCESS.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_default_permissions()

int iso_read_opts_set_default_permissions ( IsoReadOpts opts,
mode_t  file_perm,
mode_t  dir_perm 
)

Set default permissions for files when RR extensions are not present.

Parameters
optsThe option set to be manipulated
file_permPermissions for files.
dir_permPermissions for directories.
Since
0.6.2

Definition at line 6433 of file fs_image.c.

References iso_read_opts::dir_mode, iso_read_opts::file_mode, ISO_NULL_POINTER, and ISO_SUCCESS.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_default_uid()

int iso_read_opts_set_default_uid ( IsoReadOpts opts,
uid_t  uid 
)

Set default uid for files when RR extensions are not present.

Since
0.6.2

Definition at line 6415 of file fs_image.c.

References ISO_NULL_POINTER, ISO_SUCCESS, and iso_read_opts::uid.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_ecma119_map()

int iso_read_opts_set_ecma119_map ( IsoReadOpts opts,
int  ecma119_map 
)

How to convert file names if neither Rock Ridge nor Joliet names are present and acceptable.

Parameters
optsThe option set to be manipulated
ecma119_mapThe conversion mode to apply: 0 = unmapped: Take name as recorded in ECMA-119 directory record (not suitable for writing it to a new ISO filesystem) 1 = stripped: Like unmapped, but strip off trailing ";1" or ".;1" 2 = uppercase: Like stripped, but map {a-z} to {A-Z} 3 = lowercase: Like stripped, but map {A-Z} to {a-z}
Returns
ISO_SUCCESS if ecma119_map was accepted 0 if the value was out of range < 0 if other error
Since
1.4.2

Definition at line 6394 of file fs_image.c.

References iso_read_opts::ecma119_map, ISO_NULL_POINTER, and ISO_SUCCESS.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_input_charset()

int iso_read_opts_set_input_charset ( IsoReadOpts opts,
const char *  charset 
)

Set the input charset of the file names on the image. NULL to use locale charset. You have to specify a charset if the image filenames are encoded in a charset different that the local one. This could happen, for example, if the image was created on a system with different charset.

Parameters
optsThe option set to be manipulated
charsetThe charset to use as input charset. You can obtain the list of charsets supported on your system executing "iconv -l" in a shell.
Since
0.6.2

Definition at line 6444 of file fs_image.c.

References iso_read_opts::input_charset, ISO_NULL_POINTER, and ISO_SUCCESS.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_joliet_map()

int iso_read_opts_set_joliet_map ( IsoReadOpts opts,
int  joliet_map 
)

How to convert Joliet file names.

Parameters
optsThe option set to be manipulated
ecma119_mapThe conversion mode to apply: 0 = unmapped: Take name as recorded in Joliet directory record (not suitable for writing it to a new ISO filesystem) 1 = stripped: Strip off trailing ";1" or ".;1"
Returns
ISO_SUCCESS if joliet_map was accepted 0 if the value was out of range < 0 if other error
Since
1.5.4

Definition at line 6405 of file fs_image.c.

References ISO_NULL_POINTER, ISO_SUCCESS, and iso_read_opts::joliet_map.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_new_inos()

int iso_read_opts_set_new_inos ( IsoReadOpts opts,
int  new_inos 
)

Control discarding of eventual inode numbers from existing images. Such numbers may come from RRIP 1.12 entries PX. If not discarded they get written unchanged when the file object gets written into an ISO image. If this inode number is missing with a file in the imported image, or if it has been discarded during image reading, then a unique inode number will be generated at some time before the file gets written into an ISO image. Two image nodes which have the same inode number represent two hardlinks of the same file object. So discarding the numbers splits hardlinks.

Parameters
optsThe option set to be manipulated
new_inos1 = Discard imported inode numbers and finally hand out a unique new one to each single file before it gets written into an ISO image. 0 = Keep eventual inode numbers from PX entries. All other values are reserved.
Since
0.6.20

Definition at line 6376 of file fs_image.c.

References ISO_NULL_POINTER, ISO_SUCCESS, and iso_read_opts::make_new_ino.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_no_aaip()

int iso_read_opts_set_no_aaip ( IsoReadOpts opts,
int  noaaip 
)

Control reading of AAIP information about ACL and xattr when loading existing images. For importing ACL and xattr when inserting nodes from external filesystems (e.g. the local POSIX filesystem) see iso_image_set_ignore_aclea(). For eventual writing of this information see iso_write_opts_set_aaip().

Parameters
optsThe option set to be manipulated
noaaip1 = Do not read AAIP information 0 = Read AAIP information if available All other values are reserved.
Since
0.6.14

Definition at line 6357 of file fs_image.c.

References ISO_NULL_POINTER, ISO_SUCCESS, and iso_read_opts::noaaip.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_no_iso1999()

int iso_read_opts_set_no_iso1999 ( IsoReadOpts opts,
int  noiso1999 
)

Do not read ISO 9660:1999 enhanced tree

Since
0.6.2

Definition at line 6348 of file fs_image.c.

References ISO_NULL_POINTER, ISO_SUCCESS, and iso_read_opts::noiso1999.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_no_joliet()

int iso_read_opts_set_no_joliet ( IsoReadOpts opts,
int  nojoliet 
)

Do not read Joliet extensions.

Since
0.6.2

Definition at line 6339 of file fs_image.c.

References ISO_NULL_POINTER, ISO_SUCCESS, and iso_read_opts::nojoliet.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_no_md5()

int iso_read_opts_set_no_md5 ( IsoReadOpts opts,
int  no_md5 
)

Control reading of an array of MD5 checksums which is eventually stored at the end of a session. See also iso_write_opts_set_record_md5(). Important: Loading of the MD5 array will only work if AAIP is enabled because its position and layout is recorded in xattr "isofs.ca".

Parameters
optsThe option set to be manipulated
no_md50 = Read MD5 array if available, refuse on non-matching MD5 tags 1 = Do not read MD5 checksum array 2 = Read MD5 array, but do not check MD5 tags
Since
1.0.4 All other values are reserved.
0.6.22

Definition at line 6366 of file fs_image.c.

References ISO_NULL_POINTER, ISO_SUCCESS, and iso_read_opts::nomd5.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_no_rockridge()

int iso_read_opts_set_no_rockridge ( IsoReadOpts opts,
int  norr 
)

Do not read Rock Ridge extensions. In most cases you don't want to use this. It could be useful if RR info is damaged, or if you want to use the Joliet tree.

Since
0.6.2

Definition at line 6330 of file fs_image.c.

References ISO_NULL_POINTER, ISO_SUCCESS, and iso_read_opts::norock.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_preferjoliet()

int iso_read_opts_set_preferjoliet ( IsoReadOpts opts,
int  preferjoliet 
)

Whether to prefer Joliet over RR. libisofs usually prefers RR over Joliet, as it give us much more info about files. So, if both extensions are present, RR is used. You can set this if you prefer Joliet, but note that this is not very recommended. This doesn't mean than RR extensions are not read: if no Joliet is present, libisofs will read RR tree.

Since
0.6.2

Definition at line 6385 of file fs_image.c.

References ISO_NULL_POINTER, ISO_SUCCESS, and iso_read_opts::preferjoliet.

Referenced by isoburn_read_image().

◆ iso_read_opts_set_start_block()

int iso_read_opts_set_start_block ( IsoReadOpts opts,
uint32_t  block 
)

Set the block where the image begins. It is usually 0, but may be different on a multisession disc.

Since
0.6.2

Definition at line 6321 of file fs_image.c.

References iso_read_opts::block, ISO_NULL_POINTER, and ISO_SUCCESS.

Referenced by isoburn_read_image().

◆ iso_record_meta_struct_blocks()

static int iso_record_meta_struct_blocks ( IsoImage image,
IsoDataSource src,
int  flag 
)
static

◆ iso_record_pvd_blocks()

◆ iso_report_help()

static int iso_report_help ( char **  doc,
char ***  result,
int *  line_count,
int  flag 
)
static

Definition at line 5363 of file fs_image.c.

References ISO_OUT_OF_MEM, and ISO_SUCCESS.

Referenced by iso_image_report_boot_eqp().

◆ iso_report_result_destroy()

static int iso_report_result_destroy ( char ***  result,
int  flag 
)
static

Definition at line 5351 of file fs_image.c.

References ISO_SUCCESS.

Referenced by iso_image_report_boot_eqp().

◆ iso_rr_msg_submit()

static int iso_rr_msg_submit ( _ImageFsData fsdata,
int  rr_err_bit,
int  errcode,
int  causedby,
const char *  msg 
)
static

◆ iso_scan_hc_sh()

static void iso_scan_hc_sh ( uint32_t  lba,
int  c,
int  h,
int  s,
uint8_t *  matches 
)
static

Definition at line 3727 of file fs_image.c.

Referenced by iso_analyze_mbr_ptable().

◆ iso_seems_usable_gpt_head()

static int iso_seems_usable_gpt_head ( uint8_t *  head,
int  flag 
)
static

Definition at line 4122 of file fs_image.c.

References iso_read_lsb().

Referenced by iso_analyze_gpt_backup(), and iso_analyze_gpt_head().

◆ iso_src_check_sb_tree()

◆ issue_collision_warning_summary()

static void issue_collision_warning_summary ( size_t  failures)
static

Definition at line 3706 of file fs_image.c.

References ISO_IMPORT_COLL_WARN_MAX, ISO_IMPORT_COLLISION, and iso_msg_submit().

Referenced by iso_image_import().

◆ make_hopefully_unique_name()

static int make_hopefully_unique_name ( _ImageFsData fsdata,
char *  str,
size_t  len,
char **  name 
)
static

Definition at line 1303 of file fs_image.c.

References iso_md5_compute(), iso_md5_end(), iso_md5_start(), ISO_SUCCESS, LIBISO_ALLOC_MEM, and LIBISO_FREE_MEM.

Referenced by get_name().

◆ read_dir()

◆ read_el_torito_boot_catalog()

◆ read_pvd_block()

◆ read_pvm()

◆ read_root_susp_entries()

◆ size_available()

static uint32_t size_available ( int  nsections,
struct iso_file_section sections,
off_t  offset 
)
static

Get the size available for reading on the corresponding block

Definition at line 837 of file fs_image.c.

References BLOCK_SIZE, MIN, and iso_file_section::size.

Referenced by ifs_read().

◆ src_aa_to_node()

Variable Documentation

◆ fs_dev_id

unsigned int fs_dev_id = 0

unique identifier for each image

Definition at line 209 of file fs_image.c.

Referenced by iso_image_filesystem_new().

◆ ifs_class

IsoFileSourceIface ifs_class
Initial value:
= {
2,
}
static int ifs_get_aa_string(IsoFileSource *src, unsigned char **aa_string, int flag)
Definition: fs_image.c:1154
static int ifs_close(IsoFileSource *src)
Definition: fs_image.c:775
static off_t ifs_lseek(IsoFileSource *src, off_t offset, int flag)
Definition: fs_image.c:959
static void ifs_free(IsoFileSource *src)
Definition: fs_image.c:1125
static int ifs_readdir(IsoFileSource *src, IsoFileSource **child)
Definition: fs_image.c:1018
static int ifs_stat(IsoFileSource *src, struct stat *info)
Definition: fs_image.c:546
static int ifs_read(IsoFileSource *src, void *buf, size_t count)
Definition: fs_image.c:900
static int ifs_access(IsoFileSource *src)
Definition: fs_image.c:565
static int ifs_lstat(IsoFileSource *src, struct stat *info)
Definition: fs_image.c:530
static char * ifs_get_path(IsoFileSource *src)
Definition: fs_image.c:492
static int ifs_readlink(IsoFileSource *src, char *buf, size_t bufsiz)
Definition: fs_image.c:1077
static IsoFilesystem * ifs_get_filesystem(IsoFileSource *src)
Definition: fs_image.c:1112
static int ifs_open(IsoFileSource *src)
Definition: fs_image.c:718
static char * ifs_get_name(IsoFileSource *src)
Definition: fs_image.c:522
static int ifs_clone_src(IsoFileSource *old_source, IsoFileSource **new_source, int flag)
Definition: fs_image.c:1175

Definition at line 1252 of file fs_image.c.

Referenced by create_boot_img_filesrc(), iso_ifs_sections_cmp(), and iso_ifs_source_get_zf().