
Go to the source code of this file.
Defines | |
| #define | isoburn_libisofs_req_major 0 |
| The minimum version of libisofs to be used with this version of libisoburn at compile time. | |
| #define | isoburn_libisofs_req_minor 6 |
| #define | isoburn_libisofs_req_micro 6 |
| #define | isoburn_libburn_req_major 0 |
| The minimum version of libburn to be used with this version of libisoburn at compile time. | |
| #define | isoburn_libburn_req_minor 5 |
| #define | isoburn_libburn_req_micro 0 |
| #define | isoburn_header_version_major 0 |
| These three release version numbers tell the revision of this header file and of the API it describes. | |
| #define | isoburn_header_version_minor 2 |
| #define | isoburn_header_version_micro 2 |
| #define | isoburn_ropt_norock 1 |
| Which existing ISO 9660 extensions in the image to read or not to read. | |
| #define | isoburn_ropt_nojoliet 2 |
| #define | isoburn_ropt_noiso1999 4 |
| #define | isoburn_ropt_preferjoliet 8 |
| #define | isoburn_ropt_pretend_blank 16 |
| #define | isoburn_ropt_has_rockridge 1 |
| After calling function isoburn_read_image() there are informations available in the option set. | |
| #define | isoburn_ropt_has_joliet 2 |
| #define | isoburn_ropt_has_iso1999 4 |
| #define | isoburn_ropt_has_el_torito 8 |
| #define | isoburn_igopt_rockridge 1 |
| Which extensions to support. | |
| #define | isoburn_igopt_joliet 2 |
| #define | isoburn_igopt_iso1999 4 |
| #define | isoburn_igopt_omit_version_numbers 1 |
| Relaxed constraints. | |
| #define | isoburn_igopt_allow_deep_paths 2 |
| #define | isoburn_igopt_allow_longer_paths 4 |
| #define | isoburn_igopt_max_37_char_filenames 8 |
| #define | isoburn_igopt_no_force_dots 16 |
| #define | isoburn_igopt_allow_lowercase 32 |
| #define | isoburn_igopt_allow_full_ascii 64 |
| #define | isoburn_igopt_joliet_longer_paths 128 |
| #define | isoburn_igopt_sort_files_by_weight 1 |
| Whether and how files should be sorted. | |
Functions | |
| int | isoburn_initialize (char msg[1024], int flag) |
| Overview. | |
| 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. | |
| void | isoburn_version (int *major, int *minor, int *micro) |
| Obtain the three release version numbers of the library. | |
| int | isoburn_libisofs_req (int *major, int *minor, int *micro) |
| The minimum version of libisofs to be used with this version of libisoburn at runtime. | |
| int | isoburn_libburn_req (int *major, int *minor, int *micro) |
| The minimum version of libburn to be used with this version of libisoburn at runtime. | |
| int | isoburn_set_msgs_submit (int(*msgs_submit)(void *handle, int error_code, char msg_text[], int os_errno, char severity[], int flag), void *submit_handle, int submit_flag, int flag) |
| Note: Above version numbers are also recorded in configure.ac because libtool wants them as parameters at build time. | |
| int | isoburn_drive_scan_and_grab (struct burn_drive_info *drive_infos[], char *adr, int load) |
| Aquire a target drive by its filesystem path resp. | |
| int | isoburn_drive_aquire (struct burn_drive_info *drive_infos[], char *adr, int flag) |
| Aquire a target drive by its filesystem path resp. | |
| int | isoburn_drive_grab (struct burn_drive *drive, int load) |
| Aquire a drive from the burn_drive_info[] array which was obtained by a previous call of burn_drive_scan(). | |
| int | isoburn_drive_set_msgs_submit (struct burn_drive *d, int(*msgs_submit)(void *handle, int error_code, char msg_text[], int os_errno, char severity[], int flag), void *submit_handle, int submit_flag, int flag) |
| Attach to a drive an application provided method for immediate delivery of messages. | |
| enum burn_disc_status | isoburn_disc_get_status (struct burn_drive *drive) |
| Inquire the media status. | |
| int | isoburn_disc_erasable (struct burn_drive *d) |
| Tells whether the media can be treated by isoburn_disc_erase(). | |
| void | isoburn_disc_erase (struct burn_drive *drive, int fast) |
| Mark the media as blank. | |
| int | isoburn_set_msc1 (struct burn_drive *d, int adr_mode, char *adr_value, int flag) |
| Set up isoburn_disc_get_msc1() to return a fabricated value. | |
| struct isoburn_toc_disc * | isoburn_toc_drive_get_disc (struct burn_drive *d) |
| Obtain a master handle for the table of content. | |
| int | isoburn_toc_disc_get_sectors (struct isoburn_toc_disc *disc) |
| Tell the number of 2048 byte blocks covered by the table of content. | |
| struct isoburn_toc_session ** | isoburn_toc_disc_get_sessions (struct isoburn_toc_disc *disc, int *num) |
| Get the array of session handles from the table of content. | |
| int | isoburn_toc_session_get_sectors (struct isoburn_toc_session *s) |
| Tell the number of 2048 byte blocks covered by a particular session. | |
| void | isoburn_toc_session_get_leadout_entry (struct isoburn_toc_session *s, struct burn_toc_entry *entry) |
| Obtain a copy of the entry which describes the end of a particular session. | |
| struct isoburn_toc_track ** | isoburn_toc_session_get_tracks (struct isoburn_toc_session *s, int *num) |
| Get the array of track handles from a particular session. | |
| void | isoburn_toc_track_get_entry (struct isoburn_toc_track *t, struct burn_toc_entry *entry) |
| Obtain a copy of the entry which describes a particular itrack. | |
| void | isoburn_toc_disc_free (struct isoburn_toc_disc *disc) |
| Release the memory associated with a master handle of media. | |
| int | isoburn_read_iso_head (struct burn_drive *d, int lba, int *image_blocks, char *info, int flag) |
| Try whether the data at the given address look like a ISO 9660 image header and obtain its alleged size. | |
| int | isoburn_ropt_new (struct isoburn_read_opts **o, int flag) |
| Produces a set of image read options, initialized with default values. | |
| int | isoburn_ropt_destroy (struct isoburn_read_opts **o, int flag) |
| Deletes an option set which was created by isoburn_ropt_new(). | |
| 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. | |
| 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. | |
| 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. | |
| int | isoburn_ropt_get_input_charset (struct isoburn_read_opts *o, char **input_charset) |
| int | isoburn_ropt_get_size_what (struct isoburn_read_opts *o, uint32_t *size, int *has_what) |
| int | isoburn_igopt_new (struct isoburn_imgen_opts **o, int flag) |
| Produces a set of generation and transfer options, initialized with default values. | |
| int | isoburn_igopt_destroy (struct isoburn_imgen_opts **o, int flag) |
| Deletes an option set which was created by isoburn_igopt_new(). | |
| int | isoburn_igopt_set_level (struct isoburn_imgen_opts *o, int level) |
| ISO level to write at. | |
| 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_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. | |
| 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. | |
| 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 charcter set to use for representing filenames in the image. | |
| 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. | |
| 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 media. | |
| IsoImage * | isoburn_get_attached_image (struct burn_drive *d) |
| Get the image attached to a drive, if any. | |
| int | isoburn_read_image (struct burn_drive *d, struct isoburn_read_opts *read_opts, IsoImage **image) |
| Load the ISO filesystem directory tree from the media in the given drive. | |
| int | isoburn_set_read_pacifier (struct burn_drive *drive, int(*read_pacifier)(IsoImage *, IsoFileSource *), void *app_handle) |
| Set a callback function for producing pacifier messages during the lengthy process of image reading. | |
| int | isoburn_attach_image (struct burn_drive *d, IsoImage *image) |
| Set the IsoImage to be used with a drive. | |
| off_t | isoburn_disc_available_space (struct burn_drive *d, struct burn_write_opts *o) |
| Return the best possible estimation of the currently available capacity of the media. | |
| int | isoburn_disc_get_msc1 (struct burn_drive *d, int *start_lba) |
| Obtain the start block number of the most recent session on media. | |
| int | isoburn_disc_track_lba_nwa (struct burn_drive *d, struct burn_write_opts *o, int trackno, int *lba, int *nwa) |
| Use this with trackno==0 to obtain the predicted start block number of the new session. | |
| int | isoburn_get_min_start_byte (struct burn_drive *d, off_t *start_byte, int flag) |
| Obtain the size which was attributed to an emulated appendable on actually overwriteable media. | |
| int | isoburn_prepare_disc (struct burn_drive *drive, struct burn_disc **disc, struct isoburn_imgen_opts *opts) |
| To choose the expansion 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 media from where the image was eventually loaded. | |
| int | isoburn_prepare_new_image (struct burn_drive *in_drive, struct burn_disc **disc, struct isoburn_imgen_opts *opts, struct burn_drive *out_drive) |
| To choose the expansion method of Modifying: Create a disc object for producing a new image from a previous image plus the changes made by user. | |
| 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) |
| To choose the expansion 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. | |
| int | isoburn_cancel_prepared_write (struct burn_drive *input_drive, struct burn_drive *output_drive, int flag) |
| Revoke isoburn_prepare_new_image() or isoburn_prepare_disc() instead of running isoburn_disc_write(). | |
| void | isoburn_disc_write (struct burn_write_opts *o, struct burn_disc *disc) |
| Start writing of the new session. | |
| int | isoburn_get_fifo_status (struct burn_drive *d, int *size, int *free_bytes, char **status_text) |
| Inquire state and fill parameters of the fifo which is attached to the emerging track. | |
| int | isoburn_drive_wrote_well (struct burn_drive *d) |
| Inquire whether the most recent write run was successful. | |
| int | isoburn_activate_session (struct burn_drive *drive) |
| Call this after isoburn_disc_write has finished and burn_drive_wrote_well() indicates success. | |
| 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. | |
| void | isoburn_drive_release (struct burn_drive *drive, int eject) |
| Release an aquired drive. | |
| void | isoburn_finish (void) |
| Shutdown all three libraries. | |
| int | isoburn_needs_emulation (struct burn_drive *drive) |
| Inquire wether the media needs emulation or would be suitable for generic multi-session via libburn. | |
| #define isoburn_header_version_major 0 |
These three release version numbers tell the revision of this header file and of the API it describes.
They are memorized by applications at build time.
Definition at line 245 of file libisoburn.h.
Referenced by isoburn_version().
| #define isoburn_header_version_micro 2 |
| #define isoburn_header_version_minor 2 |
| #define isoburn_igopt_allow_deep_paths 2 |
Definition at line 846 of file libisoburn.h.
| #define isoburn_igopt_allow_full_ascii 64 |
Definition at line 851 of file libisoburn.h.
| #define isoburn_igopt_allow_longer_paths 4 |
Definition at line 847 of file libisoburn.h.
| #define isoburn_igopt_allow_lowercase 32 |
Definition at line 850 of file libisoburn.h.
| #define isoburn_igopt_iso1999 4 |
Definition at line 802 of file libisoburn.h.
| #define isoburn_igopt_joliet 2 |
Definition at line 801 of file libisoburn.h.
| #define isoburn_igopt_joliet_longer_paths 128 |
Definition at line 852 of file libisoburn.h.
| #define isoburn_igopt_max_37_char_filenames 8 |
Definition at line 848 of file libisoburn.h.
| #define isoburn_igopt_no_force_dots 16 |
Definition at line 849 of file libisoburn.h.
| #define isoburn_igopt_omit_version_numbers 1 |
Relaxed constraints.
Setting any of the bits to 1 break the specifications, but it is supposed to work on most moderns systems. Use with caution.
| o | The option set to work on | |
| relax | Bitfield: bit0= omit_version_numbers Omit the version number (";1") at the end of the ISO-9660 identifiers. Version numbers are usually not used. bit1= allow_deep_paths Allow ISO-9660 directory hierarchy to be deeper than 8 levels. bit2= allow_longer_paths Allow path in the ISO-9660 tree to have more than 255 characters. bit3= max_37_char_filenames Allow a single file or directory hierarchy to have up to 37 characters. This is larger than the 31 characters allowed by ISO level 2, and the extra space is taken from the version number, so this also forces omit_version_numbers. bit4= no_force_dots ISO-9660 forces filenames to have a ".", that separates file name from extension. libisofs adds it if original filename has none. Set this to 1 to prevent this behavior. bit5= allow_lowercase Allow lowercase characters in ISO-9660 filenames. By default, only uppercase characters, numbers and a few other characters are allowed. bit6= allow_full_ascii Allow all ASCII characters to be appear on an ISO-9660 filename. Note * that "/" and "\0" characters are never allowed, even in RR names. bit7= joliet_longer_paths Allow paths in the Joliet tree to have more than 240 characters. |
Definition at line 845 of file libisoburn.h.
| #define isoburn_igopt_rockridge 1 |
Which extensions to support.
| o | The option set to work on | |
| ext | Bitfield: bit0= rockridge Rock Ridge extensions add POSIX file attributes like owner, group, access permissions, long filenames. Very advisable if the designed audience has Unix style systems. bit1= joliet Longer filenames for Windows systems. Weaker than RockRidge, but also readable with Linux. bit2= iso1999 This is rather exotic. Better do not surprise the readers. |
Definition at line 800 of file libisoburn.h.
| #define isoburn_igopt_sort_files_by_weight 1 |
Whether and how files should be sorted.
| o | The option set to work on | |
| value | Bitfield: bit0= sort_files_by_weight files should be sorted based on their weight. Weight is attributed to files in the image by libisofs call iso_node_set_sort_weight(). |
Definition at line 866 of file libisoburn.h.
| #define isoburn_libburn_req_major 0 |
The minimum version of libburn to be used with this version of libisoburn at compile time.
Definition at line 209 of file libisoburn.h.
| #define isoburn_libburn_req_micro 0 |
Definition at line 211 of file libisoburn.h.
| #define isoburn_libburn_req_minor 5 |
Definition at line 210 of file libisoburn.h.
| #define isoburn_libisofs_req_major 0 |
The minimum version of libisofs to be used with this version of libisoburn at compile time.
Definition at line 201 of file libisoburn.h.
Referenced by isoburn_initialize().
| #define isoburn_libisofs_req_micro 6 |
| #define isoburn_libisofs_req_minor 6 |
| #define isoburn_ropt_has_el_torito 8 |
Definition at line 730 of file libisoburn.h.
| #define isoburn_ropt_has_iso1999 4 |
Definition at line 729 of file libisoburn.h.
| #define isoburn_ropt_has_joliet 2 |
Definition at line 728 of file libisoburn.h.
| #define isoburn_ropt_has_rockridge 1 |
After calling function isoburn_read_image() there are informations available in the option set.
This info can be obtained as bits in parameter has_what. Like: joliet_available = (has_what & isoburn_ropt_has_joliet);
| o | The option set to work on | |
| size | Number of image data blocks, 2048 bytes each. | |
| has_what | Bitfield: bit0= has_rockridge RockRidge extension info is available (POSIX filesystem) bit1= has_joliet Joliet extension info is available (suitable for MS-Windows) bit2= has_iso1999 ISO version 2 Enhanced Volume Descriptor is available. This is rather exotic. bit3= has_el_torito El-Torito boot record is present |
Definition at line 727 of file libisoburn.h.
| #define isoburn_ropt_noiso1999 4 |
Definition at line 653 of file libisoburn.h.
| #define isoburn_ropt_nojoliet 2 |
Definition at line 652 of file libisoburn.h.
| #define isoburn_ropt_norock 1 |
Which existing ISO 9660 extensions in the image to read or not to read.
Whether to read the content of an existing image at all. The bits can be combined by | resp. inquired by &.
| ext | Bitfield: bit0= norock Do not read Rock Ridge extensions bit1= nojoliet Do not read Joliet extensions bit2= noiso1999 Do not read ISO 9660:1999 enhanced tree bit3= preferjoliet When both Joliet and RR extensions are present, the RR tree is used. If you prefer using Joliet, set this to 1. bit4= pretend_blank Always create empty image.Ignore any image on input drive. |
Definition at line 651 of file libisoburn.h.
| #define isoburn_ropt_preferjoliet 8 |
Definition at line 654 of file libisoburn.h.
| #define isoburn_ropt_pretend_blank 16 |
Definition at line 655 of file libisoburn.h.
| int isoburn_activate_session | ( | struct burn_drive * | drive | ) |
Call this after isoburn_disc_write has finished and burn_drive_wrote_well() indicates success.
It will eventually complete the emulation of multi-session functionality, if needed at all. Let libisoburn decide. Not a wrapper, but peculiar to libisoburn.
| d | The output drive to which the session was written |
Definition at line 272 of file isofs_wrap.c.
References isoburn::emulation_mode, isoburn::fabricated_disc_status, isoburn::fabricated_msc2, isoburn_find_emulator(), Libisoburn_target_head_sizE, isoburn::target_iso_head, and isoburn::zero_nwa.
Referenced by isoburn_invalidate_iso().
00273 { 00274 int ret; 00275 struct isoburn *o; 00276 00277 ret = isoburn_find_emulator(&o, drive, 0); 00278 if (ret < 0) 00279 return -1; 00280 00281 if (o->emulation_mode != 1) 00282 return 1; /* don't need to activate session */ 00283 if (o->fabricated_msc2 >= 0) 00284 return 1; /* blind growing: do not alter anything outside the session */ 00285 00286 if (!(o->fabricated_disc_status == BURN_DISC_APPENDABLE || 00287 (o->fabricated_disc_status == BURN_DISC_BLANK && 00288 o->zero_nwa > 0))) 00289 return 1; 00290 00291 ret = burn_random_access_write(drive, (off_t) 0, (char*)o->target_iso_head, 00292 Libisoburn_target_head_sizE, 1); 00293 00294 return ret; 00295 }
| int isoburn_attach_image | ( | struct burn_drive * | d, | |
| IsoImage * | image | |||
| ) |
Set the IsoImage to be used with a drive.
This eventually releases the reference to the old IsoImage attached to the drive. Caution: Use with care. It hardly makes sense to replace an image that reflects a valid ISO image on media. This call is rather intended for writing a newly created and populated image to blank media. The use case in xorriso is to let an image survive the change or demise of the outdev target drive.
| d | The drive which shall be write target of the volset. | |
| image | The image that represents the image to be written. This image pointer MUST already be a valid reference suitable for iso_image_unref(). It may have been obtained by appropriate libisofs calls or by isoburn_read_image() with d==NULL. |
Definition at line 249 of file isofs_wrap.c.
References isoburn::image, isoburn_find_emulator(), and isoburn_msgs_submit().
00250 { 00251 int ret; 00252 struct isoburn *o; 00253 00254 ret = isoburn_find_emulator(&o, d, 0); 00255 if (ret < 0 || o == NULL) 00256 return 0; 00257 if (image == NULL) { 00258 isoburn_msgs_submit(o, 0x00060000, 00259 "Program error: isoburn_attach_image: image==NULL", 00260 0, "FATAL", 0); 00261 return -1; 00262 } 00263 if(o->image != NULL) 00264 iso_image_unref(o->image); 00265 o->image = image; 00266 return(1); 00267 }
| int isoburn_cancel_prepared_write | ( | struct burn_drive * | input_drive, | |
| struct burn_drive * | output_drive, | |||
| int | flag | |||
| ) |
Revoke isoburn_prepare_new_image() or isoburn_prepare_disc() instead of running isoburn_disc_write().
libisofs reserves resources and maybe already starts generating the image stream when one of above two calls is performed. It is mandatory to either run isoburn_disc_write() or to revoke the preparations by the call described here.
| input_drive | The drive resp. in_drive which was used with the preparation call. | |
| output_drive | The out_drive used with isoburn_prepare_new_image(), NULL if none. | |
| flag | Bitfield, submit 0 for now. bit0= -reserved for internal use- |
Definition at line 541 of file isoburn.c.
References isoburn::iso_source, and isoburn_find_emulator().
Referenced by isoburn_sync_after_write().
00543 { 00544 int ret; 00545 struct isoburn *o= NULL; 00546 00547 if(output_drive!=NULL) { 00548 ret= isoburn_find_emulator(&o, output_drive, 0); 00549 if(ret<0 || o==NULL) 00550 o= NULL; 00551 else if(o->iso_source==NULL) 00552 o= NULL; 00553 } 00554 if(o==NULL) { 00555 ret= isoburn_find_emulator(&o, d, 0); 00556 if(ret<0) 00557 return(-1); 00558 if(o==NULL) 00559 return(0); 00560 if(o->iso_source==NULL) 00561 return(0); 00562 } 00563 if(o->iso_source->read!=NULL) 00564 return(0); 00565 if(o->iso_source->version<1) 00566 return(0); 00567 o->iso_source->cancel(o->iso_source); 00568 burn_source_free(o->iso_source); 00569 o->iso_source= NULL; 00570 return(1); 00571 }
| off_t isoburn_disc_available_space | ( | struct burn_drive * | d, | |
| struct burn_write_opts * | o | |||
| ) |
Return the best possible estimation of the currently available capacity of the media.
This might depend on particular write option settings and on drive state. An eventual start address for emulated multi-session will be subtracted from the capacity estimation given by burn_disc_available_space(). Negative results get defaulted to 0. Wrapper for: burn_disc_available_space()
| d | The drive to query. | |
| o | If not NULL: write parameters to be set on drive before query |
Definition at line 539 of file burn_wrap.c.
References isoburn::emulation_mode, isoburn_disc_get_status(), isoburn_find_emulator(), and isoburn::nwa.
00541 { 00542 int ret; 00543 struct isoburn *o; 00544 struct burn_write_opts *eff_opts= NULL, *local_opts= NULL; 00545 enum burn_disc_status s; 00546 off_t avail; 00547 00548 eff_opts= opts; 00549 ret= isoburn_find_emulator(&o, d, 0); 00550 if(ret>0 && o!=NULL) 00551 if(o->emulation_mode!=0) { 00552 s= isoburn_disc_get_status(d); 00553 if(s==BURN_DISC_FULL) /* unknown data format in first 64 kB */ 00554 return((off_t) 0); 00555 local_opts= burn_write_opts_new(d); 00556 eff_opts= local_opts; 00557 burn_write_opts_set_start_byte(eff_opts, ((off_t) o->nwa) * (off_t) 2048); 00558 } 00559 avail= burn_disc_available_space(d, eff_opts); 00560 if(local_opts!=NULL) 00561 burn_write_opts_free(local_opts); 00562 local_opts= NULL; 00563 return(avail); 00564 }
| int isoburn_disc_erasable | ( | struct burn_drive * | d | ) |
Tells whether the media can be treated by isoburn_disc_erase().
Wrapper for: burn_disc_erasable()
| drive | The drive to inquire. |
Definition at line 494 of file burn_wrap.c.
References isoburn::emulation_mode, and isoburn_find_emulator().
00495 { 00496 int ret; 00497 struct isoburn *o; 00498 00499 ret= isoburn_find_emulator(&o, d, 0); 00500 if(ret>0) 00501 if(o->emulation_mode==1) 00502 return(1); 00503 return burn_disc_erasable(d); 00504 }
| void isoburn_disc_erase | ( | struct burn_drive * | drive, | |
| int | fast | |||
| ) |
Mark the media as blank.
With multi-session media this will call burn_disc_erase(). With random access media, an eventual ISO-9660 filesystem will get invalidated by altering its start blocks on media. In case of success, the media is in status BURN_DISC_BLANK afterwards. Wrapper for: burn_disc_erase()
| drive | The drive with the media to erase. | |
| fast | 1=fast erase, 0=thorough erase With DVD-RW, fast erase yields media incapable of multi-session. |
Definition at line 507 of file burn_wrap.c.
References isoburn::emulation_mode, isoburn_disc_get_status(), isoburn_find_emulator(), isoburn_invalidate_iso(), and Libisoburn_target_head_sizE.
00508 { 00509 int ret; 00510 struct isoburn *o; 00511 enum burn_disc_status s; 00512 char zero_buffer[Libisoburn_target_head_sizE]; 00513 00514 ret= isoburn_find_emulator(&o, drive, 0); 00515 if(ret>0) { 00516 if(o->emulation_mode==-1) { 00517 /* To cause a negative reply with burn_drive_wrote_well() */ 00518 burn_drive_cancel(drive); 00519 return; 00520 } 00521 if(o->emulation_mode>0) { 00522 s= isoburn_disc_get_status(drive); 00523 if(s==BURN_DISC_FULL) { /* unknown data format in first 64 kB */ 00524 memset(zero_buffer, 0, Libisoburn_target_head_sizE); 00525 ret= burn_random_access_write(drive, (off_t) 0, zero_buffer, 00526 (off_t) Libisoburn_target_head_sizE, 1); 00527 } else { 00528 ret= isoburn_invalidate_iso(o, 0); 00529 } 00530 if(ret<=0) 00531 burn_drive_cancel(drive); /* mark run as failure */ 00532 return; 00533 } 00534 } 00535 burn_disc_erase(drive, fast); 00536 }
| int isoburn_disc_get_msc1 | ( | struct burn_drive * | d, | |
| int * | start_lba | |||
| ) |
Obtain the start block number of the most recent session on media.
In case of random access media this will always be 0. Succesfull return is not a guarantee that there is a ISO-9660 image at all. The call will fail, nevertheless,if isoburn_disc_get_status() returns not BURN_DISC_APPENDABLE. Note: The result of this call may be fabricated by a previous call of isoburn_set_msc1() which can override the rule to load the most recent session. Wrapper for: burn_disc_get_msc1()
| d | The drive to inquire | |
| start_lba | Contains on success the start address in 2048 byte blocks |
Definition at line 567 of file burn_wrap.c.
References isoburn::emulation_mode, isoburn::fabricated_msc1, isoburn_disc_get_status(), isoburn_find_emulator(), and isoburn_msgs_submit().
Referenced by isoburn_read_image().
00568 { 00569 int ret; 00570 struct isoburn *o; 00571 00572 #ifdef Hardcoded_cd_rW 00573 /* <<< A70929 : hardcoded CD-RW with fabricated -msinfo */ 00574 *start_lba= Hardcoded_cd_rw_c1; 00575 return(1); 00576 #endif 00577 00578 if(isoburn_disc_get_status(d)!=BURN_DISC_APPENDABLE && 00579 isoburn_disc_get_status(d)!=BURN_DISC_FULL) { 00580 isoburn_msgs_submit(NULL, 0x00060000, 00581 "Media contains no recognizable data", 0, "SORRY", 0); 00582 return(0); 00583 } 00584 ret= isoburn_find_emulator(&o, d, 0); 00585 if(ret<0) 00586 return(0); 00587 if(o->fabricated_msc1>=0) { 00588 *start_lba= o->fabricated_msc1; 00589 return(1); 00590 } 00591 if(ret>0) if(o->emulation_mode>0) { 00592 *start_lba= 0; 00593 return(1); 00594 } 00595 return(burn_disc_get_msc1(d, start_lba)); 00596 }
| enum burn_disc_status isoburn_disc_get_status | ( | struct burn_drive * | drive | ) |
Inquire the media status.
Expect the whole spectrum of libburn BURN_DISC_* with multi-session media. Emulated states with random access media are BURN_DISC_BLANK and BURN_DISC_APPENDABLE. Wrapper for: burn_disc_get_status()
| drive | The drive to inquire. |
Definition at line 471 of file burn_wrap.c.
References isoburn::emulation_mode, isoburn::fabricated_disc_status, isoburn_find_emulator(), isoburn::nwa, and isoburn::zero_nwa.
Referenced by isoburn_disc_available_space(), isoburn_disc_erase(), isoburn_disc_get_msc1(), isoburn_is_intermediate_dvd_rw(), isoburn_needs_emulation(), isoburn_prepare_disc_aux(), and isoburn_read_image().
00472 { 00473 int ret; 00474 struct isoburn *o; 00475 00476 ret= isoburn_find_emulator(&o, drive, 0); 00477 if(ret<0) 00478 return(BURN_DISC_UNSUITABLE); 00479 if(o!=NULL) 00480 if(o->fabricated_disc_status!=BURN_DISC_UNREADY) 00481 return(o->fabricated_disc_status); 00482 if(ret==0) 00483 return(burn_disc_get_status(drive)); 00484 00485 /* emulated status */ 00486 if(o->emulation_mode==-1) 00487 return(BURN_DISC_UNSUITABLE); 00488 if(o->nwa>o->zero_nwa) 00489 return(BURN_DISC_APPENDABLE); 00490 return(BURN_DISC_BLANK); 00491 }
| int isoburn_disc_track_lba_nwa | ( | struct burn_drive * | d, | |
| struct burn_write_opts * | o, | |||
| int | trackno, | |||
| int * | lba, | |||
| int * | nwa | |||
| ) |
Use this with trackno==0 to obtain the predicted start block number of the new session.
The interesting number is returned in parameter nwa. Wrapper for: burn_disc_track_lba_nwa()
| d | The drive to inquire | |
| o | If not NULL: write parameters to be set on drive before query | |
| trackno | Submit 0. | |
| lba | return value: start lba | |
| nwa | return value: Next Writeable Address |
Definition at line 599 of file burn_wrap.c.
References isoburn::emulation_mode, isoburn_find_emulator(), and isoburn::nwa.
Referenced by isoburn_get_msc2(), and isoburn_prepare_disc_aux().
00602 { 00603 int ret; 00604 struct isoburn *o; 00605 00606 #ifdef Hardcoded_cd_rW 00607 /* <<< A70929 : hardcoded CD-RW with fabricated -msinfo */ 00608 *lba= Hardcoded_cd_rw_c1; 00609 *nwa= Hardcoded_cd_rw_nwA; 00610 return(1); 00611 #endif 00612 00613 *nwa= *lba= 0; 00614 ret= isoburn_find_emulator(&o, d, 0); 00615 if(ret<0) 00616 return(0); 00617 if(ret>0) if(o->emulation_mode>0) { 00618 *lba= 0; 00619 *nwa= o->nwa; 00620 return(1); 00621 } 00622 if(burn_drive_get_drive_role(d) != 1) 00623 return(1); 00624 return(burn_disc_track_lba_nwa(d, opts, trackno, lba, nwa)); 00625 }
| void isoburn_disc_write | ( | struct burn_write_opts * | o, | |
| struct burn_disc * | disc | |||
| ) |
Start writing of the new session.
This call is asynchrounous. I.e. it returns quite soon and the progress has to be watched by a loop with call burn_drive_get_status() until BURN_DRIVE_IDLE is returned. Wrapper for: burn_disc_write()
| o | Options which control the burn process. See burnwrite_opts_*() in libburn.h. | |
| disc | Disc object created either by isoburn_prepare_disc() or by isoburn_prepare_new_image(). |
Definition at line 645 of file burn_wrap.c.
References isoburn::emulation_mode, isoburn_find_emulator(), isoburn_is_intermediate_dvd_rw(), isoburn_msgs_submit(), isoburn::nwa, isoburn::truncate, and isoburn::wrote_well.
00646 { 00647 int ret; 00648 off_t nwa= 0; 00649 struct isoburn *o; 00650 struct burn_drive *drive; 00651 char reasons[BURN_REASONS_LEN],msg[160+BURN_REASONS_LEN]; 00652 char adr[BURN_DRIVE_ADR_LEN]; 00653 enum burn_write_types write_type; 00654 struct stat stbuf; 00655 00656 drive= burn_write_opts_get_drive(opts); 00657 ret= isoburn_find_emulator(&o, drive, 0); 00658 if(ret<0) 00659 return; 00660 if(o!=NULL) { 00661 o->wrote_well= -1; 00662 if(o->emulation_mode!=0) { 00663 burn_write_opts_set_multi(opts, 0); 00664 if(o->emulation_mode>0 && o->nwa >= 0) { 00665 nwa= o->nwa; 00666 00667 /* This caters for unwritten formatted DVD-RW. They need to be written 00668 sequentially on the first use. Only written areas are random access. 00669 If the first session is not written to LBA 0, then re-opening of 00670 formatting and padding is needed. 00671 This can be done. But when the track gets closed after padding, 00672 this lasts a long time. There is a high risk that an app will not 00673 poll the message queue while waiting for isoburn_disc_write() to 00674 return. The pacifier loop usually happens only afterwards. 00675 So automatic formatting might cause a nervous clueless user. 00676 */ 00677 ret= isoburn_is_intermediate_dvd_rw(drive, 0); 00678 if(ret>0 && nwa>0 && nwa <= o->zero_nwa) { 00679 /* actually this should not happen since such media get recognized 00680 by isoburn_welcome_media and o->zero_nwa gets set to 0 00681 */ 00682 sprintf(msg, 00683 "DVD-RW insufficiently formatted. (Intermediate State, size unknown)"); 00684 isoburn_msgs_submit(o, 0x00060000, msg, 0, "FAILURE", 0); 00685 sprintf(msg, 00686 "It might help to first deformat it and then format it again"); 00687 isoburn_msgs_submit(o, 0x00060000, msg, 0, "HINT", 0); 00688 burn_drive_cancel(drive); /* mark run as failure */ 00689 return; 00690 } 00691 /* end of DVD-RW oriented check */ 00692 00693 burn_write_opts_set_start_byte(opts, nwa * (off_t) 2048); 00694 } 00695 } 00696 } 00697 00698 write_type= burn_write_opts_auto_write_type(opts, disc, reasons, 0); 00699 if (write_type == BURN_WRITE_NONE) { 00700 sprintf(msg, "Failed to find a suitable write mode:\n%s", reasons); 00701 isoburn_msgs_submit(o, 0x00060000, msg, 0, "FAILURE", 0); 00702 if(o!=NULL) 00703 o->wrote_well= 0; 00704 /* To cause a negative reply with burn_drive_wrote_well() */ 00705 burn_drive_cancel(drive); 00706 return; 00707 } 00708 00709 sprintf(reasons, "%d", (int) write_type); 00710 sprintf(msg, "Write_type = %s\n", 00711 (write_type == BURN_WRITE_SAO ? "SAO" : 00712 (write_type == BURN_WRITE_TAO ? "TAO" : reasons))); 00713 isoburn_msgs_submit(o, 0x00060000, msg, 0, "DEBUG", 0); 00714 00715 #ifdef Hardcoded_cd_rW 00716 /* <<< A70929 : hardcoded CD-RW with fabricated -msinfo */ 00717 fprintf(stderr, "Setting write address to LBA %d\n", Hardcoded_cd_rw_nwA); 00718 burn_write_opts_set_start_byte(opts, 00719 ((off_t) Hardcoded_cd_rw_nwA) * (off_t) 2048); 00720 #endif 00721 00722 if(o->truncate) { 00723 ret= burn_drive_get_drive_role(drive); 00724 if(ret==2) { 00725 ret= burn_drive_d_get_adr(drive, adr); 00726 if(ret>0) { 00727 ret= lstat(adr, &stbuf); 00728 if(ret!=-1) 00729 if(S_ISREG(stbuf.st_mode)) 00730 truncate(adr, nwa * (off_t) 2048); 00731 } 00732 } 00733 } 00734 00735 burn_disc_write(opts, disc); 00736 }
| int isoburn_drive_aquire | ( | struct burn_drive_info * | drive_infos[], | |
| char * | adr, | |||
| int | flag | |||
| ) |
Aquire a target drive by its filesystem path resp.
libburn persistent address. This is a modern successor of isoburn_drive_scan_and_grab(). Wrapper for: burn_drive_scan_and_grab()
| drive_infos | On success returns a one element array with the drive (cdrom/burner). Thus use with driveno 0 only. On failure the array has no valid elements at all. The returned array should be freed via burn_drive_info_free() when the drive is no longer needed. | |
| adr | The persistent address of the desired drive. | |
| flag | bit0= attempt to load the disc tray. Else: failure if not loaded. bit1= regard overwriteable media as blank bit2= if the drive is a regular disk file: truncate it to the write start address bit3= if the drive reports a read-only profile try to read table of content by scanning for ISO image headers. (depending on media type and drive this might help or it might make the resulting toc even worse) |
| flag | bit0= load bit1= regard overwriteable media as blank bit2= if the drive is a regular disk file: truncate it to the write start address bit3= if the drive reports a -ROM profile then try to read table of content by scanning for ISO image headers. (depending on media type and drive state this might help or it might make the resulting toc even worse) |
Definition at line 377 of file burn_wrap.c.
References isoburn::drive, isoburn_destroy(), isoburn_find_emulator(), isoburn_msgs_submit(), isoburn_welcome_media(), and isoburn::truncate.
Referenced by isoburn_drive_scan_and_grab().
00379 { 00380 int ret, conv_ret, drive_grabbed= 0; 00381 char libburn_drive_adr[BURN_DRIVE_ADR_LEN]; 00382 struct isoburn *o= NULL; 00383 char msg[BURN_MSGS_MESSAGE_LEN+4096]; 00384 00385 conv_ret= burn_drive_convert_fs_adr(adr, libburn_drive_adr); 00386 if(conv_ret<=0) { 00387 sprintf(msg, "Unsuitable drive address: '%s'\n",adr); 00388 msg[BURN_MSGS_MESSAGE_LEN-1]= 0; 00389 isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "FAILURE", 0); 00390 ret= 0; goto ex; 00391 } 00392 00393 ret= burn_drive_scan_and_grab(drive_infos, libburn_drive_adr, flag&1); 00394 if(ret<=0) 00395 goto ex; 00396 drive_grabbed= 1; 00397 ret= isoburn_welcome_media(&o, (*drive_infos)[0].drive, 00398 (flag&8) | !!(flag&2)); 00399 if(ret<=0) 00400 goto ex; 00401 00402 if(flag&4) { 00403 ret= isoburn_find_emulator(&o, (*drive_infos)[0].drive, 0); 00404 if(ret>0 && o!=NULL) 00405 o->truncate= 1; 00406 } 00407 00408 ret= 1; 00409 ex: 00410 if(ret<=0) { 00411 if(drive_grabbed) 00412 burn_drive_release((*drive_infos)[0].drive, 0); 00413 isoburn_destroy(&o, 0); 00414 } 00415 return(ret); 00416 }
| int isoburn_drive_grab | ( | struct burn_drive * | drive, | |
| int | load | |||
| ) |
Aquire a drive from the burn_drive_info[] array which was obtained by a previous call of burn_drive_scan().
Wrapper for: burn_drive_grab()
| drive | The drive to grab. E.g. drive_infos[1].drive . | |
| load | 1 attempt to load the disc tray. 0 no attempt, rather failure. |
Definition at line 429 of file burn_wrap.c.
References isoburn_destroy(), and isoburn_welcome_media().
00430 { 00431 int ret; 00432 struct isoburn *o= NULL; 00433 00434 ret= burn_drive_grab(drive, load); 00435 if(ret<=0) 00436 goto ex; 00437 ret= isoburn_welcome_media(&o, drive, 0); 00438 if(ret<=0) 00439 goto ex; 00440 00441 ret= 1; 00442 ex: 00443 if(ret<=0) 00444 isoburn_destroy(&o,0); 00445 return(ret); 00446 }
| void isoburn_drive_release | ( | struct burn_drive * | drive, | |
| int | eject | |||
| ) |
Release an aquired drive.
Wrapper for: burn_drive_release()
| drive | The drive to be released | |
| eject | 1= eject media from drive , 0= do not eject |
Definition at line 739 of file burn_wrap.c.
References isoburn_destroy(), and isoburn_find_emulator().
00740 { 00741 int ret; 00742 struct isoburn *o; 00743 00744 ret= isoburn_find_emulator(&o, drive, 0); 00745 if(ret<0) 00746 return; 00747 if(o!=NULL) { 00748 isoburn_destroy(&o, 0); 00749 } 00750 burn_drive_release(drive, eject); 00751 }
| int isoburn_drive_scan_and_grab | ( | struct burn_drive_info * | drive_infos[], | |
| char * | adr, | |||
| int | load | |||
| ) |
Aquire a target drive by its filesystem path resp.
libburn persistent address. Wrapper for: burn_drive_scan_and_grab()
| drive_infos | On success returns a one element array with the drive (cdrom/burner). Thus use with driveno 0 only. On failure the array has no valid elements at all. The returned array should be freed via burn_drive_info_free() when the drive is no longer needed. | |
| adr | The persistent address of the desired drive. | |
| load | 1 attempt to load the disc tray. 0 no attempt,rather failure. |
Definition at line 419 of file burn_wrap.c.
References isoburn_drive_aquire().
00421 { 00422 int ret; 00423 00424 ret= isoburn_drive_aquire(drive_infos, adr, !!load); 00425 return(ret); 00426 }
| int isoburn_drive_set_msgs_submit | ( | struct burn_drive * | d, | |
| int(*)(void *handle, int error_code, char msg_text[], int os_errno, char severity[], int flag) | msgs_submit, | |||
| void * | submit_handle, | |||
| int | submit_flag, | |||
| int | flag | |||
| ) |
Attach to a drive an application provided method for immediate delivery of messages.
If no method is set or if the method is set to NULL then libisoburn delivers messages of the drive through the global msgs_submit() method set by isoburn_set_msgs_submiti() or by the message queue of libburn.
| d | The drive to which this function, handle and flag shall apply | |
| msgs_submit | The function call which implements the method | |
| submit_handle | Handle to be used as first argument of msgs_submit | |
| submit_flag | Flag to be used as last argument of msgs_submit | |
| flag | Unused yet, submit 0 |
Definition at line 1433 of file burn_wrap.c.
References isoburn_find_emulator(), isoburn::msgs_submit, isoburn::msgs_submit_flag, and isoburn::msgs_submit_handle.
01438 { 01439 struct isoburn *o; 01440 int ret; 01441 01442 ret= isoburn_find_emulator(&o, d, 0); 01443 if(ret<0 || o==NULL) 01444 return(-1); 01445 o->msgs_submit= msgs_submit; 01446 o->msgs_submit_handle= submit_handle; 01447 o->msgs_submit_flag= submit_flag; 01448 return(1); 01449 }
| int isoburn_drive_wrote_well | ( | struct burn_drive * | d | ) |
Inquire whether the most recent write run was successful.
Wrapper for: burn_drive_wrote_well()
| d | The drive to inquire |
Definition at line 830 of file burn_wrap.c.
References isoburn_find_emulator(), and isoburn::wrote_well.
00831 { 00832 int ret; 00833 struct isoburn *o; 00834 00835 ret= isoburn_find_emulator(&o, d, 0); 00836 if(ret<0) 00837 return(-1); 00838 if(o!=NULL) 00839 if(o->wrote_well>=0) 00840 return(o->wrote_well); 00841 ret= burn_drive_wrote_well(d); 00842 return ret; 00843 }
| void isoburn_finish | ( | void | ) |
Shutdown all three libraries.
Wrapper for : iso_finish() and burn_finish().
Definition at line 754 of file burn_wrap.c.
References isoburn_destroy_all().
00755 { 00756 isoburn_destroy_all(&isoburn_list_start, 0); 00757 burn_finish(); 00758 iso_finish(); 00759 }
| IsoImage* isoburn_get_attached_image | ( | struct burn_drive * | d | ) |
Get the image attached to a drive, if any.
| d | The drive to inquire |
Definition at line 87 of file isofs_wrap.c.
References isoburn::image, and isoburn_find_emulator().
00088 { 00089 int ret; 00090 struct isoburn *o= NULL; 00091 ret = isoburn_find_emulator(&o, d, 0); 00092 if (ret < 0) 00093 return NULL; 00094 00095 if (o == NULL) { 00096 return NULL; 00097 } 00098 iso_image_ref(o->image); 00099 return o->image; 00100 }
| int isoburn_get_fifo_status | ( | struct burn_drive * | d, | |
| int * | size, | |||
| int * | free_bytes, | |||
| char ** | status_text | |||
| ) |
Inquire state and fill parameters of the fifo which is attached to the emerging track.
This should be done in the pacifier loop while isoburn_disc_write() or burn_disc_write() are active. This works only with drives obtained by isoburn_drive_scan_and_grab() or isoburn_drive_grab(). If isoburn_prepare_new_image() was used, then parameter out_drive must have announced the track output drive. Hint: If only burn_write_opts and not burn_drive is known, then the drive can be obtained by burn_write_opts_get_drive().
| size | The total size of the fifo | |
| free_bytes | The current free capacity of the fifo | |
| status_text | Returns a pointer to a constant text, see below |
Definition at line 846 of file burn_wrap.c.
References isoburn::iso_source, and isoburn_find_emulator().
00848 { 00849 int ret; 00850 struct isoburn *o; 00851 size_t hsize= 0, hfree_bytes= 0; 00852 00853 ret= isoburn_find_emulator(&o, d, 0); 00854 if(ret<0) 00855 return(-1); 00856 00857 if(o==NULL) 00858 return(-1); 00859 if(o->iso_source==NULL) 00860 return(-1); 00861 ret= iso_ring_buffer_get_status(o->iso_source, &hsize, &hfree_bytes); 00862 if(hsize > 1024*1024*1024) 00863 *size= 1024*1024*1024; 00864 else 00865 *size= hsize; 00866 if(hfree_bytes > 1024*1024*1024) 00867 *free_bytes= 1024*1024*1024; 00868 else 00869 *free_bytes= hfree_bytes; 00870 *status_text= ""; 00871 if(ret==0) 00872 *status_text= "standby"; 00873 else if(ret==1) 00874 *status_text= "active"; 00875 else if(ret==2) 00876 *status_text= "ending"; 00877 else if(ret==3) 00878 *status_text= "failing"; 00879 else if(ret==4) 00880 *status_text= "unused"; 00881 else if(ret==5) 00882 *status_text= "abandoned"; 00883 else if(ret==6) 00884 *status_text= "ended"; 00885 else if(ret==7) 00886 *status_text= "aborted"; 00887 return(ret); 00888 }
| int isoburn_get_min_start_byte | ( | struct burn_drive * | d, | |
| off_t * | start_byte, | |||
| int | flag | |||
| ) |
Obtain the size which was attributed to an emulated appendable on actually overwriteable media.
This value is supposed to be <= 2048 * nwa as of isoburn_disc_track_lba_nwa().
| drive | The drive holding the media. | |
| start_byte | The reply value counted in bytes, not in sectors. | |
| flag | Unused yet. Submit 0. |
Definition at line 812 of file burn_wrap.c.
References isoburn_find_emulator(), and isoburn::min_start_byte.
00814 { 00815 int ret; 00816 struct isoburn *o; 00817 00818 ret= isoburn_find_emulator(&o, d, 0); 00819 if(ret<0) 00820 return(-1); 00821 if(ret==0) 00822 return(0); 00823 *start_byte= o->min_start_byte; 00824 if(o->min_start_byte<=0) 00825 return(0); 00826 return(1); 00827 }
| int isoburn_igopt_destroy | ( | struct isoburn_imgen_opts ** | o, | |
| int | flag | |||
| ) |
Deletes an option set which was created by isoburn_igopt_new().
| o | The option set to give up | |
| flag | Bitfield for control purposes. Submit 0 for now. |
Definition at line 792 of file isoburn.c.
00793 { 00794 if(*o==NULL) 00795 return(0); 00796 free(*o); 00797 *o= NULL; 00798 return(1); 00799 }
| 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 media.
This value cannot be set by the application but only be inquired.
| o | The option set to work on | |
| lba | The block number of the session start on media. <0 means that no address has been determined yet. |
Definition at line 947 of file isoburn.c.
References isoburn_imgen_opts::effective_lba.
00948 { 00949 *lba= o->effective_lba; 00950 return(1); 00951 }
| int isoburn_igopt_get_extensions | ( | struct isoburn_imgen_opts * | o, | |
| int * | ext | |||
| ) |
Definition at line 825 of file isoburn.c.
References isoburn_imgen_opts::iso1999, isoburn_imgen_opts::joliet, and isoburn_imgen_opts::rockridge.
00826 { 00827 *ext= (!!o->rockridge) | ((!!o->joliet)<<1) | ((!!o->iso1999)<<2); 00828 return(1); 00829 }
| int isoburn_igopt_get_fifo_size | ( | struct isoburn_imgen_opts * | o, | |
| int * | fifo_size | |||
| ) |
Definition at line 940 of file isoburn.c.
References isoburn_imgen_opts::fifo_size.
00941 { 00942 *fifo_size= o->fifo_size; 00943 return(1); 00944 }
| int isoburn_igopt_get_level | ( | struct isoburn_imgen_opts * | o, | |
| int * | level | |||
| ) |
Definition at line 809 of file isoburn.c.
References isoburn_imgen_opts::level.
00810 { 00811 *level= o->level; 00812 return(1); 00813 }
| int isoburn_igopt_get_out_charset | ( | struct isoburn_imgen_opts * | o, | |
| char ** | output_charset | |||
| ) |
Definition at line 925 of file isoburn.c.
References isoburn_imgen_opts::output_charset.
00927 { 00928 *output_charset= o->output_charset; 00929 return(1); 00930 }
| 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 882 of file isoburn.c.
References isoburn_imgen_opts::dir_mode, isoburn_imgen_opts::file_mode, isoburn_imgen_opts::replace_dir_mode, and isoburn_imgen_opts::replace_file_mode.
00885 { 00886 *replace_dir_mode= o->replace_dir_mode%3; 00887 *replace_file_mode= o->replace_file_mode%3; 00888 *dir_mode= o->dir_mode; 00889 *file_mode= o->file_mode; 00890 return(1); 00891 }
| 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 905 of file isoburn.c.
References isoburn_imgen_opts::gid, isoburn_imgen_opts::replace_gid, isoburn_imgen_opts::replace_uid, and isoburn_imgen_opts::uid.
00908 { 00909 *replace_uid= o->replace_uid%3; 00910 *replace_gid= o->replace_gid%3; 00911 *uid= o->uid; 00912 *gid= o->gid; 00913 return(1); 00914 }
| int isoburn_igopt_get_relaxed | ( | struct isoburn_imgen_opts * | o, | |
| int * | relax | |||
| ) |
Definition at line 846 of file isoburn.c.
References isoburn_imgen_opts::allow_deep_paths, isoburn_imgen_opts::allow_full_ascii, isoburn_imgen_opts::allow_longer_paths, isoburn_imgen_opts::allow_lowercase, isoburn_imgen_opts::joliet_longer_paths, isoburn_imgen_opts::max_37_char_filenames, isoburn_imgen_opts::no_force_dots, and isoburn_imgen_opts::omit_version_numbers.
00847 { 00848 *relax= (!!o->omit_version_numbers) | ((!!o->allow_deep_paths)<<1) | 00849 ((!!o->allow_longer_paths)<<2) | ((!!o->max_37_char_filenames)<<3) | 00850 ((!!o->no_force_dots)<<4) | ((!!o->allow_lowercase)<<5) | 00851 ((!!o->allow_full_ascii)<<6) | ((!!o->joliet_longer_paths)<<7); 00852 return(1); 00853 }
| int isoburn_igopt_get_sort_files | ( | struct isoburn_imgen_opts * | o, | |
| int * | value | |||
| ) |
Definition at line 863 of file isoburn.c.
References isoburn_imgen_opts::sort_files.
00864 { 00865 *value= !!o->sort_files; 00866 return(1); 00867 }
| int isoburn_igopt_new | ( | struct isoburn_imgen_opts ** | o, | |
| int | flag | |||
| ) |
Produces a set of generation and transfer options, initialized with default values.
| o | the newly created option set object | |
| flag | Bitfield for control purposes. Submit 0 for now. |
Definition at line 753 of file isoburn.c.
References isoburn_imgen_opts::allow_deep_paths, isoburn_imgen_opts::allow_full_ascii, isoburn_imgen_opts::allow_longer_paths, isoburn_imgen_opts::allow_lowercase, isoburn_imgen_opts::dir_mode, isoburn_imgen_opts::effective_lba, isoburn_imgen_opts::fifo_size, isoburn_imgen_opts::file_mode, isoburn_imgen_opts::gid, isoburn_imgen_opts::iso1999, isoburn_msgs_submit(), isoburn_imgen_opts::joliet, isoburn_imgen_opts::joliet_longer_paths, isoburn_imgen_opts::level, isoburn_imgen_opts::max_37_char_filenames, isoburn_imgen_opts::no_force_dots, isoburn_imgen_opts::omit_version_numbers, isoburn_imgen_opts::output_charset, 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::sort_files, and isoburn_imgen_opts::uid.
00754 { 00755 struct isoburn_imgen_opts *o; 00756 00757 o= (*new_o)= calloc(1, sizeof(struct isoburn_imgen_opts)); 00758 if(o==NULL) { 00759 isoburn_msgs_submit(NULL, 0x00060000, 00760 "Cannot allocate memory for image generation options", 00761 0, "FATAL", 0); 00762 return(-1); 00763 } 00764 o->level= 2; 00765 o->rockridge= 1; 00766 o->joliet= 0; 00767 o->iso1999= 0; 00768 o->omit_version_numbers= 0; 00769 o->allow_deep_paths= 1; 00770 o->allow_longer_paths= 0; 00771 o->max_37_char_filenames= 0; 00772 o->no_force_dots= 0; 00773 o->allow_lowercase= 0; 00774 o->allow_full_ascii= 0; 00775 o->joliet_longer_paths= 0; 00776 o->sort_files= 0; 00777 o->replace_dir_mode= 0; 00778 o->replace_file_mode= 0; 00779 o->replace_uid= 0; 00780 o->replace_gid= 0; 00781 o->dir_mode= 0555; 00782 o->file_mode= 0444; 00783 o->uid= 0; 00784 o->gid= 0; 00785 o->output_charset= 0; 00786 o->fifo_size= 4*1024*1024; 00787 o->effective_lba= -1; 00788 return(1); 00789 }
| int isoburn_igopt_set_extensions | ( | struct isoburn_imgen_opts * | o, | |
| int | ext | |||
| ) |
Definition at line 816 of file isoburn.c.
References isoburn_imgen_opts::iso1999, isoburn_imgen_opts::joliet, and isoburn_imgen_opts::rockridge.
00817 { 00818 o->rockridge= !!(ext&1); 00819 o->joliet= !!(ext&2); 00820 o->iso1999= !!(ext&4); 00821 return(1); 00822 }
| 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).
| o | The option set to work on | |
| fifo_size | Number of bytes to use |
Definition at line 933 of file isoburn.c.
References isoburn_imgen_opts::fifo_size.
| int isoburn_igopt_set_level | ( | struct isoburn_imgen_opts * | o, | |
| int | level | |||
| ) |
ISO level to write at.
| o | The option set to work on | |
| level | is 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 |
Definition at line 802 of file isoburn.c.
References isoburn_imgen_opts::level.
| int isoburn_igopt_set_out_charset | ( | struct isoburn_imgen_opts * | o, | |
| char * | output_charset | |||
| ) |
Set the charcter set to use for representing filenames in the image.
| o | The option set to work on | |
| output_charset | Set 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". |
Definition at line 917 of file isoburn.c.
References isoburn_imgen_opts::output_charset.
00919 { 00920 o->output_charset= output_charset; 00921 return(1); 00922 }
| 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.
| o | The option set to work on | |
| replace_dir_mode | whether and how to override directories | |
| replace_file_mode | whether and how to override files of other type | |
| dir_mode | Mode to use on dirs with replace_dir_mode == 2. | |
| file_mode; | Mode to use on files with replace_file_mode == 2. |
Definition at line 870 of file isoburn.c.
References isoburn_imgen_opts::dir_mode, isoburn_imgen_opts::file_mode, isoburn_imgen_opts::replace_dir_mode, and isoburn_imgen_opts::replace_file_mode.
00873 { 00874 o->replace_dir_mode= replace_dir_mode%3; 00875 o->replace_file_mode= replace_file_mode%3; 00876 o->dir_mode= dir_mode; 00877 o->file_mode= file_mode; 00878 return(1); 00879 }
| 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.
| o | The option set to work on | |
| replace_uid | whether and how to override user ids | |
| replace_gid | whether and how to override group ids | |
| uid | User id to use with replace_uid == 2. | |
| gid | Group id to use on files with replace_gid == 2. |
Definition at line 894 of file isoburn.c.
References isoburn_imgen_opts::gid, isoburn_imgen_opts::replace_gid, isoburn_imgen_opts::replace_uid, and isoburn_imgen_opts::uid.
00897 { 00898 o->replace_uid= replace_uid%3; 00899 o->replace_gid= replace_gid%3; 00900 o->uid= uid; 00901 o->gid= gid; 00902 return(1); 00903 }
| int isoburn_igopt_set_relaxed | ( | struct isoburn_imgen_opts * | o, | |
| int | relax | |||
| ) |
Definition at line 832 of file isoburn.c.
References isoburn_imgen_opts::allow_deep_paths, isoburn_imgen_opts::allow_full_ascii, isoburn_imgen_opts::allow_longer_paths, isoburn_imgen_opts::allow_lowercase, isoburn_imgen_opts::joliet_longer_paths, isoburn_imgen_opts::max_37_char_filenames, isoburn_imgen_opts::no_force_dots, and isoburn_imgen_opts::omit_version_numbers.
00833 { 00834 o->omit_version_numbers= !!(relax&1); 00835 o->allow_deep_paths= !!(relax&2); 00836 o->allow_longer_paths= !!(relax&4); 00837 o->max_37_char_filenames= !!(relax&8); 00838 o->no_force_dots= !!(relax&16); 00839 o->allow_lowercase= !!(relax&32); 00840 o->allow_full_ascii= !!(relax&64); 00841 o->joliet_longer_paths= !!(relax&128); 00842 return(1); 00843 }
| int isoburn_igopt_set_sort_files | ( | struct isoburn_imgen_opts * | o, | |
| int | value | |||
| ) |
Definition at line 856 of file isoburn.c.
References isoburn_imgen_opts::sort_files.
00857 { 00858 o->sort_files= !!(value&1); 00859 return(1); 00860 }
| int isoburn_initialize | ( | char | msg[1024], | |
| int | flag | |||
| ) |
Overview.
libisoburn is a frontend for libraries libburn and libisofs which enables creation and expansion of ISO-9660 filesystems on all CD/DVD media supported by libburn. This includes media like DVD+RW, which do not support multi-session management on media level and even plain disk files or block devices.
The price for that is thorough specialization on data files in ISO-9660 filesystem images. So libisoburn is not suitable for audio (CD-DA) or any other CD layout which does not entirely consist of ISO-9660 sessions.
Connector functions
libisofs and libburn do not depend on each other but share some interfaces by which they can cooperate. libisoburn establishes the connection between both modules by creating the necessary interface objects and attaching them to the right places.
Wrapper functions
The priciple of this frontend is that you may use any call of libisofs or libburn unless it has a isoburn_*() wrapper listed in the following function documentation.
E.g. call isoburn_initialize() rather than iso_init(); burn_initialize(); and call isoburn_drive_scan_and_grab() rather than burn_drive_scan_and_grab(). But you may call burn_disc_get_profile() directly if you want to display the media type.
The wrappers will transparently provide the necessary emulations which are appropriate for particular target drives and media states. To learn about them you have to read both API descriptions: the one of the wrapper and the one of the underlying libburn or libisofs call.
Macros BURN_* and functions burn_*() are documented in <libburn/libburn.h> Macros ISO_* and functions iso_*() are documented in <libisofs/libisofs.h>
Usage model
There may be an input drive and an output drive. Either of them may be missing with the consequence that no reading resp. writing is possible. Both drive roles can be fulfilled by the same drive.
Input can be a random access readable libburn drive: optical media, regular files, block devices. Output can be any writeable libburn drive: writeable optical media in burner, writeable file objects (no directories).
libburn demands rw-permissions to drive device file resp. file object.
If the input drive provides a suitable ISO RockRidge image, then its tree may be loaded into memory and can then be manipulated by libisofs API calls. The loading is done by isoburn_read_image() under control of struct isoburn_read_opts which the application obtains from libisoburn and manipulates by the family of isoburn_ropt_set_*() functions.
Writing of result images is controlled by libisofs related parameters in a struct isoburn_imgen_opts which the application obtains from libisoburn and manipulates by the family of isoburn_igopt_set_*() functions.
All multi-session aspects are handled by libisoburn according to these settings. The application does not have to analyze media state and write job parameters. It rather states its desires which libisoburn tries to fulfill, or else will refuse to start the write run.
Setup for Growing, Modifying or Blind Growing
The connector function family offers alternative API calls for performing the setup for several alternative image generation strategies.
Growing: If input and output drive are the same, then isoburn_prepare_disc() is to be used. It will lead to an add-on session on appendable or overwriteable media with existing ISO image. With blank media it will produce a first session.
Modifying: If the output drive is not the input drive, and if it bears blank media or overwriteable without a valid ISO image, then one may produce a consolidated image with old and new data. This will copy file data from an eventual input drive with valid image, add any newly introduced data from the local filesystem, and produce a first session on output media. To prepare for such an image generation run, use isoburn_prepare_new_image().
Blind Growing: This method reads the old image from one drive and writes the add-on session to a different drive. That output drive is nevertheless supposed to finally lead to the same media from where the session was loaded. Usually it 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 Blind growing is prepared by the call isoburn_prepare_blind_grow(). The input drive should be released immediately after this call in order to allow the consumer of the output stream to access that drive for writing.
After either of these setups, some peripheral libburn drive parameter settings like burn_write_opts_set_simulate(), burn_write_opts_set_multi(), burn_drive_set_speed(), burn_write_opts_set_underrun_proof() should be made. Do not set the write mode. It will be chosen by libisoburn so it matches job and media state.
Writing the image
Then one may start image generation and write threads by isoburn_disc_write(). Progress may be watched at the output drive by burn_drive_get_status() and isoburn_get_fifo_status().
At some time, the output drive will be BURN_DRIVE_IDLE indicating that writing has ended. One should inquire isoburn_drive_wrote_well() to learn about overall success.
Finally one must call isoburn_activate_session() which will complete any eventual multi-session emulation. Initialize libisoburn, libisofs and libburn. Wrapper for : iso_init() and burn_initialize()
| msg | A character array for eventual messages (e.g. with errors) | |
| flag | Bitfield for control purposes (unused yet, submit 0) |
Definition at line 64 of file burn_wrap.c.
References isoburn_destroy_all(), isoburn_libisofs_req_major, isoburn_libisofs_req_micro, isoburn_libisofs_req_minor, and isoburn_version().
00065 { 00066 int major, minor, micro, bad_match= 0; 00067 00068 00069 /* First two ugly compile time checks for header version compatibility. 00070 If everthing matches, then they produce no C code. In case of mismatch, 00071 intentionally faulty C code will be inserted. 00072 */ 00073 00074 #ifdef iso_lib_header_version_major 00075 /* The minimum requirement of libisoburn towards the libisofs header 00076 at compile time is defined in libisoburn/libisoburn.h : 00077 isoburn_libisofs_req_major 00078 isoburn_libisofs_req_minor 00079 isoburn_libisofs_req_micro 00080 It gets compared against the version macros in libisofs/libisofs.h : 00081 iso_lib_header_version_major 00082 iso_lib_header_version_minor 00083 iso_lib_header_version_micro 00084 If the header is too old then the following code shall cause failure of 00085 cdrskin compilation rather than to allow production of a program with 00086 unpredictable bugs or memory corruption. 00087 The compiler messages supposed to appear in this case are: 00088 error: 'LIBISOFS_MISCONFIGURATION' undeclared (first use in this function) 00089 error: 'INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libisofs_dot_h_TOO_OLD__SEE_libisoburn_dot_h_and_burn_wrap_dot_h' undeclared (first use in this function) 00090 error: 'LIBISOFS_MISCONFIGURATION_' undeclared (first use in this function) 00091 */ 00092 /* The indendation is an advise of man gcc to help old compilers ignoring */ 00093 #if isoburn_libisofs_req_major > iso_lib_header_version_major 00094 #define Isoburn_libisofs_dot_h_too_olD 1 00095 #endif 00096 #if isoburn_libisofs_req_major == iso_lib_header_version_major && isoburn_libisofs_req_minor > iso_lib_header_version_minor 00097 #define Isoburn_libisofs_dot_h_too_olD 1 00098 #endif 00099 #if isoburn_libisofs_req_minor == iso_lib_header_version_minor && isoburn_libisofs_req_micro > iso_lib_header_version_micro 00100 #define Isoburn_libisofs_dot_h_too_olD 1 00101 #endif 00102 00103 #ifdef Isoburn_libisofs_dot_h_too_olD 00104 LIBISOFS_MISCONFIGURATION = 0; 00105 INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libisofs_dot_h_TOO_OLD__SEE_libisoburn_dot_h_and_burn_wrap_dot_h = 0; 00106 LIBISOFS_MISCONFIGURATION_ = 0; 00107 #endif 00108 00109 #endif /* iso_lib_header_version_major */ 00110 00111 /* The minimum requirement of libisoburn towards the libburn header 00112 at compile time is defined in libisoburn/libisoburn.h : 00113 isoburn_libburn_req_major 00114 isoburn_libburn_req_minor 00115 isoburn_libburn_req_micro 00116 It gets compared against the version macros in libburn/libburn.h : 00117 burn_header_version_major 00118 burn_header_version_minor 00119 burn_header_version_micro 00120 If the header is too old then the following code shall cause failure of 00121 cdrskin compilation rather than to allow production of a program with 00122 unpredictable bugs or memory corruption. 00123 The compiler messages supposed to appear in this case are: 00124 error: 'LIBBURN_MISCONFIGURATION' undeclared (first use in this function) 00125 error: 'INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libburn_dot_h_TOO_OLD__SEE_libisoburn_dot_h_and_burn_wrap_dot_h' undeclared (first use in this function) 00126 error: 'LIBBURN_MISCONFIGURATION_' undeclared (first use in this function) 00127 */ 00128 00129 /* The indendation is an advise of man gcc to help old compilers ignoring */ 00130 #if isoburn_libburn_req_major > burn_header_version_major 00131 #define Isoburn_libburn_dot_h_too_olD 1 00132 #endif 00133 #if isoburn_libburn_req_major == burn_header_version_major && isoburn_libburn_req_minor > burn_header_version_minor 00134 #define Isoburn_libburn_dot_h_too_olD 1 00135 #endif 00136 #if isoburn_libburn_req_minor == burn_header_version_minor && isoburn_libburn_req_micro > burn_header_version_micro 00137 #define Isoburn_libburn_dot_h_too_olD 1 00138 #endif 00139 00140 #ifdef Isoburn_libburn_dot_h_too_olD 00141 LIBBURN_MISCONFIGURATION = 0; 00142 INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libburn_dot_h_TOO_OLD__SEE_libisoburn_dot_h_and_burn_wrap_dot_h = 0; 00143 LIBBURN_MISCONFIGURATION_ = 0; 00144 #endif 00145 00146 /* End of ugly compile time tests (scroll up for explanation) */ 00147 00148 00149 00150 msg[0]= 0; 00151 if(iso_init()<0) { 00152 sprintf(msg+strlen(msg), "Cannot initialize libisofs\n"); 00153 return(0); 00154 } 00155 iso_lib_version(&major, &minor, µ); 00156 sprintf(msg+strlen(msg), "libisofs-%d.%d.%d ", major, minor, micro); 00157 #ifdef iso_lib_header_version_major 00158 if(iso_lib_is_compatible(iso_lib_header_version_major, 00159 iso_lib_header_version_minor, 00160 iso_lib_header_version_micro)) { 00161 sprintf(msg+strlen(msg), "ok, "); 00162 } else { 00163 sprintf(msg+strlen(msg),"- TOO OLD -, need at least libisofs-%d.%d.%d ,\n", 00164 iso_lib_header_version_major, iso_lib_header_version_minor, 00165 iso_lib_header_version_micro); 00166 bad_match= 1; 00167 } 00168 #else 00169 if(iso_lib_is_compatible(isoburn_libisofs_req_major, 00170 isoburn_libisofs_req_minor, 00171 isoburn_libisofs_req_micro)) { 00172 sprintf(msg+strlen(msg), "suspicious, "); 00173 } else { 00174 sprintf(msg+strlen(msg),"- TOO OLD -, need at least libisofs-%d.%d.%d ,\n", 00175 isoburn_libisofs_req_major, isoburn_libisofs_req_minor, 00176 isoburn_libisofs_req_micro); 00177 bad_match= 1; 00178 } 00179 #endif /* ! iso_lib_header_version_major */ 00180 00181 if(!burn_initialize()) { 00182 sprintf(msg+strlen(msg), "Cannot initialize libburn\n"); 00183 return(0); 00184 } 00185 burn_version(&major, &minor, µ); 00186 sprintf(msg+strlen(msg), "libburn-%d.%d.%d ", major, minor, micro); 00187 if(major > burn_header_version_major 00188 || (major == burn_header_version_major 00189 && (minor > burn_header_version_minor 00190 || (minor == burn_header_version_minor 00191 && micro >= burn_header_version_micro)))) { 00192 sprintf(msg+strlen(msg), "ok, "); 00193 } else { 00194 sprintf(msg+strlen(msg), "- TOO OLD -, need at least libburn-%d.%d.%d ,\n", 00195 burn_header_version_major, burn_header_version_minor, 00196 burn_header_version_micro); 00197 bad_match= 1; 00198 } 00199 00200 isoburn_version(&major, &minor, µ); 00201 sprintf(msg+strlen(msg), "for libisoburn-%d.%d.%d", major, minor, micro); 00202 if(bad_match) 00203 return(0); 00204 00205 isoburn_destroy_all(&isoburn_list_start, 0); /* isoburn_list_start= NULL */ 00206 return(1); 00207 }
| 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 libisofs.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...
| major | obtained at build time | |
| minor | obtained at build time | |
| micro | obtained at build time | |
| flag | Bitfield for control purposes. Unused yet. Submit 0. |
Definition at line 598 of file isoburn.c.
References isoburn_version().
00599 { 00600 int own_major, own_minor, own_micro; 00601 00602 isoburn_version(&own_major, &own_minor, &own_micro); 00603 return(own_major > major || 00604 (own_major == major && (own_minor > minor || 00605 (own_minor == minor && own_micro >= micro)))); 00606 }
| int isoburn_libburn_req | ( | int * | major, | |
| int * | minor, | |||
| int * | micro | |||
| ) |
The minimum version of libburn to be used with this version of libisoburn at runtime.
This is checked already in isoburn_initialize() which will refuse on outdated version. So this call is for information purposes after successful startup only.
| major | isoburn_libburn_req_major as seen at build time | |
| minor | as seen at build time | |
| micro | as seen at build time |
Definition at line 221 of file burn_wrap.c.
00222 { 00223 *major= burn_header_version_major; 00224 *minor= burn_header_version_minor; 00225 *micro= burn_header_version_micro; 00226 return(1); 00227 }
| int isoburn_libisofs_req | ( | int * | major, | |
| int * | minor, | |||
| int * | micro | |||
| ) |
The minimum version of libisofs to be used with this version of libisoburn at runtime.
This is checked already in isoburn_initialize() which will refuse on outdated version. So this call is for information purposes after successful startup only.
| major | isoburn_libisofs_req_major as seen at build time | |
| minor | as seen at build time | |
| micro | as seen at build time |
Definition at line 211 of file burn_wrap.c.
00212 { 00213 *major= iso_lib_header_version_major; 00214 *minor= iso_lib_header_version_minor; 00215 *micro= iso_lib_header_version_micro; 00216 return(1); 00217 }
| int isoburn_needs_emulation | ( | struct burn_drive * | drive | ) |
Inquire wether the media needs emulation or would be suitable for generic multi-session via libburn.
| d | The drive to inquire |
Definition at line 762 of file burn_wrap.c.
References isoburn::emulation_mode, isoburn_disc_get_status(), and isoburn_find_emulator().
00763 { 00764 int ret; 00765 struct isoburn *o; 00766 enum burn_disc_status s; 00767 00768 s= isoburn_disc_get_status(drive); 00769 if(s!=BURN_DISC_BLANK && s!=BURN_DISC_APPENDABLE) 00770 return(-1); 00771 ret= isoburn_find_emulator(&o, drive, 0); 00772 if(ret<0) 00773 return(-1); 00774 if(ret>0) 00775 if(o->emulation_mode>0) 00776 return(1); 00777 return(0); 00778 }
| 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 | |||
| ) |
To choose the expansion 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 aquired $msc1 was set by isoburn_set_msc1() before image reading or was detected from the in_drive media $nwa is a parameter of this call or can be used as detected from the in_drive media
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().
| in_drive | The input drive,grabbed with isoburn_drive_scan_and_grab(). | |
| disc | Returns the newly created burn_disc object. | |
| opts | Options for image generation and data transport to media. | |
| out_drive | The output drive, from isoburn_drive_aquire() et.al.. typically stdio:/dev/fd/1 . | |
| nwa | The address (2048 byte block count) where the add-on session will be finally stored on a mountable media or in a mountable file. If nwa is -1 then the address is used as determined from the in_drive media. |
Definition at line 514 of file isoburn.c.
References isoburn::fabricated_msc2, isoburn_find_emulator(), isoburn_prepare_disc_aux(), isoburn::nwa, and isoburn::zero_nwa.
00517 { 00518 int ret; 00519 struct isoburn *o= NULL; 00520 00521 ret= isoburn_find_emulator(&o, out_drive, 0); 00522 if(ret<0 || o==NULL) 00523 return(-1); 00524 if(nwa >= 0) 00525 o->fabricated_msc2= nwa; 00526 if(o->nwa == o->zero_nwa) 00527 o->nwa= o->zero_nwa= 0; 00528 else 00529 o->zero_nwa= 0; 00530 ret= isoburn_prepare_disc_aux(d, out_drive, disc, opts, 2); 00531 if (ret<=0) 00532 return ret; 00533 return(1); 00534 }
| int isoburn_prepare_disc | ( | struct burn_drive * | drive, | |
| struct burn_disc ** | disc, | |||
| struct isoburn_imgen_opts * | opts | |||
| ) |
To choose the expansion 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 media from where the image was eventually loaded.
This 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().
| drive | The combined source and target drive, grabbed with isoburn_drive_scan_and_grab(). . | |
| disc | Returns the newly created burn_disc object. | |
| opts | Image generation options, see isoburn_igopt_*() |
Definition at line 493 of file isoburn.c.
References isoburn_prepare_disc_aux().
00495 { 00496 return isoburn_prepare_disc_aux(d, d, disc, opts, 0); 00497 }
| int isoburn_prepare_new_image | ( | struct burn_drive * | in_drive, | |
| struct burn_disc ** | disc, | |||
| struct isoburn_imgen_opts * | opts, | |||
| struct burn_drive * | out_drive | |||
| ) |
To choose the expansion 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 media. 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. 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().
| in_drive | The input drive, grabbed with isoburn_drive_aquire() or one of its alternatives. | |
| disc | Returns the newly created burn_disc object. | |
| opts | Options for image generation and data transport to media. | |
| out_drive | The output drive, from isoburn_drive_aquire() et.al.. |
Definition at line 500 of file isoburn.c.
References isoburn_prepare_disc_aux().
00503 { 00504 int ret; 00505 00506 ret= isoburn_prepare_disc_aux(d, out_drive, disc, opts, 1); 00507 if (ret<=0) 00508 return ret; 00509 return 1; 00510 }
| int isoburn_read_image | ( | struct burn_drive * | d, | |
| struct isoburn_read_opts * | read_opts, | |||
| IsoImage ** | image | |||
| ) |
Load the ISO filesystem directory tree from the media in the given drive.
This will give libisoburn the base on which it can let libisofs perform image growing or image modification. The loaded volset gets attached to the drive object and handed out to the application. Not a wrapper, but peculiar to libisoburn.
| d | The drive which holds an existing ISO filesystem or blank media. d is allowed to be NULL which produces an empty ISO image. In this case one has to call before writing isoburn_attach_volset() with the volset from this call and with the intended output drive. | |
| read_opts | The read options which can be chosen by the application | |
| image | the image read, if the disc is blank it will have no files. This reference needs to be released via iso_image_unref() when it is not longer needed. The drive, if not NULL, will hold an own reference which it will release when it gets a new volset or when it gets released via isoburn_drive_release(). You can pass NULL if you already have a reference or you plan to obtain it later with isoburn_get_attached_image(). Of course, if you haven't specified a valid drive (i.e., if d == NULL), this parameter can't be NULL. |
Definition at line 111 of file isofs_wrap.c.
References isoburn_read_opts::dirmode, isoburn_read_opts::gid, isoburn_read_opts::hasElTorito, isoburn_read_opts::hasIso1999, isoburn_read_opts::hasJoliet, isoburn_read_opts::hasRR, isoburn::image, isoburn_read_opts::input_charset, isoburn::iso_data_source, isoburn_data_source_new(), isoburn_disc_get_msc1(), isoburn_disc_get_status(), isoburn_find_emulator(), isoburn_idle_free_function(), isoburn_msgs_submit(), isoburn_read_iso_head(), isoburn_report_iso_error(), isoburn_read_opts::mode, isoburn_read_opts::noiso1999, isoburn_read_opts::nojoliet, isoburn_read_opts::norock, isoburn_read_opts::preferjoliet, isoburn_read_opts::pretend_blank, isoburn::read_pacifier, isoburn::read_pacifier_handle, isoburn_read_opts::size, and isoburn_read_opts::uid.
00114 { 00115 int ret, int_num, dummy; 00116 IsoReadOpts *ropts= NULL; 00117 IsoReadImageFeatures *features= NULL; 00118 uint32_t ms_block; 00119 char msg[160]; 00120 enum burn_disc_status status= BURN_DISC_BLANK; 00121 IsoDataSource *ds= NULL; 00122 struct isoburn *o= NULL; 00123 00124 if(d != NULL) { 00125 ret = isoburn_find_emulator(&o, d, 0); 00126 if (ret < 0 || o == NULL) 00127 return 0; 00128 status = isoburn_disc_get_status(d); 00129 } 00130 if(read_opts==NULL) { 00131 isoburn_msgs_submit(o, 0x00060000, 00132 "Program error: isoburn_read_image: read_opts==NULL", 00133 0, "FATAL", 0); 00134 return(-1); 00135 } 00136 if (d == NULL || status == BURN_DISC_BLANK || read_opts->pretend_blank) { 00137 create_blank_image:; 00138 /* 00139 * Blank disc, we create a new image without files. 00140 */ 00141 00142 if (d == NULL) { 00143 /* New empty image without relation to a drive */ 00144 if (image==NULL) { 00145 isoburn_msgs_submit(o, 0x00060000, 00146 "Program error: isoburn_read_image: image==NULL", 00147 0, "FATAL", 0); 00148 return -1; 00149 } 00150 /* create a new image */ 00151 ret = iso_image_new("ISOIMAGE", image); 00152 if (ret < 0) { 00153 isoburn_report_iso_error(ret, "Cannot create image", 0, "FATAL", 0); 00154 return ret; 00155 } 00156 } else { 00157 /* Blank new image for the drive */ 00158 iso_image_unref(o->image); 00159 ret = iso_image_new("ISOIMAGE", &o->image); 00160 if (ret < 0) { 00161 isoburn_report_iso_error(ret, "Cannot create image", 0, "FATAL", 0); 00162 return ret; 00163 } 00164 if (image) { 00165 *image = o->image; 00166 iso_image_ref(*image); /*protects object from premature free*/ 00167 } 00168 } 00169 return 1; 00170 } 00171 00172 if (status != BURN_DISC_APPENDABLE && status != BURN_DISC_FULL) { 00173 isoburn_msgs_submit(o, 0x00060000, 00174 "Program error: isoburn_read_image: incorrect disc status", 00175 0, "FATAL", 0); 00176 return -4; 00177 } 00178 00179 memset((char *) &ropts, 0, sizeof(ropts)); 00180 00181 ret = isoburn_disc_get_msc1(d, &int_num); 00182 if (ret <= 0) 00183 return -2; 00184 ms_block= int_num; 00185 ret = isoburn_read_iso_head(d, int_num, &dummy, NULL, 0); 00186 if (ret <= 0) { 00187 sprintf(msg, "No ISO 9660 image at LBA %d. Creating blank image.", int_num); 00188 isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0); 00189 goto create_blank_image; 00190 } 00191 00192 /* create the data source */ 00193 ret = iso_read_opts_new(&ropts, 0); 00194 if (ret < 0) { 00195 isoburn_report_iso_error(ret, "Cannot create write opts", 0, "FATAL", 0); 00196 return ret; 00197 } 00198 /* Important: do not return until iso_read_opts_free() */ 00199 iso_read_opts_set_start_block(ropts, ms_block); 00200 iso_read_opts_set_no_rockridge(ropts, read_opts->norock); 00201 iso_read_opts_set_no_joliet(ropts, read_opts->nojoliet); 00202 iso_read_opts_set_no_iso1999(ropts, read_opts->noiso1999); 00203 iso_read_opts_set_preferjoliet(ropts, read_opts->preferjoliet); 00204 iso_read_opts_set_default_permissions(ropts, 00205 read_opts->mode, read_opts->dirmode); 00206 iso_read_opts_set_default_uid(ropts, read_opts->uid); 00207 iso_read_opts_set_default_gid(ropts, read_opts->gid); 00208 iso_read_opts_set_input_charset(ropts, read_opts->input_charset); 00209 00210 /* <<< experimental API call of libisofs 00211 iso_read_opts_set_error_behavior(ropts, 1); 00212 */ 00213 00214 ds = isoburn_data_source_new(d); 00215 if(o->iso_data_source!=NULL) 00216 iso_data_source_unref(o->iso_data_source); 00217 o->iso_data_source= ds; 00218 iso_image_attach_data(o->image, o->read_pacifier_handle, 00219 isoburn_idle_free_function); 00220 if(o->read_pacifier_handle==NULL) 00221 iso_tree_set_report_callback(o->image, NULL); 00222 else 00223 iso_tree_set_report_callback(o->image, o->read_pacifier); 00224 ret = iso_image_import(o->image, ds, ropts, &features); 00225 iso_tree_set_report_callback(o->image, NULL); 00226 iso_read_opts_free(ropts); 00227 00228 if (ret < 0) { 00229 isoburn_report_iso_error(ret, "Cannot import image", 0, "FAILURE", 0); 00230 return ret; 00231 } 00232 /* Important: do not return until free(features) */ 00233 if (image!=NULL) { 00234 *image = o->image; 00235 iso_image_ref(*image); /*protects object from premature free*/ 00236 } 00237 read_opts->hasRR = iso_read_image_features_has_rockridge(features); 00238 read_opts->hasJoliet = iso_read_image_features_has_joliet(features); 00239 read_opts->hasIso1999 = iso_read_image_features_has_iso1999(features); 00240 read_opts->hasElTorito = iso_read_image_features_has_eltorito(features); 00241 read_opts->size = iso_read_image_features_get_size(features); 00242 iso_read_image_features_destroy(features); 00243 return 1; 00244 }
| int isoburn_read_iso_head | ( | struct burn_drive * | d, | |
| int | lba, | |||
| int * | image_blocks, | |||
| char * | info, | |||
| int | flag | |||
| ) |
Try whether the data at the given address look like a ISO 9660 image header and obtain its alleged size.
Depending on the info mode one other string of text information can be retrieved too.
| drive | The drive with the media to inspect | |
| lba | The block number from where to read | |
| image_blocks | The number of 2048 bytes blocks | |
| info | Caller provided memory, enough to take eventual info reply | |
| flag | bit0-7: info return mode 0= do not return anything in info (do not even touch it) 1= copy volume id to info (info needs 33 bytes) 2= |
0.2.2: do not read head from media but use first 64 kB from info bit14= check both half buffers (not only second) return 2 if found in first block bit15= return-1 on read error
Definition at line 999 of file burn_wrap.c.
References isoburn_read_iso_head_parse().
Referenced by isoburn_emulate_toc(), isoburn_read_image(), and isoburn_set_msc1().
01001 { 01002 unsigned char buffer[64*1024]; 01003 int ret, info_mode; 01004 off_t data_count; 01005 01006 info_mode= flag&255; 01007 *image_blocks= 0; 01008 if(flag&(1<<13)) { 01009 memcpy(buffer, info, 64*1024); 01010 } else { 01011 ret = burn_read_data(d, ((off_t) lba) * (off_t) 2048, (char *) buffer, 01012 (off_t) 64*1024, &data_count, 2); /* no error messages */ 01013 if(ret<=0) 01014 return(-1*!!(flag&(1<<15))); 01015 if(info_mode==2) 01016 memcpy(info, buffer, 64*1024); 01017 } 01018 01019 if(flag&(1<<14)) { 01020 ret= isoburn_read_iso_head_parse(d, buffer, image_blocks, info, info_mode); 01021 if(ret<0) 01022 return(ret); 01023 if(ret>0) 01024 return(2); 01025 } 01026 ret= isoburn_read_iso_head_parse(d, buffer+32*1024, image_blocks, info, 01027 info_mode); 01028 return(ret); 01029 }
| int isoburn_ropt_destroy | ( | struct isoburn_read_opts ** | o, | |
| int | flag | |||
| ) |
Deletes an option set which was created by isoburn_ropt_new().
| o | The option set to work on | |
| flag | Bitfield for control purposes. Submit 0 for now. |
Definition at line 645 of file isoburn.c.
00646 { 00647 if(*o==NULL) 00648 return(0); 00649 free(*o); 00650 *o= NULL; 00651 return(1); 00652 }
| int isoburn_ropt_get_default_dirperms | ( | struct isoburn_read_opts * | o, | |
| mode_t * | mode | |||
| ) |
Definition at line 712 of file isoburn.c.
References isoburn_read_opts::dirmode.
00714 { 00715 *mode= o->dirmode; 00716 return(1); 00717 }
| int isoburn_ropt_get_default_perms | ( | struct isoburn_read_opts * | o, | |
| uid_t * | uid, | |||
| gid_t * | gid, | |||
| mode_t * | mode | |||
| ) |
Definition at line 694 of file isoburn.c.
References isoburn_read_opts::gid, isoburn_read_opts::mode, and isoburn_read_opts::uid.
| int isoburn_ropt_get_extensions | ( | struct isoburn_read_opts * | o, | |
| int * | ext | |||
| ) |
Definition at line 666 of file isoburn.c.
References isoburn_read_opts::noiso1999, isoburn_read_opts::nojoliet, isoburn_read_opts::norock, isoburn_read_opts::preferjoliet, and isoburn_read_opts::pretend_blank.
00667 { 00668 *ext= (!!o->norock) | ((!!o->nojoliet)<<1) | ((!!o->noiso1999)<<2) | 00669 ((!!o->preferjoliet)<<3) | ((!!o->pretend_blank)<<4); 00670 return(1); 00671 }
| int isoburn_ropt_get_input_charset | ( | struct isoburn_read_opts * | o, | |
| char ** | input_charset | |||
| ) |
| int isoburn_ropt_get_size_what | ( | struct isoburn_read_opts * | o, | |
| uint32_t * | size, | |||
| int * | has_what | |||
| ) |
Definition at line 736 of file isoburn.c.
References isoburn_read_opts::hasElTorito, isoburn_read_opts::hasIso1999, isoburn_read_opts::hasJoliet, isoburn_read_opts::hasRR, and isoburn_read_opts::size.
00738 { 00739 *size= o->size; 00740 *has_what= (!!o->hasRR) | ((!!o->hasJoliet)<<1) | 00741 ((!!o->hasIso1999)<<2) | ((!!o->hasElTorito)<<3); 00742 return(1); 00743 }
| int isoburn_ropt_new | ( | struct isoburn_read_opts ** | o, | |
| int | flag | |||
| ) |
Produces a set of image read options, initialized with default values.
| o | the newly created option set object | |
| flag | Bitfield for control purposes. Submit 0 for now. |
Definition at line 616 of file isoburn.c.
References isoburn_read_opts::dirmode, 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::mode, isoburn_read_opts::noiso1999, isoburn_read_opts::nojoliet, isoburn_read_opts::norock, isoburn_read_opts::preferjoliet, isoburn_read_opts::pretend_blank, isoburn_read_opts::size, and isoburn_read_opts::uid.
00617 { 00618 struct isoburn_read_opts *o; 00619 00620 o= (*new_o)= calloc(1, sizeof(struct isoburn_read_opts)); 00621 if(o==NULL) { 00622 isoburn_msgs_submit(NULL, 0x00060000, 00623 "Cannot allocate memory for read options", 0, "FATAL", 0); 00624 return(-1); 00625 } 00626 o->norock= 0; 00627 o->nojoliet= 0; 00628 o->noiso1999= 1; 00629 o->preferjoliet= 0; 00630 o->uid= geteuid(); 00631 o->gid= getegid(); 00632 o->mode= 0444; 00633 o->dirmode= 0555; 00634 o->input_charset= NULL; 00635 o->hasRR= 0; 00636 o->hasJoliet= 0; 00637 o->hasIso1999= 0; 00638 o->hasElTorito= 0; 00639 o->size= 0; 00640 o->pretend_blank= 1; 00641 return(1); 00642 }
| 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 independend permissions for directories, especially to override the automatically added x-permissions.
| o | The option set to work on | |
| mode | permissions (not file type) as of man 2 stat. |
Definition at line 704 of file isoburn.c.
References isoburn_read_opts::dirmode.
| 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.
| o | The option set to work on | |
| uid | user id number (see /etc/passwd) | |
| gid | group id number (see /etc/group) | |
| mode | permissions (not file type) as of man 2 stat. With directories, r-permissions will automatically imply x-permissions. See isoburn_ropt_set_default_dirperms() below. |
Definition at line 674 of file isoburn.c.
References isoburn_read_opts::dirmode, isoburn_read_opts::gid, isoburn_read_opts::mode, and isoburn_read_opts::uid.
00676 { 00677 mode_t dirmode; 00678 00679 o->uid= uid; 00680 o->gid= gid; 00681 o->mode= mode; 00682 dirmode= mode; 00683 if(dirmode & S_IRUSR) 00684 dirmode|= S_IXUSR; 00685 if(dirmode & S_IRGRP) 00686 dirmode|= S_IXGRP; 00687 if(dirmode & S_IROTH) 00688 dirmode|= S_IXOTH; 00689 o->dirmode= dirmode; 00690 return(1); 00691 }
| int isoburn_ropt_set_extensions | ( | struct isoburn_read_opts * | o, | |
| int | ext | |||
| ) |
Definition at line 655 of file isoburn.c.
References isoburn_read_opts::noiso1999, isoburn_read_opts::nojoliet, isoburn_read_opts::norock, isoburn_read_opts::preferjoliet, and isoburn_read_opts::pretend_blank.
00656 { 00657 o->norock= !!(ext&1); 00658 o->nojoliet= !!(ext&2); 00659 o->noiso1999= !!(ext&4); 00660 o->preferjoliet= !!(ext&8); 00661 o->pretend_blank= !!(ext&16); 00662 return(1); 00663 }
| 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.
| o | The option set to work on | |
| input_charset | Set 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". |
Definition at line 720 of file isoburn.c.
References isoburn_read_opts::input_charset.
00722 { 00723 o->input_charset= input_charset; 00724 return(1); 00725 }
| int isoburn_set_msc1 | ( | struct burn_drive * | d, | |
| int | adr_mode, | |||
| char * | adr_value, | |||
| int | flag | |||
| ) |
Set up isoburn_disc_get_msc1() to return a fabricated value.
This makes only sense between aquiring the drive and reading the image. After isoburn_read_image() it will confuse the coordination of libisoburn and libisofs. Note: Sessions and tracks are counted beginning with 1, not with 0.
| drive | The drive where msc1 is to be set | |
| adr_mode | Determines how to interpret adr_value and to set msc1. If adr_value shall represent a number then decimal ASCII digits are expected. 0= start lba of last session in TOC, ignore adr_value 1= start lba of session number given by adr_value 2= start lba of track given number by adr_value 3= adr_value itself is the lba to be used 4= start lba of last session with volume id given by adr_value adr_value A string describing the value to be eventually used. | |
| flag | Bitfield for control purposes. bit0= |
Definition at line 1454 of file burn_wrap.c.
References isoburn_toc_disc::disc, isoburn::fabricated_msc1, isoburn_find_emulator(), isoburn_get_track_lba(), isoburn_msgs_submit(), isoburn_read_iso_head(), isoburn_toc_disc_free(), isoburn_toc_disc_get_sessions(), isoburn_toc_drive_get_disc(), and isoburn_toc_session_get_tracks().
01456 { 01457 int ret, num_sessions, num_tracks, adr_num, i, j, total_tracks; 01458 int lba, best_lba, size; 01459 char volid[33], msg[160]; 01460 struct isoburn *o; 01461 struct isoburn_toc_disc *disc= NULL; 01462 struct isoburn_toc_session **sessions= NULL; 01463 struct isoburn_toc_track **tracks= NULL; 01464 static char mode_names[][20]= {"auto", "session", "track", "lba", "volid"}; 01465 static int max_mode_names= 4; 01466 01467 ret= isoburn_find_emulator(&o, d, 0); 01468 if(ret<0) 01469 return(-1); 01470 if(o==NULL) 01471 return(-1); 01472 01473 adr_num= atoi(adr_value); 01474 if(adr_mode!=3) { 01475 disc= isoburn_toc_drive_get_disc(d); 01476 if(disc==NULL) { 01477 not_found:; 01478 if(adr_mode<0 || adr_mode>max_mode_names) 01479 goto unknown_mode; 01480 sprintf(msg, "Failed to find %s %s", mode_names[adr_mode], 01481 strlen(adr_value)<=80 ? adr_value : "-oversized-string-"); 01482 isoburn_msgs_submit(o, 0x00060000, msg, 0, "FAILURE", 0); 01483 ret= 0; goto ex; 01484 } 01485 sessions= isoburn_toc_disc_get_sessions(disc, &num_sessions); 01486 if(sessions==NULL || num_sessions<=0) 01487 goto not_found; 01488 } 01489 if(adr_mode==0) { 01490 /* Set fabricated_msc1 to last session in TOC */ 01491 tracks= isoburn_toc_session_get_tracks(sessions[num_sessions-1], 01492 &num_tracks); 01493 if(tracks==NULL || num_tracks<=0) 01494 goto not_found; 01495 isoburn_get_track_lba(tracks[0], &(o->fabricated_msc1), 0); 01496 01497 } else if(adr_mode==1) { 01498 /* Use adr_num as session index (first session is 1, not 0) */ 01499 if(adr_num<1 || adr_num>num_sessions) 01500 goto not_found; 01501 tracks= isoburn_toc_session_get_tracks(sessions[adr_num-1], &num_tracks); 01502 if(tracks==NULL || num_tracks<=0) 01503 goto not_found; 01504 isoburn_get_track_lba(tracks[0], &(o->fabricated_msc1), 0); 01505 01506 } else if(adr_mode==2) { 01507 /* use adr_num as track index */ 01508 total_tracks= 0; 01509 for(i=0; i<num_sessions; i++) { 01510 tracks= isoburn_toc_session_get_tracks(sessions[i], &num_tracks); 01511 if(tracks==NULL) 01512 continue; 01513 for(j= 0; j<num_tracks; j++) { 01514 total_tracks++; 01515 if(total_tracks==adr_num) { 01516 isoburn_get_track_lba(tracks[j], &(o->fabricated_msc1), 0); 01517 ret= 1; goto ex; 01518 } 01519 } 01520 } 01521 goto not_found; 01522 01523 } else if(adr_mode==3) { 01524 o->fabricated_msc1= adr_num; 01525 if((flag & 1) && o->fabricated_msc1 >= 16) { 01526 /* adr_num is possibly 16 blocks too high */ 01527 ret= isoburn_read_iso_head(d, o->fabricated_msc1, &size,volid, 1|(1<<14)); 01528 if(ret==2) 01529 o->fabricated_msc1-= 16; 01530 } 01531 } else if(adr_mode==4) { 01532 /* search for volume id that is equal to adr_value */ 01533 best_lba= -1; 01534 for(i=0; i<num_sessions; i++) { 01535 tracks= isoburn_toc_session_get_tracks(sessions[i], &num_tracks); 01536 if(tracks==NULL) 01537 continue; 01538 for(j= 0; j<num_tracks; j++) { 01539 isoburn_get_track_lba(tracks[0], &lba, 0); 01540 ret= isoburn_read_iso_head(d, lba, &size, volid, 1); 01541 if(ret<=0) 01542 continue; 01543 if(strcmp(volid, adr_value)!=0) 01544 continue; 01545 best_lba= lba; 01546 } 01547 } 01548 if(best_lba<0) 01549 goto not_found; 01550 o->fabricated_msc1= best_lba; 01551 01552 } else { 01553 unknown_mode:; 01554 sprintf(msg, "Program error: Unknown msc1 address mode %d", adr_mode); 01555 isoburn_msgs_submit(o, 0x00060000, msg, 0, "FATAL", 0); 01556 ret= 0; goto ex; 01557 } 01558 ret= 1; 01559 ex:; 01560 if(disc!=NULL) 01561 isoburn_toc_disc_free(disc); 01562 return(ret); 01563 }
| int isoburn_set_msgs_submit | ( | int(*)(void *handle, int error_code, char msg_text[], int os_errno, char severity[], int flag) | msgs_submit, | |
| void * | submit_handle, | |||
| int | submit_flag, | |||
| int | flag | |||
| ) |
Note: Above version numbers are also recorded in configure.ac because libtool wants them as parameters at build time.
For the library compatibility check, ISOBURN_*_VERSION in configure.ac are not decisive. Only the three numbers here do matter. Usage discussion:Some developers of the libburnia project have differing opinions how to ensure the compatibility of libaries and applications.
It is about whether to use at compile time and at runtime the version numbers isoburn_header_version_* provided here. Thomas Schmitt advises to use them. Vreixo Formoso advises to use other means.
At compile time:
Vreixo Formoso advises to leave proper version matching to properly programmed checks in the the application's build system, which will eventually refuse compilation.
Thomas Schmitt advises to use the macros defined here for comparison with the application's requirements of library revisions and to eventually break compilation.
Both advises are combinable. I.e. be master of your build system and have if checks in the source code of your application, nevertheless.
At runtime (via *_is_compatible()):
Vreixo Formoso advises to compare the application's requirements of library revisions with the runtime library. This is to allow runtime libraries which are young enough for the application but too old for the lib*.h files seen at compile time.
Thomas Schmitt advises to compare the header revisions defined here with the runtime library. This is to enforce a strictly monotonous chain of revisions from app to header to library, at the cost of excluding some older libraries.
These two advises are mutually exclusive.
-----------------------------------------------------
For an implementation of the Thomas Schmitt approach, see libisoburn/burn_wrap.c : isoburn_initialize() This connects libisoburn as "application" with libisofs as "library".
The compatible part of Vreixo Formoso's approach is implemented in configure.ac LIBBURN_REQUIRED, LIBISOFS_REQUIRED. In isoburn_initialize() it would rather test by iso_lib_is_compatible(isoburn_libisofs_req_major,... than by iso_lib_is_compatible(iso_lib_header_version_major,... and would leave out the ugly compile time traps. Announce to the library an application provided method for immediate delivery of messages. It is used when no drive is affected directly or if the drive has no own msgs_submit() method attached by isoburn_drive_set_msgs_submit. If no method is preset or if the method is set to NULL then libisoburn delivers its messages through the message queue of libburn.
| msgs_submit | The function call which implements the method | |
| submit_handle | Handle to be used as first argument of msgs_submit | |
| submit_flag | Flag to be used as last argument of msgs_submit | |
| flag | Unused yet, submit 0 |
Definition at line 230 of file burn_wrap.c.
References libisoburn_default_msgs_submit, libisoburn_default_msgs_submit_flag, libisoburn_default_msgs_submit_handle, and isoburn::msgs_submit.
00234 { 00235 libisoburn_default_msgs_submit= msgs_submit; 00236 libisoburn_default_msgs_submit_handle= submit_handle; 00237 libisoburn_default_msgs_submit_flag= submit_flag; 00238 return(1); 00239 }
| int isoburn_set_read_pacifier | ( | struct burn_drive * | drive, | |
| int(*)(IsoImage *, IsoFileSource *) | read_pacifier, | |||
| void * | app_handle | |||
| ) |
Set a callback function for producing pacifier messages during the lengthy process of image reading.
The callback function and the application handle are stored until they are needed for the underlying call to libisofs. Other than with libisofs the handle is managed entirely by the application. An idle .free() function is exposed to libisofs. The handle has to stay valid until isoburn_read_image() is done. It has to be detached by isoburn_set_read_pacifier(drive, NULL, NULL); before it may be removed from memory.
| drive | The drive which will be used with isoburn_read_image() It has to be aquired by an isoburn_* wrapper call. | |
| read_pacifier | The callback function | |
| app_handle | The app handle which the callback function can obtain via iso_image_get_attached_data() from its IsoImage* |
Definition at line 393 of file isofs_wrap.c.
References isoburn_find_emulator(), isoburn::read_pacifier, and isoburn::read_pacifier_handle.
00396 { 00397 int ret; 00398 struct isoburn *o; 00399 00400 ret = isoburn_find_emulator(&o, drive, 0); 00401 if(ret < 0 || o == NULL) 00402 return -1; 00403 o->read_pacifier_handle= read_handle; 00404 o->read_pacifier= read_pacifier; 00405 return(1); 00406 }
| 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.
| input_drive | The drive resp. in_drive which was used with the preparation call. | |
| output_drive | The out_drive used with isoburn_prepare_new_image(), NULL if none. | |
| flag | Bitfield, submit 0 for now. |
Definition at line 575 of file isoburn.c.
References isoburn_cancel_prepared_write().
00577 { 00578 return isoburn_cancel_prepared_write(d, output_drive, 1); 00579 }
| void isoburn_toc_disc_free | ( | struct isoburn_toc_disc * | disc | ) |
Release the memory associated with a master handle of media.
The handle is invalid afterwards and may not be used any more. Wrapper for: burn_disc_free()
| disc | The master handle of the media |
Definition at line 1411 of file burn_wrap.c.
References isoburn_toc_disc::disc, and isoburn_toc_destroy_arrays().
Referenced by isoburn_set_msc1().
01412 { 01413 if(d->disc!=NULL) 01414 burn_disc_free(d->disc); 01415 isoburn_toc_destroy_arrays(d, 0); 01416 free((char *) d); 01417 }
| int isoburn_toc_disc_get_sectors | ( | struct isoburn_toc_disc * | disc | ) |
Tell the number of 2048 byte blocks covered by the table of content.
Wrapper for: burn_disc_get_sectors()
| disc | The master handle of the media |
Definition at line 1297 of file burn_wrap.c.
References isoburn_toc_disc::disc, isoburn_toc_entry::next, isoburn_toc_entry::start_lba, isoburn_toc_disc::toc, and isoburn_toc_entry::track_blocks.
01298 { 01299 struct isoburn_toc_entry *t; 01300 int ret= 0; 01301 01302 if(disc==NULL) 01303 return(0); 01304 if(disc->toc!=NULL) { 01305 for(t= disc->toc; t!=NULL; t= t->next) 01306 ret= t->start_lba + t->track_blocks; 01307 } else if(disc->disc!=NULL) 01308 ret= burn_disc_get_sectors(disc->disc); 01309 return(ret); 01310 }
| struct isoburn_toc_session** isoburn_toc_disc_get_sessions | ( | struct isoburn_toc_disc * | disc, | |
| int * | num | |||
| ) | [read] |
Get the array of session handles from the table of content.
Wrapper for: burn_disc_get_sessions()
| disc | The master handle of the media | |
| num | returns the number of sessions in the array |
Definition at line 1313 of file burn_wrap.c.
References isoburn_toc_disc::session_count, and isoburn_toc_disc::session_pointers.
Referenced by isoburn_set_msc1().
01315 { 01316 *num= disc->session_count; 01317 return(disc->session_pointers); 01318 }
| struct isoburn_toc_disc* isoburn_toc_drive_get_disc | ( | struct burn_drive * | d | ) | [read] |
Obtain a master handle for the table of content.
This handle governs allocated resources which have to be released by isoburn_toc_disc_free() when no longer needed. Wrapper for: burn_drive_get_disc()
| drive | The drive with the media to inspect |
Definition at line 1211 of file burn_wrap.c.
References isoburn_toc_disc::disc, isoburn_find_emulator(), isoburn_toc_new_arrays(), isoburn_toc_entry::next, isoburn_toc_session::session, isoburn_toc_disc::session_count, isoburn_toc_disc::session_pointers, isoburn_toc_disc::sessions, isoburn::toc, isoburn_toc_disc::toc, isoburn_toc_track::toc_entry, isoburn_toc_session::toc_entry, isoburn_toc_track::track, isoburn_toc_session::track_count, isoburn_toc_disc::track_count, isoburn_toc_session::track_pointers, isoburn_toc_disc::track_pointers, and isoburn_toc_disc::tracks.
Referenced by isoburn_set_msc1().
01212 { 01213 int ret, session_count= 0, track_count= 0, num_tracks= 0, i, j; 01214 struct isoburn *o; 01215 struct isoburn_toc_entry *t; 01216 struct isoburn_toc_disc *toc_disc= NULL; 01217 struct burn_session **s; 01218 struct burn_track **tracks; 01219 01220 toc_disc= calloc(1, sizeof(struct isoburn_toc_disc)); 01221 if(toc_disc==NULL) 01222 return(NULL); 01223 toc_disc->disc= NULL; 01224 toc_disc->sessions= NULL; 01225 toc_disc->session_pointers= NULL; 01226 toc_disc->tracks= NULL; 01227 toc_disc->track_pointers= NULL; 01228 toc_disc->session_count= 0; 01229 toc_disc->track_count= 0; 01230 toc_disc->toc= NULL; 01231 01232 /* is the media emulated multi-session ? */ 01233 ret= isoburn_find_emulator(&o, d, 0); 01234 if(ret<0) 01235 goto libburn; 01236 if(o->toc==NULL) 01237 goto libburn; 01238 01239 /* This is an emulated TOC */ 01240 toc_disc->toc= o->toc; 01241 for(t= toc_disc->toc; t!=NULL; t= t->next) 01242 session_count++; 01243 ret= isoburn_toc_new_arrays(toc_disc, session_count, session_count, 0); 01244 if(ret<=0) 01245 goto failure; 01246 t= toc_disc->toc; 01247 for(i= 0; i<session_count; i++) { 01248 toc_disc->sessions[i].track_pointers= toc_disc->track_pointers+i; 01249 toc_disc->sessions[i].track_count= 1; 01250 toc_disc->sessions[i].toc_entry= t; 01251 toc_disc->session_pointers[i]= toc_disc->sessions+i; 01252 toc_disc->tracks[i].toc_entry= t; 01253 toc_disc->track_pointers[i]= toc_disc->tracks+i; 01254 t= t->next; 01255 } 01256 toc_disc->session_count= session_count; 01257 toc_disc->track_count= session_count; 01258 return(toc_disc); 01259 01260 libburn:; 01261 /* This is a libburn provided TOC */ 01262 toc_disc->disc= burn_drive_get_disc(d); 01263 if(toc_disc->disc == NULL) { 01264 failure:; 01265 free((char *) toc_disc); 01266 return(NULL); 01267 } 01268 s= burn_disc_get_sessions(toc_disc->disc, &session_count); 01269 for(i= 0; i<session_count; i++) { 01270 tracks = burn_session_get_tracks(s[i], &num_tracks); 01271 track_count+= num_tracks; 01272 } 01273 if(session_count<=0 || track_count<=0) 01274 goto failure; 01275 ret= isoburn_toc_new_arrays(toc_disc, session_count, track_count, 0); 01276 if(ret<=0) 01277 goto failure; 01278 track_count= 0; 01279 for(i= 0; i<session_count; i++) { 01280 tracks = burn_session_get_tracks(s[i], &num_tracks); 01281 toc_disc->sessions[i].session= s[i]; 01282 toc_disc->sessions[i].track_pointers= toc_disc->track_pointers+track_count; 01283 toc_disc->sessions[i].track_count= num_tracks; 01284 toc_disc->session_pointers[i]= toc_disc->sessions+i; 01285 for(j= 0; j<num_tracks; j++) { 01286 toc_disc->tracks[track_count+j].track= tracks[j]; 01287 toc_disc->track_pointers[track_count+j]= toc_disc->tracks+(track_count+j); 01288 } 01289 track_count+= num_tracks; 01290 } 01291 toc_disc->session_count= session_count; 01292 toc_disc->track_count= track_count; 01293 return(toc_disc); 01294 }
| void isoburn_toc_session_get_leadout_entry | ( | struct isoburn_toc_session * | s, | |
| struct burn_toc_entry * | entry | |||
| ) |
Obtain a copy of the entry which describes the end of a particular session.
Wrapper for: burn_session_get_leadout_entry()
| s | The session handle | |
| entry | A pointer to memory provided by the caller. It will be filled with info according to struct burn_toc_entry as defined in libburn.h |
Definition at line 1364 of file burn_wrap.c.
References isoburn_toc_entry_finish(), isoburn_toc_entry::session, isoburn_toc_session::session, isoburn_toc_entry::start_lba, isoburn_toc_track::toc_entry, isoburn_toc_session::toc_entry, isoburn_toc_entry::track_blocks, isoburn_toc_session::track_count, isoburn_toc_entry::track_no, and isoburn_toc_session::track_pointers.
01366 { 01367 struct isoburn_toc_track *t; 01368 01369 if(s==NULL) 01370 return; 01371 if(s->session!=NULL && s->toc_entry==NULL) { 01372 burn_session_get_leadout_entry(s->session, entry); 01373 return; 01374 } 01375 if(s->track_count<=0 || s->track_pointers==NULL || s->toc_entry==NULL) 01376 return; 01377 t= s->track_pointers[s->track_count-1]; 01378 entry->start_lba= t->toc_entry->start_lba + t->toc_entry->track_blocks; 01379 entry->track_blocks= 0; 01380 isoburn_toc_entry_finish(entry, s->toc_entry->session, t->toc_entry->track_no, 01381 0); 01382 }
| int isoburn_toc_session_get_sectors | ( | struct isoburn_toc_session * | s | ) |
Tell the number of 2048 byte blocks covered by a particular session.
Wrapper for: burn_session_get_sectors()
| s | The session handle |
Definition at line 1321 of file burn_wrap.c.
References isoburn_toc_entry::next, isoburn_toc_session::session, isoburn_toc_session::toc_entry, isoburn_toc_entry::track_blocks, and isoburn_toc_session::track_count.
01322 { 01323 struct isoburn_toc_entry *t; 01324 int count= 0, i; 01325 01326 if(s==NULL) 01327 return(0); 01328 if(s->toc_entry!=NULL) { 01329 t= s->toc_entry; 01330 for(i= 0; i<s->track_count; i++) { 01331 count+= t->track_blocks; 01332 t= t->next; 01333 } 01334 } else if(s->session!=NULL) 01335 count= burn_session_get_sectors(s->session); 01336 return(count); 01337 }
| struct isoburn_toc_track** isoburn_toc_session_get_tracks | ( | struct isoburn_toc_session * | s, | |
| int * | num | |||
| ) | [read] |
Get the array of track handles from a particular session.
Wrapper for: burn_session_get_tracks()
| s | The session handle | |
| num | returns the number of tracks in the array |
Definition at line 1385 of file burn_wrap.c.
References isoburn_toc_session::track_count, and isoburn_toc_session::track_pointers.
Referenced by isoburn_set_msc1().
01387 { 01388 *num= s->track_count; 01389 return(s->track_pointers); 01390 }
| void isoburn_toc_track_get_entry | ( | struct isoburn_toc_track * | t, | |
| struct burn_toc_entry * | entry | |||
| ) |
Obtain a copy of the entry which describes a particular itrack.
Wrapper for: burn_track_get_entry()
| s | The track handle | |
| entry | A pointer to memory provided by the caller. It will be filled with info according to struct burn_toc_entry as defined in libburn.h |
Definition at line 1393 of file burn_wrap.c.
References isoburn_toc_entry_finish(), isoburn_toc_entry::session, isoburn_toc_entry::start_lba, isoburn_toc_track::toc_entry, isoburn_toc_track::track, isoburn_toc_entry::track_blocks, and isoburn_toc_entry::track_no.
Referenced by isoburn_get_track_lba().
01395 { 01396 if(t==0) 01397 return; 01398 if(t->track!=NULL && t->toc_entry==NULL) { 01399 burn_track_get_entry(t->track, entry); 01400 return; 01401 } 01402 if(t->toc_entry==NULL) 01403 return; 01404 entry->start_lba= t->toc_entry->start_lba; 01405 entry->track_blocks= t->toc_entry->track_blocks; 01406 isoburn_toc_entry_finish(entry, t->toc_entry->session, t->toc_entry->track_no, 01407 0); 01408 }
| 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().
| major | The maturity version (0 for now, as we are still learning) | |
| minor | The development goal version. | |
| micro | The development step version. This has an additional meaning: |
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.
Definition at line 582 of file isoburn.c.
References isoburn_header_version_major, isoburn_header_version_micro, and isoburn_header_version_minor.
Referenced by isoburn_initialize(), and isoburn_is_compatible().
00583 { 00584 *major= isoburn_header_version_major; 00585 *minor= isoburn_header_version_minor; 00586 *micro= isoburn_header_version_micro; 00587 00588 /* No more: values from version.h generated from version.h.in and 00589 macro values defined in configure.ac 00590 00591 *major = ISOBURN_MAJOR_VERSION; 00592 *minor = ISOBURN_MINOR_VERSION; 00593 *micro = ISOBURN_MICRO_VERSION; 00594 */ 00595 }
1.5.6