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)  

filesrc.h File Reference
#include "libisofs.h"
#include "stream.h"
#include "ecma119.h"
Include dependency graph for filesrc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Iso_File_Src
 

Functions

int iso_file_src_cmp (const void *n1, const void *n2)
 
int iso_file_src_create (Ecma119Image *img, IsoFile *file, IsoFileSrc **src)
 
int iso_file_src_add (Ecma119Image *img, IsoFileSrc *new, IsoFileSrc **src)
 
void iso_file_src_free (void *node)
 
off_t iso_file_src_get_size (IsoFileSrc *file)
 
int iso_file_src_writer_create (Ecma119Image *target)
 
int filesrc_writer_pre_compute (IsoImageWriter *writer)
 
int iso_filesrc_write_data (Ecma119Image *t, IsoFileSrc *file, char *name, char *buffer, int flag)
 

Function Documentation

◆ filesrc_writer_pre_compute()

◆ iso_file_src_add()

int iso_file_src_add ( Ecma119Image img,
IsoFileSrc new,
IsoFileSrc **  src 
)

Add a given IsoFileSrc to the given image target.

The IsoFileSrc will be cached in a tree to prevent the same file for being written several times to image. If you call again this function with a node that refers to the same source file, the previously created one will be returned.

Parameters
imgThe image where this file is to be written
newThe IsoFileSrc to add
srcWill be filled with a pointer to the IsoFileSrc really present in the tree. It could be different than new if the same file already exists in the tree.
Returns
1 on success, 0 if file already exists on tree, < 0 error

Definition at line 192 of file filesrc.c.

References ecma119_image::files, ISO_NULL_POINTER, and iso_rbtree_insert().

Referenced by el_torito_catalog_file_src_create().

◆ iso_file_src_cmp()

int iso_file_src_cmp ( const void *  n1,
const void *  n2 
)

Definition at line 52 of file filesrc.c.

References iso_stream_cmp_ino(), and Iso_File_Src::stream.

Referenced by ecma119_image_new().

◆ iso_file_src_create()

int iso_file_src_create ( Ecma119Image img,
IsoFile file,
IsoFileSrc **  src 
)

Create a new IsoFileSrc to get data from a specific IsoFile.

The IsoFileSrc will be cached in a tree to prevent the same file for being written several times to image. If you call again this function with a node that refers to the same source file, the previously created one will be returned. No new IsoFileSrc is created in that case.

Parameters
imgThe image where this file is to be written
fileThe IsoNode we want to write
srcWill be filled with a pointer to the IsoFileSrc
Returns
1 if new object was created, 0 if object existed, < 0 on error

Definition at line 69 of file filesrc.c.

References iso_write_opts::appendable, iso_file_section::block, checksum_cx_xinfo_func(), ecma119_image::checksum_idx_counter, Iso_File_Src::checksum_index, checksum_md5_xinfo_func(), DIV_UP, ecma119_image::files, Iso_File::from_old_session, ISO_EXTENT_SIZE, iso_file_get_old_image_sections(), iso_file_set_isofscx(), iso_node_get_xinfo(), ISO_NULL_POINTER, ISO_OUT_OF_MEM, iso_rbtree_insert(), iso_stream_get_id(), iso_stream_get_size(), iso_stream_ref(), ISO_SUCCESS, MAX_ISO_FILE_SECTION_SIZE, iso_write_opts::md5_file_checksums, Iso_File_Src::no_write, Iso_File_Src::nsections, ecma119_image::opts, Iso_File_Src::sections, Iso_File_Src::sort_weight, Iso_File::sort_weight, Iso_File_Src::stream, Iso_File::stream, and iso_write_opts::will_cancel.

Referenced by create_file_src(), create_node(), create_tree(), ecma119_writer_create(), and eltorito_writer_create().

◆ iso_file_src_free()

void iso_file_src_free ( void *  node)

Free the IsoFileSrc especific data

Definition at line 205 of file filesrc.c.

References iso_stream_unref().

Referenced by ecma119_image_free().

◆ iso_file_src_get_size()

off_t iso_file_src_get_size ( IsoFileSrc file)

Get the size of the file this IsoFileSrc represents

Definition at line 212 of file filesrc.c.

References iso_stream_get_size(), and Iso_File_Src::stream.

Referenced by filesrc_writer_pre_compute(), and iso_filesrc_write_data().

◆ iso_file_src_writer_create()

◆ iso_filesrc_write_data()