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)  

image.c File Reference
#include "libisofs.h"
#include "image.h"
#include "node.h"
#include "messages.h"
#include "eltorito.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
Include dependency graph for image.c:

Go to the source code of this file.

Functions

int iso_imported_sa_new (struct iso_imported_sys_area **boots, int flag)
 
int iso_imported_sa_unref (struct iso_imported_sys_area **boots, int flag)
 
int iso_image_new (const char *name, IsoImage **image)
 
void iso_image_ref (IsoImage *image)
 
void iso_image_unref (IsoImage *image)
 
int iso_image_free_checksums (IsoImage *image, int flag)
 
int iso_image_attach_data (IsoImage *image, void *data, void(*give_up)(void *))
 
void * iso_image_get_attached_data (IsoImage *image)
 
IsoDiriso_image_get_root (const IsoImage *image)
 
void iso_image_set_volset_id (IsoImage *image, const char *volset_id)
 
const char * iso_image_get_volset_id (const IsoImage *image)
 
void iso_image_set_volume_id (IsoImage *image, const char *volume_id)
 
const char * iso_image_get_volume_id (const IsoImage *image)
 
void iso_image_set_publisher_id (IsoImage *image, const char *publisher_id)
 
const char * iso_image_get_publisher_id (const IsoImage *image)
 
void iso_image_set_data_preparer_id (IsoImage *image, const char *data_preparer_id)
 
const char * iso_image_get_data_preparer_id (const IsoImage *image)
 
void iso_image_set_system_id (IsoImage *image, const char *system_id)
 
const char * iso_image_get_system_id (const IsoImage *image)
 
void iso_image_set_application_id (IsoImage *image, const char *application_id)
 
const char * iso_image_get_application_id (const IsoImage *image)
 
void iso_image_set_copyright_file_id (IsoImage *image, const char *copyright_file_id)
 
const char * iso_image_get_copyright_file_id (const IsoImage *image)
 
void iso_image_set_abstract_file_id (IsoImage *image, const char *abstract_file_id)
 
const char * iso_image_get_abstract_file_id (const IsoImage *image)
 
void iso_image_set_biblio_file_id (IsoImage *image, const char *biblio_file_id)
 
const char * iso_image_get_biblio_file_id (const IsoImage *image)
 
int iso_image_set_pvd_times (IsoImage *image, char *creation_time, char *modification_time, char *expiration_time, char *effective_time)
 
int iso_image_get_pvd_times (IsoImage *image, char **creation_time, char **modification_time, char **expiration_time, char **effective_time)
 
void iso_image_set_app_use (IsoImage *image, const char *app_use_data, int count)
 
int iso_image_get_msg_id (IsoImage *image)
 
int iso_image_get_system_area (IsoImage *img, char system_area_data[32768], int *options, int flag)
 
static int dir_update_size (IsoImage *image, IsoDir *dir)
 
int iso_image_update_sizes (IsoImage *image)
 
void iso_image_set_ignore_aclea (IsoImage *image, int what)
 
int iso_image_get_ignore_aclea (IsoImage *image)
 
static int img_register_ino (IsoImage *image, IsoNode *node, int flag)
 
int img_collect_inos (IsoImage *image, IsoDir *dir, int flag)
 
uint32_t img_give_ino_number (IsoImage *image, int flag)
 
static int img_update_ino (IsoImage *image, IsoNode *node, int flag)
 
int img_make_inos (IsoImage *image, IsoDir *dir, int flag)
 
int iso_image_get_session_md5 (IsoImage *image, uint32_t *start_lba, uint32_t *end_lba, char md5[16], int flag)
 
int iso_image_set_checksums (IsoImage *image, char *checksum_array, uint32_t start_lba, uint32_t end_lba, uint32_t idx_count, int flag)
 
int iso_image_generator_is_running (IsoImage *image)
 
int iso_image_add_mips_boot_file (IsoImage *image, char *path, int flag)
 
int iso_image_get_mips_boot_files (IsoImage *image, char *paths[15], int flag)
 
int iso_image_give_up_mips_boot (IsoImage *image, int flag)
 
static void unset_blessing (IsoImage *img, unsigned int idx)
 
int iso_image_hfsplus_bless (IsoImage *img, enum IsoHfsplusBlessings blessing, IsoNode *node, int flag)
 
int iso_image_hfsplus_get_blessed (IsoImage *img, IsoNode ***blessed_nodes, int *bless_max, int flag)
 
int iso_image_set_sparc_core (IsoImage *img, IsoFile *sparc_core, int flag)
 
int iso_image_get_sparc_core (IsoImage *img, IsoFile **sparc_core, int flag)
 
static int hppa_palo_set_path (IsoImage *img, char *path, char **target, char *what, int flag)
 
int iso_image_set_hppa_palo (IsoImage *img, char *cmdline, char *bootloader, char *kernel_32, char *kernel_64, char *ramdisk, int flag)
 
int iso_image_get_hppa_palo (IsoImage *img, char **cmdline, char **bootloader, char **kernel_32, char **kernel_64, char **ramdisk)
 
int iso_image_set_alpha_boot (IsoImage *img, char *boot_loader_path, int flag)
 
int iso_image_get_alpha_boot (IsoImage *img, char **boot_loader_path)
 
int iso_image_set_truncate_mode (IsoImage *img, int mode, int length)
 
int iso_image_get_truncate_mode (IsoImage *img, int *mode, int *length)
 
int iso_image_truncate_name (IsoImage *image, const char *name, char **namept, int flag)
 
int iso_image_was_blind_attrs (IsoImage *image, int flag)
 
static int iso_dir_zisofs_discard_bpt (IsoDir *dir, int flag)
 
int iso_image_zisofs_discard_bpt (IsoImage *image, int flag)
 

Function Documentation

◆ dir_update_size()

◆ hppa_palo_set_path()

◆ img_collect_inos()

◆ img_give_ino_number()

uint32_t img_give_ino_number ( IsoImage image,
int  flag 
)

A global counter for Rock Ridge inode numbers in the ISO image filesystem.

On image import it gets maxed by the eventual inode numbers from PX entries. Up to the first 32 bit rollover it simply increments the counter. After the first rollover it uses a look ahead bitmap which gets filled by a full tree traversal. It covers the next inode numbers to come (somewhere between 1 and ISO_USED_INODE_RANGE which is quite many) and advances when being exhausted.

Parameters
imageThe image where the number shall be used
flagbit0= reset count (Caution: image must get new inos then)
Returns
Since 0 is used as default and considered self-unique, the value 0 should only be returned in case of error.

Definition at line 713 of file image.c.

References img_collect_inos(), Iso_Image::inode_counter, ISO_USED_INODE_RANGE, Iso_Image::used_inodes, and Iso_Image::used_inodes_start.

Referenced by create_boot_img_filesrc(), family_set_ino(), and iso_node_set_unique_id().

◆ img_make_inos()

int img_make_inos ( IsoImage image,
IsoDir dir,
int  flag 
)

◆ img_register_ino()

static int img_register_ino ( IsoImage image,
IsoNode node,
int  flag 
)
static

◆ img_update_ino()

static int img_update_ino ( IsoImage image,
IsoNode node,
int  flag 
)
static

Definition at line 768 of file image.c.

References iso_node_get_id(), iso_node_get_type(), iso_node_set_unique_id(), LIBISO_DIR, and LIBISO_FILE.

Referenced by img_make_inos().

◆ iso_dir_zisofs_discard_bpt()

static int iso_dir_zisofs_discard_bpt ( IsoDir dir,
int  flag 
)
static

◆ iso_image_add_mips_boot_file()

int iso_image_add_mips_boot_file ( IsoImage image,
char *  path,
int  flag 
)

Add a MIPS boot file path to the image. Up to 15 such files can be written into a MIPS Big Endian Volume Header if this is enabled by value 1 in iso_write_opts_set_system_area() option bits 2 to 7. A single file can be written into a DEC Boot Block if this is enabled by value 2 in iso_write_opts_set_system_area() option bits 2 to 7. So only the first added file gets into effect with this system area type. The data files which shall serve as MIPS boot files have to be brought into the image by the normal means.

Parameters
imageThe image to be manipulated.
pathAbsolute path of the boot file in the ISO 9660 Rock Ridge tree.
flagBitfield for control purposes, unused yet, submit 0
Returns
1 on success, < 0 error
Since
0.6.38

Definition at line 862 of file image.c.

References ISO_BOOT_TOO_MANY_MIPS, ISO_OUT_OF_MEM, ISO_SUCCESS, Iso_Image::mips_boot_file_paths, and Iso_Image::num_mips_boot_files.

Referenced by Xorriso_add_mips_boot_file().

◆ iso_image_attach_data()

int iso_image_attach_data ( IsoImage image,
void *  data,
void(*)(void *)  give_up 
)

Attach user defined data to the image. Use this if your application needs to store addition info together with the IsoImage. If the image already has data attached, the old data will be freed.

Parameters
dataPointer to application defined data that will be attached to the image. You can pass NULL to remove any already attached data.
give_upFunction that will be called when the image does not need the data any more. It receives the data pointer as an argumente, and eventually causes data to be free. It can be NULL if you don't need it.

Definition at line 304 of file image.c.

References ISO_NULL_POINTER, ISO_SUCCESS, Iso_Image::user_data, and Iso_Image::user_data_free.

Referenced by isoburn_read_image().

◆ iso_image_free_checksums()

int iso_image_free_checksums ( IsoImage image,
int  flag 
)

◆ iso_image_generator_is_running()

int iso_image_generator_is_running ( IsoImage image)

Inquire whether the image generator thread is still at work. As soon as the reply is 0, the caller of iso_image_create_burn_source() may assume that the image generation has ended. Nevertheless there may still be readily formatted output data pending in the burn_source or its consumers. So the final delivery of the image has also to be checked at the data consumer side,e.g. by burn_drive_get_status() in case of libburn as consumer.

Parameters
imageThe image to inquire.
Returns
1 generating of image stream is still in progress 0 generating of image stream has ended meanwhile
Since
0.6.38

Definition at line 855 of file image.c.

References Iso_Image::generator_is_running.

Referenced by Xorriso_pacifier_loop().

◆ iso_image_get_abstract_file_id()

const char* iso_image_get_abstract_file_id ( const IsoImage image)

Get the abstract information of a image. The returned string is owned by the image and must not be freed nor changed.

Since
0.6.2

Definition at line 439 of file image.c.

References Iso_Image::abstract_file_id.

Referenced by Xorriso_aquire_drive().

◆ iso_image_get_alpha_boot()

int iso_image_get_alpha_boot ( IsoImage img,
char **  boot_loader_path 
)

Inquire the path submitted by iso_image_set_alpha_boot() Do not free() the returned pointer.

Parameters
imgThe image to be inquired.
boot_loader_pathWill return the path. NULL if none is currently submitted.
Returns
1 is success , <0 means error
Since
1.4.0

Definition at line 1092 of file image.c.

References Iso_Image::alpha_boot_image, and ISO_SUCCESS.

Referenced by Xorriso_boot_status_non_mbr().

◆ iso_image_get_application_id()

const char* iso_image_get_application_id ( const IsoImage image)

Get the application id of a image. The returned string is owned by the image and must not be freed nor changed.

Since
0.6.2

Definition at line 411 of file image.c.

References Iso_Image::application_id.

Referenced by Xorriso_aquire_drive().

◆ iso_image_get_attached_data()

void* iso_image_get_attached_data ( IsoImage image)

The the data previously attached with iso_image_attach_data()

Definition at line 329 of file image.c.

References Iso_Image::user_data.

Referenced by Xorriso__read_pacifier().

◆ iso_image_get_biblio_file_id()

const char* iso_image_get_biblio_file_id ( const IsoImage image)

Get the biblio information of a image. The returned string is owned by the image and must not be freed or changed.

Since
0.6.2

Definition at line 452 of file image.c.

References Iso_Image::biblio_file_id.

Referenced by Xorriso_aquire_drive().

◆ iso_image_get_copyright_file_id()

const char* iso_image_get_copyright_file_id ( const IsoImage image)

Get the copyright information of a image. The returned string is owned by the image and must not be freed nor changed.

Since
0.6.2

Definition at line 425 of file image.c.

References Iso_Image::copyright_file_id.

Referenced by Xorriso_aquire_drive().

◆ iso_image_get_data_preparer_id()

const char* iso_image_get_data_preparer_id ( const IsoImage image)

Get the data preparer of a image. The returned string is owned by the image and must not be freed nor changed.

Since
0.6.2

Definition at line 385 of file image.c.

References Iso_Image::data_preparer_id.

Referenced by Xorriso_pvd_info(), and Xorriso_write_session().

◆ iso_image_get_hppa_palo()

int iso_image_get_hppa_palo ( IsoImage img,
char **  cmdline,
char **  bootloader,
char **  kernel_32,
char **  kernel_64,
char **  ramdisk 
)

Inquire the current settings of iso_image_set_hppa_palo(). Do not free() the returned pointers.

Parameters
imgThe image to be inquired.
cmdlineWill return the command line.
bootloaderWill return the absolute path of the bootloader file.
kernel_32Will return the absolute path of the 32 bit kernel file.
kernel_64Will return the absolute path of the 64 bit kernel file.
ramdiskWill return the absolute path of the RAM disk file.
Returns
1 is success , <0 means error
Since
1.3.8

Definition at line 1066 of file image.c.

References Iso_Image::hppa_bootloader, Iso_Image::hppa_cmdline, Iso_Image::hppa_kernel_32, Iso_Image::hppa_kernel_64, Iso_Image::hppa_ramdisk, and ISO_SUCCESS.

Referenced by Xorriso_boot_status_non_mbr().

◆ iso_image_get_ignore_aclea()

int iso_image_get_ignore_aclea ( IsoImage image)

Obtain the current setting of iso_image_set_ignore_aclea().

Parameters
imageThe image to be inquired
Returns
The currently set value.
Since
1.5.0

Definition at line 618 of file image.c.

References Iso_Image::builder_ignore_acl, Iso_Image::builder_ignore_ea, and Iso_Image::builder_take_all_ea.

Referenced by isoburn_read_image().

◆ iso_image_get_mips_boot_files()

int iso_image_get_mips_boot_files ( IsoImage image,
char *  paths[15],
int  flag 
)

Obtain the number of added MIPS Big Endian boot files and pointers to their paths in the ISO 9660 Rock Ridge tree.

Parameters
imageThe image to be inquired.
pathsAn array of pointers to be set to the registered boot file paths. This are just pointers to data inside IsoImage. Do not free() them. Eventually make own copies of the data before manipulating the image.
flagBitfield for control purposes, unused yet, submit 0
Returns
>= 0 is the number of valid path pointers , <0 means error
Since
0.6.38

Definition at line 874 of file image.c.

References Iso_Image::mips_boot_file_paths, and Iso_Image::num_mips_boot_files.

Referenced by Xorriso_add_mips_boot_file(), and Xorriso_boot_status_non_mbr().

◆ iso_image_get_msg_id()

int iso_image_get_msg_id ( IsoImage image)

Get the id of an IsoImage, used for message reporting. This message id, retrieved with iso_obtain_msgs(), can be used to distinguish what IsoImage has issued a given message.

Since
0.6.2

Definition at line 508 of file image.c.

References Iso_Image::id.

◆ iso_image_get_publisher_id()

const char* iso_image_get_publisher_id ( const IsoImage image)

Get the publisher of a image. The returned string is owned by the image and must not be freed nor changed.

Since
0.6.2

Definition at line 371 of file image.c.

References Iso_Image::publisher_id.

Referenced by Xorriso_aquire_drive().

◆ iso_image_get_pvd_times()

int iso_image_get_pvd_times ( IsoImage image,
char **  creation_time,
char **  modification_time,
char **  expiration_time,
char **  effective_time 
)

Get the four timestamps from the Primary Volume Descriptor of the imported ISO image. The timestamps are strings which are either empty or consist of 16 digits of the form YYYYMMDDhhmmsscc, plus a signed byte in the range of -48 to +52, which gives the timezone offset in steps of 15 minutes. None of the returned string pointers shall be used for altering or freeing data. They are just for reading.

Parameters
imageThe image to be inquired.
creation_timeReturns a pointer to the Volume Creation time: When "the information in the volume was created."
modification_timeReturns a pointer to Volume Modification time: When "the information in the volume was last modified."
expiration_timeReturns a pointer to Volume Expiration time: When "the information in the volume may be regarded as obsolete."
effective_timeReturns a pointer to Volume Expiration time: When "the information in the volume may be used."
Returns
ISO_SUCCESS or error
Since
1.2.8

Definition at line 481 of file image.c.

References Iso_Image::creation_time, Iso_Image::effective_time, Iso_Image::expiration_time, ISO_NULL_POINTER, ISO_SUCCESS, and Iso_Image::modification_time.

Referenced by Xorriso_pvd_info(), and Xorriso_scan_report_lines().

◆ iso_image_get_root()

IsoDir* iso_image_get_root ( const IsoImage image)

Get the root directory of the image. No extra ref is added to it, so you must not unref it. Use iso_node_ref() if you want to get your own reference.

Since
0.6.2

Definition at line 334 of file image.c.

References Iso_Image::root.

Referenced by isoburn_root_defaults(), Xorriso_expand_pattern(), Xorriso_graft_in(), Xorriso_grasp_loaded_aaip(), Xorriso_make_iso_write_opts(), and Xorriso_rmi().

◆ iso_image_get_session_md5()

int iso_image_get_session_md5 ( IsoImage image,
uint32_t *  start_lba,
uint32_t *  end_lba,
char  md5[16],
int  flag 
)

Obtain the recorded MD5 checksum of the session which was loaded as ISO image. Such a checksum may be stored together with others in a contiguous array at the end of the session. The session checksum covers the data blocks from address start_lba to address end_lba - 1. It does not cover the recorded array of md5 checksums. Layout, size, and position of the checksum array is recorded in the xattr "isofs.ca" of the session root node.

Parameters
imageThe image to inquire
start_lbaReturns the first block address covered by md5
end_lbaReturns the first block address not covered by md5 any more
md5Returns 16 byte of MD5 checksum
flagBitfield for control purposes, unused yet, submit 0
Returns
1= md5 found 0= no md5 available (i.e. start_lba, end_lba, md5 are invalid) <0 indicates error
Since
0.6.22

Definition at line 832 of file image.c.

References Iso_Image::checksum_array, Iso_Image::checksum_end_lba, Iso_Image::checksum_idx_count, Iso_Image::checksum_start_lba, and ISO_SUCCESS.

Referenced by Xorriso_check_session_md5(), and Xorriso_image_has_md5().

◆ iso_image_get_sparc_core()

int iso_image_get_sparc_core ( IsoImage img,
IsoFile **  sparc_core,
int  flag 
)

Obtain the current setting of iso_image_set_sparc_core().

Parameters
imgThe image to be inquired.
sparc_coreWill return a pointer to the IsoFile (or NULL, which is not an error)
flagBitfield for control purposes, unused yet, submit 0
Returns
1 is success , <0 means error
Since
1.3.0

Definition at line 982 of file image.c.

References Iso_Image::sparc_core_node.

◆ iso_image_get_system_area()

int iso_image_get_system_area ( IsoImage img,
char  data[32768],
int *  options,
int  flag 
)

Obtain a copy of the eventually loaded first 32768 bytes of the imported session, the System Area. It will be written to the start of the next session unless it gets overwritten by iso_write_opts_set_system_area().

Parameters
imgThe image to be inquired.
dataA byte array of at least 32768 bytes to take the loaded bytes.
optionsThe option bits which will be applied if not overridden by iso_write_opts_set_system_area(). See there.
flagBitfield for control purposes, unused yet, submit 0
Returns
1 on success, 0 if no System Area was loaded, < 0 error.
Since
0.6.30

Definition at line 513 of file image.c.

References Iso_Image::system_area_data, and Iso_Image::system_area_options.

Referenced by Xorriso_set_system_area().

◆ iso_image_get_system_id()

const char* iso_image_get_system_id ( const IsoImage image)

Get the system id of a image. The returned string is owned by the image and must not be freed nor changed.

Since
0.6.2

Definition at line 398 of file image.c.

References Iso_Image::system_id.

Referenced by Xorriso_aquire_drive().

◆ iso_image_get_truncate_mode()

int iso_image_get_truncate_mode ( IsoImage img,
int *  mode,
int *  length 
)

Inquire the current setting of iso_image_set_truncate_mode().

Parameters
imgThe image which shall be inquired.
modeReturns the mode value.
lengthReturns the length value.
Returns
ISO_SUCCESS or <0 = error
Since
1.4.2

Definition at line 1112 of file image.c.

References ISO_SUCCESS, Iso_Image::truncate_length, and Iso_Image::truncate_mode.

Referenced by Xorriso_aquire_drive().

◆ iso_image_get_volset_id()

const char* iso_image_get_volset_id ( const IsoImage image)

Get the volset identifier. The returned string is owned by the image and must not be freed nor changed.

Since
0.6.2

Definition at line 345 of file image.c.

References Iso_Image::volset_id.

Referenced by Xorriso_aquire_drive().

◆ iso_image_get_volume_id()

const char* iso_image_get_volume_id ( const IsoImage image)

Get the volume identifier. The returned string is owned by the image and must not be freed nor changed.

Since
0.6.2

Definition at line 358 of file image.c.

References Iso_Image::volume_id.

Referenced by Xorriso_get_volid(), Xorriso_pvd_info(), Xorriso_scan_report_lines(), and Xorriso_set_volid().

◆ iso_image_give_up_mips_boot()

int iso_image_give_up_mips_boot ( IsoImage image,
int  flag 
)

Clear the list of MIPS Big Endian boot file paths.

Parameters
imageThe image to be manipulated.
flagBitfield for control purposes, unused yet, submit 0
Returns
1 is success , <0 means error
Since
0.6.38

Definition at line 886 of file image.c.

References ISO_SUCCESS, Iso_Image::mips_boot_file_paths, and Iso_Image::num_mips_boot_files.

Referenced by iso_image_unref(), and Xorriso_add_mips_boot_file().

◆ iso_image_hfsplus_bless()

int iso_image_hfsplus_bless ( IsoImage img,
enum IsoHfsplusBlessings  blessing,
IsoNode node,
int  flag 
)

Issue a blessing to a particular IsoNode. If the blessing is already issued to some file, then it gets revoked from that one.

Parameters
imgThe image to manipulate.
blessingThe kind of blessing to be issued.
nodeThe file that shall be blessed. It must actually be an IsoDir or IsoFile as is appropriate for the kind of blessing. (See above enum.) The node may not yet bear a blessing other than the desired one. If node is NULL, then the blessing will be revoked from any node which bears it.
flagBitfield for control purposes. bit0= Revoke blessing if node != NULL bears it. bit1= Revoke any blessing of the node, regardless of parameter blessing. If node is NULL, then revoke all blessings in the image.
Returns
1 means successful blessing or revokation of an existing blessing. 0 means the node already bears another blessing, or is of wrong type, or that the node was not blessed and revokation was desired. <0 is one of the listed error codes.
Since
1.2.4

Definition at line 907 of file image.c.

References Iso_Image::hfsplus_blessed, ISO_HFSPLUS_BLESS_INTEL_BOOTFILE, ISO_HFSPLUS_BLESS_MAX, iso_node_ref(), ISO_WRONG_ARG_VALUE, LIBISO_DIR, LIBISO_FILE, Iso_Node::type, and unset_blessing().

Referenced by Xorriso_hfsplus_bless().

◆ iso_image_hfsplus_get_blessed()

int iso_image_hfsplus_get_blessed ( IsoImage img,
IsoNode ***  blessed_nodes,
int *  bless_max,
int  flag 
)

Get the array of nodes which are currently blessed. Array indice correspond to enum IsoHfsplusBlessings. Array element value NULL means that no node bears that blessing.

Several usage restrictions apply. See parameter blessed_nodes.

Parameters
imgThe image to inquire.
blessed_nodesWill return a pointer to an internal node array of image. This pointer is valid only as long as image exists and only until iso_image_hfsplus_bless() gets used to manipulate the blessings. Do not free() this array. Do not alter the content of the array directly, but rather use iso_image_hfsplus_bless() and re-inquire by iso_image_hfsplus_get_blessed(). This call does not impose an extra reference on the nodes in the array. So do not iso_node_unref() them. Nodes listed here are not necessarily grafted into the tree of the IsoImage.
bless_maxWill return the number of elements in the array. It is unlikely but not outruled that it will be larger than ISO_HFSPLUS_BLESS_MAX in this libisofs.h file.
flagBitfield for control purposes. Submit 0.
Returns
1 means success, <0 means error
Since
1.2.4

Definition at line 960 of file image.c.

References Iso_Image::hfsplus_blessed, and ISO_HFSPLUS_BLESS_MAX.

Referenced by Xorriso_get_blessing(), and Xorriso_hfsplus_bless().

◆ iso_image_new()

int iso_image_new ( const char *  name,
IsoImage **  image 
)

Create a new image, empty.

The image will be owned by you and should be unref() when no more needed.

Parameters
nameName of the image. This will be used as volset_id and volume_id.
imageLocation where the image pointer will be stored.
Returns
1 success, < 0 error

Definition at line 131 of file image.c.

References Iso_Image::alpha_boot_image, Iso_Image::application_use, Iso_Image::blind_on_local_get_attrs, Iso_Image::builder, Iso_Image::builder_ignore_acl, Iso_Image::builder_ignore_ea, Iso_Image::checksum_array, Iso_Image::checksum_end_lba, Iso_Image::checksum_idx_count, Iso_Image::checksum_start_lba, Iso_Image::collision_warnings, Iso_Image::fs, Iso_Image::generator_is_running, Iso_Image::hfsplus_blessed, Iso_Image::hppa_bootloader, Iso_Image::hppa_cmdline, Iso_Image::hppa_kernel_32, Iso_Image::hppa_kernel_64, Iso_Image::hppa_ramdisk, Iso_Image::id, Iso_Image::import_src, Iso_Image::imported_sa_info, Iso_Image::inode_counter, iso_filesystem_unref(), ISO_HFSPLUS_BLESS_MAX, iso_local_filesystem_new(), iso_message_id, iso_node_basic_builder_new(), iso_node_builder_unref(), iso_node_new_root(), ISO_NULL_POINTER, ISO_OUT_OF_MEM, ISO_SUCCESS, LIBISOFS_NODE_NAME_MAX, Iso_Image::mips_boot_file_paths, Iso_Image::num_mips_boot_files, Iso_Image::refcount, Iso_Image::root, Iso_Image::sparc_core_node, Iso_Image::system_area_data, Iso_Image::system_area_options, Iso_Image::truncate_buffer, Iso_Image::truncate_length, Iso_Image::truncate_mode, Iso_Image::used_inodes, Iso_Image::used_inodes_start, Iso_Image::volset_id, and Iso_Image::volume_id.

Referenced by isoburn_new(), and isoburn_read_image().

◆ iso_image_ref()

void iso_image_ref ( IsoImage image)

Increments the reference counting of the given image.

Definition at line 215 of file image.c.

References Iso_Image::refcount.

Referenced by ecma119_image_new(), isoburn_get_attached_image(), isoburn_read_image(), and Xorriso_aquire_drive().

◆ iso_image_set_abstract_file_id()

void iso_image_set_abstract_file_id ( IsoImage image,
const char *  abstract_file_id 
)

Fill abstract information for the image. Usually this refers to a file on disc. Up to 37 characters.

Since
0.6.2

Definition at line 432 of file image.c.

References Iso_Image::abstract_file_id.

Referenced by iso_image_import(), and Xorriso_write_session().

◆ iso_image_set_alpha_boot()

int iso_image_set_alpha_boot ( IsoImage img,
char *  boot_loader_path,
int  flag 
)

Submit the path of the DEC Alpha Secondary Bootstrap Loader file. The path must lead to an already existing data file in the ISO image which stays with this path until image production. This setting has an effect only if system area type is set to 6 with iso_write_opts_set_system_area().

Parameters
imgThe image to be manipulated.
boot_loader_pathAbsolute path of a data file in the ISO image. Submit NULL to free this image property.
flagBitfield for control purposes. Unused yet. Submit 0.
Returns
1 is success , <0 means error
Since
1.4.0

Definition at line 1079 of file image.c.

References Iso_Image::alpha_boot_image, hppa_palo_set_path(), and ISO_SUCCESS.

Referenced by Xorriso_set_alpha_boot().

◆ iso_image_set_app_use()

void iso_image_set_app_use ( IsoImage image,
const char *  app_use_data,
int  count 
)

Fill Application Use field of the Primary Volume Descriptor. ECMA-119 8.4.32 Application Use (BP 884 to 1395) "This field shall be reserved for application use. Its content is not specified by this Standard."

Parameters
imageThe image to manipulate.
app_use_dataUp to 512 bytes of data.
countThe number of bytes in app_use_data. If the number is smaller than 512, then the remaining bytes will be set to 0.
Since
1.3.2

Definition at line 495 of file image.c.

References Iso_Image::application_use.

Referenced by Xorriso_write_application_use().

◆ iso_image_set_application_id()

void iso_image_set_application_id ( IsoImage image,
const char *  application_id 
)

Fill in the application id for a image. Up to 128 chars.

Since
0.6.2

Definition at line 405 of file image.c.

References Iso_Image::application_id.

Referenced by iso_image_import(), and Xorriso_write_session().

◆ iso_image_set_biblio_file_id()

void iso_image_set_biblio_file_id ( IsoImage image,
const char *  biblio_file_id 
)

Fill biblio information for the image. Usually this refers to a file on disc. Up to 37 characters.

Since
0.6.2

Definition at line 446 of file image.c.

References Iso_Image::biblio_file_id.

Referenced by iso_image_import(), and Xorriso_write_session().

◆ iso_image_set_checksums()

int iso_image_set_checksums ( IsoImage image,
char *  checksum_array,
uint32_t  start_lba,
uint32_t  end_lba,
uint32_t  idx_count,
int  flag 
)

◆ iso_image_set_copyright_file_id()

void iso_image_set_copyright_file_id ( IsoImage image,
const char *  copyright_file_id 
)

Fill copyright information for the image. Usually this refers to a file on disc. Up to 37 characters.

Since
0.6.2

Definition at line 418 of file image.c.

References Iso_Image::copyright_file_id.

Referenced by iso_image_import(), and Xorriso_write_session().

◆ iso_image_set_data_preparer_id()

void iso_image_set_data_preparer_id ( IsoImage image,
const char *  data_preparer_id 
)

Fill in the data preparer for a image.

Since
0.6.2

Definition at line 378 of file image.c.

References Iso_Image::data_preparer_id.

Referenced by iso_image_import(), and Xorriso_write_session().

◆ iso_image_set_hppa_palo()

int iso_image_set_hppa_palo ( IsoImage img,
char *  cmdline,
char *  bootloader,
char *  kernel_32,
char *  kernel_64,
char *  ramdisk,
int  flag 
)

Define a command line and submit the paths of four mandatory files for production of a HP-PA PALO boot sector for PA-RISC machines. The paths must lead to already existing data files in the ISO image which stay with these paths until image production.

Parameters
imgThe image to be manipulated.
cmdlineUp to 127 characters of command line.
bootloaderAbsolute path of a data file in the ISO image.
kernel_32Absolute path of a data file in the ISO image which serves as 32 bit kernel.
kernel_64Absolute path of a data file in the ISO image which serves as 64 bit kernel.
ramdiskAbsolute path of a data file in the ISO image.
flagBitfield for control purposes bit0= Let NULL parameters free the corresponding image properties. Else only the non-NULL parameters of this call have an effect
Returns
1 is success , <0 means error
Since
1.3.8

Definition at line 1035 of file image.c.

References Iso_Image::hppa_bootloader, Iso_Image::hppa_cmdline, Iso_Image::hppa_kernel_32, Iso_Image::hppa_kernel_64, hppa_palo_set_path(), Iso_Image::hppa_ramdisk, iso_clone_mgtd_mem(), ISO_OUT_OF_MEM, and ISO_SUCCESS.

Referenced by iso_image_unref(), and Xorriso_set_hppa_boot_parm().

◆ iso_image_set_ignore_aclea()

void iso_image_set_ignore_aclea ( IsoImage image,
int  what 
)

Control whether ACL and xattr will be imported from external filesystems (typically the local POSIX filesystem) when new nodes get inserted. If enabled by iso_write_opts_set_aaip() they will later be written into the image as AAIP extension fields.

A change of this setting does neither affect existing IsoNode objects nor the way how ACL and xattr are handled when loading an ISO image. The latter is controlled by iso_read_opts_set_no_aaip().

Parameters
imageThe image of which the behavior is to be controlled
whatA bit field which sets the behavior: bit0= ignore ACLs if the external file object bears some bit1= ignore xattr if the external file object bears some bit3= if not bit1: import all xattr namespaces, not only "user."
Since
1.5.0 all other bits are reserved
0.6.14

Definition at line 610 of file image.c.

References Iso_Image::builder_ignore_acl, Iso_Image::builder_ignore_ea, and Iso_Image::builder_take_all_ea.

Referenced by isoburn_read_image(), isoburn_welcome_media(), and Xorriso_set_ignore_aclea().

◆ iso_image_set_publisher_id()

void iso_image_set_publisher_id ( IsoImage image,
const char *  publisher_id 
)

Fill in the publisher for a image.

Since
0.6.2

Definition at line 365 of file image.c.

References Iso_Image::publisher_id.

Referenced by iso_image_import(), and Xorriso_write_session().

◆ iso_image_set_pvd_times()

int iso_image_set_pvd_times ( IsoImage image,
char *  creation_time,
char *  modification_time,
char *  expiration_time,
char *  effective_time 
)

◆ iso_image_set_sparc_core()

int iso_image_set_sparc_core ( IsoImage img,
IsoFile sparc_core,
int  flag 
)

Designate a data file in the ISO image of which the position and size shall be written after the SUN Disk Label. The position is written as 64-bit big-endian number to byte position 0x228. The size is written as 32-bit big-endian to 0x230. This setting has an effect only if system area type is set to 3 with iso_write_opts_set_system_area().

Parameters
imgThe image to be manipulated.
sparc_coreThe IsoFile which shall be mentioned after the SUN Disk label. NULL is a permissible value. It disables this feature.
flagBitfield for control purposes, unused yet, submit 0
Returns
1 is success , <0 means error
Since
1.3.0

Definition at line 970 of file image.c.

References iso_node_ref(), iso_node_unref(), and Iso_Image::sparc_core_node.

Referenced by Xorriso_set_system_area().

◆ iso_image_set_system_id()

void iso_image_set_system_id ( IsoImage image,
const char *  system_id 
)

Fill in the system id for a image. Up to 32 characters.

Since
0.6.2

Definition at line 392 of file image.c.

References Iso_Image::system_id.

Referenced by iso_image_import(), and Xorriso_write_session().

◆ iso_image_set_truncate_mode()

int iso_image_set_truncate_mode ( IsoImage img,
int  mode,
int  length 
)

Set the name truncation mode and the maximum name length for nodes from image importing, creation of new IsoNode objects, and name changing image manipulations.

Truncated names are supposed to be nearly unique because they end by the MD5 of the first 4095 characters of the untruncated name. One should treat them as if they were the untruncated original names.

For proper processing of truncated names it is necessary to use iso_image_set_node_name() instead of iso_node_set_name() iso_image_add_new_dir() iso_tree_add_new_dir() iso_image_add_new_file() iso_tree_add_new_file() iso_image_add_new_special() iso_tree_add_new_special() iso_image_add_new_symlink() iso_tree_add_new_symlink() iso_image_tree_clone() iso_tree_clone() iso_image_dir_get_node() iso_dir_get_node() iso_image_path_to_node() iso_tree_path_to_node()

Beware of ambiguities if both, the full name and the truncated name, exist in the same directory. Best is to only set truncation parameters once with an ISO filesystem and to never change them later.

If writing of AAIP is enabled, then the mode and length are recorded in xattr "isofs.nt" of the root node. If reading of AAIP is enabled and "isofs.nt" is found, then it gets into effect if both, the truncate mode value from "isofs.nt" and the current truncate mode of the IsoImage are 1, and the length is between 64 and 255.

Parameters
imgThe image which shall be manipulated.
mode0= Do not truncate but throw error ISO_RR_NAME_TOO_LONG if a file name is longer than parameter length. 1= Truncate to length and overwrite the last 33 bytes of that length by a colon ':' and the hex representation of the MD5 of the first 4095 bytes of the whole oversized name. Potential incomplete UTF-8 characters will get their leading bytes replaced by '_'. Mode 1 is the default.
lengthMaximum byte count of a file name. Permissible values are 64 to 255. Default is 255.
Returns
ISO_SUCCESS or ISO_WRONG_ARG_VALUE
Since
1.4.2

Definition at line 1100 of file image.c.

References ISO_SUCCESS, ISO_WRONG_ARG_VALUE, LIBISOFS_NODE_NAME_MAX, Iso_Image::truncate_length, and Iso_Image::truncate_mode.

Referenced by isoburn_read_image(), Xorriso_aquire_drive(), and Xorriso_set_file_name_limit().

◆ iso_image_set_volset_id()

void iso_image_set_volset_id ( IsoImage image,
const char *  volset_id 
)

Fill in the volset identifier for a image.

Since
0.6.2

Definition at line 339 of file image.c.

References Iso_Image::volset_id.

Referenced by iso_image_import(), and Xorriso_write_session().

◆ iso_image_set_volume_id()

void iso_image_set_volume_id ( IsoImage image,
const char *  volume_id 
)

Fill in the volume identifier for a image.

Since
0.6.2

Definition at line 352 of file image.c.

References Iso_Image::volume_id.

Referenced by iso_image_import(), and Xorriso_set_volid().

◆ iso_image_truncate_name()

◆ iso_image_unref()

void iso_image_unref ( IsoImage image)

Decrements the reference counting of the given image. If it reaches 0, the image is free, together with its tree nodes (whether their refcount reach 0 too, of course).

Definition at line 225 of file image.c.

References Iso_Image::abstract_file_id, Iso_Image::alpha_boot_image, Iso_Image::application_id, Iso_Image::biblio_file_id, Iso_Image::bootcat, Iso_Image::builder, Iso_Image::copyright_file_id, Iso_Image::creation_time, Iso_Image::data_preparer_id, Iso_Image::effective_time, el_torito_boot_catalog_free(), Iso_Image::excludes, Iso_Image::expiration_time, Iso_Image::fs, Iso_Image::hfsplus_blessed, Iso_Image::import_src, Iso_Image::imported_sa_info, iso_data_source_unref(), iso_filesystem_unref(), ISO_HFSPLUS_BLESS_MAX, iso_image_free_checksums(), iso_image_give_up_mips_boot(), iso_image_set_hppa_palo(), iso_imported_sa_unref(), iso_node_builder_unref(), iso_node_unref(), Iso_Image::modification_time, Iso_Image::nexcludes, Iso_Image::publisher_id, Iso_Image::refcount, Iso_Image::root, Iso_Image::sparc_core_node, Iso_Image::system_area_data, Iso_Image::system_id, Iso_Image::used_inodes, Iso_Image::user_data, Iso_Image::user_data_free, Iso_Image::volset_id, and Iso_Image::volume_id.

Referenced by ecma119_image_free(), isoburn_attach_image(), isoburn_destroy(), isoburn_read_image(), Xorriso_aquire_drive(), Xorriso_attach_boot_image(), Xorriso_boot_image_status(), Xorriso_create_empty_iso(), Xorriso_detach_libraries(), Xorriso_give_up_drive(), Xorriso_pacifier_loop(), Xorriso_record_boot_info(), Xorriso_set_system_area_path(), Xorriso_show_boot_info(), and Xorriso_write_session().

◆ iso_image_update_sizes()

int iso_image_update_sizes ( IsoImage image)

Update the sizes of all files added to image.

This may be called just before iso_image_create_burn_source() to force libisofs to check the file sizes again (they're already checked when added to IsoImage). It is useful if you have changed some files after adding then to the image.

Returns
1 on success, < 0 on error
Since
0.6.8

Definition at line 600 of file image.c.

References dir_update_size(), ISO_NULL_POINTER, and Iso_Image::root.

Referenced by Xorriso_write_session().

◆ iso_image_was_blind_attrs()

int iso_image_was_blind_attrs ( IsoImage image,
int  flag 
)

Inquire whether some local filesystem xattr namespace could not be explored during node building.This may happen due to lack of administrator privileges e.g. on FreeBSD namespace "system". It may well be that the processed local files have no attributes which would require special privileges. But already their existence was neither denied nor confirmed.

Parameters
imageThe image to inquire.
flagBitfield for control purposes: bit0 = reset internal value to 0
Returns
1 = Exploration was prevented 0 = No such prevention occurred
Since
1.5.0

Definition at line 1143 of file image.c.

References Iso_Image::blind_on_local_get_attrs, and ISO_NULL_POINTER.

Referenced by Xorriso_write_session().

◆ iso_image_zisofs_discard_bpt()

int iso_image_zisofs_discard_bpt ( IsoImage image,
int  flag 
)

Discard all buffered zisofs compression block pointers of streams in the given image, which are zisofs compression streams and not currently opened.

Parameters
imageThe image to be manipulated.
flagBitfield for control purposes, unused yet, submit 0
Returns
ISO_SUCCESS on success, <0 on error
Since
1.5.4

Definition at line 1199 of file image.c.

References iso_dir_zisofs_discard_bpt(), ISO_NULL_POINTER, ISO_SUCCESS, and Iso_Image::root.

Referenced by Xorriso_set_filter().

◆ iso_imported_sa_new()

◆ iso_imported_sa_unref()

◆ unset_blessing()

static void unset_blessing ( IsoImage img,
unsigned int  idx 
)
static

Definition at line 899 of file image.c.

References Iso_Image::hfsplus_blessed, and iso_node_unref().

Referenced by iso_image_hfsplus_bless().