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 "libisofs.h"
#include "util.h"
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
Include dependency graph for data_source.c:

Go to the source code of this file.

Data Structures

struct  file_data_src
 

Macros

#define O_BINARY   0
 

Functions

void iso_data_source_ref (IsoDataSource *src)
 
void iso_data_source_unref (IsoDataSource *src)
 
static int ds_open (IsoDataSource *src)
 
static int ds_close (IsoDataSource *src)
 
static int ds_read_block (IsoDataSource *src, uint32_t lba, uint8_t *buffer)
 
static void ds_free_data (IsoDataSource *src)
 
int iso_data_source_new_from_file (const char *path, IsoDataSource **src)
 

Macro Definition Documentation

◆ O_BINARY

#define O_BINARY   0

Definition at line 26 of file data_source.c.

Function Documentation

◆ ds_close()

static int ds_close ( IsoDataSource src)
static

◆ ds_free_data()

static void ds_free_data ( IsoDataSource src)
static

◆ ds_open()

◆ ds_read_block()

static int ds_read_block ( IsoDataSource src,
uint32_t  lba,
uint8_t *  buffer 
)
static

◆ iso_data_source_new_from_file()

int iso_data_source_new_from_file ( const char *  path,
IsoDataSource **  src 
)

Create a new IsoDataSource from a local file. This is suitable for accessing regular .iso images, or to access drives via its block device and standard POSIX I/O calls.

Parameters
pathThe path of the file
srcWill be filled with the pointer to the newly created data source.
Returns
1 on success, < 0 on error.

Definition at line 158 of file data_source.c.

References iso_data_source::close, iso_data_source::data, ds_close(), ds_free_data(), ds_open(), ds_read_block(), file_data_src::fd, iso_data_source::free_data, iso_eaccess(), ISO_NULL_POINTER, ISO_OUT_OF_MEM, ISO_SUCCESS, iso_data_source::open, file_data_src::path, iso_data_source::read_block, iso_data_source::refcount, and iso_data_source::version.

◆ iso_data_source_ref()

void iso_data_source_ref ( IsoDataSource src)

Increments the reference counting of the given IsoDataSource.

Definition at line 41 of file data_source.c.

References iso_data_source::refcount.

Referenced by iso_image_filesystem_new(), and iso_image_import().

◆ iso_data_source_unref()

void iso_data_source_unref ( IsoDataSource src)

Decrements the reference counting of the given IsoDataSource, freeing it if refcount reach 0.

Definition at line 50 of file data_source.c.

References iso_data_source::free_data, and iso_data_source::refcount.

Referenced by ifs_fs_free(), iso_image_unref(), isoburn_destroy(), and isoburn_read_image().