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)  

iso1999.c File Reference
#include "iso1999.h"
#include "messages.h"
#include "writer.h"
#include "image.h"
#include "filesrc.h"
#include "eltorito.h"
#include "util.h"
#include "ecma119.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
Include dependency graph for iso1999.c:

Go to the source code of this file.

Functions

static int get_iso1999_name (Ecma119Image *t, const char *str, char **fname)
 
static void iso1999_node_free (Iso1999Node *node)
 
static int create_node (Ecma119Image *t, IsoNode *iso, Iso1999Node **node)
 
static int create_tree (Ecma119Image *t, IsoNode *iso, Iso1999Node **tree, int pathlen)
 
static int cmp_node (const void *f1, const void *f2)
 
static void sort_tree (Iso1999Node *root)
 
static int mangle_single_dir (Ecma119Image *img, Iso1999Node *dir)
 
static int mangle_tree (Ecma119Image *t, Iso1999Node *dir)
 
static int iso1999_tree_create (Ecma119Image *t)
 
static size_t calc_dirent_len (Ecma119Image *t, Iso1999Node *n)
 
static size_t calc_dir_size (Ecma119Image *t, Iso1999Node *dir)
 
static void calc_dir_pos (Ecma119Image *t, Iso1999Node *dir)
 
static uint32_t calc_path_table_size (Iso1999Node *dir)
 
static int iso1999_writer_compute_data_blocks (IsoImageWriter *writer)
 
static void write_one_dir_record (Ecma119Image *t, Iso1999Node *node, int file_id, uint8_t *buf, size_t len_fi, int extent)
 
static int iso1999_writer_write_vol_desc (IsoImageWriter *writer)
 
static int write_one_dir (Ecma119Image *t, Iso1999Node *dir)
 
static int write_dirs (Ecma119Image *t, Iso1999Node *root)
 
static int write_path_table (Ecma119Image *t, Iso1999Node **pathlist, int l_type)
 
static int write_path_tables (Ecma119Image *t)
 
static int iso1999_writer_write_data (IsoImageWriter *writer)
 
static int iso1999_writer_free_data (IsoImageWriter *writer)
 
int iso1999_writer_create (Ecma119Image *target)
 

Function Documentation

◆ calc_dir_pos()

◆ calc_dir_size()

static size_t calc_dir_size ( Ecma119Image t,
Iso1999Node dir 
)
static

Computes the total size of all directory entries of a single dir, as stated in ISO 9660:1999, 6.8.1.3

Definition at line 572 of file iso1999.c.

References BLOCK_SIZE, calc_dirent_len(), iso1999_dir_info::children, iso1999_node::dir, iso1999_node::file, iso1999_node::info, ISO1999_FILE, iso1999_dir_info::len, iso1999_dir_info::nchildren, Iso_File_Src::nsections, ROUND_UP, and iso1999_node::type.

Referenced by calc_dir_pos().

◆ calc_dirent_len()

static size_t calc_dirent_len ( Ecma119Image t,
Iso1999Node n 
)
static

Compute the size of a directory entry for a single node

Definition at line 559 of file iso1999.c.

References iso1999_node::name.

Referenced by calc_dir_size().

◆ calc_path_table_size()

static uint32_t calc_path_table_size ( Iso1999Node dir)
static

Compute the length of the path table (ISO 9660:1999, 6.9), in bytes.

Definition at line 630 of file iso1999.c.

References iso1999_dir_info::children, iso1999_node::dir, iso1999_node::info, ISO1999_DIR, iso1999_node::name, iso1999_dir_info::nchildren, and iso1999_node::type.

Referenced by iso1999_writer_compute_data_blocks().

◆ cmp_node()

static int cmp_node ( const void *  f1,
const void *  f2 
)
static

TODO #00027 Follow ISO 9660:1999 specs when sorting files strcmp do not does exactly what ISO 9660:1999, 9.3, as characters < 0x20 " " are allowed, so name len must be taken into account

Definition at line 278 of file iso1999.c.

References iso1999_node::name.

Referenced by mangle_single_dir(), and sort_tree().

◆ create_node()

◆ create_tree()

◆ get_iso1999_name()

static int get_iso1999_name ( Ecma119Image t,
const char *  str,
char **  fname 
)
static

◆ iso1999_node_free()

◆ iso1999_tree_create()

◆ iso1999_writer_compute_data_blocks()

◆ iso1999_writer_create()

◆ iso1999_writer_free_data()

static int iso1999_writer_free_data ( IsoImageWriter writer)
static

◆ iso1999_writer_write_data()

static int iso1999_writer_write_data ( IsoImageWriter writer)
static

◆ iso1999_writer_write_vol_desc()

static int iso1999_writer_write_vol_desc ( IsoImageWriter writer)
static

Write the enhanced volume descriptor (ISO/IEC 9660:1999, 8.5)

Definition at line 752 of file iso1999.c.

References ecma119_sup_vol_desc::abstract_file_id, Iso_Image::abstract_file_id, ecma119_sup_vol_desc::application_id, Iso_Image::application_id, Iso_Image::biblio_file_id, ecma119_sup_vol_desc::bibliographic_file_id, BLOCK_SIZE, ecma119_sup_vol_desc::block_size, ecma119_sup_vol_desc::copyright_file_id, Iso_Image::copyright_file_id, ecma119_sup_vol_desc::data_prep_id, Iso_Image::data_preparer_id, ecma119_set_voldescr_times(), ecma119_sup_vol_desc::file_structure_version, get_iso1999_name(), Iso_Image::id, ecma119_image::image, ecma119_image::input_charset, ecma119_image::iso1999_l_path_table_pos, ecma119_image::iso1999_m_path_table_pos, ecma119_image::iso1999_path_table_size, ecma119_image::iso1999_root, iso_bb(), iso_lsb(), iso_msb(), iso_msg_debug(), ISO_OUT_OF_MEM, iso_write(), ecma119_sup_vol_desc::l_path_table_pos, ecma119_sup_vol_desc::m_path_table_pos, ecma119_sup_vol_desc::path_table_size, ecma119_sup_vol_desc::publisher_id, Iso_Image::publisher_id, ecma119_sup_vol_desc::root_dir_record, ecma119_sup_vol_desc::std_identifier, str2a_char(), strncpy_pad(), ecma119_sup_vol_desc::system_id, Iso_Image::system_id, Iso_Image_Writer::target, ecma119_sup_vol_desc::vol_desc_type, ecma119_sup_vol_desc::vol_desc_version, ecma119_sup_vol_desc::vol_seq_number, ecma119_sup_vol_desc::vol_set_id, ecma119_sup_vol_desc::vol_set_size, ecma119_image::vol_space_size, ecma119_sup_vol_desc::vol_space_size, Iso_Image::volset_id, ecma119_sup_vol_desc::volume_id, Iso_Image::volume_id, and write_one_dir_record().

Referenced by iso1999_writer_create().

◆ mangle_single_dir()

◆ mangle_tree()

◆ sort_tree()

static void sort_tree ( Iso1999Node root)
static

Sort the entries inside an ISO 9660:1999 directory, according to ISO 9660:1999, 9.3

Definition at line 296 of file iso1999.c.

References iso1999_dir_info::children, cmp_node(), iso1999_node::dir, iso1999_node::info, ISO1999_DIR, iso1999_dir_info::nchildren, and iso1999_node::type.

Referenced by iso1999_tree_create().

◆ write_dirs()

◆ write_one_dir()

◆ write_one_dir_record()

static void write_one_dir_record ( Ecma119Image t,
Iso1999Node node,
int  file_id,
uint8_t *  buf,
size_t  len_fi,
int  extent 
)
static

◆ write_path_table()

◆ write_path_tables()