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)  

rockridge.c File Reference
#include <string.h>
#include <stdio.h>
#include "rockridge.h"
#include "node.h"
#include "ecma119_tree.h"
#include "writer.h"
#include "messages.h"
#include "image.h"
#include "aaip_0_2.h"
#include "libisofs.h"
Include dependency graph for rockridge.c:

Go to the source code of this file.

Macros

#define ISO_ROCKRIDGE_IN_DIR_REC   124
 
#define ISO_CE_ENTRY_SIZE   28
 

Functions

static int susp_add_ES (Ecma119Image *t, struct susp_info *susp, int to_ce, int seqno)
 
static int susp_make_CE (Ecma119Image *t, uint8_t **CE, uint32_t block_offset, uint32_t byte_offset, uint32_t size)
 
static int susp_append (Ecma119Image *t, struct susp_info *susp, uint8_t *data)
 
static int susp_append_ce (Ecma119Image *t, struct susp_info *susp, uint8_t *data)
 
static uid_t px_get_uid (Ecma119Image *t, Ecma119Node *n)
 
static uid_t px_get_gid (Ecma119Image *t, Ecma119Node *n)
 
static mode_t px_get_mode (Ecma119Image *t, Ecma119Node *n)
 
static int rrip_add_PX (Ecma119Image *t, Ecma119Node *n, struct susp_info *susp)
 
static int rrip_add_TF (Ecma119Image *t, Ecma119Node *n, struct susp_info *susp)
 
static int rrip_add_PL (Ecma119Image *t, Ecma119Node *n, struct susp_info *susp)
 
static int rrip_add_RE (Ecma119Image *t, Ecma119Node *n, struct susp_info *susp)
 
static int rrip_add_PN (Ecma119Image *t, Ecma119Node *n, struct susp_info *susp)
 
static int rrip_add_CL (Ecma119Image *t, Ecma119Node *n, struct susp_info *susp)
 
int iso_get_rr_name (IsoWriteOpts *opts, char *input_charset, char *output_charset, int imgid, char *str, char **name, int flag)
 
static char * get_rr_fname (Ecma119Image *t, char *str)
 
static int rrip_add_NM (Ecma119Image *t, struct susp_info *susp, char *name, int size, int flags, int ce)
 
static int rrip_SL_append_comp (size_t *n, uint8_t ***comps, char *s, int size, char fl)
 
static int rrip_add_SL (Ecma119Image *t, struct susp_info *susp, uint8_t **comp, size_t n, int ce)
 
static int susp_calc_add_to_ce (size_t *ce, size_t base_ce, int add, int flag)
 
static int aaip_add_AL (Ecma119Image *t, struct susp_info *susp, uint8_t **data, size_t num_data, size_t *sua_free, size_t *ce_len, size_t ce_mem, int flag)
 
static int rrip_add_ER (Ecma119Image *t, struct susp_info *susp)
 
static int aaip_add_ER (Ecma119Image *t, struct susp_info *susp, int flag)
 
static int susp_add_CE (Ecma119Image *t, size_t ce_len, struct susp_info *susp)
 
static int susp_add_SP (Ecma119Image *t, struct susp_info *susp)
 
static int pseudo_susp_add_PAD (Ecma119Image *t, struct susp_info *susp)
 
static int zisofs_add_ZF (Ecma119Image *t, struct susp_info *susp, int to_ce, uint8_t algo[2], int header_size_div4, int block_size_log2, uint64_t uncompressed_size, int flag)
 
static int add_zf_field (Ecma119Image *t, Ecma119Node *n, struct susp_info *info, size_t *sua_free, size_t *ce_len, size_t base_ce, int flag)
 
int aaip_xinfo_func (void *data, int flag)
 
int aaip_xinfo_cloner (void *old_data, void **new_data, int flag)
 
static int susp_calc_nm_sl_al (Ecma119Image *t, Ecma119Node *n, size_t space, size_t *su_size, size_t *ce, size_t base_ce, int flag)
 
static int add_aa_string (Ecma119Image *t, Ecma119Node *n, struct susp_info *info, size_t *sua_free, size_t *ce_len, size_t base_ce, int flag)
 
size_t rrip_calc_len (Ecma119Image *t, Ecma119Node *n, int type, size_t used_up, size_t *ce, size_t base_ce)
 
static void susp_info_free (struct susp_info *susp)
 
int rrip_get_susp_fields (Ecma119Image *t, Ecma119Node *n, int type, size_t used_up, struct susp_info *info)
 
static int susp_update_CE_sizes (Ecma119Image *t, struct susp_info *info, int flag)
 
void rrip_write_susp_fields (Ecma119Image *t, struct susp_info *info, uint8_t *buf)
 
int rrip_write_ce_fields (Ecma119Image *t, struct susp_info *info)
 

Macro Definition Documentation

◆ ISO_CE_ENTRY_SIZE

#define ISO_CE_ENTRY_SIZE   28

Definition at line 35 of file rockridge.c.

◆ ISO_ROCKRIDGE_IN_DIR_REC

#define ISO_ROCKRIDGE_IN_DIR_REC   124

Definition at line 32 of file rockridge.c.

Function Documentation

◆ aaip_add_AL()

static int aaip_add_AL ( Ecma119Image t,
struct susp_info susp,
uint8_t **  data,
size_t  num_data,
size_t *  sua_free,
size_t *  ce_len,
size_t  ce_mem,
int  flag 
)
static

◆ aaip_add_ER()

static int aaip_add_ER ( Ecma119Image t,
struct susp_info susp,
int  flag 
)
static

This always goes to continuation area

Definition at line 799 of file rockridge.c.

References ISO_OUT_OF_MEM, and susp_append_ce().

Referenced by rrip_get_susp_fields().

◆ aaip_xinfo_cloner()

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

The iso_node_xinfo_cloner function which gets associated to aaip_xinfo_func by iso_init() or iso_init_with_flag() via iso_node_xinfo_make_clonable().

Since
1.0.2

Definition at line 1127 of file rockridge.c.

References aaip_count_bytes(), ISO_AAIP_BAD_AASTRING, and ISO_OUT_OF_MEM.

Referenced by ifs_clone_src(), and iso_init_with_flag().

◆ aaip_xinfo_func()

int aaip_xinfo_func ( void *  data,
int  flag 
)

Function to identify and manage AAIP strings as xinfo of IsoNode.

An AAIP string contains the Attribute List with the xattr and ACL of a node in the image tree. It is formatted according to libisofs specification AAIP-2.0 and ready to be written into the System Use Area or Continuation Area of a directory entry in an ISO image.

Applications are not supposed to manipulate AAIP strings directly. They should rather make use of the appropriate iso_node_get_* and iso_node_set_* calls.

AAIP represents ACLs as xattr with empty name and AAIP-specific binary content. Local filesystems may represent ACLs as xattr with names like "system.posix_acl_access". libisofs does not interpret those local xattr representations of ACL directly but rather uses the ACL interface of the local system. By default the local xattr representations of ACL will not become part of the AAIP Attribute List via iso_local_get_attrs() and not be attached to local files via iso_local_set_attrs().

Since
0.6.14

Definition at line 1118 of file rockridge.c.

Referenced by add_aa_string(), default_create_node(), Exprtest_match(), ifs_clone_src(), iso_init_with_flag(), iso_node_cmp_flag(), iso_node_get_attrs(), iso_node_lookup_attr(), iso_node_set_attrs(), src_aa_to_node(), and susp_calc_nm_sl_al().

◆ add_aa_string()

static int add_aa_string ( Ecma119Image t,
Ecma119Node n,
struct susp_info info,
size_t *  sua_free,
size_t *  ce_len,
size_t  base_ce,
int  flag 
)
static

◆ add_zf_field()

◆ get_rr_fname()

static char* get_rr_fname ( Ecma119Image t,
char *  str 
)
static

◆ iso_get_rr_name()

int iso_get_rr_name ( IsoWriteOpts opts,
char *  input_charset,
char *  output_charset,
int  imgid,
char *  str,
char **  name,
int  flag 
)

Convert a RR filename to the requested charset. On any conversion error, the original name will be used.

Parameters
flagbit0= do not issue error messages

Definition at line 367 of file rockridge.c.

References iso_clone_mem(), ISO_FILENAME_WRONG_CHARSET, iso_msg_submit(), ISO_SUCCESS, and strconv().

Referenced by get_rr_fname(), and iso_conv_name_chars().

◆ pseudo_susp_add_PAD()

static int pseudo_susp_add_PAD ( Ecma119Image t,
struct susp_info susp 
)
static

A field beginning by 0 causes rrip_write_ce_fields() to pad up to the next block.

Definition at line 938 of file rockridge.c.

References ISO_OUT_OF_MEM, ISO_SUCCESS, and susp_append_ce().

Referenced by rrip_get_susp_fields().

◆ px_get_gid()

static uid_t px_get_gid ( Ecma119Image t,
Ecma119Node n 
)
static

Definition at line 147 of file rockridge.c.

References ecma119_image::gid, Iso_Node::gid, ecma119_node::node, and ecma119_image::replace_gid.

Referenced by rrip_add_PX().

◆ px_get_mode()

◆ px_get_uid()

static uid_t px_get_uid ( Ecma119Image t,
Ecma119Node n 
)
static

Definition at line 137 of file rockridge.c.

References ecma119_node::node, ecma119_image::replace_uid, ecma119_image::uid, and Iso_Node::uid.

Referenced by rrip_add_PX().

◆ rrip_add_CL()

static int rrip_add_CL ( Ecma119Image t,
Ecma119Node n,
struct susp_info susp 
)
static

Add to the given tree node a CL System Use Entry, that is used to record the new location of a directory which has been relocated.

See RRIP, 4.1.5.1 for more details.

Definition at line 341 of file rockridge.c.

References ecma119_dir_info::block, ecma119_node::dir, ECMA119_PLACEHOLDER, ecma119_image::eff_partition_offset, ecma119_node::info, ISO_ASSERT_FAILURE, iso_bb(), ISO_OUT_OF_MEM, ecma119_node::real_me, susp_append(), and ecma119_node::type.

Referenced by rrip_get_susp_fields().

◆ rrip_add_ER()

static int rrip_add_ER ( Ecma119Image t,
struct susp_info susp 
)
static

Add a SUSP "ER" System Use Entry to identify the Rock Ridge specification.

The "ER" System Use Entry is used to uniquely identify a specification compliant with SUSP. This method adds to the given tree node "." entry the "ER" corresponding to the RR protocol.

See SUSP, 5.5 and RRIP, 4.3 for more details.

This always goes to continuation area

Definition at line 726 of file rockridge.c.

References ISO_OUT_OF_MEM, ecma119_image::opts, iso_write_opts::rrip_version_1_10, and susp_append_ce().

Referenced by rrip_get_susp_fields().

◆ rrip_add_NM()

static int rrip_add_NM ( Ecma119Image t,
struct susp_info susp,
char *  name,
int  size,
int  flags,
int  ce 
)
static

Add a NM System Use Entry to the given tree node. The purpose of this System Use Entry is to store the content of an Alternate Name to support POSIX-style or other names.

See RRIP, 4.1.4 for more details.

Parameters
sizeLength of the name to be included into the NM
flags
ceWhether to add or not to CE

Definition at line 420 of file rockridge.c.

References ISO_ASSERT_FAILURE, ISO_OUT_OF_MEM, susp_append(), and susp_append_ce().

Referenced by rrip_get_susp_fields().

◆ rrip_add_PL()

static int rrip_add_PL ( Ecma119Image t,
Ecma119Node n,
struct susp_info susp 
)
static

Add a PL System Use Entry, used to record the location of the original parent directory of a directory which has been relocated.

This is special because it doesn't modify the susp fields of the directory that gets passed to it; it modifies the susp fields of the ".." entry in that directory.

See RRIP, 4.1.5.2 for more details.

Definition at line 243 of file rockridge.c.

References ecma119_dir_info::block, ecma119_node::dir, ECMA119_DIR, ecma119_image::eff_partition_offset, ecma119_node::info, ISO_ASSERT_FAILURE, iso_bb(), ISO_OUT_OF_MEM, ecma119_dir_info::real_parent, susp_append(), and ecma119_node::type.

Referenced by rrip_get_susp_fields().

◆ rrip_add_PN()

static int rrip_add_PN ( Ecma119Image t,
Ecma119Node n,
struct susp_info susp 
)
static

Add a PN System Use Entry to the given tree node. The PN System Use Entry is used to store the device number, and it's mandatory if the tree node corresponds to a character or block device.

See RRIP, 4.1.2 for more details.

Definition at line 300 of file rockridge.c.

References Iso_Special::dev, ISO_ASSERT_FAILURE, iso_bb(), ISO_OUT_OF_MEM, LIBISO_SPECIAL, ecma119_node::node, Iso_Special::node, susp_append(), and Iso_Node::type.

Referenced by rrip_get_susp_fields().

◆ rrip_add_PX()

static int rrip_add_PX ( Ecma119Image t,
Ecma119Node n,
struct susp_info susp 
)
static

Add a PX System Use Entry. The PX System Use Entry is used to add POSIX file attributes, such as access permissions or user and group id, to a ECMA 119 directory record. (RRIP, 4.1.1)

Definition at line 177 of file rockridge.c.

References ecma119_node::ino, iso_bb(), ISO_OUT_OF_MEM, ecma119_node::nlink, ecma119_image::opts, px_get_gid(), px_get_mode(), px_get_uid(), iso_write_opts::rrip_1_10_px_ino, iso_write_opts::rrip_version_1_10, and susp_append().

Referenced by rrip_get_susp_fields().

◆ rrip_add_RE()

static int rrip_add_RE ( Ecma119Image t,
Ecma119Node n,
struct susp_info susp 
)
static

Add a RE System Use Entry to the given tree node. The purpose of the this System Use Entry is to indicate to an RRIP-compliant receiving system that the Directory Record in which an "RE" System Use Entry is recorded has been relocated from another position in the original Directory Hierarchy.

See RRIP, 4.1.5.3 for more details.

Definition at line 278 of file rockridge.c.

References ISO_OUT_OF_MEM, and susp_append().

Referenced by rrip_get_susp_fields().

◆ rrip_add_SL()

static int rrip_add_SL ( Ecma119Image t,
struct susp_info susp,
uint8_t **  comp,
size_t  n,
int  ce 
)
static

Add a SL System Use Entry to the given tree node. This is used to store the content of a symbolic link, and is mandatory if the tree node indicates a symbolic link (RRIP, 4.1.3).

Parameters
compComponents of the SL System Use Entry. If they don't fit in a single SL, more than one SL will be added.
nNumber of components in comp
ceWhether to add to a continuation area or system use field.

Definition at line 543 of file rockridge.c.

References ISO_ASSERT_FAILURE, ISO_OUT_OF_MEM, susp_append(), and susp_append_ce().

Referenced by rrip_get_susp_fields().

◆ rrip_add_TF()

static int rrip_add_TF ( Ecma119Image t,
Ecma119Node n,
struct susp_info susp 
)
static

Add to the given tree node a TF System Use Entry, used to record some time stamps related to the file (RRIP, 4.1.6).

Definition at line 208 of file rockridge.c.

References iso_write_opts::always_gmt, Iso_Node::atime, Iso_Node::ctime, iso_datetime_7(), ISO_OUT_OF_MEM, Iso_Node::mtime, ecma119_node::node, ecma119_image::opts, ecma119_image::replace_timestamps, susp_append(), and ecma119_image::timestamp.

Referenced by rrip_get_susp_fields().

◆ rrip_calc_len()

size_t rrip_calc_len ( Ecma119Image t,
Ecma119Node n,
int  type,
size_t  used_up,
size_t *  ce,
size_t  base_ce 
)

Compute the length needed for write all RR and SUSP entries for a given node.

Parameters
type0 normal entry, 1 "." entry for that node (it is a dir), 2 ".." for that node (i.e., it will refer to the parent)
used_upAlready occupied space in the directory record.
ceWill be filled with the space needed in a CE
base_cePredicted fill of continuation area by previous nodes of same dir
Returns
The size needed for the RR entries in the System Use Area

Definition at line 1483 of file rockridge.c.

References iso_write_opts::aaip, iso_write_opts::aaip_susp_1_10, add_aa_string(), ecma119_node::dir, ECMA119_DIR, ecma119_is_dedicated_reloc_dir(), ECMA119_PLACEHOLDER, ECMA119_SPECIAL, Iso_Image::id, ecma119_image::image, ecma119_node::info, ISO_ASSERT_FAILURE, iso_msg_submit(), ISO_OUT_OF_MEM, ISO_ROCKRIDGE_IN_DIR_REC, Iso_Node::mode, ecma119_node::node, ecma119_image::opts, ecma119_node::parent, ecma119_dir_info::real_parent, iso_write_opts::rr_reloc_flags, iso_write_opts::rrip_1_10_px_ino, iso_write_opts::rrip_version_1_10, susp_calc_nm_sl_al(), and ecma119_node::type.

Referenced by calc_dir_size().

◆ rrip_get_susp_fields()

int rrip_get_susp_fields ( Ecma119Image t,
Ecma119Node n,
int  type,
size_t  used_up,
struct susp_info info 
)

Fill a struct susp_info with the RR/SUSP entries needed for a given node.

Parameters
type0 normal entry, 1 "." entry for that node (it is a dir), 2 ".." for that node (i.e., it will refer to the parent)
used_upAlready occupied space in the directory record.
infoPointer to the struct susp_info where the entries will be stored. If some entries need to go to a Continuation Area, they will be added to the existing ce_susp_fields, and ce_len will be incremented properly. Please ensure ce_block is initialized properly.
Returns
1 success, < 0 error

Definition at line 1636 of file rockridge.c.

References iso_write_opts::aaip, aaip_add_ER(), iso_write_opts::aaip_susp_1_10, add_aa_string(), add_zf_field(), BLOCK_SIZE, susp_info::ce_len, susp_info::current_ce_start, ecma119_node::dir, ECMA119_DIR, ecma119_is_dedicated_reloc_dir(), ECMA119_PLACEHOLDER, ECMA119_SPECIAL, ECMA119_SYMLINK, get_rr_fname(), Iso_Image::id, ecma119_image::image, ecma119_node::info, ISO_ASSERT_FAILURE, iso_msg_submit(), ecma119_node::iso_name, ISO_NULL_POINTER, ISO_OUT_OF_MEM, ISO_ROCKRIDGE_IN_DIR_REC, ISO_SUCCESS, Iso_Node::mode, susp_info::n_ce_susp_fields, Iso_Node::name, ecma119_node::node, ecma119_image::opts, ecma119_node::parent, pseudo_susp_add_PAD(), ecma119_dir_info::real_parent, iso_write_opts::rr_reloc_flags, rrip_add_CL(), rrip_add_ER(), rrip_add_NM(), rrip_add_PL(), rrip_add_PN(), rrip_add_PX(), rrip_add_RE(), rrip_add_SL(), rrip_add_TF(), rrip_SL_append_comp(), iso_write_opts::rrip_version_1_10, susp_info::suf_len, susp_add_CE(), susp_add_ES(), susp_add_SP(), susp_calc_nm_sl_al(), susp_info_free(), and ecma119_node::type.

Referenced by write_one_dir().

◆ rrip_SL_append_comp()

static int rrip_SL_append_comp ( size_t *  n,
uint8_t ***  comps,
char *  s,
int  size,
char  fl 
)
static

Add a new SL component (RRIP, 4.1.3.1) to a list of components.

Parameters
nNumber of components. It will be updated.
composPointer to the list of components.
sThe component content
sizeSize of the component content
flFlags
Returns
1 on success, < 0 on error

Definition at line 465 of file rockridge.c.

References ISO_OUT_OF_MEM, and ISO_SUCCESS.

Referenced by rrip_get_susp_fields().

◆ rrip_write_ce_fields()

int rrip_write_ce_fields ( Ecma119Image t,
struct susp_info info 
)

Write the Continuation Area entries for the given struct susp_info, using the iso_write() function. After written, the ce_susp_fields array will be freed.

Definition at line 2270 of file rockridge.c.

References susp_info::alloc_ce_susp_fields, BLOCK_SIZE, susp_info::ce_len, susp_info::ce_susp_fields, ISO_SUCCESS, iso_write(), LIBISO_ALLOC_MEM, LIBISO_FREE_MEM, and susp_info::n_ce_susp_fields.

Referenced by write_one_dir().

◆ rrip_write_susp_fields()

void rrip_write_susp_fields ( Ecma119Image t,
struct susp_info info,
uint8_t *  buf 
)

Write the given SUSP fields into buf. Note that Continuation Area fields are not written. If info does not contain any SUSP entry this function just return. After written, the info susp_fields array will be freed, and the counters updated properly.

Definition at line 2235 of file rockridge.c.

References susp_info::n_susp_fields, susp_info::suf_len, susp_info::susp_fields, and susp_update_CE_sizes().

Referenced by write_one_dir_record().

◆ susp_add_CE()

static int susp_add_CE ( Ecma119Image t,
size_t  ce_len,
struct susp_info susp 
)
static

Add a CE System Use Entry to the given tree node. A "CE" is used to add a continuation area, where additional System Use Entry can be written. (SUSP, 5.1).

Definition at line 864 of file rockridge.c.

References block_offset(), BLOCK_SIZE, susp_info::ce_block, susp_info::ce_len, susp_append(), and susp_make_CE().

Referenced by rrip_get_susp_fields().

◆ susp_add_ES()

static int susp_add_ES ( Ecma119Image t,
struct susp_info susp,
int  to_ce,
int  seqno 
)
static

SUSP 1.12: [...] shall specify as an 8-bit number the Extension Sequence Number of the extension specification utilized in the entries immediately following this System Use Entry. The Extension Sequence Numbers of multiple extension specifications on a volume shall correspond to the order in which their "ER" System Use Entries are recorded [...]

Definition at line 913 of file rockridge.c.

References ISO_OUT_OF_MEM, susp_append(), and susp_append_ce().

Referenced by aaip_add_AL(), and rrip_get_susp_fields().

◆ susp_add_SP()

static int susp_add_SP ( Ecma119Image t,
struct susp_info susp 
)
static

Add a SP System Use Entry. The SP provide an identifier that the SUSP is used within the volume. The SP shall be recorded in the "." entry of the root directory. See SUSP, 5.3 for more details.

Definition at line 887 of file rockridge.c.

References ISO_OUT_OF_MEM, and susp_append().

Referenced by rrip_get_susp_fields().

◆ susp_append()

◆ susp_append_ce()

◆ susp_calc_add_to_ce()

static int susp_calc_add_to_ce ( size_t *  ce,
size_t  base_ce,
int  add,
int  flag 
)
static

Definition at line 621 of file rockridge.c.

References BLOCK_SIZE, ISO_CE_ENTRY_SIZE, and ISO_SUCCESS.

Referenced by aaip_add_AL(), add_zf_field(), and susp_calc_nm_sl_al().

◆ susp_calc_nm_sl_al()

static int susp_calc_nm_sl_al ( Ecma119Image t,
Ecma119Node n,
size_t  space,
size_t *  su_size,
size_t *  ce,
size_t  base_ce,
int  flag 
)
static

Compute SUA length and eventual Continuation Area length of field NM and eventually fields SL and AL. Because CA usage makes necessary the use of a CE entry of 28 bytes in SUA, this computation fails if not the 28 bytes are taken into account at start. In this case the caller should retry with bit0 set. If the resulting *ce added to base_ce is in a different block than base_ce, then computation with bit0 fails and the caller should finally try bit1.

Parameters
flagbit0= assume CA usage (else return 0 on SUA overflow) bit1= let CA start at block start (else return 0 if *ce crosses a block boundary)
Returns
1= ok, computation of *su_size and *ce is valid 0= not ok, CA usage is necessary but bit0 was not set or *ce crosses boundary and bit1 was not set (*su_size and *ce stay unaltered in this case) <0= error: -1= not enough SUA space for 28 bytes of CE entry -2= out of memory

Definition at line 1165 of file rockridge.c.

References iso_write_opts::aaip, aaip_add_AL(), aaip_count_bytes(), aaip_xinfo_func(), add_zf_field(), BLOCK_SIZE, ECMA119_SYMLINK, get_rr_fname(), ISO_CE_ENTRY_SIZE, iso_node_get_xinfo(), Iso_Node::name, ecma119_node::node, ecma119_image::opts, susp_calc_add_to_ce(), and ecma119_node::type.

Referenced by rrip_calc_len(), and rrip_get_susp_fields().

◆ susp_info_free()

static void susp_info_free ( struct susp_info susp)
static

Free all info in a struct susp_info.

Definition at line 1603 of file rockridge.c.

References susp_info::ce_susp_fields, susp_info::n_ce_susp_fields, susp_info::n_susp_fields, and susp_info::susp_fields.

Referenced by rrip_get_susp_fields().

◆ susp_make_CE()

static int susp_make_CE ( Ecma119Image t,
uint8_t **  CE,
uint32_t  block_offset,
uint32_t  byte_offset,
uint32_t  size 
)
static

Create the byte representation of a CE entry. (SUSP, 5.1).

Definition at line 834 of file rockridge.c.

References block_offset(), ecma119_image::eff_partition_offset, iso_bb(), ISO_OUT_OF_MEM, and ISO_SUCCESS.

Referenced by susp_add_CE(), and susp_append_ce().

◆ susp_update_CE_sizes()

◆ zisofs_add_ZF()

static int zisofs_add_ZF ( Ecma119Image t,
struct susp_info susp,
int  to_ce,
uint8_t  algo[2],
int  header_size_div4,
int  block_size_log2,
uint64_t  uncompressed_size,
int  flag 
)
static

see doc/zisofs_format.txt : "ZF System Use Entry Format" see doc/zisofs2_format.txt : "ZF System Use Entry Format", "Z2 ..."

Definition at line 959 of file rockridge.c.

References iso_bb(), iso_lsb64(), ISO_OUT_OF_MEM, iso_zisofs2_enable_susp_z2, ISO_ZISOFS_TOO_LARGE, susp_append(), and susp_append_ce().

Referenced by add_zf_field().