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)  

data_source.c File Reference
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <libburn/libburn.h>
#include <libisofs/libisofs.h>
#include "isoburn.h"
Include dependency graph for data_source.c:

Go to the source code of this file.

Data Structures

struct  isoburn_cache_tile
struct  isoburn_cached_drive


#define Libisoburn_max_agE   2000000000


static int ds_inc_age (struct isoburn_cached_drive *icd, int idx, int flag)
int ds_read_block (IsoDataSource *src, uint32_t lba, uint8_t *buffer)
static int ds_open (IsoDataSource *src)
static int ds_close (IsoDataSource *src)
static int isoburn_cache_tile_destroy (struct isoburn_cache_tile **o, int flag)
static int isoburn_cache_tile_new (struct isoburn_cache_tile **o, int tile_blocks, int flag)
static int isoburn_cached_drive_destroy (struct isoburn_cached_drive **o, int flag)
static int isoburn_cached_drive_new (struct isoburn_cached_drive **o, struct burn_drive *d, int cache_tiles, int tile_blocks, int flag)
static void ds_free_data (IsoDataSource *src)
int isoburn_data_source_shutdown (IsoDataSource *src, int flag)
IsoDataSourceisoburn_data_source_new (struct burn_drive *d, uint32_t displacement, int displacement_sign, int cache_tiles, int tile_blocks)

Macro Definition Documentation

◆ Libisoburn_max_agE

#define Libisoburn_max_agE   2000000000

Definition at line 75 of file data_source.c.

Function Documentation

◆ ds_close()

static int ds_close ( IsoDataSource src)

Definition at line 202 of file data_source.c.

Referenced by isoburn_data_source_new().

◆ ds_free_data()

static void ds_free_data ( IsoDataSource src)

Definition at line 301 of file data_source.c.

References iso_data_source::data, and isoburn_cached_drive_destroy().

Referenced by isoburn_data_source_new().

◆ ds_inc_age()

static int ds_inc_age ( struct isoburn_cached_drive icd,
int  idx,
int  flag 

◆ ds_open()

static int ds_open ( IsoDataSource src)

Definition at line 196 of file data_source.c.

Referenced by isoburn_data_source_new().

◆ ds_read_block()

◆ isoburn_cache_tile_destroy()

static int isoburn_cache_tile_destroy ( struct isoburn_cache_tile **  o,
int  flag 

Definition at line 209 of file data_source.c.

Referenced by isoburn_cache_tile_new(), and isoburn_cached_drive_destroy().

◆ isoburn_cache_tile_new()

◆ isoburn_cached_drive_destroy()

static int isoburn_cached_drive_destroy ( struct isoburn_cached_drive **  o,
int  flag 

◆ isoburn_cached_drive_new()

◆ isoburn_data_source_new()

IsoDataSource* isoburn_data_source_new ( struct burn_drive d,
uint32_t  displacement,
int  displacement_sign,
int  cache_tiles,
int  tile_blocks 

Get a data source suitable for read from a drive using burn_read_data() function.

ddrive to read from. Must be grabbed.
displacementwill be added or subtracted to any block address
displacement_sign+1 = add , -1= subtract , else keep unaltered
the data source, NULL on error. Must be freed with libisofs iso_data_source_unref() function. Note: this doesn't release the drive.

Definition at line 325 of file data_source.c.

References iso_data_source::close, iso_data_source::data, isoburn_cached_drive::displacement, isoburn_cached_drive::displacement_sign, ds_close(), ds_free_data(), ds_open(), ds_read_block(), iso_data_source::free_data, isoburn_cached_drive_new(), iso_data_source::open, iso_data_source::read_block, iso_data_source::refcount, isoburn_cached_drive::tile_blocks, and iso_data_source::version.

Referenced by isoburn_read_image().

◆ isoburn_data_source_shutdown()

int isoburn_data_source_shutdown ( IsoDataSource src,
int  flag 

Disable read capabilities of a data source which was originally created by isoburn_data_source_new(). After this any attempt to read will yield a FATAL programming error event. This is usually done to allow libburn to release the drive while libisofs still holds a reference to the data source object. libisofs is not supposed to use this object for reading any more, nevertheless. The disabled state of the data source is a safety fence around this daring situation.

srcThe data source to be disabled
flagunused yet
<=0 is failure , >0 success

Definition at line 313 of file data_source.c.

References iso_data_source::data, and isoburn_cached_drive::drive.

Referenced by isoburn_prepare_disc_aux().