libisoburn  1.5.4
About: libisoburn is a frontend for the libraries libburn and libisofs which enables creation and expansion of ISO-9660 filesystems on all media and file types supported by libburn. It implements the API and command interpreter of program xorriso, and installs this program as small dynamically linked binary. xorriso is suitable for incremental data backup and for production of bootable ISO 9660 images. A statically linked version is available as GNU xorriso.
  Fossies Dox: libisoburn-1.5.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

isoburn.c File Reference
#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <libburn/libburn.h>
#include <libisofs/libisofs.h>
#include "libisoburn.h"
#include "isoburn.h"
Include dependency graph for isoburn.c:

Go to the source code of this file.

Functions

int isoburn_toc_entry_new (struct isoburn_toc_entry **objpt, struct isoburn_toc_entry *boss, int flag)
 
int isoburn_toc_entry_destroy (struct isoburn_toc_entry **o, int flag)
 
int isoburn_new (struct isoburn **objpt, int flag)
 
int isoburn_destroy (struct isoburn **objpt, int flag)
 
int isoburn_destroy_all (struct isoburn **objpt, int flag)
 
int isoburn_get_target_image (struct isoburn *o, IsoImage **pt, int flag)
 
int isoburn_get_prev (struct isoburn *o, struct isoburn **pt, int flag)
 
int isoburn_get_next (struct isoburn *o, struct isoburn **pt, int flag)
 
int isoburn_link (struct isoburn *o, struct isoburn *link, int flag)
 
int isoburn_count (struct isoburn *o, int flag)
 
int isoburn_by_idx (struct isoburn *o, int idx, struct isoburn **pt, int flag)
 
int isoburn_find_by_drive (struct isoburn **pt, struct burn_drive *d, int flag)
 
int isoburn_msgs_submit (struct isoburn *o, int error_code, char msg_text[], int os_errno, char severity[], int flag)
 
int isoburn_adjust_target_iso_head (struct isoburn *o, uint32_t offst, int flag)
 Check whether the size of target_iso_head matches the given partition offset. More...
 
static int isoburn_make_iso_write_opts (struct isoburn *out_o, struct isoburn_imgen_opts *opts, int fifo_chunks, IsoWriteOpts *wopts, int flag)
 
static int isoburn_prepare_disc_aux (struct burn_drive *in_d, struct burn_drive *out_d, struct burn_disc **disc, struct isoburn_imgen_opts *opts, int flag)
 
int isoburn_prepare_disc (struct burn_drive *d, struct burn_disc **disc, struct isoburn_imgen_opts *opts)
 Start production of an ISO 9660 image using the method of Growing: Create a disc object for writing the new session from the created or loaded iso_volset which has been manipulated via libisofs, to the same medium from where the image was eventually loaded. More...
 
int isoburn_prepare_new_image (struct burn_drive *d, struct burn_disc **disc, struct isoburn_imgen_opts *opts, struct burn_drive *out_drive)
 Start production of an ISO 9660 image using the method of Modifying: Create a disc object for producing a new image from a previous image plus the changes made by user. More...
 
int isoburn_prepare_blind_grow (struct burn_drive *d, struct burn_disc **disc, struct isoburn_imgen_opts *opts, struct burn_drive *out_drive, int nwa)
 Start production of an ISO 9660 image using the method of Blind Growing: Create a disc object for writing an add-on session from the created or loaded IsoImage which has been manipulated via libisofs, to a different drive than the one from where it was loaded. More...
 
int isoburn_cancel_prepared_write (struct burn_drive *d, struct burn_drive *output_drive, int flag)
 Revoke isoburn_prepare_*() instead of running isoburn_disc_write(). More...
 
int isoburn_sync_after_write (struct burn_drive *d, struct burn_drive *output_drive, int flag)
 Wait after normal end of operations until libisofs ended all write threads and freed resource reservations. More...
 
void isoburn_version (int *major, int *minor, int *micro)
 Obtain the three release version numbers of the library. More...
 
int isoburn_is_compatible (int major, int minor, int micro, int flag)
 Check whether all features of header file libisoburn.h from the given major.minor.micro revision triple can be delivered by the library version which is performing this call. More...
 
int isoburn_ropt_new (struct isoburn_read_opts **new_o, int flag)
 Produces a set of image read options, initialized with default values. More...
 
int isoburn_ropt_destroy (struct isoburn_read_opts **o, int flag)
 Deletes an option set which was created by isoburn_ropt_new(). More...
 
int isoburn_ropt_set_data_cache (struct isoburn_read_opts *o, int cache_tiles, int tile_blocks, int flag)
 Sets the size and granularity of the cache which libisoburn provides to libisofs for reading of ISO image data. More...
 
int isoburn_ropt_get_data_cache (struct isoburn_read_opts *o, int *cache_tiles, int *tile_blocks, int *set_flag, int flag)
 Inquire the current settings of isoburn_set_data_cache(). More...
 
int isoburn_ropt_set_extensions (struct isoburn_read_opts *o, int ext)
 
int isoburn_ropt_get_extensions (struct isoburn_read_opts *o, int *ext)
 
int isoburn_ropt_set_default_perms (struct isoburn_read_opts *o, uid_t uid, gid_t gid, mode_t mode)
 Default attributes to use if no RockRidge extension gets loaded. More...
 
int isoburn_ropt_get_default_perms (struct isoburn_read_opts *o, uid_t *uid, gid_t *gid, mode_t *mode)
 
int isoburn_ropt_set_default_dirperms (struct isoburn_read_opts *o, mode_t mode)
 Default attributes to use on directories if no RockRidge extension gets loaded. More...
 
int isoburn_ropt_get_default_dirperms (struct isoburn_read_opts *o, mode_t *mode)
 
int isoburn_ropt_set_input_charset (struct isoburn_read_opts *o, char *input_charset)
 Set the character set for reading RR file names from ISO images. More...
 
int isoburn_ropt_get_input_charset (struct isoburn_read_opts *o, char **input_charset)
 
int isoburn_ropt_set_auto_incharset (struct isoburn_read_opts *o, int mode)
 Enable or disable methods to automatically choose an input charset. More...
 
int isoburn_ropt_get_auto_incharset (struct isoburn_read_opts *o, int *mode)
 
int isoburn_ropt_set_displacement (struct isoburn_read_opts *o, uint32_t displacement, int displacement_sign)
 Control an offset to be applied to all block address pointers in the ISO image in order to compensate for an eventual displacement of the image relative to the start block address for which it was produced. More...
 
int isoburn_ropt_get_displacement (struct isoburn_read_opts *o, uint32_t *displacement, int *displacement_sign)
 
int isoburn_ropt_set_truncate_mode (struct isoburn_read_opts *o, int mode, int length)
 Set the name truncation mode and the maximum name length for imported file objects. More...
 
int isoburn_ropt_get_truncate_mode (struct isoburn_read_opts *o, int *mode, int *length)
 
int isoburn_ropt_get_size_what (struct isoburn_read_opts *o, uint32_t *size, int *has_what)
 
int isoburn_ropt_get_tree_loaded (struct isoburn_read_opts *o, int *tree, int *rr)
 After calling function isoburn_read_image() there are information available in the option set about which tree was used for image loading and whether Rock Ridge information was actually used. More...
 
int isoburn_igopt_new (struct isoburn_imgen_opts **new_o, int flag)
 Produces a set of generation and transfer options, initialized with default values. More...
 
int isoburn_igopt_destroy (struct isoburn_imgen_opts **o, int flag)
 Deletes an option set which was created by isoburn_igopt_new(). More...
 
int isoburn_igopt_set_level (struct isoburn_imgen_opts *o, int level)
 ISO level to write at. More...
 
int isoburn_igopt_get_level (struct isoburn_imgen_opts *o, int *level)
 
int isoburn_igopt_set_extensions (struct isoburn_imgen_opts *o, int ext)
 
int isoburn_igopt_get_extensions (struct isoburn_imgen_opts *o, int *ext)
 
int isoburn_igopt_set_relaxed (struct isoburn_imgen_opts *o, int relax)
 
int isoburn_igopt_get_relaxed (struct isoburn_imgen_opts *o, int *relax)
 
int isoburn_igopt_set_rr_reloc (struct isoburn_imgen_opts *o, char *name, int flags)
 If not isoburn_igopt_allow_deep_paths is in effect, then it may become necessary to relocate directories so that no ECMA-119 file path has more than 8 components. More...
 
int isoburn_igopt_get_rr_reloc (struct isoburn_imgen_opts *o, char **name, int *flags)
 Obtain the settings of isoburn_igopt_set_rr_reloc(). More...
 
int isoburn_igopt_set_untranslated_name_len (struct isoburn_imgen_opts *o, int len)
 Caution: This option breaks any assumptions about names that are supported by ECMA-119 specifications. More...
 
int isoburn_igopt_get_untranslated_name_len (struct isoburn_imgen_opts *o, int *len)
 
int isoburn_igopt_set_sort_files (struct isoburn_imgen_opts *o, int value)
 
int isoburn_igopt_get_sort_files (struct isoburn_imgen_opts *o, int *value)
 
int isoburn_igopt_set_over_mode (struct isoburn_imgen_opts *o, int replace_dir_mode, int replace_file_mode, mode_t dir_mode, mode_t file_mode)
 Set the override values for files and directory permissions. More...
 
int isoburn_igopt_get_over_mode (struct isoburn_imgen_opts *o, int *replace_dir_mode, int *replace_file_mode, mode_t *dir_mode, mode_t *file_mode)
 
int isoburn_igopt_set_over_ugid (struct isoburn_imgen_opts *o, int replace_uid, int replace_gid, uid_t uid, gid_t gid)
 Set the override values values for group id and user id. More...
 
int isoburn_igopt_get_over_ugid (struct isoburn_imgen_opts *o, int *replace_uid, int *replace_gid, uid_t *uid, gid_t *gid)
 
int isoburn_igopt_set_out_charset (struct isoburn_imgen_opts *o, char *output_charset)
 Set the character set to use for representing RR filenames in the image. More...
 
int isoburn_igopt_get_out_charset (struct isoburn_imgen_opts *o, char **output_charset)
 
int isoburn_igopt_set_fifo_size (struct isoburn_imgen_opts *o, int fifo_size)
 The number of bytes to be used for the fifo which decouples libisofs and libburn for better throughput and for reducing the risk of interrupting signals hitting the libburn thread which operates the MMC drive. More...
 
int isoburn_igopt_get_fifo_size (struct isoburn_imgen_opts *o, int *fifo_size)
 
int isoburn_igopt_get_effective_lba (struct isoburn_imgen_opts *o, int *lba)
 Obtain after image preparation the block address where the session will start on the medium. More...
 
int isoburn_igopt_get_data_start (struct isoburn_imgen_opts *o, int *lba)
 Obtain after image preparation the lowest block address of file content data. More...
 
int isoburn_igopt_set_scdbackup_tag (struct isoburn_imgen_opts *o, char *name, char *timestamp, char *tag_written)
 Set or get parameters "name" and "timestamp" for a scdbackup checksum tag. More...
 
int isoburn_igopt_get_scdbackup_tag (struct isoburn_imgen_opts *o, char name[81], char timestamp[19], char **tag_written)
 
int isoburn_igopt_set_system_area (struct isoburn_imgen_opts *opts, char data[32768], int options)
 Attach 32 kB of binary data which shall get written to the first 32 kB of the ISO image, the System Area. More...
 
int isoburn_igopt_get_system_area (struct isoburn_imgen_opts *opts, char data[32768], int *options)
 
int isoburn_igopt_set_pvd_times (struct isoburn_imgen_opts *opts, time_t vol_creation_time, time_t vol_modification_time, time_t vol_expiration_time, time_t vol_effective_time, char *vol_uuid)
 Explicitly set the four timestamps of the emerging ISO image. More...
 
int isoburn_igopt_get_pvd_times (struct isoburn_imgen_opts *opts, time_t *vol_creation_time, time_t *vol_modification_time, time_t *vol_expiration_time, time_t *vol_effective_time, char vol_uuid[17])
 
int isoburn_igopt_set_part_offset (struct isoburn_imgen_opts *opts, uint32_t block_offset_2k, int secs_512_per_head, int heads_per_cyl)
 Control production of a second set of volume descriptors (superblock) and directory trees, together with a partition table in the MBR where the first partition has non-zero start address and the others are zeroed. More...
 
int isoburn_igopt_get_part_offset (struct isoburn_imgen_opts *opts, uint32_t *block_offset_2k, int *secs_512_per_head, int *heads_per_cyl)
 
int isoburn_igopt_attach_jte (struct isoburn_imgen_opts *opts, void *libjte_handle)
 Associate a libjte environment object to the upcoming write run. More...
 
int isoburn_igopt_detach_jte (struct isoburn_imgen_opts *opts, void **libjte_handle)
 Remove eventual association to a libjte environment handle. More...
 
int isoburn_igopt_set_tail_blocks (struct isoburn_imgen_opts *opts, uint32_t num_blocks)
 Set or get the number of trailing zero byte blocks to be written by libisofs. More...
 
int isoburn_igopt_get_tail_blocks (struct isoburn_imgen_opts *opts, uint32_t *num_blocks)
 
int isoburn_igopt_set_prep_partition (struct isoburn_imgen_opts *o, char *path, int flag)
 Copy a data file from the local filesystem into the emerging ISO image. More...
 
int isoburn_igopt_get_prep_partition (struct isoburn_imgen_opts *opts, char **path, int flag)
 
int isoburn_igopt_set_efi_bootp (struct isoburn_imgen_opts *o, char *path, int flag)
 Copy a data file from the local filesystem into the emerging ISO image and mark it by a GPT entry as EFI system partition. More...
 
int isoburn_igopt_get_efi_bootp (struct isoburn_imgen_opts *opts, char **path, int flag)
 
int isoburn_igopt_set_partition_img (struct isoburn_imgen_opts *opts, int partition_number, uint8_t partition_type, char *image_path)
 Cause an arbitrary data file to be appended to the ISO image and to be described by a partition table entry in an MBR or SUN Disk Label at the start of the ISO image. More...
 
int isoburn_igopt_get_partition_img (struct isoburn_imgen_opts *opts, int num_entries, uint8_t partition_types[], char *image_paths[])
 Inquire the current settings made by isoburn_igopt_set_partition_img(). More...
 
int isoburn_igopt_set_part_flag (struct isoburn_imgen_opts *opts, int partition_number, int flag)
 Set flag bits for a partition defined by isoburn_igopt_set_partition_img(). More...
 
int isoburn_igopt_get_part_flags (struct isoburn_imgen_opts *opts, int num_entries, int part_flags[])
 Inquire the current settings made by isoburn_igopt_set_part_flags(). More...
 
int isoburn_igopt_set_appended_as_gpt (struct isoburn_imgen_opts *opts, int gpt)
 Control whether partitions created by iso_write_opts_set_partition_img() are to be represented in MBR or as GPT partitions. More...
 
int isoburn_igopt_get_appended_as_gpt (struct isoburn_imgen_opts *opts, int *gpt)
 Inquire the current setting made by isoburn_igopt_set_appended_as_gpt(). More...
 
int isoburn_igopt_set_part_type_guid (struct isoburn_imgen_opts *opts, int partition_number, uint8_t guid[16], int valid)
 Set the GPT Type GUID for a partition defined by isoburn_igopt_set_partition_img(). More...
 
int isoburn_igopt_get_part_type_guid (struct isoburn_imgen_opts *opts, int num_entries, uint8_t guids[][16], int valids[])
 Inquire the current settings made by isoburn_igopt_set_part_type_guid(). More...
 
int isoburn_igopt_set_appended_as_apm (struct isoburn_imgen_opts *opts, int apm)
 Control whether partitions created by iso_write_opts_set_partition_img() are to be represented in Apple Partition Map. More...
 
int isoburn_igopt_get_appended_as_apm (struct isoburn_imgen_opts *opts, int *apm)
 Inquire the current setting made by isoburn_igopt_set_appended_as_apm(). More...
 
int isoburn_igopt_set_part_like_isohybrid (struct isoburn_imgen_opts *opts, int alike)
 Control whether bits 2 to 8 of el_torito_set_isolinux_options() shall apply even if not isohybrid MBR patching is enabled (bit1 of parameter options of isoburn_igopt_set_system_area()). More...
 
int isoburn_igopt_get_part_like_isohybrid (struct isoburn_imgen_opts *opts, int *alike)
 Inquire the current setting of isoburn_igopt_set_part_like_isohybrid(). More...
 
int isoburn_igopt_set_iso_mbr_part_type (struct isoburn_imgen_opts *opts, int part_type)
 Set the partition type of the MBR partition which represents the ISO filesystem or at least protects it. More...
 
int isoburn_igopt_get_iso_mbr_part_type (struct isoburn_imgen_opts *opts, int *part_type)
 Inquire the current setting of isoburn_igopt_set_iso_mbr_part_type(). More...
 
int isoburn_igopt_set_iso_type_guid (struct isoburn_imgen_opts *opts, uint8_t guid[16], int valid)
 Set the GPT Type GUID for the partition which represents the ISO 9660 filesystem, if such a partition emerges in GPT. More...
 
int isoburn_igopt_get_iso_type_guid (struct isoburn_imgen_opts *opts, uint8_t guid[16])
 Inquire the current setting of isoburn_igopt_set_iso_type_guid(). More...
 
int isoburn_igopt_set_gpt_guid (struct isoburn_imgen_opts *opts, uint8_t guid[16], int mode)
 Control whether the emerging GPT gets a pseudo-randomly generated disk GUID or whether it gets a user supplied GUID. More...
 
int isoburn_igopt_get_gpt_guid (struct isoburn_imgen_opts *opts, uint8_t guid[16], int *mode)
 Inquire the current setting of isoburn_igopt_set_gpt_guid(). More...
 
int isoburn_igopt_set_disc_label (struct isoburn_imgen_opts *opts, char *label)
 Set a name for the system area. More...
 
int isoburn_igopt_get_disc_label (struct isoburn_imgen_opts *opts, char **label)
 Inquire the current setting made by isoburn_igopt_set_disc_label(). More...
 
int isoburn_igopt_set_hfsp_serial_number (struct isoburn_imgen_opts *opts, uint8_t serial_number[8])
 Set a serial number for the HFS+ extension of the emerging ISO image. More...
 
int isoburn_igopt_get_hfsp_serial_number (struct isoburn_imgen_opts *opts, uint8_t serial_number[8])
 Inquire the current setting made by isoburn_igopt_set_disc_label() More...
 
int isoburn_igopt_set_hfsp_block_size (struct isoburn_imgen_opts *opts, int hfsp_block_size, int apm_block_size)
 Set the allocation block size for HFS+ production and the block size for layout and address unit of Apple Partition map. More...
 
int isoburn_igopt_get_hfsp_block_size (struct isoburn_imgen_opts *opts, int *hfsp_block_size, int *apm_block_size)
 Inquire the current setting made by isoburn_igopt_set_hfsp_block_size. More...
 
int isoburn_igopt_set_write_type (struct isoburn_imgen_opts *opts, int do_tao)
 Set or inquire the write type for the next write run on optical media. More...
 
int isoburn_igopt_get_write_type (struct isoburn_imgen_opts *opts, int *do_tao)
 
int isoburn_igopt_set_stdio_endsync (struct isoburn_imgen_opts *opts, int do_sync)
 Set or inquire whether a final fsync(2) is performed when updating the multi-session information of libburn stdio pseudo-drives by isoburn_activate_session(). More...
 
int isoburn_igopt_get_stdio_endsync (struct isoburn_imgen_opts *opts, int *do_sync)
 
int isoburn_conv_name_chars (struct isoburn_imgen_opts *opts, char *name, size_t name_len, char **result, size_t *result_len, int flag)
 Frontend of libisofs call iso_conv_name_chars() controlled by struct isoburn_imgen_opts rather than IsoWriteOpts. More...
 

Variables

int(* libisoburn_default_msgs_submit )(void *handle, int error_code, char msg_text[], int os_errno, char severity[], int flag) = NULL
 
void * libisoburn_default_msgs_submit_handle = NULL
 
int libisoburn_default_msgs_submit_flag = 0
 
struct isoburnisoburn_list_start = NULL
 

Function Documentation

◆ isoburn_adjust_target_iso_head()

int isoburn_adjust_target_iso_head ( struct isoburn o,
uint32_t  offst,
int  flag 
)

Check whether the size of target_iso_head matches the given partition offset.

Eventually adjust size.

Definition at line 368 of file isoburn.c.

370 {
371  uint8_t *new_buf;
372  uint32_t new_size;
373 
374  if((uint32_t) o->target_iso_head_size ==
375  Libisoburn_target_head_sizE + 2048 * offst)
376  return(1);
377  new_size= Libisoburn_target_head_sizE + 2048 * offst;
378  new_buf= calloc(1, new_size);
379  if(new_buf == NULL) {
380  isoburn_msgs_submit(o, 0x00060000,
381  "Cannot re-allocate overwrite buffer", 0, "FATAL", 0);
382  return(-1);
383  }
384  memcpy(new_buf, o->target_iso_head,
385  (uint32_t) o->target_iso_head_size < new_size ?
386  (uint32_t) o->target_iso_head_size : new_size);
387  free(o->target_iso_head);
388  o->target_iso_head= new_buf;
389  o->target_iso_head_size= new_size;
390  if(o->nwa == o->zero_nwa)
393  return(1);
394 }
int isoburn_msgs_submit(struct isoburn *o, int error_code, char msg_text[], int os_errno, char severity[], int flag)
Definition: isoburn.c:340
#define Libisoburn_overwriteable_starT
Definition: isoburn.h:811
#define Libisoburn_target_head_sizE
Definition: isoburn.h:51
int nwa
Definition: isoburn.h:104
uint8_t * target_iso_head
Definition: isoburn.h:134
int zero_nwa
Definition: isoburn.h:98
int target_iso_head_size
Definition: isoburn.h:133

References isoburn_msgs_submit(), Libisoburn_overwriteable_starT, Libisoburn_target_head_sizE, isoburn::nwa, isoburn::target_iso_head, isoburn::target_iso_head_size, and isoburn::zero_nwa.

Referenced by isoburn_inspect_partition(), and isoburn_make_iso_write_opts().

◆ isoburn_by_idx()

int isoburn_by_idx ( struct isoburn o,
int  idx,
struct isoburn **  pt,
int  flag 
)

Definition at line 302 of file isoburn.c.

305 {
306  int i,abs_idx;
307  struct isoburn *npt;
308 
309  if(flag&2)
310  for(;o->prev!=NULL;o= o->prev);
311  abs_idx= (idx>0?idx:-idx);
312  *pt= o;
313  for(i= 0;(i<abs_idx || (flag&1)) && *pt!=NULL;i++) {
314  if(idx>0)
315  npt= o->next;
316  else
317  npt= o->prev;
318  if(npt==NULL && (flag&1))
319  break;
320  *pt= npt;
321  }
322  return(*pt!=NULL);
323 }
struct isoburn * prev
Definition: isoburn.h:79
struct isoburn * next
Definition: isoburn.h:80

References isoburn::next, and isoburn::prev.

◆ isoburn_cancel_prepared_write()

int isoburn_cancel_prepared_write ( struct burn_drive *  input_drive,
struct burn_drive *  output_drive,
int  flag 
)

Revoke isoburn_prepare_*() instead of running isoburn_disc_write().

libisofs reserves resources and maybe already starts generating the image stream when one of above three calls is performed. It is mandatory to either run isoburn_disc_write() or to revoke the preparations by the call described here. If this call returns 0 or 1 then the write thread of libisofs has ended.

Since
0.1.0
Parameters
input_driveThe drive or in_drive which was used with the preparation call.
output_driveThe out_drive used with isoburn_prepare_new_image(), NULL if none.
flagBitfield, submit 0 for now. bit0= -reserved for internal use-
Returns
<0 error, 0= no pending preparations detectable, 1 = canceled

Definition at line 767 of file isoburn.c.

769 {
770  int ret;
771  struct isoburn *o= NULL;
772 
773  if(output_drive!=NULL) {
774  ret= isoburn_find_emulator(&o, output_drive, 0);
775  if(ret<0 || o==NULL)
776  o= NULL;
777  else if(o->iso_source==NULL)
778  o= NULL;
779  }
780  if(o==NULL) {
781  ret= isoburn_find_emulator(&o, d, 0);
782  if(ret<0)
783  return(-1);
784  if(o==NULL)
785  return(0);
786  if(o->iso_source==NULL)
787  return(0);
788  }
789  if(o->iso_source->read!=NULL)
790  return(0);
791  if(o->iso_source->version<1)
792  return(0);
793  o->iso_source->cancel(o->iso_source);
794  burn_source_free(o->iso_source);
795  o->iso_source= NULL;
796  return(1);
797 }
int isoburn_find_emulator(struct isoburn **pt, struct burn_drive *drive, int flag)
Retrieve medium emulation and eventual isoburn emulator of drive.
Definition: burn_wrap.c:627
struct burn_source * iso_source
Definition: isoburn.h:154

References isoburn::iso_source, and isoburn_find_emulator().

Referenced by isoburn_sync_after_write(), Xorriso_pacifier_loop(), and Xorriso_write_session().

◆ isoburn_conv_name_chars()

int isoburn_conv_name_chars ( struct isoburn_imgen_opts opts,
char *  name,
size_t  name_len,
char **  result,
size_t *  result_len,
int  flag 
)

Frontend of libisofs call iso_conv_name_chars() controlled by struct isoburn_imgen_opts rather than IsoWriteOpts.

See libisofs.h for a more detailed description.

Since
1.3.6
Parameters
optsDefines options like output charset, UCS-2 versus UTF-16 for Joliet, and naming restrictions.
nameThe input text which shall be converted.
name_lenThe number of bytes in input text.
resultWill return the conversion result in case of success. Terminated by a trailing zero byte. Use free() to dispose it when no longer needed.
result_lenWill return the number of bytes in result (excluding trailing zero)
flagBitfield for control purposes. bit0-bit7= Name space 0= generic (to_charset is valid, no reserved characters, no length limits) 1= Rock Ridge (to_charset is valid) 2= Joliet (to_charset gets overridden by UCS-2 or UTF-16) 3= ECMA-119 (to_charset gets overridden by the dull ISO 9660 subset of ASCII) 4= HFS+ (to_charset gets overridden by UTF-16BE) bit8= Treat input text as directory name (matters for Joliet and ECMA-119) bit9= Do not issue error messages bit15= Reverse operation (best to be done only with results of previous conversions)
Returns
1 means success, <=0 means error

Definition at line 2038 of file isoburn.c.

2041 {
2042  int ret;
2043  IsoWriteOpts *wopts= NULL;
2044 
2045  ret = iso_write_opts_new(&wopts, 0);
2046  if (ret < 0) {
2047  isoburn_report_iso_error(ret, "Cannot create iso_write_opts", 0, "FATAL",0);
2048  goto ex;
2049  }
2050  ret= isoburn_make_iso_write_opts(NULL, opts, 0, wopts, 0);
2051  if(ret < 0)
2052  goto ex;
2053  ret= iso_conv_name_chars(wopts, name, name_len, result, result_len, flag);
2054 ex:;
2055  if(wopts != NULL)
2056  iso_write_opts_free(wopts);
2057  return(ret);
2058 }
int isoburn_report_iso_error(int iso_error_code, char msg_text[], int os_errno, char min_severity[], int flag)
Definition: burn_wrap.c:1221
static int isoburn_make_iso_write_opts(struct isoburn *out_o, struct isoburn_imgen_opts *opts, int fifo_chunks, IsoWriteOpts *wopts, int flag)
Definition: isoburn.c:402

References isoburn_make_iso_write_opts(), and isoburn_report_iso_error().

Referenced by Xorriso_test_outchar().

◆ isoburn_count()

int isoburn_count ( struct isoburn o,
int  flag 
)

Definition at line 289 of file isoburn.c.

291 {
292  int counter= 0;
293 
294  if(flag&2)
295  for(;o->prev!=NULL;o= o->prev);
296  for(;o!=NULL;o= o->next)
297  counter++;
298  return(counter);
299 }

References isoburn::next, and isoburn::prev.

◆ isoburn_destroy()

int isoburn_destroy ( struct isoburn **  objpt,
int  flag 
)

Definition at line 178 of file isoburn.c.

179 {
180  struct isoburn *o;
181 
182  o= *objpt;
183  if(o==NULL)
184  return(0);
185 
186  /* >>> mutex */
187 
188  if(o==isoburn_list_start)
190  if(o->prev!=NULL)
191  o->prev->next= o->next;
192  if(o->next!=NULL)
193  o->next->prev= o->prev;
194 
195  /* >>> end mutex */
196 
197  if(o->image!=NULL)
198  iso_image_unref(o->image);
199  if(o->toc!=NULL)
200  isoburn_toc_entry_destroy(&(o->toc), 1); /* all */
201  if(o->iso_source!=NULL)
202  burn_source_free(o->iso_source);
203  if(o->iso_data_source!=NULL)
204  iso_data_source_unref(o->iso_data_source);
205  if(o->target_iso_head != NULL)
206  free(o->target_iso_head);
207  free((char *) o);
208  *objpt= NULL;
209  return(1);
210 }
int isoburn_toc_entry_destroy(struct isoburn_toc_entry **o, int flag)
Definition: isoburn.c:89
struct isoburn * isoburn_list_start
Definition: isoburn.c:112
struct isoburn_toc_entry * toc
Definition: isoburn.h:123
IsoDataSource * iso_data_source
Definition: isoburn.h:149
IsoImage * image
Definition: isoburn.h:142

References isoburn::image, isoburn::iso_data_source, isoburn::iso_source, isoburn_list_start, isoburn_toc_entry_destroy(), isoburn::next, isoburn::prev, isoburn::target_iso_head, and isoburn::toc.

Referenced by isoburn_destroy_all(), isoburn_drive_aquire(), isoburn_drive_grab(), isoburn_drive_release(), isoburn_new(), and isoburn_welcome_media().

◆ isoburn_destroy_all()

int isoburn_destroy_all ( struct isoburn **  objpt,
int  flag 
)

Definition at line 213 of file isoburn.c.

214 {
215  struct isoburn *o,*n;
216 
217  o= *objpt;
218  if(o==NULL)
219  return(0);
220  for(;o->prev!=NULL;o= o->prev);
221  for(;o!=NULL;o= n) {
222  n= o->next;
223  isoburn_destroy(&o,0);
224  }
225  *objpt= NULL;
226  return(1);
227 }
int isoburn_destroy(struct isoburn **objpt, int flag)
Definition: isoburn.c:178

References isoburn_destroy(), isoburn::next, and isoburn::prev.

Referenced by isoburn_finish(), and isoburn_initialize().

◆ isoburn_find_by_drive()

int isoburn_find_by_drive ( struct isoburn **  pt,
struct burn_drive *  d,
int  flag 
)

Definition at line 326 of file isoburn.c.

327 {
328  struct isoburn *o;
329 
330  *pt= NULL;
331  for(o= isoburn_list_start;o!=NULL;o= o->next)
332  if(o->drive==d) {
333  *pt= o;
334  return(1);
335  }
336  return(0);
337 }
struct burn_drive * drive
Definition: isoburn.h:70

References isoburn::drive, isoburn_list_start, and isoburn::next.

Referenced by isoburn_disc_get_status().

◆ isoburn_get_next()

int isoburn_get_next ( struct isoburn o,
struct isoburn **  pt,
int  flag 
)

Definition at line 244 of file isoburn.c.

245 {
246  *pt= o->next;
247  return(1);
248 }

References isoburn::next.

◆ isoburn_get_prev()

int isoburn_get_prev ( struct isoburn o,
struct isoburn **  pt,
int  flag 
)

Definition at line 237 of file isoburn.c.

238 {
239  *pt= o->prev;
240  return(1);
241 }

References isoburn::prev.

◆ isoburn_get_target_image()

int isoburn_get_target_image ( struct isoburn o,
IsoImage **  pt,
int  flag 
)

Definition at line 230 of file isoburn.c.

231 {
232  *pt= o->image;
233  return(1);
234 }

References isoburn::image.

◆ isoburn_igopt_attach_jte()

int isoburn_igopt_attach_jte ( struct isoburn_imgen_opts opts,
void *  libjte_handle 
)

Associate a libjte environment object to the upcoming write run.

libjte implements Jigdo Template Extraction as of Steve McIntyre and Richard Atterer. A non-NULL libjte_handle will cause failure to write if libjte was not enabled in libisofs at compile time.

Since
0.6.4
Parameters
optsThe option set to work on
libjte_handlePointer to a struct libjte_env e.g. created by libjte_new(). It must stay existent from the start of image writing by isoburn_prepare_*() until the write thread has ended. E.g. until libburn indicates the end of its write run.
Returns
1 success, <=0 failure

Definition at line 1621 of file isoburn.c.

1623 {
1624  opts->libjte_handle = libjte_handle;
1625  return 1;
1626 }
void * libjte_handle
Definition: isoburn.h:691

References isoburn_imgen_opts::libjte_handle.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_destroy()

int isoburn_igopt_destroy ( struct isoburn_imgen_opts **  o,
int  flag 
)

Deletes an option set which was created by isoburn_igopt_new().

Since
0.1.0
Parameters
oThe option set to give up
flagBitfield for control purposes. Submit 0 for now.
Returns
1= **o destroyed , 0= *o was already NULL (harmless)

Definition at line 1216 of file isoburn.c.

1217 {
1218  int i;
1219 
1220  if(*o==NULL)
1221  return(0);
1222  if((*o)->rr_reloc_dir != NULL)
1223  free((*o)->rr_reloc_dir);
1224  if((*o)->prep_partition != NULL)
1225  free((*o)->prep_partition);
1226  if((*o)->efi_boot_partition != NULL)
1227  free((*o)->efi_boot_partition);
1228  for(i= 0; i < Libisoburn_max_appended_partitionS; i++)
1229  if((*o)->appended_partitions[i] != NULL)
1230  free((*o)->appended_partitions[i]);
1231  if ((*o)->system_area_data != NULL)
1232  free((*o)->system_area_data);
1233  free(*o);
1234  *o= NULL;
1235  return(1);
1236 }
#define Libisoburn_max_appended_partitionS
Definition: isoburn.h:57

References Libisoburn_max_appended_partitionS.

Referenced by Xorriso_relax_compliance(), Xorriso_test_outchar(), and Xorriso_write_session().

◆ isoburn_igopt_detach_jte()

int isoburn_igopt_detach_jte ( struct isoburn_imgen_opts opts,
void **  libjte_handle 
)

Remove eventual association to a libjte environment handle.

Since
0.6.4
Parameters
optsThe option set to work on
libjte_handleIf not submitted as NULL, this will return the previously set libjte handle.
Returns
1 success, <=0 failure

Definition at line 1629 of file isoburn.c.

1631 {
1632  if(libjte_handle != NULL)
1633  *libjte_handle = opts->libjte_handle;
1634  opts->libjte_handle = NULL;
1635  return 1;
1636 }

References isoburn_imgen_opts::libjte_handle.

◆ isoburn_igopt_get_appended_as_apm()

int isoburn_igopt_get_appended_as_apm ( struct isoburn_imgen_opts opts,
int *  apm 
)

Inquire the current setting made by isoburn_igopt_set_appended_as_apm().

Since
1.4.4
Parameters
optsThe option set to be inquired.
apmReturns the current value.
Returns
<=0 = error, 1 = success

Definition at line 1854 of file isoburn.c.

1856 {
1857  *apm= opts->appended_as_apm;
1858  return(1);
1859 }

References isoburn_imgen_opts::appended_as_apm.

◆ isoburn_igopt_get_appended_as_gpt()

int isoburn_igopt_get_appended_as_gpt ( struct isoburn_imgen_opts opts,
int *  gpt 
)

Inquire the current setting made by isoburn_igopt_set_appended_as_gpt().

Since
1.4.0
Parameters
optsThe option set to be inquired.
gptReturns the current value.
Returns
<=0 = error, 1 = success

Definition at line 1797 of file isoburn.c.

1799 {
1800  *gpt= opts->appended_as_gpt;
1801  return(1);
1802 }

References isoburn_imgen_opts::appended_as_gpt.

◆ isoburn_igopt_get_data_start()

int isoburn_igopt_get_data_start ( struct isoburn_imgen_opts o,
int *  lba 
)

Obtain after image preparation the lowest block address of file content data.

Failure can occur if libisofs is too old to provide this information, if the result exceeds 31 bit, or if the call is made before image preparation. This value cannot be set by the application but only be inquired.

Since
0.3.6
Parameters
oThe option set to work on
lbaThe block number of the session start on the medium. <0 means that no address has been determined yet.
Returns
1 success, <=0 failure

Definition at line 1503 of file isoburn.c.

1504 {
1505  *lba= o->data_start_lba;
1506  return(1);
1507 }
int data_start_lba
Output value: Block address of data section start as predicted by libisofs.
Definition: isoburn.h:639

References isoburn_imgen_opts::data_start_lba.

Referenced by Xorriso_write_session().

◆ isoburn_igopt_get_disc_label()

int isoburn_igopt_get_disc_label ( struct isoburn_imgen_opts opts,
char **  label 
)

Inquire the current setting made by isoburn_igopt_set_disc_label().

Since
0.6.6
Parameters
optsThe option set to be inquired.
labelReturns a pointer to the currently set label string. Do not alter this string. Use only as long as the opts object exists.
Returns
<=0 = error, 1 = success

Definition at line 1948 of file isoburn.c.

1949 {
1950  *label= opts->ascii_disc_label;
1951  return(1);
1952 }
char ascii_disc_label[129]
Definition: isoburn.h:747

References isoburn_imgen_opts::ascii_disc_label.

◆ isoburn_igopt_get_effective_lba()

int isoburn_igopt_get_effective_lba ( struct isoburn_imgen_opts o,
int *  lba 
)

Obtain after image preparation the block address where the session will start on the medium.

This value cannot be set by the application but only be inquired.

Since
0.1.4
Parameters
oThe option set to work on
lbaThe block number of the session start on the medium. <0 means that no address has been determined yet.
Returns
1 success, <=0 failure

Definition at line 1496 of file isoburn.c.

1497 {
1498  *lba= o->effective_lba;
1499  return(1);
1500 }
int effective_lba
Output value: Block address of session start as evaluated from medium and other options by libisoburn...
Definition: isoburn.h:632

References isoburn_imgen_opts::effective_lba.

Referenced by Xorriso_write_session().

◆ isoburn_igopt_get_efi_bootp()

int isoburn_igopt_get_efi_bootp ( struct isoburn_imgen_opts opts,
char **  path,
int  flag 
)

Definition at line 1702 of file isoburn.c.

1704 {
1705  *path= opts->efi_boot_partition;
1706  if(flag & 1)
1707  return(1 + (opts->efi_boot_part_flag & 0x3fffffff));
1708  return(1);
1709 }
int efi_boot_part_flag
Definition: isoburn.h:701
char * efi_boot_partition
Definition: isoburn.h:700

References isoburn_imgen_opts::efi_boot_part_flag, and isoburn_imgen_opts::efi_boot_partition.

◆ isoburn_igopt_get_extensions()

int isoburn_igopt_get_extensions ( struct isoburn_imgen_opts o,
int *  ext 
)

Definition at line 1271 of file isoburn.c.

1272 {
1273  *ext= (!!o->rockridge) | ((!!o->joliet)<<1) | ((!!o->iso1999)<<2) |
1274  ((!!o->hardlinks) << 3) | ((!!o->aaip) << 5) |
1275  ((!!o->session_md5) << 6) | ((o->file_md5 & 3) << 7) |
1276  ((!!o->no_emul_toc) << 9) | ((o->will_cancel) << 10) |
1277  ((!!o->old_empty) << 11) | ((!!o->hfsplus) << 12) |
1278  ((!!o->fat) << 13);
1279  return(1);
1280 }
unsigned int fat
Definition: isoburn.h:422
unsigned int hfsplus
Definition: isoburn.h:421
unsigned int no_emul_toc
Definition: isoburn.h:441
unsigned int aaip
Definition: isoburn.h:428
unsigned int session_md5
Definition: isoburn.h:431
unsigned int joliet
Definition: isoburn.h:419
unsigned int old_empty
Definition: isoburn.h:447
unsigned int iso1999
Definition: isoburn.h:420
unsigned int file_md5
Definition: isoburn.h:436
unsigned int rockridge
Which extensions to support.
Definition: isoburn.h:418
unsigned int hardlinks
Definition: isoburn.h:425

References isoburn_imgen_opts::aaip, isoburn_imgen_opts::fat, isoburn_imgen_opts::file_md5, isoburn_imgen_opts::hardlinks, isoburn_imgen_opts::hfsplus, isoburn_imgen_opts::iso1999, isoburn_imgen_opts::joliet, isoburn_imgen_opts::no_emul_toc, isoburn_imgen_opts::old_empty, isoburn_imgen_opts::rockridge, isoburn_imgen_opts::session_md5, and isoburn_imgen_opts::will_cancel.

◆ isoburn_igopt_get_fifo_size()

int isoburn_igopt_get_fifo_size ( struct isoburn_imgen_opts o,
int *  fifo_size 
)

Definition at line 1489 of file isoburn.c.

1490 {
1491  *fifo_size= o->fifo_size;
1492  return(1);
1493 }
int fifo_size
The number of bytes to be used for the fifo which decouples libisofs and libburn for better throughpu...
Definition: isoburn.h:624

References isoburn_imgen_opts::fifo_size.

◆ isoburn_igopt_get_gpt_guid()

int isoburn_igopt_get_gpt_guid ( struct isoburn_imgen_opts opts,
uint8_t  guid[16],
int *  mode 
)

Inquire the current setting of isoburn_igopt_set_gpt_guid().

Since
1.4.6
Parameters
optsThe option set to be inquired.
guidReturns the current guid if current mode is 1.
modeReturns the current value.
Returns
<=0 = error, 1 = success

Definition at line 1930 of file isoburn.c.

1932 {
1933  if(opts->gpt_guid_mode == 1)
1934  memcpy(guid, opts->gpt_guid, 16);
1935  *mode = opts->gpt_guid_mode;
1936  return(1);
1937 }
uint8_t gpt_guid[16]
Definition: isoburn.h:742

References isoburn_imgen_opts::gpt_guid, and isoburn_imgen_opts::gpt_guid_mode.

◆ isoburn_igopt_get_hfsp_block_size()

int isoburn_igopt_get_hfsp_block_size ( struct isoburn_imgen_opts opts,
int *  hfsp_block_size,
int *  apm_block_size 
)

Inquire the current setting made by isoburn_igopt_set_hfsp_block_size.

Since
1.2.4
Parameters
optsThe option set to be inquired.
hfsp_block_sizeWill be set to a value as described above. Except -1.
apm_block_sizeWill be set to a value as described above. Except -1.
Returns
<=0 = error, 1 = success

Definition at line 2000 of file isoburn.c.

2002 {
2003  *hfsp_block_size= opts->hfsp_block_size;
2004  *apm_block_size= opts->apm_block_size;
2005  return(1);
2006 }

References isoburn_imgen_opts::apm_block_size, and isoburn_imgen_opts::hfsp_block_size.

◆ isoburn_igopt_get_hfsp_serial_number()

int isoburn_igopt_get_hfsp_serial_number ( struct isoburn_imgen_opts opts,
uint8_t  serial_number[8] 
)

Inquire the current setting made by isoburn_igopt_set_disc_label()

Since
1.2.4
Parameters
optsThe option set to be inquired.
serial_numberWill get filled with the current setting.
Returns
<=0 = error, 1 = success

Definition at line 1963 of file isoburn.c.

1965 {
1966  memcpy(serial_number, opts->hfsp_serial_number, 8);
1967  return(1);
1968 }
uint8_t hfsp_serial_number[8]
Definition: isoburn.h:752

References isoburn_imgen_opts::hfsp_serial_number.

◆ isoburn_igopt_get_iso_mbr_part_type()

int isoburn_igopt_get_iso_mbr_part_type ( struct isoburn_imgen_opts opts,
int *  part_type 
)

Inquire the current setting of isoburn_igopt_set_iso_mbr_part_type().

Since
1.4.8
Parameters
optsThe option set to be inquired.
part_typeReturns the current value: -1, 0x00 to 0xff.
Returns
<=0 = error, 1 = success

Definition at line 1888 of file isoburn.c.

1890 {
1891  *part_type= opts->iso_mbr_part_type;
1892  return(1);
1893 }

References isoburn_imgen_opts::iso_mbr_part_type.

◆ isoburn_igopt_get_iso_type_guid()

int isoburn_igopt_get_iso_type_guid ( struct isoburn_imgen_opts opts,
uint8_t  guid[16] 
)

Inquire the current setting of isoburn_igopt_set_iso_type_guid().

Since
1.5.2
Parameters
optsThe option set to be inquired.
guidGets filled with the 16 bytes of GUID.
Returns
<= error, 0= guid is invalid, 1 = guid is valid

Definition at line 1906 of file isoburn.c.

1908 {
1909  memcpy(guid, opts->iso_gpt_type_guid, 16);
1910  return(opts->iso_gpt_flag & 1);
1911 }
uint8_t iso_gpt_type_guid[16]
Definition: isoburn.h:735

References isoburn_imgen_opts::iso_gpt_flag, and isoburn_imgen_opts::iso_gpt_type_guid.

◆ isoburn_igopt_get_level()

int isoburn_igopt_get_level ( struct isoburn_imgen_opts o,
int *  level 
)

Definition at line 1246 of file isoburn.c.

1247 {
1248  *level= o->level;
1249  return(1);
1250 }
int level
ISO level to write at.
Definition: isoburn.h:415

References isoburn_imgen_opts::level.

◆ isoburn_igopt_get_out_charset()

int isoburn_igopt_get_out_charset ( struct isoburn_imgen_opts o,
char **  output_charset 
)

Definition at line 1474 of file isoburn.c.

1476 {
1477  *output_charset= o->output_charset;
1478  return(1);
1479 }
char * output_charset
gid to use when replace_gid == 2.
Definition: isoburn.h:612

References isoburn_imgen_opts::output_charset.

◆ isoburn_igopt_get_over_mode()

int isoburn_igopt_get_over_mode ( struct isoburn_imgen_opts o,
int *  replace_dir_mode,
int *  replace_file_mode,
mode_t *  dir_mode,
mode_t *  file_mode 
)

Definition at line 1431 of file isoburn.c.

1434 {
1435  *replace_dir_mode= o->replace_dir_mode%3;
1436  *replace_file_mode= o->replace_file_mode%3;
1437  *dir_mode= o->dir_mode;
1438  *file_mode= o->file_mode;
1439  return(1);
1440 }
unsigned int replace_dir_mode
The following options set the default values for files and directory permissions, gid and uid.
Definition: isoburn.h:602
mode_t file_mode
Mode to use on dirs when replace_dir_mode == 2.
Definition: isoburn.h:608
unsigned int replace_file_mode
Definition: isoburn.h:603

References isoburn_imgen_opts::dir_mode, isoburn_imgen_opts::file_mode, isoburn_imgen_opts::replace_dir_mode, and isoburn_imgen_opts::replace_file_mode.

◆ isoburn_igopt_get_over_ugid()

int isoburn_igopt_get_over_ugid ( struct isoburn_imgen_opts o,
int *  replace_uid,
int *  replace_gid,
uid_t *  uid,
gid_t *  gid 
)

Definition at line 1454 of file isoburn.c.

1457 {
1458  *replace_uid= o->replace_uid%3;
1459  *replace_gid= o->replace_gid%3;
1460  *uid= o->uid;
1461  *gid= o->gid;
1462  return(1);
1463 }
unsigned int replace_uid
Definition: isoburn.h:604
uid_t uid
Mode to use on files when replace_file_mode == 2.
Definition: isoburn.h:609
unsigned int replace_gid
Definition: isoburn.h:605
gid_t gid
uid to use when replace_uid == 2.
Definition: isoburn.h:610

References isoburn_imgen_opts::gid, isoburn_imgen_opts::replace_gid, isoburn_imgen_opts::replace_uid, and isoburn_imgen_opts::uid.

◆ isoburn_igopt_get_part_flags()

int isoburn_igopt_get_part_flags ( struct isoburn_imgen_opts opts,
int  num_entries,
int  part_flags[] 
)

Inquire the current settings made by isoburn_igopt_set_part_flags().

Since
1.4.0
Parameters
optsThe option set to be inquired.
num_entriesNumber of array elements in part_flags[].
part_flagsThe array elements 0 to num_entries - 1 will get filled by the flag bits of the images of the corresponding partition.
Returns
<0 = error 0 = no partition image set >0 highest used partition number

Definition at line 1774 of file isoburn.c.

1776 {
1777  int i, max_entry= 0;
1778 
1779  for(i= 0; i < num_entries; i++)
1780  part_flags[i]= 0;
1781  for(i= 0; i < Libisoburn_max_appended_partitionS; i++) {
1782  if(i < num_entries)
1783  part_flags[i]= opts->appended_part_flags[i];
1784  max_entry= i + 1;
1785  }
1786  return(max_entry);
1787 }
int appended_part_flags[8]
Definition: isoburn.h:709

References isoburn_imgen_opts::appended_part_flags, and Libisoburn_max_appended_partitionS.

◆ isoburn_igopt_get_part_like_isohybrid()

int isoburn_igopt_get_part_like_isohybrid ( struct isoburn_imgen_opts opts,
int *  alike 
)

Inquire the current setting of isoburn_igopt_set_part_like_isohybrid().

Since
1.4.4
Parameters
optsThe option set to be inquired.
alikeReturns the current value.
Returns
<=0 = error, 1 = success

Definition at line 1870 of file isoburn.c.

1872 {
1873  *alike= opts->part_like_isohybrid;
1874  return(1);
1875 }
int part_like_isohybrid
Definition: isoburn.h:727

References isoburn_imgen_opts::part_like_isohybrid.

◆ isoburn_igopt_get_part_offset()

int isoburn_igopt_get_part_offset ( struct isoburn_imgen_opts opts,
uint32_t *  block_offset_2k,
int *  secs_512_per_head,
int *  heads_per_cyl 
)

Definition at line 1610 of file isoburn.c.

1613 {
1614  *block_offset_2k = opts->partition_offset;
1615  *secs_512_per_head = opts->partition_secs_per_head;
1616  *heads_per_cyl = opts->partition_heads_per_cyl;
1617  return 1;
1618 }
int partition_secs_per_head
Definition: isoburn.h:685
int partition_heads_per_cyl
Definition: isoburn.h:687
uint32_t partition_offset
Definition: isoburn.h:683

References isoburn_imgen_opts::partition_heads_per_cyl, isoburn_imgen_opts::partition_offset, and isoburn_imgen_opts::partition_secs_per_head.

◆ isoburn_igopt_get_part_type_guid()

int isoburn_igopt_get_part_type_guid ( struct isoburn_imgen_opts opts,
int  num_entries,
uint8_t  guids[][16],
int  valids[] 
)

Inquire the current settings made by isoburn_igopt_set_part_type_guid().

Since
1.5.2
Parameters
optsThe option set to be inquired.
num_entriesNumber of array elements in part_flags[].
type_guidsThe array elements 0 to num_entries - 1 will get filled by the 16 flag bits of the images of the corresponding partition.
validsThe array elements 0 to num_entries - 1 will get filled by 1 or 0 to indicate whether the corresponding type_guids element is valid.
Returns
<0 = error 0 = no partition image set >0 highest used partition number

Definition at line 1827 of file isoburn.c.

1830 {
1831  int i, max_entry= 0;
1832 
1833  for(i= 0; i < num_entries; i++) {
1834  memset(guids[i], 0, 16);
1835  valids[i]= 0;
1836  }
1837  for(i= 0; i < Libisoburn_max_appended_partitionS; i++) {
1838  if(i < num_entries) {
1839  memcpy(guids[i], opts->appended_part_type_guids[i], 16);
1840  valids[i]= opts->appended_part_gpt_flags[i] & 1;
1841  }
1842  max_entry= i + 1;
1843  }
1844  return(max_entry);
1845 }
uint8_t appended_part_type_guids[8][16]
Definition: isoburn.h:710
uint8_t appended_part_gpt_flags[8]
Definition: isoburn.h:715

References isoburn_imgen_opts::appended_part_gpt_flags, isoburn_imgen_opts::appended_part_type_guids, and Libisoburn_max_appended_partitionS.

◆ isoburn_igopt_get_partition_img()

int isoburn_igopt_get_partition_img ( struct isoburn_imgen_opts opts,
int  num_entries,
uint8_t  partition_types[],
char *  image_paths[] 
)

Inquire the current settings made by isoburn_igopt_set_partition_img().

Since
0.6.4
Parameters
optsThe option set to be inquired.
num_entriesNumber of array elements in partition_types[] and image_paths[].
partition_typesThe partition type associated with the partition. Valid only if image_paths[] of the same index is not NULL.
image_pathsIts elements get filled with either NULL or a pointer to a string with a file address or an empty text.
Returns
<0 = error 0 = no partition image set >0 highest used partition number

Definition at line 1735 of file isoburn.c.

1739 {
1740  int i, max_entry= 0;
1741 
1742  for(i= 0; i < num_entries; i++)
1743  image_paths[i]= NULL;
1744  for(i= 0; i < Libisoburn_max_appended_partitionS; i++) {
1745  if(opts->appended_partitions[i] == NULL)
1746  continue;
1747  if(i < num_entries) {
1748  image_paths[i]= opts->appended_partitions[i];
1749  partition_types[i]= opts->appended_part_types[i];
1750  }
1751  max_entry= i + 1;
1752  }
1753  return(max_entry);
1754 }
uint8_t appended_part_types[8]
Definition: isoburn.h:708
char * appended_partitions[8]
Definition: isoburn.h:707

References isoburn_imgen_opts::appended_part_types, isoburn_imgen_opts::appended_partitions, and Libisoburn_max_appended_partitionS.

◆ isoburn_igopt_get_prep_partition()

int isoburn_igopt_get_prep_partition ( struct isoburn_imgen_opts opts,
char **  path,
int  flag 
)

Definition at line 1673 of file isoburn.c.

1675 {
1676  *path= opts->prep_partition;
1677  if(flag & 1)
1678  return(1 + (opts->prep_part_flag & 0x3fffffff));
1679  return(1);
1680 }
char * prep_partition
Definition: isoburn.h:698

References isoburn_imgen_opts::prep_part_flag, and isoburn_imgen_opts::prep_partition.

◆ isoburn_igopt_get_pvd_times()

int isoburn_igopt_get_pvd_times ( struct isoburn_imgen_opts opts,
time_t *  vol_creation_time,
time_t *  vol_modification_time,
time_t *  vol_expiration_time,
time_t *  vol_effective_time,
char  vol_uuid[17] 
)

Definition at line 1583 of file isoburn.c.

1587 {
1588  *vol_creation_time = opts->vol_creation_time;
1589  *vol_modification_time = opts->vol_modification_time;
1590  *vol_expiration_time = opts->vol_expiration_time;
1591  *vol_effective_time = opts->vol_effective_time;
1592  strcpy(vol_uuid, opts->vol_uuid);
1593  return(1);
1594 }
time_t vol_creation_time
Definition: isoburn.h:671
char vol_uuid[17]
Definition: isoburn.h:677
time_t vol_expiration_time
Definition: isoburn.h:673
time_t vol_modification_time
Definition: isoburn.h:672
time_t vol_effective_time
Definition: isoburn.h:674

References isoburn_imgen_opts::vol_creation_time, isoburn_imgen_opts::vol_effective_time, isoburn_imgen_opts::vol_expiration_time, isoburn_imgen_opts::vol_modification_time, and isoburn_imgen_opts::vol_uuid.

◆ isoburn_igopt_get_relaxed()

int isoburn_igopt_get_relaxed ( struct isoburn_imgen_opts o,
int *  relax 
)

Definition at line 1309 of file isoburn.c.

1310 {
1311  *relax= (!!o->omit_version_numbers) | ((!!o->allow_deep_paths)<<1) |
1312  ((!!o->allow_longer_paths)<<2) | ((!!o->max_37_char_filenames)<<3) |
1313  ((!!(o->no_force_dots & 1))<<4)| ((!!o->allow_lowercase)<<5) |
1314  ((!!o->allow_full_ascii)<<6) | ((!!o->joliet_longer_paths)<<7) |
1315  ((!!o->always_gmt)<<8) | ((!!o->rrip_version_1_10)<<9) |
1316  ((!!o->dir_rec_mtime)<<10) | ((!!o->aaip_susp_1_10)<<11) |
1317  ((!!(o->omit_version_numbers & 2))<<12) |
1318  ((!!(o->no_force_dots & 2))<<13) |
1319  ((!!o->allow_dir_id_ext) << 14) |
1320  ((!!o->joliet_long_names) << 15) |
1321  ((!!o->joliet_rec_mtime) << 16) |
1322  ((!!o->iso1999_rec_mtime) << 17) |
1323  ((!!o->allow_full_ascii) << 18) |
1324  ((!!o->joliet_utf16) << 19);
1325  return(1);
1326 }
unsigned int allow_dir_id_ext
Definition: isoburn.h:473
unsigned int iso1999_rec_mtime
Definition: isoburn.h:579
unsigned int joliet_rec_mtime
Definition: isoburn.h:578
unsigned int allow_lowercase
Allow lowercase characters in ISO-9660 filenames.
Definition: isoburn.h:529
unsigned int no_force_dots
ISO-9660 forces filenames to have a ".", that separates file name from extension.
Definition: isoburn.h:523
unsigned int allow_deep_paths
Allow ISO-9660 directory hierarchy to be deeper than 8 levels.
Definition: isoburn.h:486
unsigned int joliet_longer_paths
Allow paths in the Joliet tree to have more than 240 characters.
Definition: isoburn.h:547
unsigned int joliet_utf16
Use UTF-16BE rather than its subset UCS-2.
Definition: isoburn.h:558
unsigned int always_gmt
Store timestamps as GMT rather than in local time.
Definition: isoburn.h:563
unsigned int dir_rec_mtime
Store as ECMA-119 Directory Record timestamp the mtime of the source rather than the image creation t...
Definition: isoburn.h:577
unsigned int joliet_long_names
Allow leaf names in the Joliet tree to have up to 103 characters rather than 64.
Definition: isoburn.h:553
unsigned int allow_longer_paths
Allow path in the ISO-9660 tree to have more than 255 characters.
Definition: isoburn.h:506
unsigned int rrip_version_1_10
Write Rock Ridge info as of specification RRIP-1.10 rather than RRIP-1.12: signature "RRIP_1991A" rat...
Definition: isoburn.h:570
unsigned int aaip_susp_1_10
Write AAIP as extension according to SUSP 1.10 rather than SUSP 1.12.
Definition: isoburn.h:586
unsigned int max_37_char_filenames
Allow a single file or directory hierarchy to have up to 37 characters.
Definition: isoburn.h:514
unsigned int omit_version_numbers
Omit the version number (";1") at the end of the ISO-9660 identifiers.
Definition: isoburn.h:481
unsigned int allow_full_ascii
Allow all ASCII characters to be appear on an ISO-9660 filename.
Definition: isoburn.h:535

References isoburn_imgen_opts::aaip_susp_1_10, isoburn_imgen_opts::allow_deep_paths, isoburn_imgen_opts::allow_dir_id_ext, isoburn_imgen_opts::allow_full_ascii, isoburn_imgen_opts::allow_longer_paths, isoburn_imgen_opts::allow_lowercase, isoburn_imgen_opts::always_gmt, isoburn_imgen_opts::dir_rec_mtime, isoburn_imgen_opts::iso1999_rec_mtime, isoburn_imgen_opts::joliet_long_names, isoburn_imgen_opts::joliet_longer_paths, isoburn_imgen_opts::joliet_rec_mtime, isoburn_imgen_opts::joliet_utf16, isoburn_imgen_opts::max_37_char_filenames, isoburn_imgen_opts::no_force_dots, isoburn_imgen_opts::omit_version_numbers, and isoburn_imgen_opts::rrip_version_1_10.

◆ isoburn_igopt_get_rr_reloc()

int isoburn_igopt_get_rr_reloc ( struct isoburn_imgen_opts o,
char **  name,
int *  flags 
)

Obtain the settings of isoburn_igopt_set_rr_reloc().

Since
1.2.2
Parameters
oThe option set to work on
nameWill return NULL or a pointer to the name of the relocation directory in the root directory. Do not alter or dispose the memory which holds this name.
flagsWill return the flags bitfield.
Returns
> 0 success, <= 0 failure

Definition at line 1351 of file isoburn.c.

1353 {
1354  *name= o->rr_reloc_dir;
1355  *flags= o->rr_reloc_flags;
1356  return(1);
1357 }
char * rr_reloc_dir
If not allow_deep_paths is in effect, then it may become necessary to relocate directories so that no...
Definition: isoburn.h:495

References isoburn_imgen_opts::rr_reloc_dir, and isoburn_imgen_opts::rr_reloc_flags.

◆ isoburn_igopt_get_scdbackup_tag()

int isoburn_igopt_get_scdbackup_tag ( struct isoburn_imgen_opts o,
char  name[81],
char  timestamp[19],
char **  tag_written 
)

Definition at line 1524 of file isoburn.c.

1527 {
1528  strncpy(name, o->scdbackup_tag_name, 80);
1529  name[80]= 0;
1530  strncpy(timestamp, o->scdbackup_tag_time, 18);
1531  timestamp[18]= 0;
1532  *tag_written= o->scdbackup_tag_written;
1533  return(1);
1534 }
char * scdbackup_tag_written
Definition: isoburn.h:654
char scdbackup_tag_name[81]
If not empty: Parameters "name" and "timestamp" for a scdbackup stream checksum tag.
Definition: isoburn.h:652
char scdbackup_tag_time[19]
Definition: isoburn.h:653

References isoburn_imgen_opts::scdbackup_tag_name, isoburn_imgen_opts::scdbackup_tag_time, and isoburn_imgen_opts::scdbackup_tag_written.

◆ isoburn_igopt_get_sort_files()

int isoburn_igopt_get_sort_files ( struct isoburn_imgen_opts o,
int *  value 
)

Definition at line 1412 of file isoburn.c.

1413 {
1414  *value= !!o->sort_files;
1415  return(1);
1416 }
unsigned int sort_files
If files should be sorted based on their weight.
Definition: isoburn.h:588

References isoburn_imgen_opts::sort_files.

◆ isoburn_igopt_get_stdio_endsync()

int isoburn_igopt_get_stdio_endsync ( struct isoburn_imgen_opts opts,
int *  do_sync 
)

Definition at line 2031 of file isoburn.c.

2033 {
2034  *do_sync= opts->do_fsync;
2035  return(1);
2036 }

References isoburn_imgen_opts::do_fsync.

◆ isoburn_igopt_get_system_area()

int isoburn_igopt_get_system_area ( struct isoburn_imgen_opts opts,
char  data[32768],
int *  options 
)

Definition at line 1557 of file isoburn.c.

1559 {
1560  *options= opts->system_area_options;
1561  if(opts->system_area_data == NULL)
1562  return(0);
1563  memcpy(data, opts->system_area_data, 32768);
1564  return(1);
1565 }
char * system_area_data
Definition: isoburn.h:660
int system_area_options
Definition: isoburn.h:668

References isoburn_imgen_opts::system_area_data, and isoburn_imgen_opts::system_area_options.

◆ isoburn_igopt_get_tail_blocks()

int isoburn_igopt_get_tail_blocks ( struct isoburn_imgen_opts opts,
uint32_t *  num_blocks 
)

Definition at line 1646 of file isoburn.c.

1648 {
1649  *num_blocks = opts->tail_blocks;
1650  return 1;
1651 }
uint32_t tail_blocks
Definition: isoburn.h:695

References isoburn_imgen_opts::tail_blocks.

◆ isoburn_igopt_get_untranslated_name_len()

int isoburn_igopt_get_untranslated_name_len ( struct isoburn_imgen_opts o,
int *  len 
)

Definition at line 1397 of file isoburn.c.

1399 {
1400  *len = o->untranslated_name_len;
1401  return(1);
1402 }
unsigned int untranslated_name_len
Definition: isoburn.h:464

References isoburn_imgen_opts::untranslated_name_len.

◆ isoburn_igopt_get_write_type()

int isoburn_igopt_get_write_type ( struct isoburn_imgen_opts opts,
int *  do_tao 
)

Definition at line 2018 of file isoburn.c.

2019 {
2020  *do_tao= opts->do_tao;
2021  return(1);
2022 }

References isoburn_imgen_opts::do_tao.

◆ isoburn_igopt_new()

int isoburn_igopt_new ( struct isoburn_imgen_opts **  o,
int  flag 
)

Produces a set of generation and transfer options, initialized with default values.

Since
0.1.0
Parameters
othe newly created option set object
flagBitfield for control purposes. Submit 0 for now.
Returns
1=ok , <0 = failure

Definition at line 1125 of file isoburn.c.

1126 {
1127  struct isoburn_imgen_opts *o;
1128  int i;
1129 
1130  o= (*new_o)= calloc(1, sizeof(struct isoburn_imgen_opts));
1131  if(o==NULL) {
1132  isoburn_msgs_submit(NULL, 0x00060000,
1133  "Cannot allocate memory for image generation options",
1134  0, "FATAL", 0);
1135  return(-1);
1136  }
1137  o->level= 2;
1138  o->rockridge= 1;
1139  o->joliet= 0;
1140  o->iso1999= 0;
1141  o->hardlinks= 0;
1142  o->aaip = 0;
1143  o->session_md5= 0;
1144  o->file_md5= 0;
1145  o->no_emul_toc= 0;
1146  o->old_empty= 0;
1147  o->untranslated_name_len = 0;
1148  o->allow_dir_id_ext = 0;
1149  o->omit_version_numbers= 0;
1150  o->allow_deep_paths= 1;
1151  o->rr_reloc_dir= NULL;
1152  o->rr_reloc_flags= 0;
1153  o->allow_longer_paths= 0;
1154  o->max_37_char_filenames= 0;
1155  o->no_force_dots= 0;
1156  o->allow_lowercase= 0;
1157  o->allow_full_ascii= 0;
1158  o->allow_7bit_ascii= 0;
1159  o->joliet_longer_paths= 0;
1160  o->joliet_long_names= 0;
1161  o->joliet_utf16= 0;
1162  o->always_gmt= 0;
1163  o->rrip_version_1_10= 0;
1164  o->dir_rec_mtime= 0;
1165  o->aaip_susp_1_10= 0;
1166  o->sort_files= 0;
1167  o->replace_dir_mode= 0;
1168  o->replace_file_mode= 0;
1169  o->replace_uid= 0;
1170  o->replace_gid= 0;
1171  o->dir_mode= 0555;
1172  o->file_mode= 0444;
1173  o->uid= 0;
1174  o->gid= 0;
1175  o->output_charset= NULL;
1176  o->fifo_size= 4*1024*1024;
1177  o->effective_lba= -1;
1178  o->data_start_lba= -1;
1179  o->system_area_data= NULL;
1180  o->system_area_options= 0;
1181  o->partition_offset= 0;
1184  o->vol_creation_time= 0;
1185  o->vol_modification_time= 0;
1186  o->vol_expiration_time= 0;
1187  o->vol_effective_time= 0;
1188  o->libjte_handle= NULL;
1189  o->tail_blocks= 0;
1190  o->prep_partition= NULL;
1191  o->prep_part_flag= 0;
1192  o->efi_boot_partition= NULL;
1193  o->efi_boot_part_flag= 0;
1194  for(i= 0; i < Libisoburn_max_appended_partitionS; i++) {
1195  o->appended_partitions[i]= NULL;
1196  o->appended_part_types[i]= 0;
1197  o->appended_part_flags[i]= 0;
1198  memset(o->appended_part_type_guids[i], 0, 16);
1199  o->appended_part_gpt_flags[i]= 0;
1200  }
1201  o->appended_as_gpt= 0;
1202  o->appended_as_apm= 0;
1203  o->part_like_isohybrid= 0;
1204  o->iso_mbr_part_type= -1;
1205  memset(o->gpt_guid, 0, 16);
1206  o->gpt_guid_mode= 0;
1207  memset(o->hfsp_serial_number, 0, 8);
1208  o->hfsp_block_size= 0;
1209  o->apm_block_size= 0;
1210  o->do_tao= 0;
1211  o->do_fsync= 0;
1212  return(1);
1213 }
Options for image generation by libisofs and image transport to libburn.
Definition: isoburn.h:409
unsigned int allow_7bit_ascii
Like allow_full_ascii, but only allowing 7-bit characters.
Definition: isoburn.h:542

References isoburn_imgen_opts::aaip, isoburn_imgen_opts::aaip_susp_1_10, isoburn_imgen_opts::allow_7bit_ascii, isoburn_imgen_opts::allow_deep_paths, isoburn_imgen_opts::allow_dir_id_ext, isoburn_imgen_opts::allow_full_ascii, isoburn_imgen_opts::allow_longer_paths, isoburn_imgen_opts::allow_lowercase, isoburn_imgen_opts::always_gmt, isoburn_imgen_opts::apm_block_size, isoburn_imgen_opts::appended_as_apm, isoburn_imgen_opts::appended_as_gpt, isoburn_imgen_opts::appended_part_flags, isoburn_imgen_opts::appended_part_gpt_flags, isoburn_imgen_opts::appended_part_type_guids, isoburn_imgen_opts::appended_part_types, isoburn_imgen_opts::appended_partitions, isoburn_imgen_opts::data_start_lba, isoburn_imgen_opts::dir_mode, isoburn_imgen_opts::dir_rec_mtime, isoburn_imgen_opts::do_fsync, isoburn_imgen_opts::do_tao, isoburn_imgen_opts::effective_lba, isoburn_imgen_opts::efi_boot_part_flag, isoburn_imgen_opts::efi_boot_partition, isoburn_imgen_opts::fifo_size, isoburn_imgen_opts::file_md5, isoburn_imgen_opts::file_mode, isoburn_imgen_opts::gid, isoburn_imgen_opts::gpt_guid, isoburn_imgen_opts::gpt_guid_mode, isoburn_imgen_opts::hardlinks, isoburn_imgen_opts::hfsp_block_size, isoburn_imgen_opts::hfsp_serial_number, isoburn_imgen_opts::iso1999, isoburn_imgen_opts::iso_mbr_part_type, isoburn_msgs_submit(), isoburn_imgen_opts::joliet, isoburn_imgen_opts::joliet_long_names, isoburn_imgen_opts::joliet_longer_paths, isoburn_imgen_opts::joliet_utf16, isoburn_imgen_opts::level, Libisoburn_max_appended_partitionS, isoburn_imgen_opts::libjte_handle, isoburn_imgen_opts::max_37_char_filenames, isoburn_imgen_opts::no_emul_toc, isoburn_imgen_opts::no_force_dots, isoburn_imgen_opts::old_empty, isoburn_imgen_opts::omit_version_numbers, isoburn_imgen_opts::output_charset, isoburn_imgen_opts::part_like_isohybrid, isoburn_imgen_opts::partition_heads_per_cyl, isoburn_imgen_opts::partition_offset, isoburn_imgen_opts::partition_secs_per_head, isoburn_imgen_opts::prep_part_flag, isoburn_imgen_opts::prep_partition, isoburn_imgen_opts::replace_dir_mode, isoburn_imgen_opts::replace_file_mode, isoburn_imgen_opts::replace_gid, isoburn_imgen_opts::replace_uid, isoburn_imgen_opts::rockridge, isoburn_imgen_opts::rr_reloc_dir, isoburn_imgen_opts::rr_reloc_flags, isoburn_imgen_opts::rrip_version_1_10, isoburn_imgen_opts::session_md5, isoburn_imgen_opts::sort_files, isoburn_imgen_opts::system_area_data, isoburn_imgen_opts::system_area_options, isoburn_imgen_opts::tail_blocks, isoburn_imgen_opts::uid, isoburn_imgen_opts::untranslated_name_len, isoburn_imgen_opts::vol_creation_time, isoburn_imgen_opts::vol_effective_time, isoburn_imgen_opts::vol_expiration_time, and isoburn_imgen_opts::vol_modification_time.

Referenced by Xorriso_relax_compliance(), Xorriso_test_outchar(), and Xorriso_write_session().

◆ isoburn_igopt_set_appended_as_apm()

int isoburn_igopt_set_appended_as_apm ( struct isoburn_imgen_opts opts,
int  apm 
)

Control whether partitions created by iso_write_opts_set_partition_img() are to be represented in Apple Partition Map.

Since
1.4.4
Parameters
optsThe option set to be manipulated.
apm0= do not represent appended partitions in APM 1= represent in APM, even if not iso_write_opts_set_part_like_isohybrid() enables it and no other APM partitions emerge. Do not use other values for now.
Returns
<=0 = error, 1 = success

Definition at line 1847 of file isoburn.c.

1848 {
1849  opts->appended_as_apm= !!apm;
1850  return(1);
1851 }

References isoburn_imgen_opts::appended_as_apm.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_appended_as_gpt()

int isoburn_igopt_set_appended_as_gpt ( struct isoburn_imgen_opts opts,
int  gpt 
)

Control whether partitions created by iso_write_opts_set_partition_img() are to be represented in MBR or as GPT partitions.

Since
1.4.0
Parameters
optsThe option set to be manipulated.
gpt0= represent as MBR partition; as GPT only if other GPT partitions are present 1= represent as GPT partition and cause protective MBR with a single partition which covers the whole output data. This may fail if other settings demand MBR partitions. Do not use other values for now.
Returns
<=0 = error, 1 = success

Definition at line 1790 of file isoburn.c.

1791 {
1792  opts->appended_as_gpt= !!gpt;
1793  return(1);
1794 }

References isoburn_imgen_opts::appended_as_gpt.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_disc_label()

int isoburn_igopt_set_disc_label ( struct isoburn_imgen_opts opts,
char *  label 
)

Set a name for the system area.

This setting is ignored unless system area type 3 "SUN Disk Label" is in effect by iso_write_opts_set_system_area(). In this case it will replace the default text at the start of the image: "CD-ROM Disc with Sun sparc boot created by libisofs"

Since
0.6.6
Parameters
optsThe option set to be manipulated.
labelA text of up to 128 characters.
Returns
<=0 = error, 1 = success

Definition at line 1940 of file isoburn.c.

1941 {
1942  strncpy(opts->ascii_disc_label, label, Libisoburn_disc_label_sizE - 1);
1944  return(1);
1945 }
#define Libisoburn_disc_label_sizE
Definition: isoburn.h:62

References isoburn_imgen_opts::ascii_disc_label, and Libisoburn_disc_label_sizE.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_efi_bootp()

int isoburn_igopt_set_efi_bootp ( struct isoburn_imgen_opts opts,
char *  path,
int  flag 
)

Copy a data file from the local filesystem into the emerging ISO image and mark it by a GPT entry as EFI system partition.

Since
1.2.4
Parameters
optsThe option set to be manipulated.
pathFile address in the local file system. Instead of a disk path, the word –efi-boot-image may be given. It exposes in GPT the content of the first El Torito EFI boot image as EFI system partition.
flagWith isoburn_igopt_get_efi_bootp(): Control bits as of iso_write_opts_set_efi_bootp() bit0= The path contains instructions for the interval libisofs reader. See libisofs.h.
Since
1.4.0 With isoburn_igopt_set_efi_bootp(): bit0= add the current flag setting & 0x3fffffff to return value 1.
Returns
1 success, <=0 failure

Definition at line 1683 of file isoburn.c.

1685 {
1686  if(o->efi_boot_partition != NULL)
1687  free(o->efi_boot_partition);
1688  o->efi_boot_partition= NULL;
1689  o->efi_boot_part_flag= 0;
1690  if(path != NULL) {
1691  o->efi_boot_partition= strdup(path);
1692  if(o->efi_boot_partition == NULL) {
1693  isoburn_report_iso_error(ISO_OUT_OF_MEM, "Out of memory", 0, "FATAL", 0);
1694  return(-1);
1695  }
1696  }
1697  o->efi_boot_part_flag = flag & 1;
1698  return(1);
1699 }

References isoburn_imgen_opts::efi_boot_part_flag, isoburn_imgen_opts::efi_boot_partition, and isoburn_report_iso_error().

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_extensions()

int isoburn_igopt_set_extensions ( struct isoburn_imgen_opts o,
int  ext 
)

Definition at line 1253 of file isoburn.c.

1254 {
1255  o->rockridge= !!(ext&1);
1256  o->joliet= !!(ext&2);
1257  o->iso1999= !!(ext&4);
1258  o->hardlinks= !!(ext & 8);
1259  o->aaip= !!(ext & 32);
1260  o->session_md5= !!(ext & 64);
1261  o->file_md5= (ext & (128 | 256)) >> 7;
1262  o->no_emul_toc= !!(ext & 512);
1263  o->will_cancel= !!(ext & 1024);
1264  o->old_empty= !!(ext & 2048);
1265  o->hfsplus= !!(ext & 4096);
1266  o->fat= !!(ext & 8192);
1267  return(1);
1268 }

References isoburn_imgen_opts::aaip, isoburn_imgen_opts::fat, isoburn_imgen_opts::file_md5, isoburn_imgen_opts::hardlinks, isoburn_imgen_opts::hfsplus, isoburn_imgen_opts::iso1999, isoburn_imgen_opts::joliet, isoburn_imgen_opts::no_emul_toc, isoburn_imgen_opts::old_empty, isoburn_imgen_opts::rockridge, isoburn_imgen_opts::session_md5, and isoburn_imgen_opts::will_cancel.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_fifo_size()

int isoburn_igopt_set_fifo_size ( struct isoburn_imgen_opts o,
int  fifo_size 
)

The number of bytes to be used for the fifo which decouples libisofs and libburn for better throughput and for reducing the risk of interrupting signals hitting the libburn thread which operates the MMC drive.

The size will be rounded up to the next full 2048. Minimum is 64kiB, maximum is 1 GiB (but that is too much anyway).

Since
0.1.0
Parameters
oThe option set to work on
fifo_sizeNumber of bytes to use
Returns
1 success, <=0 failure

Definition at line 1482 of file isoburn.c.

1483 {
1484  o->fifo_size= fifo_size;
1485  return(1);
1486 }

References isoburn_imgen_opts::fifo_size.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_gpt_guid()

int isoburn_igopt_set_gpt_guid ( struct isoburn_imgen_opts opts,
uint8_t  guid[16],
int  mode 
)

Control whether the emerging GPT gets a pseudo-randomly generated disk GUID or whether it gets a user supplied GUID.

The partition GUIDs will be generated in a reproducible way by exoring a little-endian 32 bit counter with the disk GUID beginning at byte offset 9.

Since
1.4.6
Parameters
optsThe option set to be manipulated.
guid16 bytes of user supplied GUID. Readily byte-swapped from the text form as prescribed by UEFI specs: 4 byte, 2 byte, 2 byte as little-endian. 2 byte, 6 byte as big-endian. The upper 4 bit of guid[6] and guid[7] should bear the value 4 to express the version 4 in both endiannesses. Bit 7 of byte[8] should be set to 1 and bit 6 be set to 0, in order to express the RFC 4122 variant of GUID, where version 4 means "random".
mode0 = ignore parameter guid and produce the GPT disk GUID by a pseudo-random algorithm. This is the default setting. 1 = use parameter guid as GPT disk GUID 2 = ignore parameter guid and derive the GPT disk GUID from parameter uuid of isoburn_igopt_set_pvd_times(). The 16 bytes of uuid get copied and bytes 6, 7, 8 get their upper bits changed to comply to RFC 4122. If no such uuid is given when ISO production starts, then mode 2 defaults to mode 0.

Definition at line 1914 of file isoburn.c.

1916 {
1917  if(mode < 0 || mode > 2) {
1918  isoburn_msgs_submit(NULL, 0x00060000,
1919  "Unrecognized GPT disk GUID setup mode. (0 ... 2)",
1920  0, "FAILURE", 0);
1921  return(0);
1922  }
1923  opts->gpt_guid_mode= mode;
1924  if(opts->gpt_guid_mode == 1)
1925  memcpy(opts->gpt_guid, guid, 16);
1926  return 1;
1927 }

References isoburn_imgen_opts::gpt_guid, isoburn_imgen_opts::gpt_guid_mode, and isoburn_msgs_submit().

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_hfsp_block_size()

int isoburn_igopt_set_hfsp_block_size ( struct isoburn_imgen_opts opts,
int  hfsp_block_size,
int  apm_block_size 
)

Set the allocation block size for HFS+ production and the block size for layout and address unit of Apple Partition map.

Since
1.2.4
Parameters
optsThe option set to be manipulated.
hfsp_block_size-1 means that this setting shall be left unchanged 0 allows the automatic default setting 512 and 2048 enforce a size.
apm_block_size-1 means that this setting shall be left unchanged 0 allows the automatic default setting 512 and 2048 enforce a size. Size 512 cannot be combined with GPT production. Size 2048 cannot be mounted -t hfsplus by Linux kernels at least up to 2.6.32.
Returns
<=0 = error, 1 = success

Definition at line 1971 of file isoburn.c.

1973 {
1974  char msg[80];
1975 
1976  msg[0]= 0;
1977  if(hfsp_block_size != -1) {
1978  if(hfsp_block_size != 0 && hfsp_block_size != 512 &&
1979  hfsp_block_size != 2048) {
1980  sprintf(msg, "Not a supported HFS+ size (%d <-> 0, 512, 2048)",
1981  hfsp_block_size);
1982  isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "FAILURE", 0);
1983  }
1984  opts->hfsp_block_size = hfsp_block_size;
1985  }
1986  if(apm_block_size != -1) {
1987  if(apm_block_size != 0 && apm_block_size != 512 && apm_block_size != 2048) {
1988  sprintf(msg, "Not a supported APM block size (%d <-> 0, 512, 2048)",
1989  apm_block_size);
1990  isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "FAILURE", 0);
1991  }
1992  opts->apm_block_size = apm_block_size;
1993  }
1994  if(msg[0])
1995  return(0);
1996  return(1);
1997 }

References isoburn_imgen_opts::apm_block_size, isoburn_imgen_opts::hfsp_block_size, and isoburn_msgs_submit().

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_hfsp_serial_number()

int isoburn_igopt_set_hfsp_serial_number ( struct isoburn_imgen_opts opts,
uint8_t  serial_number[8] 
)

Set a serial number for the HFS+ extension of the emerging ISO image.

Since
1.2.4
Parameters
optsThe option set to be manipulated.
serial_number8 bytes which should be unique to the image. If all bytes are 0, then the serial number will be generated as random number by libisofs. This is the default setting.
Returns
<=0 = error, 1 = success

Definition at line 1955 of file isoburn.c.

1957 {
1958  memcpy(opts->hfsp_serial_number, serial_number, 8);
1959  return(1);
1960 }

References isoburn_imgen_opts::hfsp_serial_number.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_iso_mbr_part_type()

int isoburn_igopt_set_iso_mbr_part_type ( struct isoburn_imgen_opts opts,
int  part_type 
)

Set the partition type of the MBR partition which represents the ISO filesystem or at least protects it.

This is without effect if no such partition emerges by other settings or if the partition type is prescribed mandatorily like 0xee for GPT protective MBR or 0x96 for CHRP.

Since
1.4.8
Parameters
optsThe option set to be manipulated.
part_type0x00 to 0xff as desired partition type. Any other value (e.g. -1) enables the default types of the various occasions.

Definition at line 1878 of file isoburn.c.

1880 {
1881  if(part_type < -1 || part_type > 255)
1882  part_type = -1;
1883  opts->iso_mbr_part_type = part_type;
1884  return(1);
1885 }

References isoburn_imgen_opts::iso_mbr_part_type.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_iso_type_guid()

int isoburn_igopt_set_iso_type_guid ( struct isoburn_imgen_opts opts,
uint8_t  guid[16],
int  valid 
)

Set the GPT Type GUID for the partition which represents the ISO 9660 filesystem, if such a partition emerges in GPT.

Since
1.5.2
Parameters
optsThe option set to be manipulated.
guid16 bytes of user supplied GUID. Readily byte-swapped from the text form as prescribed by UEFI specs: 4 byte, 2 byte, 2 byte as little-endian. 2 byte, 6 byte as big-endian.
validSet to 1 to make this Type GUID valid. Set to 0 in order to invalidate a previously made setting. In this case the setting of isoburn_igopt_set_iso_mbr_part_type() or its default gets into effect.
Returns
<=0 = error, 1 = success

Definition at line 1896 of file isoburn.c.

1898 {
1899  if(valid)
1900  memcpy(opts->iso_gpt_type_guid, guid, 16);
1901  opts->iso_gpt_flag= (opts->iso_gpt_flag & ~1) | !!valid;
1902  return(1);
1903 }

References isoburn_imgen_opts::iso_gpt_flag, and isoburn_imgen_opts::iso_gpt_type_guid.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_level()

int isoburn_igopt_set_level ( struct isoburn_imgen_opts o,
int  level 
)

ISO level to write at.

Since
0.1.0
Parameters
oThe option set to work on
levelis a term of the ISO 9660 standard. It should be one of: 1= filenames restricted to form 8.3 2= filenames allowed up to 31 characters 3= file content may be larger than 4 GB - 1.
Returns
1 success, <=0 failure

Definition at line 1239 of file isoburn.c.

1240 {
1241  o->level= level;
1242  return(1);
1243 }

References isoburn_imgen_opts::level.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_out_charset()

int isoburn_igopt_set_out_charset ( struct isoburn_imgen_opts o,
char *  output_charset 
)

Set the character set to use for representing RR filenames in the image.

Since
0.1.0
Parameters
oThe option set to work on
output_charsetSet this to NULL to use the default output charset. For selecting a particular character set, submit its name, e.g. as listed by program iconv -l. Example: "UTF-8".
Returns
1 success, <=0 failure

Definition at line 1466 of file isoburn.c.

1468 {
1469  o->output_charset= output_charset;
1470  return(1);
1471 }

References isoburn_imgen_opts::output_charset.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_over_mode()

int isoburn_igopt_set_over_mode ( struct isoburn_imgen_opts o,
int  replace_dir_mode,
int  replace_file_mode,
mode_t  dir_mode,
mode_t  file_mode 
)

Set the override values for files and directory permissions.

The parameters replace_* these take one of three values: 0, 1 or 2. If 0, the corresponding attribute will be kept as set in the IsoNode at the time of image generation. If set to 1, the corresponding attrib. will be changed by a default suitable value. With value 2, the attrib. will be changed with the value specified in the corresponding *_mode options. Note that only the permissions are set, the file type remains unchanged.

Since
0.1.0
Parameters
oThe option set to work on
replace_dir_modewhether and how to override directories
replace_file_modewhether and how to override files of other type
dir_modeMode to use on dirs with replace_dir_mode == 2.
file_mode;Mode to use on files with replace_file_mode == 2.
Returns
1 success, <=0 failure

Definition at line 1419 of file isoburn.c.

1422 {
1423  o->replace_dir_mode= replace_dir_mode%3;
1424  o->replace_file_mode= replace_file_mode%3;
1425  o->dir_mode= dir_mode;
1426  o->file_mode= file_mode;
1427  return(1);
1428 }

References isoburn_imgen_opts::dir_mode, isoburn_imgen_opts::file_mode, isoburn_imgen_opts::replace_dir_mode, and isoburn_imgen_opts::replace_file_mode.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_over_ugid()

int isoburn_igopt_set_over_ugid ( struct isoburn_imgen_opts o,
int  replace_uid,
int  replace_gid,
uid_t  uid,
gid_t  gid 
)

Set the override values values for group id and user id.

The rules are like with above overriding of mode values. replace_* controls whether and how. The other two parameters provide values for eventual use.

Since
0.1.0
Parameters
oThe option set to work on
replace_uidwhether and how to override user ids
replace_gidwhether and how to override group ids
uidUser id to use with replace_uid == 2.
gidGroup id to use on files with replace_gid == 2.
Returns
1 success, <=0 failure

Definition at line 1443 of file isoburn.c.

1446 {
1447  o->replace_uid= replace_uid%3;
1448  o->replace_gid= replace_gid%3;
1449  o->uid= uid;
1450  o->gid= gid;
1451  return(1);
1452 }

References isoburn_imgen_opts::gid, isoburn_imgen_opts::replace_gid, isoburn_imgen_opts::replace_uid, and isoburn_imgen_opts::uid.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_part_flag()

int isoburn_igopt_set_part_flag ( struct isoburn_imgen_opts opts,
int  partition_number,
int  flag 
)

Set flag bits for a partition defined by isoburn_igopt_set_partition_img().

The bits will be forwarded to libisofs iso_write_opts_set_partition_img().

Since
1.4.0
Parameters
optsThe option set to be manipulated.
partition_numberDepicts the partition table entry to which shall the flags bits shall apply.
flagControl bits as of iso_write_opts_set_partition_img() bit0= The path contains instructions for the interval libisofs reader. See libisofs.h.
Since
1.4.0
Returns
<=0 = error, 1 = success

Definition at line 1757 of file isoburn.c.

1759 {
1760  char msg[80];
1761 
1762  if (partition_number < 1 ||
1763  partition_number > Libisoburn_max_appended_partitionS) {
1764  sprintf(msg, "Partition number is out of range (1 ... %d)",
1766  isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "FAILURE", 0);
1767  return(0);
1768  }
1769  opts->appended_part_flags[partition_number - 1]= flag;
1770  return(1);
1771 }

References isoburn_imgen_opts::appended_part_flags, isoburn_msgs_submit(), and Libisoburn_max_appended_partitionS.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_part_like_isohybrid()

int isoburn_igopt_set_part_like_isohybrid ( struct isoburn_imgen_opts opts,
int  alike 
)

Control whether bits 2 to 8 of el_torito_set_isolinux_options() shall apply even if not isohybrid MBR patching is enabled (bit1 of parameter options of isoburn_igopt_set_system_area()).

For details see iso_write_opts_set_part_like_isohybrid() in libisofs.h.

Since
1.4.4
Parameters
optsThe option set to be manipulated.
alike0= Apply isohybrid behavior only with ISOLINUX isohybrid. Do not mention appended partitions in APM unless isoburn_igopt_set_appended_as_apm() is enabled. 1= Apply isohybrid behavior even without ISOLINUX isohybrid.
Returns
<=0 = error, 1 = success

Definition at line 1862 of file isoburn.c.

1864 {
1865  opts->part_like_isohybrid= !!alike;
1866  return(1);
1867 }

References isoburn_imgen_opts::part_like_isohybrid.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_part_offset()

int isoburn_igopt_set_part_offset ( struct isoburn_imgen_opts opts,
uint32_t  block_offset_2k,
int  secs_512_per_head,
int  heads_per_cyl 
)

Control production of a second set of volume descriptors (superblock) and directory trees, together with a partition table in the MBR where the first partition has non-zero start address and the others are zeroed.

The first partition stretches to the end of the whole ISO image. The additional volume descriptor set and trees can be used to mount the ISO image at the start of the first partition, while it is still possible to mount it via the normal first volume descriptor set and tree at the start of the image or storage device. This makes few sense on optical media. But on USB sticks it creates a conventional partition table which makes it mountable on e.g. Linux via /dev/sdb and /dev/sdb1 alike.

Since
0.6.2
Parameters
optsThe option set to be manipulated.
block_offset_2kThe offset of the partition start relative to device start. This is counted in 2 kB blocks. The partition table will show the according number of 512 byte sectors. Default is 0 which causes no second set and trees. If it is not 0 then it must not be smaller than 16.
secs_512_per_headNumber of 512 byte sectors per head. 1 to 63. 0=automatic.
heads_per_cylNumber of heads per cylinder. 1 to 255. 0=automatic.
Returns
1 success, <=0 failure

Definition at line 1597 of file isoburn.c.

1600 {
1601  if (block_offset_2k > 0 && block_offset_2k < 16)
1602  return(0);
1603  opts->partition_offset = block_offset_2k;
1604  opts->partition_secs_per_head = secs_512_per_head;
1605  opts->partition_heads_per_cyl = heads_per_cyl;
1606  return(1);
1607 }

References isoburn_imgen_opts::partition_heads_per_cyl, isoburn_imgen_opts::partition_offset, and isoburn_imgen_opts::partition_secs_per_head.

Referenced by Xorriso_set_system_area().

◆ isoburn_igopt_set_part_type_guid()

int isoburn_igopt_set_part_type_guid ( struct isoburn_imgen_opts opts,
int  partition_number,
uint8_t  guid[16],
int  valid 
)

Set the GPT Type GUID for a partition defined by isoburn_igopt_set_partition_img().

Since
1.5.2
Parameters
optsThe option set to be manipulated.
partition_numberDepicts the partition table entry which shall get the Type GUID.
guid16 bytes of user supplied GUID. Readily byte-swapped from the text form as prescribed by UEFI specs: 4 byte, 2 byte, 2 byte as little-endian. 2 byte, 6 byte as big-endian.
validSet to 1 to make this Type GUID valid. Set to 0 in order to invalidate a previously made setting. In this case MBR type 0xEF will become the EFI Type GUID. All others will become the Basic Data Partition Type GUID.
Returns
<=0 = error, 1 = success

Definition at line 1805 of file isoburn.c.

1808 {
1809  char msg[80];
1810 
1811  if (partition_number < 1 ||
1812  partition_number > Libisoburn_max_appended_partitionS) {
1813  sprintf(msg, "Partition number is out of range (1 ... %d)",
1815  isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "FAILURE", 0);
1816  return(0);
1817  }
1818  if(valid)
1819  memcpy(opts->appended_part_type_guids[partition_number - 1], guid, 16);
1820  if(valid)
1821  opts->appended_part_gpt_flags[partition_number - 1]|= 1;
1822  else
1823  opts->appended_part_gpt_flags[partition_number - 1]&= ~1;
1824  return(1);
1825 }

References isoburn_imgen_opts::appended_part_gpt_flags, isoburn_imgen_opts::appended_part_type_guids, isoburn_msgs_submit(), and Libisoburn_max_appended_partitionS.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_partition_img()

int isoburn_igopt_set_partition_img ( struct isoburn_imgen_opts opts,
int  partition_number,
uint8_t  partition_type,
char *  image_path 
)

Cause an arbitrary data file to be appended to the ISO image and to be described by a partition table entry in an MBR or SUN Disk Label at the start of the ISO image.

The partition entry will bear the size of the image file rounded up to the next multiple of 2048 bytes. MBR or SUN Disk Label are selected by isoburn_igopt_set_system_area() system area type: 0 selects MBR partition table. 3 selects a SUN partition table with 320 kB start alignment.

Since
0.6.4
Parameters
optsThe option set to be manipulated.
partition_numberDepicts the partition table entry which shall describe the appended image. Range with MBR: 1 to 4. 1 will cause the whole ISO image to be unclaimable space before partition 1.
Since
0.6.6 Range with SUN Disk Label: 2 to 8.
Parameters
image_pathFile address in the local file system. With SUN Disk Label: an empty name causes the partition to become a copy of the next lower partition.
partition_typeThe MBR partition type. E.g. FAT12 = 0x01 , FAT16 = 0x06, Linux Native Partition = 0x83. See fdisk command L. This parameter is ignored with SUN Disk Label.
Returns
<=0 = error, 1 = success

Definition at line 1712 of file isoburn.c.

1715 {
1716  char msg[80];
1717 
1718  if (partition_number < 1 ||
1719  partition_number > Libisoburn_max_appended_partitionS) {
1720  sprintf(msg, "Partition number is out of range (1 ... %d)",
1722  isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "FAILURE", 0);
1723  return(0);
1724  }
1725  if (opts->appended_partitions[partition_number - 1] != NULL)
1726  free(opts->appended_partitions[partition_number - 1]);
1727  opts->appended_partitions[partition_number - 1] = strdup(image_path);
1728  if (opts->appended_partitions[partition_number - 1] == NULL)
1729  return(-1);
1730  opts->appended_part_types[partition_number - 1] = partition_type;
1731  return(1);
1732 }

References isoburn_imgen_opts::appended_part_types, isoburn_imgen_opts::appended_partitions, isoburn_msgs_submit(), and Libisoburn_max_appended_partitionS.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_prep_partition()

int isoburn_igopt_set_prep_partition ( struct isoburn_imgen_opts opts,
char *  path,
int  flag 
)

Copy a data file from the local filesystem into the emerging ISO image.

Mark it by an MBR partition entry as PreP partition and also cause protective MBR partition entries before and after this partition. See libisofs.h iso_write_opts_set_prep_img().

Since
1.2.4
Parameters
optsThe option set to be manipulated.
pathFile address in the local file system.
flagWith isoburn_igopt_set_prep_partition(): Control bits as of iso_write_opts_set_efi_bootp() bit0= The path contains instructions for the interval libisofs reader. See libisofs.h.
Since
1.4.0 With isoburn_igopt_get_prep_partition(): bit0= add the current flag setting & 0x3fffffff to return value 1.
Returns
1 success, <=0 failure

Definition at line 1654 of file isoburn.c.

1656 {
1657  if(o->prep_partition != NULL)
1658  free(o->prep_partition);
1659  o->prep_partition= NULL;
1660  o->prep_part_flag= 0;
1661  if(path != NULL) {
1662  o->prep_partition= strdup(path);
1663  if(o->prep_partition == NULL) {
1664  isoburn_report_iso_error(ISO_OUT_OF_MEM, "Out of memory", 0, "FATAL", 0);
1665  return(-1);
1666  }
1667  }
1668  o->prep_part_flag= flag & 1;
1669  return(1);
1670 }

References isoburn_report_iso_error(), isoburn_imgen_opts::prep_part_flag, and isoburn_imgen_opts::prep_partition.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_pvd_times()

int isoburn_igopt_set_pvd_times ( struct isoburn_imgen_opts opts,
time_t  creation_time,
time_t  modification_time,
time_t  expiration_time,
time_t  effective_time,
char *  uuid 
)

Explicitly set the four timestamps of the emerging ISO image.

Default with all parameters is 0.

Since
0.5.4
Parameters
optsThe option set to work on
creation_timeECMA-119 Volume Creation Date and Time When "the information in the volume was created." A value of 0 means that the timepoint of write start is to be used.
modification_timeECMA-119 Volume Modification Date and Time When "the informationin the volume was last modified." A value of 0 means that the timepoint of write start is to be used.
expiration_timeECMA-119 Volume Expiration Date and Time When "the information in the volume may be regarded as obsolete." A value of 0 means that the information never shall expire.
effective_timeECMA-119 Volume Effective Date and Time When "the information in the volume may be used." A value of 0 means that not such retention is intended.
uuidIf this text is not empty, then it overrides vol_modification_time by copying the first 16 decimal digits from uuid, eventually padding up with decimal '1', and writing a NUL-byte as timezone GMT. It should express a reasonable time in form YYYYMMDDhhmmsscc E.g.: 2010040711405800 = 7 Apr 2010 11:40:58 (+0 centiseconds)
Returns
1 success, <=0 failure

Definition at line 1568 of file isoburn.c.

1572 {
1573  opts->vol_creation_time = vol_creation_time;
1574  opts->vol_modification_time = vol_modification_time;
1575  opts->vol_expiration_time = vol_expiration_time;
1576  opts->vol_effective_time = vol_effective_time;
1577  strncpy(opts->vol_uuid, vol_uuid, 16);
1578  opts->vol_uuid[16] = 0;
1579  return(1);
1580 }

References isoburn_imgen_opts::vol_creation_time, isoburn_imgen_opts::vol_effective_time, isoburn_imgen_opts::vol_expiration_time, isoburn_imgen_opts::vol_modification_time, and isoburn_imgen_opts::vol_uuid.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_relaxed()

int isoburn_igopt_set_relaxed ( struct isoburn_imgen_opts o,
int  relax 
)

Definition at line 1283 of file isoburn.c.

1284 {
1285  o->omit_version_numbers= (!!(relax&1)) |
1286  (2 * !!(relax & isoburn_igopt_only_iso_versions));
1287  o->allow_deep_paths= !!(relax&2);
1288  o->allow_longer_paths= !!(relax&4);
1289  o->max_37_char_filenames= !!(relax&8);
1290  o->no_force_dots= (!!(relax&16)) |
1291  (2 * !!(relax & isoburn_igopt_no_j_force_dots));
1292  o->allow_lowercase= !!(relax&32);
1293  o->allow_full_ascii= !!(relax&64);
1294  o->joliet_longer_paths= !!(relax&128);
1295  o->always_gmt= !!(relax & isoburn_igopt_always_gmt);
1304  o->joliet_utf16= !!(relax & isoburn_igopt_joliet_utf16);
1305  return(1);
1306 }
#define isoburn_igopt_aaip_susp_1_10
Definition: libisoburn.h:1367
#define isoburn_igopt_iso1999_rec_mtime
Definition: libisoburn.h:1373
#define isoburn_igopt_joliet_long_names
Definition: libisoburn.h:1371
#define isoburn_igopt_no_j_force_dots
Definition: libisoburn.h:1369
#define isoburn_igopt_only_iso_versions
Definition: libisoburn.h:1368
#define isoburn_igopt_joliet_utf16
Definition: libisoburn.h:1375
#define isoburn_igopt_dir_rec_mtime
Definition: libisoburn.h:1366
#define isoburn_igopt_allow_dir_id_ext
Definition: libisoburn.h:1370
#define isoburn_igopt_joliet_rec_mtime
Definition: libisoburn.h:1372
#define isoburn_igopt_allow_7bit_ascii
Definition: libisoburn.h:1374
#define isoburn_igopt_always_gmt
Definition: libisoburn.h:1364
#define isoburn_igopt_rrip_version_1_10
Definition: libisoburn.h:1365

References isoburn_imgen_opts::aaip_susp_1_10, isoburn_imgen_opts::allow_7bit_ascii, isoburn_imgen_opts::allow_deep_paths, isoburn_imgen_opts::allow_dir_id_ext, isoburn_imgen_opts::allow_full_ascii, isoburn_imgen_opts::allow_longer_paths, isoburn_imgen_opts::allow_lowercase, isoburn_imgen_opts::always_gmt, isoburn_imgen_opts::dir_rec_mtime, isoburn_imgen_opts::iso1999_rec_mtime, isoburn_igopt_aaip_susp_1_10, isoburn_igopt_allow_7bit_ascii, isoburn_igopt_allow_dir_id_ext, isoburn_igopt_always_gmt, isoburn_igopt_dir_rec_mtime, isoburn_igopt_iso1999_rec_mtime, isoburn_igopt_joliet_long_names, isoburn_igopt_joliet_rec_mtime, isoburn_igopt_joliet_utf16, isoburn_igopt_no_j_force_dots, isoburn_igopt_only_iso_versions, isoburn_igopt_rrip_version_1_10, isoburn_imgen_opts::joliet_long_names, isoburn_imgen_opts::joliet_longer_paths, isoburn_imgen_opts::joliet_rec_mtime, isoburn_imgen_opts::joliet_utf16, isoburn_imgen_opts::max_37_char_filenames, isoburn_imgen_opts::no_force_dots, isoburn_imgen_opts::omit_version_numbers, and isoburn_imgen_opts::rrip_version_1_10.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_rr_reloc()

int isoburn_igopt_set_rr_reloc ( struct isoburn_imgen_opts o,
char *  name,
int  flags 
)

If not isoburn_igopt_allow_deep_paths is in effect, then it may become necessary to relocate directories so that no ECMA-119 file path has more than 8 components.

These directories are grafted into either the root directory of the ISO image or into a dedicated relocation directory. For details see libisofs.h. Wrapper for: iso_write_opts_set_rr_reloc()

Since
1.2.2
Parameters
oThe option set to work on
nameThe name of the relocation directory in the root directory. Do not prepend "/". An empty name or NULL will direct relocated directories into the root directory. This is the default. If the given name does not exist in the root directory when isoburn_disc_write() is called, and if there are directories at path level 8, then directory /name will be created automatically.
flagsBitfield for control purposes. bit0= Mark the relocation directory by a Rock Ridge RE entry, if it gets created during isoburn_disc_write(). This will make it invisible for most Rock Ridge readers. bit1= not settable via API (used internally)
Returns
> 0 success, <= 0 failure

Definition at line 1329 of file isoburn.c.

1331 {
1332  if(o->rr_reloc_dir != name) {
1333  if(o->rr_reloc_dir != NULL)
1334  free(o->rr_reloc_dir);
1335  o->rr_reloc_dir= NULL;
1336  if(name != NULL) {
1337  o->rr_reloc_dir= strdup(name);
1338  if(o->rr_reloc_dir == NULL) {
1339  isoburn_msgs_submit(NULL, 0x00060000,
1340  "Cannot allocate memory for image generation options",
1341  0, "FATAL", 0);
1342  return(-1);
1343  }
1344  }
1345  }
1346  o->rr_reloc_flags = flags & 1;
1347  return 1;
1348 }

References isoburn_msgs_submit(), isoburn_imgen_opts::rr_reloc_dir, and isoburn_imgen_opts::rr_reloc_flags.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_scdbackup_tag()

int isoburn_igopt_set_scdbackup_tag ( struct isoburn_imgen_opts o,
char *  name,
char *  timestamp,
char *  tag_written 
)

Set or get parameters "name" and "timestamp" for a scdbackup checksum tag.

It will be appended to the libisofs session tag if the image starts at LBA 0. See isoburn_disc_track_lba_nwa. The scdbackup tag can be used to verify the image by command scdbackup_verify $device -auto_end. See scdbackup/README appendix VERIFY for its inner details.

Since
0.4.4
Parameters
oThe option set to work on
nameThe tag name. 80 characters max. An empty name disables production of an scdbackup tag.
timestampA string of up to 13 characters YYMMDD.hhmmss A9 = 2009, B0 = 2010, B1 = 2011, ... C0 = 2020, ...
tag_writtenEither NULL or the address of an array with at least 512 characters. In the latter case the eventually produced scdbackup tag will be copied to this array when the image gets written. This call sets scdbackup_tag_written[0] = 0 to mark its preliminary invalidity.
Returns
1 success, <=0 failure

Definition at line 1510 of file isoburn.c.

1512 {
1513  strncpy(o->scdbackup_tag_name, name, 80);
1514  o->scdbackup_tag_name[80]= 0;
1515  strncpy(o->scdbackup_tag_time, timestamp, 18);
1516  o->scdbackup_tag_time[18]= 0;
1517  o->scdbackup_tag_written = tag_written;
1518  if(tag_written != NULL)
1519  tag_written[0]= 0;
1520  return(1);
1521 }

References isoburn_imgen_opts::scdbackup_tag_name, isoburn_imgen_opts::scdbackup_tag_time, and isoburn_imgen_opts::scdbackup_tag_written.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_sort_files()

int isoburn_igopt_set_sort_files ( struct isoburn_imgen_opts o,
int  value 
)

Definition at line 1405 of file isoburn.c.

1406 {
1407  o->sort_files= !!(value&1);
1408  return(1);
1409 }

References isoburn_imgen_opts::sort_files.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_stdio_endsync()

int isoburn_igopt_set_stdio_endsync ( struct isoburn_imgen_opts opts,
int  do_sync 
)

Set or inquire whether a final fsync(2) is performed when updating the multi-session information of libburn stdio pseudo-drives by isoburn_activate_session().

Note: fsync(2) calls during and at the end of isoburn_disc_write() are controlled by libburn call burn_write_opts_set_stdio_fsync().

Since
1.2.4
Parameters
optsThe option set to be manipulated or inquired.
do_sync1= call fsync(2) with stdio drives in isoburn_activate_session() 0= do not
Returns
<=0 = error, 1 = success

Definition at line 2024 of file isoburn.c.

2026 {
2027  opts->do_fsync= !!do_sync;
2028  return(1);
2029 }

References isoburn_imgen_opts::do_fsync.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_system_area()

int isoburn_igopt_set_system_area ( struct isoburn_imgen_opts o,
char  data[32768],
int  options 
)

Attach 32 kB of binary data which shall get written to the first 32 kB of the ISO image, the System Area.

options can cause manipulations of these data before writing happens. If system area data are giveni or options bit0 is set, then bit1 of el_torito_set_isolinux_options() is automatically disabled.

Since
0.5.4
Parameters
oThe option set to work on
dataEither NULL or 32 kB of data. Do not submit less bytes !
optionsCan cause manipulations of submitted data before they get written: bit0= apply a –protective-msdos-label as of grub-mkisofs. This means to patch bytes 446 to 512 of the system area so that one partition is defined which begins at the second 512-byte block of the image and ends where the image ends. This works with and without system_area_data. bit1= apply isohybrid MBR patching to the system area. This works only with system area data from SYSLINUX plus an ISOLINUX boot image (see iso_image_set_boot_image()) and only if not bit0 is set. bit2-7= System area type 0= with bit0 or bit1: MBR else: unspecified type
Since
0.6.4 1= MIPS Big Endian Volume Header Submit up to 15 MIPS Big Endian boot files by iso_image_add_mips_boot_file() of libisofs. This will overwrite the first 512 bytes of the submitted data. 2= DEC Boot Block for MIPS Little Endian The first boot file submitted by iso_image_add_mips_boot_file() will be activated. This will overwrite the first 512 bytes of the submitted data.
0.6.6 3= SUN Disk Label for SUN SPARC Submit up to 7 SPARC boot images by isoburn_igopt_set_partition_img() for partition numbers 2 to 8. This will overwrite the first 512 bytes of the submitted data.
1.3.8 4= HP-PA PALO boot sector header version 4 Submit all five parameters of iso_image_set_hppa_palo() as non-NULL texts. 5= HP-PA PALO boot sector header version 5 Submit all five parameters of iso_image_set_hppa_palo() as non-NULL texts. bit8-9= Only with System area type 0 = MBR
1.0.4 Cylinder alignment mode eventually pads the image to make it end at a cylinder boundary. 0 = auto (align if bit1) 1 = always align to cylinder boundary 2 = never align to cylinder boundary bit10-13= System area sub type
1.2.4 With type 0 = MBR: Gets overridden by bit0 and bit1. 0 = no particular sub type 1 = CHRP: A single MBR partition of type 0x96 covers the ISO image. Not compatible with any other feature which needs to have own MBR partition entries. bit14= Only with System area type 0 = MBR GRUB2 boot provisions:
1.3.0 Patch system area at byte 0x1b0 to 0x1b7 with (512-block address + 4) of the first boot image file. Little-endian 8-byte. Should be combined with options bit0. Will not be in effect if options bit1 is set.
Returns
1 success, 0 no data to get, <0 failure

Definition at line 1537 of file isoburn.c.

1539 {
1540  if (data == NULL) { /* Disable */
1541  if (opts->system_area_data != NULL)
1542  free(opts->system_area_data);
1543  opts->system_area_data = NULL;
1544  } else {
1545  if (opts->system_area_data == NULL) {
1546  opts->system_area_data = calloc(32768, 1);
1547  if (opts->system_area_data == NULL)
1548  return(-1);
1549  }
1550  memcpy(opts->system_area_data, data, 32768);
1551  }
1552  opts->system_area_options = options & 0xffff;
1553  return(1);
1554 }

References isoburn_imgen_opts::system_area_data, and isoburn_imgen_opts::system_area_options.

Referenced by Xorriso_set_system_area().

◆ isoburn_igopt_set_tail_blocks()

int isoburn_igopt_set_tail_blocks ( struct isoburn_imgen_opts opts,
uint32_t  num_blocks 
)

Set or get the number of trailing zero byte blocks to be written by libisofs.

The image size counter of the emerging ISO image will include them. Eventual checksums will take them into respect. They will be written immediately before the eventual image checksum area which is at the very end of the image. For a motivation see iso_write_opts_set_tail_blocks() in libisofs.h .

Since
0.6.4
Parameters
optsThe option set to work on
num_blocksNumber of extra 2 kB blocks to be written by libisofs.
Returns
1 success, <=0 failure

Definition at line 1639 of file isoburn.c.

1641 {
1642  opts->tail_blocks = num_blocks;
1643  return 1;
1644 }

References isoburn_imgen_opts::tail_blocks.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_igopt_set_untranslated_name_len()

int isoburn_igopt_set_untranslated_name_len ( struct isoburn_imgen_opts o,
int  len 
)

Caution: This option breaks any assumptions about names that are supported by ECMA-119 specifications.

Try to omit any translation which would make a file name compliant to the ECMA-119 rules. This includes and exceeds omit_version_numbers, max_37_char_filenames, no_force_dots bit0, allow_full_ascii. Further it prevents the conversion from local character set to ASCII. The maximum name length is given by this call. If a filename exceeds this length or cannot be recorded untranslated for other reasons, then image production gets aborted. Currently the length limit is 96 characters, because an ECMA-119 directory record may at most have 254 bytes and up to 158 other bytes must fit into the record. Probably 96 more bytes can be made free for the name in future.

Since
1.0.0
Parameters
oThe option set to work on
len0 = disable this feature and perform name translation according to other settings. >0 = Omit any translation. Eventually abort image production if a name is longer than the given value. -1 = Like >0. Allow maximum possible length. isoburn_igopt_get_untranslated_name_len() will tell the effectively resulting value.
Returns
>0 success, <=0 failure

Definition at line 1360 of file isoburn.c.

1362 {
1363  int ret;
1364  IsoWriteOpts *opts = NULL;
1365  char *msg= NULL;
1366 
1367  msg= calloc(1, 160);
1368  if(msg == NULL)
1369  {ret= -1; goto ex;}
1370 
1371  ret= iso_write_opts_new(&opts, 0);
1372  if(ret < 0) {
1373  isoburn_msgs_submit(NULL, 0x00060000,
1374  "Cannot create libisofs write options object", 0, "FATAL", 0);
1375  {ret= 0; goto ex;}
1376  }
1377  ret= iso_write_opts_set_untranslated_name_len(opts, len);
1378  if(ret < 0) {
1379  ret= iso_write_opts_set_untranslated_name_len(opts, -1);
1380  sprintf(msg,
1381  "Improper value for maximum length of untranslated names (%d <-> -1 ... %d)",
1382  len, ret);
1383  isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "FAILURE", 0);
1384  iso_write_opts_free(opts);
1385  {ret= 0; goto ex;}
1386  }
1387  o->untranslated_name_len= ret; /* Normalized len value */
1388  iso_write_opts_free(opts);
1389  ret= 1;
1390 ex:;
1391  if(msg != NULL)
1392  free(msg);
1393  return(ret);
1394 }

References isoburn_msgs_submit(), and isoburn_imgen_opts::untranslated_name_len.

Referenced by Xorriso_make_iso_write_opts(), and Xorriso_relax_compliance().

◆ isoburn_igopt_set_write_type()

int isoburn_igopt_set_write_type ( struct isoburn_imgen_opts opts,
int  do_tao 
)

Set or inquire the write type for the next write run on optical media.

Since
1.2.4
Parameters
optsThe option set to be manipulated or inquired.
do_taoThe value to be set or the variable where to return the current setting: 0 = Let libburn choose according to other write parameters. This is advisable unless there are particular reasons not to use one of the two write types. Be aware that 1 and -1 can lead to failure if the write type is not appropriate for the given media situation. 1 = Use BURN_WRITE_TAO which does TAO on CD, Incremental on DVD-R, no track reservation on DVD+R and BD-R -1 = Use BURN_WRITE_SAO which does SAO on CD, DAO on DVD-R, track reservation on DVD+R and BD-R
Returns
<=0 = error, 1 = success

Definition at line 2009 of file isoburn.c.

2010 {
2011  if(do_tao < -1 || do_tao > 1)
2012  return(0);
2013  opts->do_tao= do_tao;
2014  return(1);
2015 }

References isoburn_imgen_opts::do_tao.

Referenced by Xorriso_make_iso_write_opts().

◆ isoburn_is_compatible()

int isoburn_is_compatible ( int  major,
int  minor,
int  micro,
int  flag 
)

Check whether all features of header file libisoburn.h from the given major.minor.micro revision triple can be delivered by the library version which is performing this call.

An application of libisoburn can easily memorize the version of the libisoburn.h header in its own code. Immediately after isoburn_initialize() it should simply do this check: if (! isoburn_is_compatible(isoburn_header_version_major, isoburn_header_version_minor, isoburn_header_version_micro, 0)) ...refuse to start the program with this dynamic library version...

Since
0.1.0
Parameters
majorobtained at build time
minorobtained at build time
microobtained at build time
flagBitfield for control purposes. Unused yet. Submit 0.
Returns
1= library can work for caller 0= library is not usable in some aspects. Caller must restrict itself to an earlier API version or must not use this library at all.

Definition at line 824 of file isoburn.c.

825 {
826  int own_major, own_minor, own_micro;
827 
828  isoburn_version(&own_major, &own_minor, &own_micro);
829  return(own_major > major ||
830  (own_major == major && (own_minor > minor ||
831  (own_minor == minor && own_micro >= micro))));
832 }
void isoburn_version(int *major, int *minor, int *micro)
Obtain the three release version numbers of the library.
Definition: isoburn.c:808

References isoburn_version().

Referenced by Xorriso_startup_libraries().

◆ isoburn_link()

int isoburn_link ( struct isoburn o,
struct isoburn link,
int  flag 
)

Definition at line 251 of file isoburn.c.

255 {
256 
257  /* >>> mutex */
258 
259  if(isoburn_list_start==NULL ||
260  (isoburn_list_start==link && (flag&1)))
262  if(o->prev!=NULL)
263  o->prev->next= o->next;
264  if(o->next!=NULL)
265  o->next->prev= o->prev;
266  o->prev= o->next= NULL;
267  if(link==NULL)
268  return(1);
269  if(flag&1) {
270  o->next= link;
271  o->prev= link->prev;
272  if(o->prev!=NULL)
273  o->prev->next= o;
274  link->prev= o;
275  } else {
276  o->prev= link;
277  o->next= link->next;
278  if(o->next!=NULL)
279  o->next->prev= o;
280  link->next= o;
281  }
282 
283  /* >>> end mutex */
284 
285  return(1);
286 }

References isoburn_list_start, isoburn::next, and isoburn::prev.

Referenced by isoburn_new().

◆ isoburn_make_iso_write_opts()

static int isoburn_make_iso_write_opts ( struct isoburn out_o,
struct isoburn_imgen_opts opts,
int  fifo_chunks,
IsoWriteOpts *  wopts,
int  flag 
)
static

Definition at line 402 of file isoburn.c.

407 {
408  int ret, rec_mtime, new_img, lba, nwa, i, guid_mode;
409  struct burn_drive *out_d;
410 
411  new_img= flag&1;
412 
413  iso_write_opts_set_will_cancel(wopts, opts->will_cancel);
414  iso_write_opts_set_iso_level(wopts, opts->level);
415  iso_write_opts_set_rockridge(wopts, opts->rockridge);
416  iso_write_opts_set_joliet(wopts, opts->joliet);
417  iso_write_opts_set_hfsplus(wopts, opts->hfsplus);
418  iso_write_opts_set_hfsp_block_size(wopts, opts->hfsp_block_size,
419  opts->apm_block_size);
420  iso_write_opts_set_fat(wopts, opts->fat);
421  iso_write_opts_set_iso1999(wopts, opts->iso1999);
422  iso_write_opts_set_hardlinks(wopts, opts->hardlinks);
423  if(opts->hardlinks)
424  iso_write_opts_set_rrip_1_10_px_ino(wopts, 1);
425  iso_write_opts_set_aaip(wopts, opts->aaip);
426  iso_write_opts_set_old_empty(wopts, !!opts->old_empty);
427  iso_write_opts_set_untranslated_name_len(wopts, opts->untranslated_name_len);
428  iso_write_opts_set_allow_dir_id_ext(wopts, opts->allow_dir_id_ext);
429  iso_write_opts_set_omit_version_numbers(wopts, opts->omit_version_numbers);
430  iso_write_opts_set_allow_deep_paths(wopts, opts->allow_deep_paths);
431  iso_write_opts_set_rr_reloc(wopts, opts->rr_reloc_dir, opts->rr_reloc_flags);
432  iso_write_opts_set_allow_longer_paths(wopts, opts->allow_longer_paths);
433  iso_write_opts_set_max_37_char_filenames(wopts, opts->max_37_char_filenames);
434  iso_write_opts_set_no_force_dots(wopts, opts->no_force_dots);
435  iso_write_opts_set_allow_lowercase(wopts, opts->allow_lowercase);
436  iso_write_opts_set_allow_full_ascii(wopts, opts->allow_full_ascii);
437  iso_write_opts_set_allow_7bit_ascii(wopts, opts->allow_7bit_ascii);
438  iso_write_opts_set_relaxed_vol_atts(wopts, 1);
439  iso_write_opts_set_joliet_longer_paths(wopts, opts->joliet_longer_paths);
440  iso_write_opts_set_joliet_long_names(wopts, opts->joliet_long_names);
441  iso_write_opts_set_joliet_utf16(wopts, opts->joliet_utf16);
442  iso_write_opts_set_always_gmt(wopts, opts->always_gmt);
443  iso_write_opts_set_rrip_version_1_10(wopts, opts->rrip_version_1_10);
444  rec_mtime= 0;
445  if(opts->dir_rec_mtime)
446  rec_mtime|= 1;
447  else
448  rec_mtime|= (1 << 14);
449  if(opts->joliet_rec_mtime)
450  rec_mtime|= 2;
451  if(opts->iso1999_rec_mtime)
452  rec_mtime|= 4;
453  iso_write_opts_set_dir_rec_mtime(wopts, rec_mtime);
454  iso_write_opts_set_aaip_susp_1_10(wopts, opts->aaip_susp_1_10);
455  iso_write_opts_set_sort_files(wopts, opts->sort_files);
456  iso_write_opts_set_record_md5(wopts, opts->session_md5, opts->file_md5 & 3);
457  if(opts->scdbackup_tag_name[0] && opts->scdbackup_tag_time[0])
458  iso_write_opts_set_scdbackup_tag(wopts, opts->scdbackup_tag_name,
459  opts->scdbackup_tag_time,
460  opts->scdbackup_tag_written);
461  iso_write_opts_set_replace_mode(wopts, opts->replace_dir_mode,
462  opts->replace_file_mode, opts->replace_uid, opts->replace_gid);
463  iso_write_opts_set_default_dir_mode(wopts, opts->dir_mode);
464  iso_write_opts_set_default_file_mode(wopts, opts->file_mode);
465  iso_write_opts_set_default_uid(wopts, opts->uid);
466  iso_write_opts_set_default_gid(wopts, opts->gid);
467  iso_write_opts_set_output_charset(wopts, opts->output_charset);
468  iso_write_opts_set_fifo_size(wopts, fifo_chunks);
469  ret = iso_write_opts_set_system_area(wopts, opts->system_area_data,
470  opts->system_area_options, 0);
471  if (ret < 0) {
472  isoburn_report_iso_error(ret, "Cannot set content of System Area",
473  0, "FAILURE", 0);
474  {ret= -1; goto ex;}
475  }
476  iso_write_opts_set_pvd_times(wopts,
479  opts->vol_uuid);
480  guid_mode= opts->gpt_guid_mode;
481  if(opts->vol_uuid[0] == 0 && opts->gpt_guid_mode == 2)
482  guid_mode= 0;
483  iso_write_opts_set_gpt_guid(wopts, opts->gpt_guid, guid_mode);
484  iso_write_opts_attach_jte(wopts, opts->libjte_handle);
485  iso_write_opts_set_hfsp_serial_number(wopts, opts->hfsp_serial_number);
486 
487  if(out_o != NULL) {
488  out_d= out_o->drive;
489  ret= isoburn_adjust_target_iso_head(out_o, opts->partition_offset, 0);
490  if(ret <= 0)
491  {ret= -1; goto ex;}
492  if(out_o->nwa < out_o->zero_nwa)
493  out_o->zero_nwa= 0;
494  if(opts->no_emul_toc || opts->libjte_handle != NULL) {
495  if(out_o->nwa == out_o->zero_nwa &&
497  + opts->partition_offset
498  && out_o->emulation_mode == 1) {
499  out_o->nwa= 0;
500  out_o->zero_nwa= 0;
501  out_o->min_start_byte= 0;
502  }
503  }
504  ret = isoburn_disc_track_lba_nwa(out_d, NULL, 0, &lba, &nwa);
505  opts->effective_lba= nwa;
506  ret= isoburn_get_msc2(out_o, NULL, &nwa, 0);
507  if (ret != 1) {
508  isoburn_msgs_submit(out_o, 0x00060000,
509  "Cannot determine next writeable address", 0, "FAILURE", 0);
510 
511  /* >>> NWA_V : If burn_next_track_damaged:
512  ??? Close track and session ?
513  ??? Issue a hint for a repair command ?
514  */;
515 
516  {ret= -3; goto ex;}
517  }
518  iso_write_opts_set_ms_block(wopts, nwa);
519  iso_write_opts_set_appendable(wopts, !new_img);
520  iso_write_opts_set_overwrite_buf(wopts,
521  nwa>0 ? out_o->target_iso_head : NULL);
522  }
523  iso_write_opts_set_part_offset(wopts, opts->partition_offset,
526  iso_write_opts_set_tail_blocks(wopts, opts->tail_blocks);
527  if(opts->prep_partition != NULL) {
528  ret = iso_write_opts_set_prep_img(wopts, opts->prep_partition,
529  opts->prep_part_flag & 1);
530  if(ret < 0) {
531  isoburn_report_iso_error(ret, "Cannot set path for PreP partition",
532  0, "FAILURE", 0);
533  {ret= -1; goto ex;}
534  }
535  }
536  if(opts->efi_boot_partition != NULL) {
537  ret = iso_write_opts_set_efi_bootp(wopts, opts->efi_boot_partition,
538  opts->efi_boot_part_flag & 1);
539  if(ret < 0) {
540  isoburn_report_iso_error(ret, "Cannot set path for EFI system partition",
541  0, "FAILURE", 0);
542  {ret= -1; goto ex;}
543  }
544  }
545  for(i= 0; i < Libisoburn_max_appended_partitionS; i++) {
546  if(opts->appended_partitions[i] == NULL)
547  continue;
548  ret= iso_write_opts_set_partition_img(wopts, i + 1,
549  opts->appended_part_types[i],
550  opts->appended_partitions[i],
551  opts->appended_part_flags[i]);
552  if(ret < 0) {
553  isoburn_report_iso_error(ret, "Cannot set path for appended partition",
554  0, "FAILURE", 0);
555  {ret= -1; goto ex;}
556  }
557  iso_write_opts_set_part_type_guid(wopts, i + 1,
558  opts->appended_part_type_guids[i],
559  opts->appended_part_gpt_flags[i] & 1);
560  }
561  iso_write_opts_set_appended_as_gpt(wopts, opts->appended_as_gpt);
562  iso_write_opts_set_appended_as_apm(wopts, opts->appended_as_apm);
563  iso_write_opts_set_part_like_isohybrid(wopts, opts->part_like_isohybrid);
564  iso_write_opts_set_iso_mbr_part_type(wopts, opts->iso_mbr_part_type);
565  iso_write_opts_set_iso_type_guid(wopts, opts->iso_gpt_type_guid,
566  opts->iso_gpt_flag & 1);
567  iso_write_opts_set_disc_label(wopts, opts->ascii_disc_label);
568 
569  ret= 1;
570 ex:
571  return(ret);
572 }
int isoburn_get_msc2(struct isoburn *o, struct burn_write_opts *opts, int *msc2, int flag)
Obtains the image address offset to be used with image generation.
Definition: burn_wrap.c:865
int isoburn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *opts, int trackno, int *lba, int *nwa)
Use this with trackno==0 to obtain the predicted start block number of the new session.
Definition: burn_wrap.c:831
int isoburn_adjust_target_iso_head(struct isoburn *o, uint32_t offst, int flag)
Check whether the size of target_iso_head matches the given partition offset.
Definition: isoburn.c:368
off_t min_start_byte
Definition: isoburn.h:101
int emulation_mode
Definition: isoburn.h:75

References isoburn_imgen_opts::aaip, isoburn_imgen_opts::aaip_susp_1_10, isoburn_imgen_opts::allow_7bit_ascii, isoburn_imgen_opts::allow_deep_paths, isoburn_imgen_opts::allow_dir_id_ext, isoburn_imgen_opts::allow_full_ascii, isoburn_imgen_opts::allow_longer_paths, isoburn_imgen_opts::allow_lowercase, isoburn_imgen_opts::always_gmt, isoburn_imgen_opts::apm_block_size, isoburn_imgen_opts::appended_as_apm, isoburn_imgen_opts::appended_as_gpt, isoburn_imgen_opts::appended_part_flags, isoburn_imgen_opts::appended_part_gpt_flags, isoburn_imgen_opts::appended_part_type_guids, isoburn_imgen_opts::appended_part_types, isoburn_imgen_opts::appended_partitions, isoburn_imgen_opts::ascii_disc_label, isoburn_imgen_opts::dir_mode, isoburn_imgen_opts::dir_rec_mtime, isoburn::drive, isoburn_imgen_opts::effective_lba, isoburn_imgen_opts::efi_boot_part_flag, isoburn_imgen_opts::efi_boot_partition, isoburn::emulation_mode, isoburn_imgen_opts::fat, isoburn_imgen_opts::file_md5, isoburn_imgen_opts::file_mode, isoburn_imgen_opts::gid, isoburn_imgen_opts::gpt_guid, isoburn_imgen_opts::gpt_guid_mode, isoburn_imgen_opts::hardlinks, isoburn_imgen_opts::hfsp_block_size, isoburn_imgen_opts::hfsp_serial_number, isoburn_imgen_opts::hfsplus, isoburn_imgen_opts::iso1999, isoburn_imgen_opts::iso1999_rec_mtime, isoburn_imgen_opts::iso_gpt_flag, isoburn_imgen_opts::iso_gpt_type_guid, isoburn_imgen_opts::iso_mbr_part_type, isoburn_adjust_target_iso_head(), isoburn_disc_track_lba_nwa(), isoburn_get_msc2(), isoburn_msgs_submit(), isoburn_report_iso_error(), isoburn_imgen_opts::joliet, isoburn_imgen_opts::joliet_long_names, isoburn_imgen_opts::joliet_longer_paths, isoburn_imgen_opts::joliet_rec_mtime, isoburn_imgen_opts::joliet_utf16, isoburn_imgen_opts::level, Libisoburn_max_appended_partitionS, Libisoburn_overwriteable_starT, isoburn_imgen_opts::libjte_handle, isoburn_imgen_opts::max_37_char_filenames, isoburn::min_start_byte, isoburn_imgen_opts::no_emul_toc, isoburn_imgen_opts::no_force_dots, isoburn::nwa, isoburn_imgen_opts::old_empty, isoburn_imgen_opts::omit_version_numbers, isoburn_imgen_opts::output_charset, isoburn_imgen_opts::part_like_isohybrid, isoburn_imgen_opts::partition_heads_per_cyl, isoburn_imgen_opts::partition_offset, isoburn_imgen_opts::partition_secs_per_head, isoburn_imgen_opts::prep_part_flag, isoburn_imgen_opts::prep_partition, isoburn_imgen_opts::replace_dir_mode, isoburn_imgen_opts::replace_file_mode, isoburn_imgen_opts::replace_gid, isoburn_imgen_opts::replace_uid, isoburn_imgen_opts::rockridge, isoburn_imgen_opts::rr_reloc_dir, isoburn_imgen_opts::rr_reloc_flags, isoburn_imgen_opts::rrip_version_1_10, isoburn_imgen_opts::scdbackup_tag_name, isoburn_imgen_opts::scdbackup_tag_time, isoburn_imgen_opts::scdbackup_tag_written, isoburn_imgen_opts::session_md5, isoburn_imgen_opts::sort_files, isoburn_imgen_opts::system_area_data, isoburn_imgen_opts::system_area_options, isoburn_imgen_opts::tail_blocks, isoburn::target_iso_head, isoburn_imgen_opts::uid, isoburn_imgen_opts::untranslated_name_len, isoburn_imgen_opts::vol_creation_time, isoburn_imgen_opts::vol_effective_time, isoburn_imgen_opts::vol_expiration_time, isoburn_imgen_opts::vol_modification_time, isoburn_imgen_opts::vol_uuid, isoburn_imgen_opts::will_cancel, and isoburn::zero_nwa.

Referenced by isoburn_conv_name_chars(), and isoburn_prepare_disc_aux().

◆ isoburn_msgs_submit()

int isoburn_msgs_submit ( struct isoburn o,
int  error_code,
char  msg_text[],
int  os_errno,
char  severity[],
int  flag 
)

Definition at line 340 of file isoburn.c.

342 {
343  int ret, use_drive_method= 0;
344 
345  if(o!=NULL)
346  if(o->msgs_submit!=NULL)
347  use_drive_method= 1;
348  if(use_drive_method) {
349  ret= o->msgs_submit(o->msgs_submit_handle, error_code, msg_text, os_errno,
350  severity, o->msgs_submit_flag);
351  return(ret);
352  }
353  if(libisoburn_default_msgs_submit != NULL) {
355  error_code, msg_text, os_errno, severity,
357  return(ret);
358  }
359  /* Fallback: use message queue of libburn */
360  burn_msgs_submit(error_code, msg_text, os_errno, severity, NULL);
361  return(1);
362 }
int(* libisoburn_default_msgs_submit)(void *handle, int error_code, char msg_text[], int os_errno, char severity[], int flag)
Definition: isoburn.c:51
int libisoburn_default_msgs_submit_flag
Definition: isoburn.c:54
void * libisoburn_default_msgs_submit_handle
Definition: isoburn.c:53
int(* msgs_submit)(void *handle, int error_code, char msg_text[], int os_errno, char severity[], int flag)
Definition: isoburn.h:163
int msgs_submit_flag
Definition: isoburn.h:166
void * msgs_submit_handle
Definition: isoburn.h:165

References libisoburn_default_msgs_submit, libisoburn_default_msgs_submit_flag, libisoburn_default_msgs_submit_handle, isoburn::msgs_submit, isoburn::msgs_submit_flag, and isoburn::msgs_submit_handle.

Referenced by ds_read_block(), isoburn_adjust_target_iso_head(), isoburn_attach_image(), isoburn_disc_get_msc1(), isoburn_disc_get_status(), isoburn_disc_write(), isoburn_emulate_toc(), isoburn_igopt_new(), isoburn_igopt_set_gpt_guid(), isoburn_igopt_set_hfsp_block_size(), isoburn_igopt_set_part_flag(), isoburn_igopt_set_part_type_guid(), isoburn_igopt_set_partition_img(), isoburn_igopt_set_rr_reloc(), isoburn_igopt_set_untranslated_name_len(), isoburn_inspect_partition(), isoburn_make_iso_write_opts(), isoburn_make_toc_entry(), isoburn_new(), isoburn_prepare_disc_aux(), isoburn_read_image(), isoburn_read_iso_head_parse(), isoburn_ropt_new(), isoburn_ropt_set_data_cache(), isoburn_set_msc1(), isoburn_set_start_byte(), isoburn_set_truncate(), isoburn_start_emulation(), isoburn_toc_entry_new(), and isoburn_welcome_media().

◆ isoburn_new()

int isoburn_new ( struct isoburn **  objpt,
int  flag 
)

Definition at line 115 of file isoburn.c.

116 {
117  struct isoburn *o;
118  int ret;
119 
120  *objpt= o= (struct isoburn *) malloc(sizeof(struct isoburn));
121  if(o==NULL) {
122  isoburn_msgs_submit(NULL, 0x00060000,
123  "Cannot allocate memory for isoburn control object",
124  0, "FATAL", 0);
125  return(-1);
126  }
127 
128  o->drive= NULL;
129  o->emulation_mode= 0;
130  o->fabricated_msc1= -1;
131  o->fabricated_msc2= -1;
133  o->min_start_byte= o->zero_nwa * 2048;
134  o->nwa= o->zero_nwa;
135  o->truncate= 0;
136  o->iso_source= NULL;
137  o->fabricated_disc_status= BURN_DISC_UNREADY;
138  o->media_read_error= 0;
139  o->toc= NULL;
140  o->wrote_well= -1;
143  o->target_iso_head= NULL;
144  o->image= NULL;
145  o->image_start_lba= -1;
146  o->iso_data_source= NULL;
147  o->read_pacifier= NULL;
148  o->read_pacifier_handle= NULL;
149  o->msgs_submit= NULL;
150  o->msgs_submit_handle= NULL;
151  o->msgs_submit_flag= 0;
152  o->do_tao= 0;
153  o->do_fsync= 1;
154  o->prev= NULL;
155  o->next= NULL;
156  o->target_iso_head= calloc(1, o->target_iso_head_size);
157  if(o->target_iso_head == NULL) {
158  isoburn_report_iso_error(ISO_OUT_OF_MEM, "Cannot allocate overwrite buffer",
159  0, "FATAL", 0);
160  goto failed;
161  }
162  ret= iso_image_new("ISOIMAGE", &o->image);
163  if(ret<0) {
164  isoburn_report_iso_error(ret, "Cannot create image object", 0, "FATAL", 0);
165  goto failed;
166  }
167  ret= isoburn_root_defaults(o->image, 0);
168  if(ret <= 0)
169  goto failed;
171  return(1);
172 failed:;
173  isoburn_destroy(objpt, 0);
174  return(-1);
175 }
int isoburn_link(struct isoburn *o, struct isoburn *link, int flag)
Definition: isoburn.c:251
int isoburn_root_defaults(IsoImage *image, int flag)
Initialize the root directory attributes of a freshly created image.
Definition: isofs_wrap.c:129
void * read_pacifier_handle
Definition: isoburn.h:160
int do_fsync
Definition: isoburn.h:172
int image_start_lba
Definition: isoburn.h:145
int wrote_well
Definition: isoburn.h:129
int truncate
Definition: isoburn.h:108
int(* read_pacifier)(IsoImage *, IsoFileSource *)
Definition: isoburn.h:157
int do_tao
Definition: isoburn.h:169
uint32_t loaded_partition_offset
Definition: isoburn.h:138
int fabricated_msc1
Definition: isoburn.h:85
int fabricated_msc2
Definition: isoburn.h:92
enum burn_disc_status fabricated_disc_status
Definition: isoburn.h:114
int media_read_error
Definition: isoburn.h:118

References isoburn::do_fsync, isoburn::do_tao, isoburn::drive, isoburn::emulation_mode, isoburn::fabricated_disc_status, isoburn::fabricated_msc1, isoburn::fabricated_msc2, isoburn::image, isoburn::image_start_lba, isoburn::iso_data_source, isoburn::iso_source, isoburn_destroy(), isoburn_link(), isoburn_list_start, isoburn_msgs_submit(), isoburn_report_iso_error(), isoburn_root_defaults(), Libisoburn_overwriteable_starT, Libisoburn_target_head_sizE, isoburn::loaded_partition_offset, isoburn::media_read_error, isoburn::min_start_byte, isoburn::msgs_submit, isoburn::msgs_submit_flag, isoburn::msgs_submit_handle, isoburn::next, isoburn::nwa, isoburn::prev, isoburn::read_pacifier, isoburn::read_pacifier_handle, isoburn::target_iso_head, isoburn::target_iso_head_size, isoburn::toc, isoburn::truncate, isoburn::wrote_well, and isoburn::zero_nwa.

Referenced by isoburn_welcome_media().

◆ isoburn_prepare_blind_grow()

int isoburn_prepare_blind_grow ( struct burn_drive *  in_drive,
struct burn_disc **  disc,
struct isoburn_imgen_opts opts,
struct burn_drive *  out_drive,
int  nwa 
)

Start production of an ISO 9660 image using the method of Blind Growing: Create a disc object for writing an add-on session from the created or loaded IsoImage which has been manipulated via libisofs, to a different drive than the one from where it was loaded.

Usually output will be stdio:/dev/fd/1 (i.e. stdout) being piped into some burn program like with this classic gesture: mkisofs -M $dev -C $msc1,$nwa | cdrecord -waiti dev=$dev Parameter translation into libisoburn: $dev is the address by which parameter in_drive of this call was acquired $msc1 was set by isoburn_set_msc1() before image reading or was detected from the in_drive medium $nwa is a parameter of this call or can be used as detected from the in_drive medium

This call starts a libisofs thread which begins to produce the image. It has to be revoked by isoburn_cancel_prepared_write() if for some reason this image data stream shall not be consumed. This call waits for libisofs output to become available and then detaches the input drive object from the data source object by which libisofs was reading from the input drive. So, as far as libisofs is concerned, that drive may be released immediately after this call in order to allow the consumer to access the drive for writing. The consumer should wait for input to become available and only then open its burn drive. With cdrecord this is caused by option -waiti.

The resulting burn_disc object has to be disposed when all its writing is done and the drive is BURN_DRIVE_IDLE again after asynchronous burn_disc_write().

Since
0.2.2
Parameters
in_driveThe input drive,grabbed with isoburn_drive_scan_and_grab().
discReturns the newly created burn_disc object.
optsOptions for image generation and data transport to media.
out_driveThe output drive, from isoburn_drive_aquire() et.al.. typically stdio:/dev/fd/1 .
nwaThe address (2048 byte block count) where the add-on session will be finally stored on a mountable medium or in a mountable file. If nwa is -1 then the address is used as determined from the in_drive medium.
Returns
<=0 error , 1 = success

Definition at line 739 of file isoburn.c.

742 {
743  int ret;
744  struct isoburn *o= NULL;
745 
746  ret= isoburn_find_emulator(&o, out_drive, 0);
747  if(ret<0 || o==NULL)
748  return(-1);
749  if(nwa >= 0)
750  o->fabricated_msc2= nwa;
751  if(o->nwa == o->zero_nwa)
752  o->nwa= o->zero_nwa= 0;
753  else
754  o->zero_nwa= 0;
755  o->min_start_byte= 0;
756  ret= isoburn_prepare_disc_aux(d, out_drive, disc, opts, 2);
757  if (ret<=0)
758  return ret;
759  return(1);
760 }
static int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d, struct burn_disc **disc, struct isoburn_imgen_opts *opts, int flag)
Definition: isoburn.c:580

References isoburn::fabricated_msc2, isoburn_find_emulator(), isoburn_prepare_disc_aux(), isoburn::min_start_byte, isoburn::nwa, and isoburn::zero_nwa.

Referenced by Xorriso_write_session().

◆ isoburn_prepare_disc()

int isoburn_prepare_disc ( struct burn_drive *  drive,
struct burn_disc **  disc,
struct isoburn_imgen_opts opts 
)

Start production of an ISO 9660 image using the method of Growing: Create a disc object for writing the new session from the created or loaded iso_volset which has been manipulated via libisofs, to the same medium from where the image was eventually loaded.

This call starts a libisofs thread which begins to produce the image. It has to be revoked by isoburn_cancel_prepared_write() if for some reason this image data stream shall not be consumed. The returned struct burn_disc is ready for use by a subsequent call to isoburn_disc_write(). After this asynchronous writing has ended and the drive is BURN_DRIVE_IDLE again, the burn_disc object has to be disposed by burn_disc_free().

Since
0.1.0
Parameters
driveThe combined source and target drive, grabbed with isoburn_drive_scan_and_grab(). .
discReturns the newly created burn_disc object.
optsImage generation options, see isoburn_igopt_*()
Returns
<=0 error , 1 = success

Definition at line 718 of file isoburn.c.

720 {
721  return isoburn_prepare_disc_aux(d, d, disc, opts, 0);
722 }

References isoburn_prepare_disc_aux().

Referenced by Xorriso_write_session().

◆ isoburn_prepare_disc_aux()

static int isoburn_prepare_disc_aux ( struct burn_drive *  in_d,
struct burn_drive *  out_d,
struct burn_disc **  disc,
struct isoburn_imgen_opts opts,
int  flag 
)
static

Definition at line 580 of file isoburn.c.

583 {
584  struct burn_source *wsrc;
585  struct burn_session *session;
586  struct burn_track *track;
587  struct isoburn *in_o, *out_o;
588  IsoWriteOpts *wopts= NULL;
589  enum burn_disc_status state;
590  int ret, fifo_chunks, i, new_img, early_indev_release;
591  uint32_t data_start= -1;
592  size_t buffer_size= 0, buffer_free= 0;
593  char *msg= NULL;
594 
595  msg= calloc(1, 160);
596  if(msg == NULL)
597  {ret= -1; goto ex;}
598 
599  new_img= flag&1;
600  early_indev_release= flag&2;
601 
602  ret= isoburn_find_emulator(&in_o, in_d, 0);
603  if(ret<0 || in_o==NULL)
604  {ret= -1; goto ex;}
605  ret= isoburn_find_emulator(&out_o, out_d, 0);
606  if(ret<0 || out_o==NULL)
607  {ret= -1; goto ex;}
608  /* early end will be registered as failure */
609  in_o->wrote_well= out_o->wrote_well= 0;
610 
611  if(new_img && early_indev_release) {
612  isoburn_msgs_submit(in_o, 0x00060000,
613  "Programming error: Wrong session setup: new_img && early_indev_release",
614  0, "FATAL", 0);
615  {ret= -4; goto ex;}
616  }
617 
618  out_o->do_tao = opts->do_tao;
619  out_o->do_fsync = opts->do_fsync;
620 
621  state = isoburn_disc_get_status(in_d);
622  if (state != BURN_DISC_BLANK && state != BURN_DISC_APPENDABLE &&
623  state != BURN_DISC_FULL) {
624  isoburn_msgs_submit(in_o, 0x00060000, "Unsuitable source media state",
625  0, "FAILURE", 0);
626  {ret= -2; goto ex;}
627  }
628  state = isoburn_disc_get_status(out_d);
629  if (state != BURN_DISC_BLANK && state != BURN_DISC_APPENDABLE) {
630  isoburn_msgs_submit(out_o, 0x00060000, "Unsuitable target media state",
631  0, "FAILURE", 0);
632  {ret= -2; goto ex;}
633  }
634  if (state != BURN_DISC_BLANK && opts->libjte_handle != NULL) {
635  isoburn_msgs_submit(out_o, 0x00060000,
636  "Jigdo Template Extraction works only on blank target media",
637  0, "FAILURE", 0);
638  {ret= -2; goto ex;}
639  }
640 
641  fifo_chunks= 32;
642  if(opts->fifo_size >= 64*1024 && opts->fifo_size <= 1024.0 * 1024.0 * 1024.0){
643  fifo_chunks= opts->fifo_size/2048;
644  if(fifo_chunks*2048 < opts->fifo_size)
645  fifo_chunks++;
646  }
647 
648  ret= iso_write_opts_new(&wopts, 0);
649  if (ret < 0) {
650  isoburn_report_iso_error(ret, "Cannot create iso_write_opts", 0, "FATAL",0);
651  goto ex;
652  }
653  ret= isoburn_make_iso_write_opts(out_o, opts, fifo_chunks, wopts, flag & 1);
654  if(ret < 0)
655  goto ex;
656 
657  ret = iso_image_create_burn_source(in_o->image, wopts, &wsrc);
658  if (ret < 0) {
659  isoburn_report_iso_error(ret, "Cannot create burn source", 0, "FAILURE", 0);
660  {ret= -1; goto ex;}
661  }
662  if (early_indev_release) {
663  for(i= 0; i<300; i++) {
664 
665  /* <<< ??? */
666  if((i%30) == 0) {
667  sprintf(msg, "Waiting for data in fifo since %d seconds", i/30);
668  isoburn_msgs_submit(in_o, 0x00060000, msg, 0, "DEBUG", 0);
669  }
670 
671  usleep(100000);
672  ret= iso_ring_buffer_get_status(wsrc, &buffer_size, &buffer_free);
673  if(ret >0 && buffer_size != buffer_free)
674  break;
675  }
676 
677  /* <<< ??? */
678  sprintf(msg,
679  "After %.1f seconds: %d bytes of output available (fifo state=%d)",
680  ((double) i+1) / 10.0, (int) (buffer_size - buffer_free), ret);
681  isoburn_msgs_submit(in_o, 0x00060000, msg, 0, "DEBUG", 0);
682 
683  if(in_o->iso_data_source!=NULL)
685  }
686 
687  ret= iso_write_opts_get_data_start(wopts, &data_start, 0);
688  opts->data_start_lba= -1;
689  if(ret > 0 && data_start <= 0x7FFFFFFF)
690  opts->data_start_lba= data_start;
691 
692  /* TODO check return values for failure. properly clean-up on error */
693 
694  out_o->iso_source= wsrc;
695 
696  *disc = burn_disc_create();
697  session = burn_session_create();
698  burn_disc_add_session(*disc, session, BURN_POS_END);
699  track = burn_track_create();
700  burn_track_set_source(track, out_o->iso_source);
701  burn_session_add_track(session, track, BURN_POS_END);
702 
703  /* give up local references */
704  burn_track_free(track);
705  burn_session_free(session);
706 
707  in_o->wrote_well= out_o->wrote_well= -1; /* neutral */
708  ret= 1;
709 ex:
710  if(wopts!=NULL)
711  {iso_write_opts_free(wopts); wopts= NULL;}
712  if(msg != NULL)
713  free(msg);
714  return ret;
715 }
enum burn_disc_status isoburn_disc_get_status(struct burn_drive *drive)
Inquire the medium status.
Definition: burn_wrap.c:646
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().
Definition: data_source.c:313

References isoburn_imgen_opts::data_start_lba, isoburn::do_fsync, isoburn_imgen_opts::do_fsync, isoburn::do_tao, isoburn_imgen_opts::do_tao, isoburn_imgen_opts::fifo_size, isoburn::image, isoburn::iso_data_source, isoburn::iso_source, isoburn_data_source_shutdown(), isoburn_disc_get_status(), isoburn_find_emulator(), isoburn_make_iso_write_opts(), isoburn_msgs_submit(), isoburn_report_iso_error(), isoburn_imgen_opts::libjte_handle, and isoburn::wrote_well.

Referenced by isoburn_prepare_blind_grow(), isoburn_prepare_disc(), and isoburn_prepare_new_image().

◆ isoburn_prepare_new_image()

int isoburn_prepare_new_image ( struct burn_drive *  in_drive,
struct burn_disc **  disc,
struct isoburn_imgen_opts opts,
struct burn_drive *  out_drive 
)

Start production of an ISO 9660 image using the method of Modifying: Create a disc object for producing a new image from a previous image plus the changes made by user.

The generated burn_disc is suitable to be written to a grabbed drive with blank writeable medium. But you must not use the same drive for input and output, because data will be read from the source drive while at the same time the target drive is already writing. This call starts a libisofs thread which begins to produce the image. It has to be revoked by isoburn_cancel_prepared_write() if for some reason this image data stream shall not be consumed. The resulting burn_disc object has to be disposed when all its writing is done and the drive is BURN_DRIVE_IDLE again after asynchronous burn_disc_write().

Since
0.1.0
Parameters
in_driveThe input drive, grabbed with isoburn_drive_aquire() or one of its alternatives.
discReturns the newly created burn_disc object.
optsOptions for image generation and data transport to the medium.
out_driveThe output drive, from isoburn_drive_aquire() et.al..
Returns
<=0 error , 1 = success

Definition at line 725 of file isoburn.c.

728 {
729  int ret;
730 
731  ret= isoburn_prepare_disc_aux(d, out_drive, disc, opts, 1);
732  if (ret<=0)
733  return ret;
734  return 1;
735 }

References isoburn_prepare_disc_aux().

Referenced by Xorriso_write_session().

◆ isoburn_ropt_destroy()

int isoburn_ropt_destroy ( struct isoburn_read_opts **  o,
int  flag 
)

Deletes an option set which was created by isoburn_ropt_new().

Since
0.1.0
Parameters
oThe option set to work on
flagBitfield for control purposes. Submit 0 for now.
Returns
1= **o destroyed , 0= *o was already NULL (harmless)

Definition at line 886 of file isoburn.c.

887 {
888  if(*o==NULL)
889  return(0);
890  free(*o);
891  *o= NULL;
892  return(1);
893 }

Referenced by Xorriso_aquire_drive(), and Xorriso_create_empty_iso().

◆ isoburn_ropt_get_auto_incharset()

int isoburn_ropt_get_auto_incharset ( struct isoburn_read_opts o,
int *  mode 
)

Definition at line 1050 of file isoburn.c.

1051 {
1052  *mode= o->auto_input_charset;
1053  return(1);
1054 }
int auto_input_charset
Enable or disable methods to automatically choose an input charset.
Definition: isoburn.h:364

References isoburn_read_opts::auto_input_charset, and isoburn_read_opts::mode.

◆ isoburn_ropt_get_data_cache()

int isoburn_ropt_get_data_cache ( struct isoburn_read_opts o,
int *  cache_tiles,
int *  tile_blocks,
int *  set_flag,
int  flag 
)

Inquire the current settings of isoburn_set_data_cache().

Since
1.2.2
Parameters
oThe option set to work on. NULL has the same effect as flag bit0.
cache_tilesWill return the number of tiles in the cache.
tile_blocksWill return the number of blocks per tile.
set_flagWill return control bits. None are defined yet.
flagBitfield for control purposes bit0= return default values rather than current ones
Returns
<=0 error , >0 reply is valid

Definition at line 932 of file isoburn.c.

935 {
936  if((flag & 1) || o == NULL) {
937  *cache_tiles= Libisoburn_default_cache_tileS;
938  *tile_blocks= Libisoburn_default_tile_blockS;
939  *set_flag= 0;
940  return(1);
941  }
942  *cache_tiles= o->cache_tiles;
943  *tile_blocks= o->cache_tile_blocks;
944  *set_flag= 0;
945  return(1);
946 }
#define Libisoburn_default_tile_blockS
Definition: isoburn.h:279
#define Libisoburn_default_cache_tileS
Default settings for above cache_tiles, tile_blocks in newly created struct isoburn_read_opts.
Definition: isoburn.h:278
int cache_tile_blocks
Definition: isoburn.h:320

References isoburn_read_opts::cache_tile_blocks, isoburn_read_opts::cache_tiles, Libisoburn_default_cache_tileS, and Libisoburn_default_tile_blockS.

Referenced by Xorriso_set_data_cache().

◆ isoburn_ropt_get_default_dirperms()

int isoburn_ropt_get_default_dirperms ( struct isoburn_read_opts o,
mode_t *  mode 
)

Definition at line 1019 of file isoburn.c.

1021 {
1022  *mode= o->dirmode;
1023  return(1);
1024 }
mode_t dirmode
Default mode for directories when no RR (only permissions)
Definition: isoburn.h:349

References isoburn_read_opts::dirmode, and isoburn_read_opts::mode.

◆ isoburn_ropt_get_default_perms()

int isoburn_ropt_get_default_perms ( struct isoburn_read_opts o,
uid_t *  uid,
gid_t *  gid,
mode_t *  mode 
)

Definition at line 1001 of file isoburn.c.

1003 {
1004  *uid= o->uid;
1005  *gid= o->gid;
1006  *mode= o->mode;
1007  return(1);
1008 }
uid_t uid
Default uid when no RR.
Definition: isoburn.h:346
mode_t mode
Default mode when no RR (only permissions)
Definition: isoburn.h:348
gid_t gid
Default uid when no RR.
Definition: isoburn.h:347

References isoburn_read_opts::gid, isoburn_read_opts::mode, and isoburn_read_opts::uid.

◆ isoburn_ropt_get_displacement()

int isoburn_ropt_get_displacement ( struct isoburn_read_opts o,
uint32_t *  displacement,
int *  displacement_sign 
)

Definition at line 1066 of file isoburn.c.

1068 {
1069  *displacement= o->displacement;
1070  *displacement_sign= o->displacement_sign;
1071  return(1);
1072 }
uint32_t displacement
Definition: isoburn.h:398
int displacement_sign
Definition: isoburn.h:399

References isoburn_read_opts::displacement, and isoburn_read_opts::displacement_sign.

◆ isoburn_ropt_get_extensions()

int isoburn_ropt_get_extensions ( struct isoburn_read_opts o,
int *  ext 
)

Definition at line 969 of file isoburn.c.

970 {
971  *ext= (!!o->norock) | ((!!o->nojoliet)<<1) | ((!!o->noiso1999)<<2) |
972  ((!!o->preferjoliet)<<3) | ((!!o->pretend_blank)<<4) |
973  ((!!o->noaaip) << 5) | ((!!o->noacl) << 6) | ((!!o->noea) << 7) |
974  ((!!o->noino) << 8) | ((o->nomd5 & 3) << 9) |
975  ((!!o->do_ecma119_map) << 11) | ((o->map_mode & 3) << 12) |
976  ((!!o->do_joliet_map) << 14) | ((!!o->joliet_map_mode) << 15);
977  return(1);
978 }
unsigned int noaaip
Definition: isoburn.h:333
unsigned int noacl
Definition: isoburn.h:334
unsigned int noino
Definition: isoburn.h:338
unsigned int nojoliet
Definition: isoburn.h:323
unsigned int norock
Definition: isoburn.h:322
unsigned int do_ecma119_map
Definition: isoburn.h:326
unsigned int map_mode
Definition: isoburn.h:327
unsigned int nomd5
Definition: isoburn.h:341
unsigned int noiso1999
Definition: isoburn.h:324
unsigned int preferjoliet
Definition: isoburn.h:343
unsigned int do_joliet_map
Definition: isoburn.h:329
unsigned int noea
Definition: isoburn.h:335
unsigned int joliet_map_mode
Definition: isoburn.h:330
unsigned int pretend_blank
Definition: isoburn.h:396

References isoburn_read_opts::do_ecma119_map, isoburn_read_opts::do_joliet_map, isoburn_read_opts::joliet_map_mode, isoburn_read_opts::map_mode, isoburn_read_opts::noaaip, isoburn_read_opts::noacl, isoburn_read_opts::noea, isoburn_read_opts::noino, isoburn_read_opts::noiso1999, isoburn_read_opts::nojoliet, isoburn_read_opts::nomd5, isoburn_read_opts::norock, isoburn_read_opts::preferjoliet, and isoburn_read_opts::pretend_blank.

◆ isoburn_ropt_get_input_charset()

int isoburn_ropt_get_input_charset ( struct isoburn_read_opts o,
char **  input_charset 
)

Definition at line 1035 of file isoburn.c.

1037 {
1038  *input_charset= o->input_charset;
1039  return(1);
1040 }
char * input_charset
Input charset for RR file names.
Definition: isoburn.h:355

References isoburn_read_opts::input_charset.

◆ isoburn_ropt_get_size_what()

int isoburn_ropt_get_size_what ( struct isoburn_read_opts o,
uint32_t *  size,
int *  has_what 
)

Definition at line 1099 of file isoburn.c.

1101 {
1102  *size= o->size;
1103  *has_what= (!!o->hasRR) | ((!!o->hasJoliet)<<1) |
1104  ((!!o->hasIso1999)<<2) | ((!!o->hasElTorito)<<3);
1105  return(1);
1106 }
unsigned int hasIso1999
It will be set to 1 if the image is an ISO 9660:1999, i.e.
Definition: isoburn.h:384
unsigned int hasRR
Definition: isoburn.h:375
unsigned int hasJoliet
Definition: isoburn.h:377
uint32_t size
Will be filled with the size (in 2048 byte block) of the image, as reported in the PVM.
Definition: isoburn.h:389
unsigned int hasElTorito
It will be set to 1 if El-Torito boot record is present, to 0 if not.
Definition: isoburn.h:387

References isoburn_read_opts::hasElTorito, isoburn_read_opts::hasIso1999, isoburn_read_opts::hasJoliet, isoburn_read_opts::hasRR, and isoburn_read_opts::size.

Referenced by Xorriso_aquire_drive().

◆ isoburn_ropt_get_tree_loaded()

int isoburn_ropt_get_tree_loaded ( struct isoburn_read_opts o,
int *  tree,
int *  rr 
)

After calling function isoburn_read_image() there are information available in the option set about which tree was used for image loading and whether Rock Ridge information was actually used.

Since
1.5.4
Parameters
oThe option set to work on
treeThe tree which was loaded: 0= ISO 9660 , 1 = Joliet , 2 = ISO 9660:1999
rr1= Rock Ridge information was used, 0 = No Rock Ridge was used
Returns
1 success, <=0 failure

Definition at line 1109 of file isoburn.c.

1111 {
1112  *tree= o->tree_loaded;
1113  *rr= o->rr_loaded;
1114  return(1);
1115 }

References isoburn_read_opts::rr_loaded, and isoburn_read_opts::tree_loaded.

Referenced by Xorriso_aquire_drive().

◆ isoburn_ropt_get_truncate_mode()

int isoburn_ropt_get_truncate_mode ( struct isoburn_read_opts o,
int *  mode,
int *  length 
)

Definition at line 1090 of file isoburn.c.

1092 {
1093  *mode= o->truncate_mode;
1094  *length= o->truncate_length;
1095  return(1);
1096 }
int truncate_mode
What to do in case of name longer than truncate_length: 0= throw FAILURE 1= truncate to truncate_leng...
Definition: isoburn.h:371

References isoburn_read_opts::mode, isoburn_read_opts::truncate_length, and isoburn_read_opts::truncate_mode.

◆ isoburn_ropt_new()

int isoburn_ropt_new ( struct isoburn_read_opts **  o,
int  flag 
)

Produces a set of image read options, initialized with default values.

Since
0.1.0
Parameters
othe newly created option set object
flagBitfield for control purposes. Submit 0 for now.
Returns
1=ok , <0 = failure

Definition at line 842 of file isoburn.c.

843 {
844  struct isoburn_read_opts *o;
845 
846  o= (*new_o)= calloc(1, sizeof(struct isoburn_read_opts));
847  if(o==NULL) {
848  isoburn_msgs_submit(NULL, 0x00060000,
849  "Cannot allocate memory for read options", 0, "FATAL", 0);
850  return(-1);
851  }
854  o->norock= 0;
855  o->nojoliet= 0;
856  o->noiso1999= 1;
857  o->do_ecma119_map= 0;
858  o->map_mode= 1;
859  o->do_joliet_map= 0;
860  o->joliet_map_mode= 1;
861  o->noaaip= 1;
862  o->noacl= 1;
863  o->noea= 1;
864  o->noino= 1;
865  o->nomd5= 1;
866  o->preferjoliet= 0;
867  o->uid= geteuid();
868  o->gid= getegid();
869  o->mode= 0444;
870  o->dirmode= 0555;
871  o->input_charset= NULL;
872  o->truncate_mode= 1;
873  o->truncate_length= 255;
874  o->hasRR= 0;
875  o->hasJoliet= 0;
876  o->hasIso1999= 0;
877  o->hasElTorito= 0;
878  o->size= 0;
879  o->pretend_blank= 1;
880  o->displacement= 0;
881  o->displacement_sign= 0;
882  return(1);
883 }
Options for image reading.
Definition: isoburn.h:318

References isoburn_read_opts::cache_tile_blocks, isoburn_read_opts::cache_tiles, isoburn_read_opts::dirmode, isoburn_read_opts::displacement, isoburn_read_opts::displacement_sign, isoburn_read_opts::do_ecma119_map, isoburn_read_opts::do_joliet_map, isoburn_read_opts::gid, isoburn_read_opts::hasElTorito, isoburn_read_opts::hasIso1999, isoburn_read_opts::hasJoliet, isoburn_read_opts::hasRR, isoburn_read_opts::input_charset, isoburn_msgs_submit(), isoburn_read_opts::joliet_map_mode, Libisoburn_default_cache_tileS, Libisoburn_default_tile_blockS, isoburn_read_opts::map_mode, isoburn_read_opts::mode, isoburn_read_opts::noaaip, isoburn_read_opts::noacl, isoburn_read_opts::noea, isoburn_read_opts::noino, isoburn_read_opts::noiso1999, isoburn_read_opts::nojoliet, isoburn_read_opts::nomd5, isoburn_read_opts::norock, isoburn_read_opts::preferjoliet, isoburn_read_opts::pretend_blank, isoburn_read_opts::size, isoburn_read_opts::truncate_length, isoburn_read_opts::truncate_mode, and isoburn_read_opts::uid.

Referenced by Xorriso_aquire_drive(), and Xorriso_create_empty_iso().

◆ isoburn_ropt_set_auto_incharset()

int isoburn_ropt_set_auto_incharset ( struct isoburn_read_opts o,
int  mode 
)

Enable or disable methods to automatically choose an input charset.

This eventually overrides the name set via isoburn_ropt_set_input_charset()

Since
0.3.8
Parameters
oThe option set to work on
modeBitfield for control purposes: bit0= set the input character set automatically from attribute "isofs.cs" of root directory. Submit any other bits with value 0.
Returns
1 success, <=0 failure

Definition at line 1043 of file isoburn.c.

1044 {
1045  o->auto_input_charset= mode & 1;
1046  return(1);
1047 }

References isoburn_read_opts::auto_input_charset, and isoburn_read_opts::mode.

Referenced by Xorriso_aquire_drive().

◆ isoburn_ropt_set_data_cache()

int isoburn_ropt_set_data_cache ( struct isoburn_read_opts o,
int  cache_tiles,
int  tile_blocks,
int  flag 
)

Sets the size and granularity of the cache which libisoburn provides to libisofs for reading of ISO image data.

This cache consists of several tiles which are buffers of a given size. The ISO image is divided into virtual tiles of that size. A cache tile may hold an in-memory copy of such a virtual image tile. When libisofs requests to read a block, then first the cache is inquired whether it holds that block. If not, then the block is read via libburn together with its neighbors in their virtual image tile into a free cache tile. If no cache tile is free, then the one will be re-used which has the longest time of not being hit by a read attempt.

A larger cache might speed up image loading by reducing the number of libburn read calls on the directory tree. It might also help with reading the content of many small files, if for some reason it is not an option to sort access by LBA. Caching will not provide much benefit with libburn "stdio:" drives, because the operating system is supposed to provide the same speed-up in a more flexible way.

Since
1.2.2
Parameters
oThe option set to work on. It is permissible to submit NULL in order to just have the parameters tested.
cache_tilesNumber of tiles in the cache. Not less than 1. Default is 32.
tile_blocksNumber of blocks per tile. Must be a power of 2. Default is 32. cache_tiles * tile_blocks * 2048 must not exceed 1073741824 (= 1 GiB).
flagBitfield for control purposes. Unused yet. Submit 0.
Returns
<=0 error , >0 ok

Definition at line 896 of file isoburn.c.

898 {
899  int i;
900  char msg[80];
901 
902  if(cache_tiles < 1) {
903  isoburn_msgs_submit(NULL, 0x00060000,
904  "Requested number of data cache tiles is too small (< 1)",
905  0, "SORRY", 0);
906  return(0);
907  }
908  if(((double) cache_tiles) * ((double) tile_blocks)
909  > (double) Libisoburn_cache_max_sizE) {
910  sprintf(msg, "Requested size of data cache exceeds limit of %.f blocks",
911  (double) Libisoburn_cache_max_sizE);
912  isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "SORRY", 0);
913  return(0);
914  }
915  for(i = 1; i <= Libisoburn_cache_max_sizE; i = i << 1)
916  if(i == tile_blocks)
917  break;
918  if(i > Libisoburn_cache_max_sizE) {
919  isoburn_msgs_submit(NULL, 0x00060000,
920  "Requested number of blocks per data cache tiles is not a power of 2",
921  0, "SORRY", 0);
922  return(0);
923  }
924  if(o != NULL) {
925  o->cache_tiles= cache_tiles;
926  o->cache_tile_blocks= tile_blocks;
927  }
928  return(1);
929 }
#define Libisoburn_cache_max_sizE
Maximum size of the cache in 2 kB blocks (1 GB)
Definition: isoburn.h:283

References isoburn_read_opts::cache_tile_blocks, isoburn_read_opts::cache_tiles, isoburn_msgs_submit(), and Libisoburn_cache_max_sizE.

Referenced by Xorriso_create_empty_iso(), and Xorriso_set_data_cache().

◆ isoburn_ropt_set_default_dirperms()

int isoburn_ropt_set_default_dirperms ( struct isoburn_read_opts o,
mode_t  mode 
)

Default attributes to use on directories if no RockRidge extension gets loaded.

Above call isoburn_ropt_set_default_perms() automatically adds x-permissions to r-permissions for directories. This call here may be done afterwards to set independent permissions for directories, especially to override the automatically added x-permissions.

Since
0.1.0
Parameters
oThe option set to work on
modepermissions (not file type) as of man 2 stat.
Returns
1 success, <=0 failure

Definition at line 1011 of file isoburn.c.

1013 {
1014  o->dirmode= mode;
1015  return(1);
1016 }

References isoburn_read_opts::dirmode, and isoburn_read_opts::mode.

◆ isoburn_ropt_set_default_perms()

int isoburn_ropt_set_default_perms ( struct isoburn_read_opts o,
uid_t  uid,
gid_t  gid,
mode_t  mode 
)

Default attributes to use if no RockRidge extension gets loaded.

Since
0.1.0
Parameters
oThe option set to work on
uiduser id number (see /etc/passwd)
gidgroup id number (see /etc/group)
modepermissions (not file type) as of man 2 stat. With directories, r-permissions will automatically imply x-permissions. See isoburn_ropt_set_default_dirperms() below.
Returns
1 success, <=0 failure

Definition at line 981 of file isoburn.c.

983 {
984  mode_t dirmode;
985 
986  o->uid= uid;
987  o->gid= gid;
988  o->mode= mode;
989  dirmode= mode;
990  if(dirmode & S_IRUSR)
991  dirmode|= S_IXUSR;
992  if(dirmode & S_IRGRP)
993  dirmode|= S_IXGRP;
994  if(dirmode & S_IROTH)
995  dirmode|= S_IXOTH;
996  o->dirmode= dirmode;
997  return(1);
998 }

References isoburn_read_opts::dirmode, isoburn_read_opts::gid, isoburn_read_opts::mode, and isoburn_read_opts::uid.

Referenced by Xorriso_aquire_drive().

◆ isoburn_ropt_set_displacement()

int isoburn_ropt_set_displacement ( struct isoburn_read_opts o,
uint32_t  displacement,
int  displacement_sign 
)

Control an offset to be applied to all block address pointers in the ISO image in order to compensate for an eventual displacement of the image relative to the start block address for which it was produced.

E.g. if track number 2 from CD gets copied into a disk file and shall then be loaded as ISO filesystem, then the directory tree and all data file content of the track copy will become readable by setting the track start address as displacement and -1 as displacement_sign. Data file content outside the track will of course not be accessible and eventually produce read errors.

Since
0.6.6
Parameters
oThe option set to work on
displacement0 or a positive number
displacement_signDetermines whether to add or subtract displacement to block addresses before applying them to the storage object for reading: +1 = add , -1= subtract , else keep unaltered

Definition at line 1057 of file isoburn.c.

1059 {
1060  o->displacement= displacement;
1061  o->displacement_sign= displacement_sign;
1062  return(1);
1063 }

References isoburn_read_opts::displacement, and isoburn_read_opts::displacement_sign.

Referenced by Xorriso_aquire_drive().

◆ isoburn_ropt_set_extensions()

int isoburn_ropt_set_extensions ( struct isoburn_read_opts o,
int  ext 
)

Definition at line 949 of file isoburn.c.

950 {
951  o->norock= !!(ext&1);
952  o->nojoliet= !!(ext&2);
953  o->noiso1999= !!(ext&4);
954  o->preferjoliet= !!(ext&8);
955  o->pretend_blank= !!(ext&16);
956  o->noaaip= !!(ext & 32);
957  o->noacl= !!(ext & 64);
958  o->noea= !!(ext & 128);
959  o->noino= !!(ext & 256);
960  o->nomd5= (ext >> 9) & 3;
961  o->do_ecma119_map= !!(ext & 2048);
962  o->map_mode= (ext >> 12) & 3;
963  o->do_joliet_map= !!(ext & 16384);
964  o->joliet_map_mode= !!(ext & 32768);
965  return(1);
966 }

References isoburn_read_opts::do_ecma119_map, isoburn_read_opts::do_joliet_map, isoburn_read_opts::joliet_map_mode, isoburn_read_opts::map_mode, isoburn_read_opts::noaaip, isoburn_read_opts::noacl, isoburn_read_opts::noea, isoburn_read_opts::noino, isoburn_read_opts::noiso1999, isoburn_read_opts::nojoliet, isoburn_read_opts::nomd5, isoburn_read_opts::norock, isoburn_read_opts::preferjoliet, and isoburn_read_opts::pretend_blank.

Referenced by Xorriso_aquire_drive(), and Xorriso_create_empty_iso().

◆ isoburn_ropt_set_input_charset()

int isoburn_ropt_set_input_charset ( struct isoburn_read_opts o,
char *  input_charset 
)

Set the character set for reading RR file names from ISO images.

Since
0.1.0
Parameters
oThe option set to work on
input_charsetSet this to NULL to use the default locale charset For selecting a particular character set, submit its name, e.g. as listed by program iconv -l. Example: "UTF-8".
Returns
1 success, <=0 failure

Definition at line 1027 of file isoburn.c.

1029 {
1030  o->input_charset= input_charset;
1031  return(1);
1032 }

References isoburn_read_opts::input_charset.

Referenced by Xorriso_aquire_drive(), and Xorriso_create_empty_iso().

◆ isoburn_ropt_set_truncate_mode()

int isoburn_ropt_set_truncate_mode ( struct isoburn_read_opts o,
int  mode,
int  length 
)

Set the name truncation mode and the maximum name length for imported file objects.

Since
1.4.2
Parameters
oThe option set to work on
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 32 bytes of that length by the hex representation of the MD5 of the whole oversized name. Potential incomplete UTF-8 characters will get their leading bytes replaced by '_'. This is the default.
lengthMaximum byte count of a file name. Permissible values are 64 to 255. Default is 255.

Definition at line 1075 of file isoburn.c.

1077 {
1078  if(mode < 0 || mode > 1)
1079  mode= 1;
1080  if(length < 64)
1081  length= 64;
1082  if(length > 255)
1083  length= 255;
1084  o->truncate_mode= mode;
1085  o->truncate_length= length;
1086  return(1);
1087 }

References isoburn_read_opts::mode, isoburn_read_opts::truncate_length, and isoburn_read_opts::truncate_mode.

Referenced by Xorriso_aquire_drive(), and Xorriso_create_empty_iso().

◆ isoburn_sync_after_write()

int isoburn_sync_after_write ( struct burn_drive *  input_drive,
struct burn_drive *  output_drive,
int  flag 
)

Wait after normal end of operations until libisofs ended all write threads and freed resource reservations.

This call is not mandatory. But without it, messages from the ending threads might appear after the application ended its write procedure.

Since
0.1.0
Parameters
input_driveThe drive or in_drive which was used with the preparation call.
output_driveThe out_drive used with isoburn_prepare_new_image(), NULL if none.
flagBitfield, submit 0 for now.
Returns
<=0 error , 1 = success

Definition at line 801 of file isoburn.c.

803 {
804  return isoburn_cancel_prepared_write(d, output_drive, 1);
805 }
int isoburn_cancel_prepared_write(struct burn_drive *d, struct burn_drive *output_drive, int flag)
Revoke isoburn_prepare_*() instead of running isoburn_disc_write().
Definition: isoburn.c:767

References isoburn_cancel_prepared_write().

Referenced by Xorriso_write_session().

◆ isoburn_toc_entry_destroy()

int isoburn_toc_entry_destroy ( struct isoburn_toc_entry **  o,
int  flag 
)

Definition at line 89 of file isoburn.c.

90 {
91  if(*o==NULL)
92  return(0);
93  if(flag&1)
94  isoburn_toc_entry_destroy(&((*o)->next), flag);
95  if((*o)->volid != NULL)
96  free((*o)->volid);
97  free((char *) (*o));
98  *o= NULL;
99  return(1);
100 }

Referenced by isoburn_destroy(), and isoburn_emulate_toc().

◆ isoburn_toc_entry_new()

int isoburn_toc_entry_new ( struct isoburn_toc_entry **  objpt,
struct isoburn_toc_entry boss,
int  flag 
)

Definition at line 60 of file isoburn.c.

62 {
63  struct isoburn_toc_entry *o, *s;
64 
65  *objpt= o= (struct isoburn_toc_entry *)
66  malloc(sizeof(struct isoburn_toc_entry));
67  if(o==NULL) {
68  isoburn_msgs_submit(NULL, 0x00060000,
69  "Cannot allocate memory for isoburn toc entry",
70  0, "FATAL", 0);
71  return(-1);
72  }
73  o->session= 0;
74  o->track_no= 0;
75  o->start_lba= -1;
76  o->track_blocks= 0;
77  o->volid= NULL;
78  o->next= NULL;
79  if(boss!=NULL) {
80  for(s= boss; s->next!=NULL; s= s->next);
81  s->next= o;
82  }
83  return(1);
84 }
Definition: isoburn.h:27
int start_lba
Definition: isoburn.h:30
struct isoburn_toc_entry * next
Definition: isoburn.h:34
int session
Definition: isoburn.h:28
char * volid
Definition: isoburn.h:32
int track_blocks
Definition: isoburn.h:31
int track_no
Definition: isoburn.h:29

References isoburn_msgs_submit(), isoburn_toc_entry::next, isoburn_toc_entry::session, isoburn_toc_entry::start_lba, isoburn_toc_entry::track_blocks, isoburn_toc_entry::track_no, and isoburn_toc_entry::volid.

Referenced by isoburn_make_toc_entry().

◆ isoburn_version()

void isoburn_version ( int *  major,
int *  minor,
int *  micro 
)

Obtain the three release version numbers of the library.

These are the numbers encountered by the application when linking with libisoburn, i.e. possibly not before run time. Better do not base the fundamental compatibility decision of an application on these numbers. For a reliable check use isoburn_is_compatible().

Since
0.1.0
Parameters
majorThe maturity version (0 for now, as we are still learning)
minorThe development goal version.
microThe development step version. This has an additional meaning:
         Pare numbers indicate a version with frozen API. I.e. you can
         rely on the same set of features to be present in all
         published releases with that major.minor.micro combination.
         Features of a pare release will stay available and ABI
         compatible as long as the SONAME of libisoburn stays "1".
         Currently there are no plans to ever change the SONAME.

         Odd numbers indicate that API upgrades are in progress.
         I.e. new features might be already present or they might
         be still missing. Newly introduced features may be changed
         incompatibly or even be revoked before release of a pare
         version.
         So micro revisions {1,3,5,7,9} should never be used for
         dynamic linking unless the proper library match can be
         guaranteed by external circumstances.
Returns
1 success, <=0 might in future become an error indication

Definition at line 808 of file isoburn.c.

809 {
813 
814 /* No more: values from version.h generated from version.h.in and
815  macro values defined in configure.ac
816 
817  *major = ISOBURN_MAJOR_VERSION;
818  *minor = ISOBURN_MINOR_VERSION;
819  *micro = ISOBURN_MICRO_VERSION;
820 */
821 }
#define isoburn_header_version_major
These three release version numbers tell the revision of this header file and of the API it describes...
Definition: libisoburn.h:313
#define isoburn_header_version_minor
Definition: libisoburn.h:314
#define isoburn_header_version_micro
Definition: libisoburn.h:315

References isoburn_header_version_major, isoburn_header_version_micro, and isoburn_header_version_minor.

Referenced by isoburn_initialize(), isoburn_is_compatible(), main(), Xorriso_preparer_string(), Xorriso_report_lib_versions(), and Xorriso_startup_libraries().

Variable Documentation

◆ isoburn_list_start

struct isoburn* isoburn_list_start = NULL

◆ libisoburn_default_msgs_submit

int(* libisoburn_default_msgs_submit) (void *handle, int error_code, char msg_text[], int os_errno, char severity[], int flag) ( void *  handle,
int  error_code,
char  msg_text[],
int  os_errno,
char  severity[],
int  flag 
) = NULL

Definition at line 50 of file isoburn.c.

Referenced by isoburn_msgs_submit(), isoburn_set_msgs_submit(), and isoburn_welcome_media().

◆ libisoburn_default_msgs_submit_flag

int libisoburn_default_msgs_submit_flag = 0

Definition at line 54 of file isoburn.c.

Referenced by isoburn_msgs_submit(), isoburn_set_msgs_submit(), and isoburn_welcome_media().

◆ libisoburn_default_msgs_submit_handle

void* libisoburn_default_msgs_submit_handle = NULL

Definition at line 53 of file isoburn.c.

Referenced by isoburn_msgs_submit(), isoburn_set_msgs_submit(), and isoburn_welcome_media().