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)  

stream.c File Reference
#include "libisofs.h"
#include "stream.h"
#include "fsource.h"
#include "util.h"
#include "node.h"
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <stdio.h>
Include dependency graph for stream.c:

Go to the source code of this file.

Data Structures

struct  cut_out_stream
 
struct  MemStreamData
 
struct  iso_streamcmprank
 

Macros

#define PATH_MAX   Libisofs_default_path_maX
 

Functions

static int fsrc_open (IsoStream *stream)
 
static int fsrc_close (IsoStream *stream)
 
static off_t fsrc_get_size (IsoStream *stream)
 
static int fsrc_read (IsoStream *stream, void *buf, size_t count)
 
static int fsrc_is_repeatable (IsoStream *stream)
 
static void fsrc_get_id (IsoStream *stream, unsigned int *fs_id, dev_t *dev_id, ino_t *ino_id)
 
static void fsrc_free (IsoStream *stream)
 
static int fsrc_update_size (IsoStream *stream)
 
static IsoStreamfsrc_get_input_stream (IsoStream *stream, int flag)
 
int fsrc_clone_stream (IsoStream *old_stream, IsoStream **new_stream, int flag)
 
int iso_file_source_stream_new (IsoFileSource *src, IsoStream **stream)
 
int iso_stream_get_src_zf (IsoStream *stream, uint8_t zisofs_algo[2], int *header_size_div4, int *block_size_log2, uint64_t *uncompressed_size, int flag)
 
static int cut_out_open (IsoStream *stream)
 
static int cut_out_close (IsoStream *stream)
 
static off_t cut_out_get_size (IsoStream *stream)
 
static int cut_out_read (IsoStream *stream, void *buf, size_t count)
 
static int cut_out_is_repeatable (IsoStream *stream)
 
static void cut_out_get_id (IsoStream *stream, unsigned int *fs_id, dev_t *dev_id, ino_t *ino_id)
 
static void cut_out_free (IsoStream *stream)
 
static int cut_out_update_size (IsoStream *stream)
 
static IsoStreamcut_out_get_input_stream (IsoStream *stream, int flag)
 
static int cut_out_clone_stream (IsoStream *old_stream, IsoStream **new_stream, int flag)
 
int iso_cut_out_stream_new (IsoFileSource *src, off_t offset, off_t size, IsoStream **stream)
 
static int mem_open (IsoStream *stream)
 
static int mem_close (IsoStream *stream)
 
static off_t mem_get_size (IsoStream *stream)
 
static int mem_read (IsoStream *stream, void *buf, size_t count)
 
static int mem_is_repeatable (IsoStream *stream)
 
static void mem_get_id (IsoStream *stream, unsigned int *fs_id, dev_t *dev_id, ino_t *ino_id)
 
static void mem_free (IsoStream *stream)
 
static int mem_update_size (IsoStream *stream)
 
static IsoStreammem_get_input_stream (IsoStream *stream, int flag)
 
static int mem_clone_stream (IsoStream *old_stream, IsoStream **new_stream, int flag)
 
int iso_memory_stream_new (unsigned char *buf, size_t size, IsoStream **stream)
 
void iso_stream_ref (IsoStream *stream)
 
void iso_stream_unref (IsoStream *stream)
 
int iso_stream_open (IsoStream *stream)
 
int iso_stream_close (IsoStream *stream)
 
off_t iso_stream_get_size (IsoStream *stream)
 
int iso_stream_read (IsoStream *stream, void *buf, size_t count)
 
int iso_stream_is_repeatable (IsoStream *stream)
 
int iso_stream_update_size (IsoStream *stream)
 
void iso_stream_get_id (IsoStream *stream, unsigned int *fs_id, dev_t *dev_id, ino_t *ino_id)
 
void iso_stream_get_file_name (IsoStream *stream, char *name)
 
IsoStreamiso_stream_get_input_stream (IsoStream *stream, int flag)
 
char * iso_stream_get_source_path (IsoStream *stream, int flag)
 
int iso_stream_set_image_ino (IsoStream *stream, ino_t ino, int flag)
 
int iso_stream_cmp_ifs_sections (IsoStream *s1, IsoStream *s2, int *cmp_ret, int flag)
 
static int iso_get_streamcmprank (int(*cmp_func)(IsoStream *s1, IsoStream *s2), int flag)
 
static int iso_cmp_streamcmpranks (int(*cf1)(IsoStream *s1, IsoStream *s2), int(*cf2)(IsoStream *s1, IsoStream *s2))
 
int iso_stream_destroy_cmpranks (int flag)
 
int iso_stream_cmp_ino (IsoStream *s1, IsoStream *s2, int flag)
 
int iso_stream_read_buffer (IsoStream *stream, char *buf, size_t count, size_t *got)
 
int iso_stream_make_md5 (IsoStream *stream, char md5[16], int flag)
 
int iso_stream_clone (IsoStream *old_stream, IsoStream **new_stream, int flag)
 
int iso_stream_clone_filter_common (IsoStream *old_stream, IsoStream **new_stream, IsoStream **new_input, int flag)
 

Variables

ino_t serial_id = (ino_t)1
 
ino_t mem_serial_id = (ino_t)1
 
ino_t cut_out_serial_id = (ino_t)1
 
static IsoStreamIface fsrc_stream_class
 
static IsoStreamIface cut_out_stream_class
 
static IsoStreamIface mem_stream_class
 
static struct iso_streamcmprankstreamcmpranks = NULL
 

Macro Definition Documentation

◆ PATH_MAX

#define PATH_MAX   Libisofs_default_path_maX

Definition at line 28 of file stream.c.

Function Documentation

◆ cut_out_clone_stream()

◆ cut_out_close()

static int cut_out_close ( IsoStream stream)
static

◆ cut_out_free()

static void cut_out_free ( IsoStream stream)
static

Definition at line 423 of file stream.c.

References iso_stream::data, iso_file_source_unref(), and cut_out_stream::src.

◆ cut_out_get_id()

static void cut_out_get_id ( IsoStream stream,
unsigned int *  fs_id,
dev_t *  dev_id,
ino_t *  ino_id 
)
static

◆ cut_out_get_input_stream()

static IsoStream* cut_out_get_input_stream ( IsoStream stream,
int  flag 
)
static

Definition at line 437 of file stream.c.

◆ cut_out_get_size()

static off_t cut_out_get_size ( IsoStream stream)
static

Definition at line 383 of file stream.c.

References iso_stream::data, and cut_out_stream::size.

◆ cut_out_is_repeatable()

static int cut_out_is_repeatable ( IsoStream stream)
static

Definition at line 401 of file stream.c.

◆ cut_out_open()

◆ cut_out_read()

static int cut_out_read ( IsoStream stream,
void *  buf,
size_t  count 
)
static

◆ cut_out_update_size()

static int cut_out_update_size ( IsoStream stream)
static

Definition at line 431 of file stream.c.

References ISO_SUCCESS.

◆ fsrc_clone_stream()

◆ fsrc_close()

static int fsrc_close ( IsoStream stream)
static

Definition at line 64 of file stream.c.

References iso_stream::data, iso_file_source_close(), and ISO_NULL_POINTER.

◆ fsrc_free()

static void fsrc_free ( IsoStream stream)
static

Definition at line 133 of file stream.c.

References iso_stream::data, iso_file_source_unref(), and FSrcStreamData::src.

◆ fsrc_get_id()

static void fsrc_get_id ( IsoStream stream,
unsigned int *  fs_id,
dev_t *  dev_id,
ino_t *  ino_id 
)
static

◆ fsrc_get_input_stream()

static IsoStream* fsrc_get_input_stream ( IsoStream stream,
int  flag 
)
static

Definition at line 162 of file stream.c.

◆ fsrc_get_size()

static off_t fsrc_get_size ( IsoStream stream)
static

Definition at line 75 of file stream.c.

References iso_stream::data, and FSrcStreamData::size.

◆ fsrc_is_repeatable()

static int fsrc_is_repeatable ( IsoStream stream)
static

Definition at line 95 of file stream.c.

References iso_stream::data, iso_file_source_stat(), and ISO_NULL_POINTER.

◆ fsrc_open()

static int fsrc_open ( IsoStream stream)
static

◆ fsrc_read()

static int fsrc_read ( IsoStream stream,
void *  buf,
size_t  count 
)
static

Definition at line 84 of file stream.c.

References iso_stream::data, iso_file_source_read(), and ISO_NULL_POINTER.

◆ fsrc_update_size()

static int fsrc_update_size ( IsoStream stream)
static

Definition at line 142 of file stream.c.

References iso_stream::data, iso_file_source_stat(), ISO_NULL_POINTER, and ISO_SUCCESS.

◆ iso_cmp_streamcmpranks()

static int iso_cmp_streamcmpranks ( int(*)(IsoStream *s1, IsoStream *s2)  cf1,
int(*)(IsoStream *s1, IsoStream *s2)  cf2 
)
static

Definition at line 1018 of file stream.c.

References iso_get_streamcmprank().

Referenced by iso_stream_cmp_ino().

◆ iso_cut_out_stream_new()

int iso_cut_out_stream_new ( IsoFileSource src,
off_t  offset,
off_t  size,
IsoStream **  stream 
)

Create a new stream to read a chunk of an IsoFileSource.. The stream will add a ref. to the IsoFileSource.

Returns
1 success, < 0 error

Definition at line 507 of file stream.c.

References cut_out_serial_id, cut_out_stream_class, cut_out_stream::dev_id, cut_out_stream::ino_id, ISO_FILE_OFFSET_TOO_BIG, iso_file_source_access(), iso_file_source_ref(), iso_file_source_stat(), ISO_NULL_POINTER, ISO_OUT_OF_MEM, ISO_SUCCESS, ISO_WRONG_ARG_VALUE, MIN, cut_out_stream::offset, cut_out_stream::size, and cut_out_stream::src.

Referenced by iso_tree_add_new_cut_out_node().

◆ iso_file_source_stream_new()

int iso_file_source_stream_new ( IsoFileSource src,
IsoStream **  stream 
)

Create a stream to read from a IsoFileSource. The stream will take the ref. to the IsoFileSource, so after a successfully execution of this function, you must not unref() the source, unless you take an extra ref.

Returns
1 success, < 0 error Possible errors:

Definition at line 225 of file stream.c.

References FSrcStreamData::dev_id, fsrc_stream_class, iso_filesystem::get_id, FSrcStreamData::ino_id, ISO_FILE_IS_DIR, iso_file_source_access(), iso_file_source_get_filesystem(), iso_file_source_stat(), ISO_NULL_POINTER, ISO_OUT_OF_MEM, ISO_SUCCESS, serial_id, FSrcStreamData::size, and FSrcStreamData::src.

Referenced by default_create_file(), default_create_node(), and image_builder_create_node().

◆ iso_get_streamcmprank()

static int iso_get_streamcmprank ( int(*)(IsoStream *s1, IsoStream *s2)  cmp_func,
int  flag 
)
static

◆ iso_memory_stream_new()

int iso_memory_stream_new ( unsigned char *  buf,
size_t  size,
IsoStream **  stream 
)

Create a stream for reading from a arbitrary memory buffer. When the Stream refcount reach 0, the buffer is free(3).

Returns
1 success, < 0 error

Definition at line 751 of file stream.c.

References MemStreamData::buf, iso_stream::class, iso_stream::data, MemStreamData::ino_id, ISO_NULL_POINTER, ISO_OUT_OF_MEM, ISO_SUCCESS, mem_serial_id, mem_stream_class, MemStreamData::offset, iso_stream::refcount, cut_out_stream::size, and MemStreamData::size.

Referenced by iso_patch_eltoritos().

◆ iso_stream_clone()

int iso_stream_clone ( IsoStream old_stream,
IsoStream **  new_stream,
int  flag 
)

Produce a copy of a stream. It must be possible to operate both stream objects concurrently. The success of this function depends on the existence of a IsoStream_Iface.clone_stream() method with the stream and with its eventual subordinate streams. See iso_tree_clone() for a list of surely clonable built-in streams.

Parameters
old_streamThe existing stream object to be copied
new_streamWill return a pointer to the copy
flagBitfield for control purposes. Submit 0 for now.
Returns
>0 means success ISO_STREAM_NO_CLONE is issued if no .clone_stream() exists other error return values < 0 may occur depending on kind of stream
Since
1.0.2

Definition at line 1282 of file stream.c.

References iso_stream::class, IsoStream_Iface::clone_stream, ISO_STREAM_NO_CLONE, and IsoStream_Iface::version.

Referenced by iso_stream_clone_filter_common(), and iso_tree_clone_file().

◆ iso_stream_clone_filter_common()

int iso_stream_clone_filter_common ( IsoStream old_stream,
IsoStream **  new_stream,
IsoStream **  new_input,
int  flag 
)

Create a clone of the input stream of old_stream and a roughly initialized clone of old_stream which has the same class and refcount 1. Its data pointer will be NULL and needs to be filled by an expert which knows how to clone the data of old_stream.

Parameters
old_streamThe existing stream which is in process of cloning
new_streamWill return the uninitialized memory object which shall later become the clone of old_stream.
new_inputThe clone of the input stream of old stream.
flagSubmit 0 for now.
Returns
ISO_SUCCESS or an error code <0

Definition at line 1292 of file stream.c.

References iso_stream::class, iso_stream::data, ISO_OUT_OF_MEM, iso_stream_clone(), iso_stream_get_input_stream(), ISO_STREAM_NO_CLONE, ISO_SUCCESS, and iso_stream::refcount.

Referenced by extf_clone_stream(), gzip_clone_stream(), and ziso_clone_stream().

◆ iso_stream_close()

int iso_stream_close ( IsoStream stream)
inline

◆ iso_stream_cmp_ifs_sections()

int iso_stream_cmp_ifs_sections ( IsoStream s1,
IsoStream s2,
int *  cmp_ret,
int  flag 
)

◆ iso_stream_cmp_ino()

int iso_stream_cmp_ino ( IsoStream s1,
IsoStream s2,
int  flag 
)

Compare two streams whether they are based on the same input and will produce the same output. If in any doubt, then this comparison will indicate no match.

Parameters
s1The first stream to compare.
s2The second stream to compare.
Returns
-1 if s1 is smaller s2 , 0 if s1 matches s2 , 1 if s1 is larger s2
Parameters
flagbit0= do not use s1->class->cmp_ino() even if available
Since
0.6.20

Definition at line 1042 of file stream.c.

References iso_stream::class, IsoStream_Iface::cmp_ino, iso_cmp_streamcmpranks(), iso_stream_cmp_ifs_sections(), iso_stream_get_id(), iso_stream_get_size(), and IsoStream_Iface::version.

Referenced by extf_cmp_ino(), gzip_cmp_ino(), gzip_uncompress_cmp_ino(), iso_file_src_cmp(), iso_node_cmp_flag(), ziso_cmp_ino(), and ziso_uncompress_cmp_ino().

◆ iso_stream_destroy_cmpranks()

int iso_stream_destroy_cmpranks ( int  flag)

Dispose the internal list of stream class cmp_ino() functions. It is a static global of stream.c, created and used by iso_stream_cmp_ino(). This function is supposed to be called by iso_finish() only.

Definition at line 1028 of file stream.c.

References ISO_SUCCESS, LIBISO_FREE_MEM, iso_streamcmprank::next, and streamcmpranks.

Referenced by iso_finish().

◆ iso_stream_get_file_name()

void iso_stream_get_file_name ( IsoStream stream,
char *  name 
)

Get an identifier for the file of the source, for debug purposes

Parameters
nameMust provide at least PATH_MAX bytes. If no PATH_MAX is defined then assume PATH_MAX = Libisofs_default_path_maX from libisofs.h

Definition at line 841 of file stream.c.

References iso_stream::class, iso_stream::data, iso_file_source_get_path(), PATH_MAX, FSrcStreamData::src, and IsoStream_Iface::type.

Referenced by iso_filesrc_write_data().

◆ iso_stream_get_id()

void iso_stream_get_id ( IsoStream stream,
unsigned int *  fs_id,
dev_t *  dev_id,
ino_t *  ino_id 
)
inline

Get an unique identifier for a given IsoStream.

Since
0.6.4

Definition at line 835 of file stream.c.

References iso_stream::class, and IsoStream_Iface::get_id.

Referenced by iso_file_src_create(), iso_node_get_id(), iso_stream_cmp_ino(), Xorriso_iso_file_open(), Xorriso_restore_is_identical(), and Xorriso_show_stream().

◆ iso_stream_get_input_stream()

IsoStream* iso_stream_get_input_stream ( IsoStream stream,
int  flag 
)

Obtain the eventual input stream of a filter stream.

Parameters
streamThe eventual filter stream to be inquired.
flagBitfield for control purposes. bit0= Follow the chain of input streams and return the one at the end of the chain.
Since
1.3.2
Returns
The input stream, if one exists. Elsewise NULL. No extra reference to the stream is taken by this call.
Since
0.6.18

Definition at line 867 of file stream.c.

Referenced by add_zf_field(), dir_update_size(), Exprtest_match(), gzip_cmp_ino(), gzip_uncompress_cmp_ino(), iso_file_get_old_image_sections(), iso_file_remove_filter(), iso_file_zf_by_magic(), iso_filesrc_write_data(), iso_patch_eltoritos(), iso_stream_clone_filter_common(), iso_stream_make_md5(), iso_stream_set_image_ino(), Xorriso_is_plain_image_file(), Xorriso_iso_file_open(), Xorriso_retrieve_disk_path(), Xorriso_show_stream(), ziso_cmp_ino(), and ziso_uncompress_cmp_ino().

◆ iso_stream_get_size()

off_t iso_stream_get_size ( IsoStream stream)
inline

Get the size of a given stream. This function should always return the same size, even if the underlying source size changes, unless you call iso_stream_update_size().

Returns
IsoStream size in bytes
Since
0.6.4

Definition at line 810 of file stream.c.

References iso_stream::class, and IsoStream_Iface::get_size.

Referenced by create_file_src(), create_image(), create_node(), filesrc_writer_pre_compute(), gzip_add_filter(), iso_file_add_external_filter(), iso_file_get_size(), iso_file_src_create(), iso_file_src_get_size(), iso_patch_eltoritos(), iso_stream_cmp_ino(), iso_stream_make_md5(), make_mips_volume_header(), Xorriso_check_md5(), Xorriso_iso_file_to_fd(), ziso_add_filter(), and ziso_stream_compress().

◆ iso_stream_get_source_path()

char* iso_stream_get_source_path ( IsoStream stream,
int  flag 
)

Try to get eventual source path string of a stream. Meaning and availability of this string depends on the stream.class . Expect valid results with types "fsrc" and "cout". Result formats are fsrc: result of file_source_get_path() cout: result of file_source_get_path() " " offset " " size

Parameters
streamThe stream to be inquired.
flagBitfield for control purposes, unused yet, submit 0
Returns
A copy of the path string. Apply free() when no longer needed. NULL if no path string is available.
Since
0.6.18

Definition at line 889 of file stream.c.

References iso_stream::class, cut_out_stream_class, iso_stream::data, fsrc_stream_class, iso_file_source_get_path(), cut_out_stream::offset, cut_out_stream::size, cut_out_stream::src, and FSrcStreamData::src.

Referenced by dir_update_size(), Xorriso_retrieve_disk_path(), and Xorriso_show_stream().

◆ iso_stream_get_src_zf()

int iso_stream_get_src_zf ( IsoStream stream,
uint8_t  zisofs_algo[2],
int *  header_size_div4,
int *  block_size_log2,
uint64_t *  uncompressed_size,
int  flag 
)

Obtain eventual zisofs ZF field entry parameters from a file source out of a loaded ISO image. To make hope for non-zero reply the stream has to be the original stream of an IsoFile with .from_old_session==1. The call is safe with any stream type, though, unless fsrc_stream_class would be used without FSrcStreamData.

Returns
1= returned parameters are valid, 0=no ZF info found , <0 error

Definition at line 293 of file stream.c.

References iso_stream::class, iso_stream::data, fsrc_stream_class, iso_ifs_source_get_zf(), and FSrcStreamData::src.

Referenced by add_zf_field().

◆ iso_stream_is_repeatable()

int iso_stream_is_repeatable ( IsoStream stream)
inline

Whether the given IsoStream can be read several times, with the same results. For example, a regular file is repeatable, you can read it as many times as you want. However, a pipe isn't.

This function doesn't take into account if the file has been modified between the two reads.

Returns
1 if stream is repeatable, 0 if not, < 0 on error
Since
0.6.4

Definition at line 822 of file stream.c.

References iso_stream::class, and IsoStream_Iface::is_repeatable.

Referenced by create_image(), iso_file_add_filter(), iso_stream_make_md5(), and Xorriso_iso_file_open().

◆ iso_stream_make_md5()

int iso_stream_make_md5 ( IsoStream stream,
char  md5[16],
int  flag 
)

◆ iso_stream_open()

int iso_stream_open ( IsoStream stream)
inline

Opens the given stream. Remember to close the Stream before writing the image.

Returns
1 on success, 2 file greater than expected, 3 file smaller than expected, < 0 on error
Since
0.6.4

Definition at line 798 of file stream.c.

References iso_stream::class, and IsoStream_Iface::open.

Referenced by create_image(), extf_stream_open_flag(), filesrc_open(), gzip_stream_open_flag(), iso_image_eval_boot_info_table(), iso_patch_eltoritos(), iso_read_mipsel_elf(), iso_stream_make_md5(), Xorriso_iso_file_open(), ziso_is_zisofs_stream(), and ziso_stream_open_flag().

◆ iso_stream_read()

int iso_stream_read ( IsoStream stream,
void *  buf,
size_t  count 
)
inline

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

The stream must be open() before calling this, and close() when no more needed.

Returns
number of bytes read, 0 if EOF, < 0 on error
Since
0.6.4

Definition at line 816 of file stream.c.

References iso_stream::class, and IsoStream_Iface::read.

Referenced by create_image(), extf_stream_read(), gzip_stream_convert(), iso_image_eval_boot_info_table(), iso_patch_eltoritos(), iso_read_mipsel_elf(), iso_stream_read_buffer(), Xorriso_iso_file_read(), ziso_parse_zisofs_head(), ziso_stream_compress(), and ziso_stream_uncompress().

◆ iso_stream_read_buffer()

int iso_stream_read_buffer ( IsoStream stream,
char *  buf,
size_t  count,
size_t *  got 
)
Returns
1 ok, 0 EOF, < 0 error

Definition at line 1197 of file stream.c.

References iso_stream_read().

Referenced by filesrc_read(), and iso_stream_make_md5().

◆ iso_stream_ref()

void iso_stream_ref ( IsoStream stream)

Increment reference count of an IsoStream.

Since
0.6.4

Definition at line 784 of file stream.c.

References iso_stream::refcount.

Referenced by extf_filter_get_filter(), iso_file_remove_filter(), and iso_file_src_create().

◆ iso_stream_set_image_ino()

int iso_stream_set_image_ino ( IsoStream stream,
ino_t  ino,
int  flag 
)

Set the inode number of a stream that is based on FSrcStreamData, i.e. stems from the imported ISO image.

Returns
1 = ok , 0 = not an ISO image stream , <0 = error

Definition at line 923 of file stream.c.

References iso_stream::class, iso_stream::data, fsrc_stream_class, FSrcStreamData::ino_id, ISO_NULL_POINTER, and iso_stream_get_input_stream().

Referenced by iso_node_set_ino().

◆ iso_stream_unref()

◆ iso_stream_update_size()

int iso_stream_update_size ( IsoStream stream)
inline

Updates the size of the IsoStream with the current size of the underlying source.

Returns
1 if ok, < 0 on error (has to be a valid libisofs error code), 0 if the IsoStream does not support this function.
Since
0.6.8

Definition at line 828 of file stream.c.

Referenced by dir_update_size().

◆ mem_clone_stream()

static int mem_clone_stream ( IsoStream old_stream,
IsoStream **  new_stream,
int  flag 
)
static

◆ mem_close()

static int mem_close ( IsoStream stream)
static

◆ mem_free()

static void mem_free ( IsoStream stream)
static

Definition at line 662 of file stream.c.

References MemStreamData::buf, and iso_stream::data.

◆ mem_get_id()

static void mem_get_id ( IsoStream stream,
unsigned int *  fs_id,
dev_t *  dev_id,
ino_t *  ino_id 
)
static

◆ mem_get_input_stream()

static IsoStream* mem_get_input_stream ( IsoStream stream,
int  flag 
)
static

Definition at line 678 of file stream.c.

◆ mem_get_size()

static off_t mem_get_size ( IsoStream stream)
static

Definition at line 609 of file stream.c.

References iso_stream::data, and MemStreamData::size.

◆ mem_is_repeatable()

static int mem_is_repeatable ( IsoStream stream)
static

Definition at line 645 of file stream.c.

◆ mem_open()

static int mem_open ( IsoStream stream)
static

◆ mem_read()

static int mem_read ( IsoStream stream,
void *  buf,
size_t  count 
)
static

◆ mem_update_size()

static int mem_update_size ( IsoStream stream)
static

Definition at line 672 of file stream.c.

References ISO_SUCCESS.

Variable Documentation

◆ cut_out_serial_id

ino_t cut_out_serial_id = (ino_t)1

Definition at line 34 of file stream.c.

Referenced by cut_out_clone_stream(), and iso_cut_out_stream_new().

◆ cut_out_stream_class

IsoStreamIface cut_out_stream_class
static
Initial value:
= {
4,
"cout",
NULL,
}
static int cut_out_is_repeatable(IsoStream *stream)
Definition: stream.c:401
static void cut_out_get_id(IsoStream *stream, unsigned int *fs_id, dev_t *dev_id, ino_t *ino_id)
Definition: stream.c:408
static void cut_out_free(IsoStream *stream)
Definition: stream.c:423
static off_t cut_out_get_size(IsoStream *stream)
Definition: stream.c:383
static int cut_out_clone_stream(IsoStream *old_stream, IsoStream **new_stream, int flag)
Definition: stream.c:443
static int cut_out_read(IsoStream *stream, void *buf, size_t count)
Definition: stream.c:390
static int cut_out_close(IsoStream *stream)
Definition: stream.c:372
static int cut_out_open(IsoStream *stream)
Definition: stream.c:329
static int cut_out_update_size(IsoStream *stream)
Definition: stream.c:431
static IsoStream * cut_out_get_input_stream(IsoStream *stream, int flag)
Definition: stream.c:437

Definition at line 490 of file stream.c.

Referenced by iso_cut_out_stream_new(), and iso_stream_get_source_path().

◆ fsrc_stream_class

IsoStreamIface fsrc_stream_class
static
Initial value:
= {
4,
"fsrc",
NULL,
}
static IsoStream * fsrc_get_input_stream(IsoStream *stream, int flag)
Definition: stream.c:162
static int fsrc_is_repeatable(IsoStream *stream)
Definition: stream.c:95
static int fsrc_open(IsoStream *stream)
Definition: stream.c:37
static int fsrc_close(IsoStream *stream)
Definition: stream.c:64
static off_t fsrc_get_size(IsoStream *stream)
Definition: stream.c:75
static void fsrc_free(IsoStream *stream)
Definition: stream.c:133
static int fsrc_read(IsoStream *stream, void *buf, size_t count)
Definition: stream.c:84
static void fsrc_get_id(IsoStream *stream, unsigned int *fs_id, dev_t *dev_id, ino_t *ino_id)
Definition: stream.c:118
static int fsrc_update_size(IsoStream *stream)
Definition: stream.c:142
int fsrc_clone_stream(IsoStream *old_stream, IsoStream **new_stream, int flag)
Definition: stream.c:167

Definition at line 209 of file stream.c.

Referenced by iso_file_source_stream_new(), iso_stream_cmp_ifs_sections(), iso_stream_get_source_path(), iso_stream_get_src_zf(), and iso_stream_set_image_ino().

◆ mem_serial_id

ino_t mem_serial_id = (ino_t)1

Definition at line 33 of file stream.c.

Referenced by iso_memory_stream_new(), and mem_clone_stream().

◆ mem_stream_class

IsoStreamIface mem_stream_class
static
Initial value:
= {
4,
"mem ",
NULL,
}
static int mem_clone_stream(IsoStream *old_stream, IsoStream **new_stream, int flag)
Definition: stream.c:684
static int mem_read(IsoStream *stream, void *buf, size_t count)
Definition: stream.c:618
static int mem_is_repeatable(IsoStream *stream)
Definition: stream.c:645
static int mem_open(IsoStream *stream)
Definition: stream.c:579
static IsoStream * mem_get_input_stream(IsoStream *stream, int flag)
Definition: stream.c:678
static void mem_get_id(IsoStream *stream, unsigned int *fs_id, dev_t *dev_id, ino_t *ino_id)
Definition: stream.c:651
static off_t mem_get_size(IsoStream *stream)
Definition: stream.c:609
static int mem_close(IsoStream *stream)
Definition: stream.c:594
static int mem_update_size(IsoStream *stream)
Definition: stream.c:672
static void mem_free(IsoStream *stream)
Definition: stream.c:662

Definition at line 727 of file stream.c.

Referenced by iso_memory_stream_new().

◆ serial_id

ino_t serial_id = (ino_t)1

Serial number to be used when you can't get a valid id for a Stream by other means. If you use this, both fs_id and dev_id should be set to 0. This must be incremented each time you get a reference to it.

See also
IsoStreamIface->get_id()
Since
0.6.4

Definition at line 32 of file stream.c.

Referenced by iso_file_source_stream_new().

◆ streamcmpranks

struct iso_streamcmprank* streamcmpranks = NULL
static

Definition at line 987 of file stream.c.

Referenced by iso_get_streamcmprank(), and iso_stream_destroy_cmpranks().