"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xorriso/lib_mgt.c" between
xorriso-1.5.2.tar.gz and xorriso-1.5.4.tar.gz

About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.

lib_mgt.c  (xorriso-1.5.2):lib_mgt.c  (xorriso-1.5.4)
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2019 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2020 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
This file contains functions which manage the relation between xorriso This file contains functions which manage the relation between xorriso
and the libraries: libburn, libisofs, libisoburn. and the libraries: libburn, libisofs, libisoburn.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "../config.h" #include "../config.h"
#endif #endif
skipping to change at line 120 skipping to change at line 120
sprintf(handler_prefix, "%s : ", xorriso->progname); sprintf(handler_prefix, "%s : ", xorriso->progname);
burn_set_signal_handling(handler_prefix, NULL, mode); burn_set_signal_handling(handler_prefix, NULL, mode);
free(handler_prefix); free(handler_prefix);
return(1); return(1);
} }
int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag) int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag)
{ {
int ret, major, minor, micro; int ret, major, minor, micro;
char *queue_sev, *print_sev, reason[1024]; char *queue_sev, *print_sev, reason[1024];
struct iso_zisofs_ctrl zisofs_ctrl= {0, 6, 15}; struct iso_zisofs_ctrl zisofs_ctrl;
/* First an ugly compile time check for header version compatibility. /* First an ugly compile time check for header version compatibility.
If everything matches, then no C code is produced. In case of mismatch, If everything matches, then no C code is produced. In case of mismatch,
intentionally faulty C code will be inserted. intentionally faulty C code will be inserted.
*/ */
/* The minimum requirement of xorriso towards the libisoburn header /* The minimum requirement of xorriso towards the libisoburn header
at compile time is defined in xorriso/xorrisoburn.h at compile time is defined in xorriso/xorrisoburn.h
xorriso_libisoburn_req_major xorriso_libisoburn_req_major
xorriso_libisoburn_req_minor xorriso_libisoburn_req_minor
skipping to change at line 144 skipping to change at line 144
isoburn_header_version_minor isoburn_header_version_minor
isoburn_header_version_micro isoburn_header_version_micro
If the header is too old then the following code shall cause failure of If the header is too old then the following code shall cause failure of
cdrskin compilation rather than to allow production of a program with cdrskin compilation rather than to allow production of a program with
unpredictable bugs or memory corruption. unpredictable bugs or memory corruption.
The compiler messages supposed to appear in this case are: The compiler messages supposed to appear in this case are:
error: 'LIBISOBURN_MISCONFIGURATION' undeclared (first use in this functio n) error: 'LIBISOBURN_MISCONFIGURATION' undeclared (first use in this functio n)
error: 'INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libisoburn_dot_h_TOO_ OLD__SEE_xorrisoburn_dot_c' undeclared (first use in this function) error: 'INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libisoburn_dot_h_TOO_ OLD__SEE_xorrisoburn_dot_c' undeclared (first use in this function)
error: 'LIBISOBURN_MISCONFIGURATION_' undeclared (first use in this functi on) error: 'LIBISOBURN_MISCONFIGURATION_' undeclared (first use in this functi on)
*/ */
/* The indendation is an advise of man gcc to help old compilers ignoring */ /* The indentation is an advise of man gcc to help old compilers ignoring */
#if xorriso_libisoburn_req_major > isoburn_header_version_major #if xorriso_libisoburn_req_major > isoburn_header_version_major
#define Isoburn_libisoburn_dot_h_too_olD 1 #define Isoburn_libisoburn_dot_h_too_olD 1
#endif #endif
#if xorriso_libisoburn_req_major == isoburn_header_version_major && xorriso_lib isoburn_req_minor > isoburn_header_version_minor #if xorriso_libisoburn_req_major == isoburn_header_version_major && xorriso_lib isoburn_req_minor > isoburn_header_version_minor
#define Isoburn_libisoburn_dot_h_too_olD 1 #define Isoburn_libisoburn_dot_h_too_olD 1
#endif #endif
#if xorriso_libisoburn_req_minor == isoburn_header_version_minor && xorriso_lib isoburn_req_micro > isoburn_header_version_micro #if xorriso_libisoburn_req_minor == isoburn_header_version_minor && xorriso_lib isoburn_req_micro > isoburn_header_version_micro
#define Isoburn_libisoburn_dot_h_too_olD 1 #define Isoburn_libisoburn_dot_h_too_olD 1
#endif #endif
skipping to change at line 212 skipping to change at line 212
/* ??? >>> do we want united queues ? */ /* ??? >>> do we want united queues ? */
/* burn_set_messenger(iso_get_messenger()); */ /* burn_set_messenger(iso_get_messenger()); */
isoburn_set_msgs_submit(Xorriso_msgs_submit_void, (void *) xorriso, isoburn_set_msgs_submit(Xorriso_msgs_submit_void, (void *) xorriso,
(3<<2) | 128 , 0); (3<<2) | 128 , 0);
ret= Xorriso_set_signal_handling(xorriso, 0); ret= Xorriso_set_signal_handling(xorriso, 0);
if(ret <= 0) if(ret <= 0)
return(ret); return(ret);
memset(&zisofs_ctrl, 0, sizeof(zisofs_ctrl));
zisofs_ctrl.version = 1;
ret = iso_zisofs_get_params(&zisofs_ctrl, 0); ret = iso_zisofs_get_params(&zisofs_ctrl, 0);
if (ret == 1) { if (ret == 1) {
xorriso->zisofs_block_size= xorriso->zisofs_block_size_default= xorriso->zisofs_block_size= xorriso->zisofs_block_size_default=
(1 << zisofs_ctrl.block_size_log2); (1 << zisofs_ctrl.block_size_log2);
xorriso->zlib_level= xorriso->zlib_level_default= xorriso->zlib_level= xorriso->zlib_level_default=
zisofs_ctrl.compression_level; zisofs_ctrl.compression_level;
xorriso->zisofs_v2_enabled= zisofs_ctrl.v2_enabled;
xorriso->zisofs_max_total_blocks=
xorriso->zisofs_max_total_blocks_default= zisofs_ctrl.max_total_blocks;
xorriso->zisofs_max_file_blocks=
xorriso->zisofs_max_file_blocks_default= zisofs_ctrl.max_file_blocks;
xorriso->zisofs_v2_block_size= xorriso->zisofs_v2_block_size_default=
1 << zisofs_ctrl.v2_block_size_log2;
xorriso->zisofs_block_number_target= zisofs_ctrl.block_number_target;
xorriso->zisofs_bpt_discard_free_ratio=
xorriso->zisofs_bpt_discard_free_ratio_default=
zisofs_ctrl.bpt_discard_free_ratio;
} }
xorriso->zisofs_susp_z2= xorriso->zisofs_susp_z2_default=
iso_zisofs_ctrl_susp_z2(-1);
iso_node_xinfo_make_clonable(Xorriso__mark_update_xinfo, iso_node_xinfo_make_clonable(Xorriso__mark_update_xinfo,
Xorriso__mark_update_cloner, 0); Xorriso__mark_update_cloner, 0);
/* Second initialization. This time with libs. */ /* Second initialization. This time with libs. */
Xorriso_preparer_string(xorriso, xorriso->preparer_id, 0); Xorriso_preparer_string(xorriso, xorriso->preparer_id, 0);
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
if(reason[0]) { if(reason[0]) {
sprintf(xorriso->info_text, "%s", reason); sprintf(xorriso->info_text, "%s", reason);
skipping to change at line 745 skipping to change at line 760
if(ret <= 0) if(ret <= 0)
goto jte_failed; goto jte_failed;
xorriso->libjte_params_given|= 4; xorriso->libjte_params_given|= 4;
} else if(strcmp(aspect, "jigdo_path") == 0 || } else if(strcmp(aspect, "jigdo_path") == 0 ||
strcmp(aspect, "-jigdo-jigdo") == 0) { strcmp(aspect, "-jigdo-jigdo") == 0) {
ret= libjte_set_jigdo_path(jte, arg); ret= libjte_set_jigdo_path(jte, arg);
if(ret <= 0) if(ret <= 0)
goto jte_failed; goto jte_failed;
xorriso->libjte_params_given|= 8; xorriso->libjte_params_given|= 8;
} else if(strcmp(aspect, "md5_path") == 0 || } else if(strcmp(aspect, "md5_path") == 0 ||
strcmp(aspect, "-md5-list") == 0) { strcmp(aspect, "-md5-list") == 0 ||
ret= libjte_set_md5_path(jte, arg); strcmp(aspect, "checksum_path") == 0 ||
strcmp(aspect, "-checksum-list") == 0) {
ret= libjte_set_checksum_path(jte, arg);
if(ret <= 0) if(ret <= 0)
goto jte_failed; goto jte_failed;
xorriso->libjte_params_given|= 16; xorriso->libjte_params_given|= 16;
} else if(strcmp(aspect, "min_size") == 0 || } else if(strcmp(aspect, "min_size") == 0 ||
strcmp(aspect, "-jigdo-min-file-size") == 0) { strcmp(aspect, "-jigdo-min-file-size") == 0) {
num= Scanf_io_size(arg, 0); num= Scanf_io_size(arg, 0);
ret= libjte_set_min_size(jte, num); ret= libjte_set_min_size(jte, num);
if(ret <= 0) if(ret <= 0)
goto jte_failed; goto jte_failed;
xorriso->libjte_params_given|= 32; xorriso->libjte_params_given|= 32;
skipping to change at line 782 skipping to change at line 799
if(ret <= 0) if(ret <= 0)
goto jte_failed; goto jte_failed;
xorriso->libjte_params_given|= 256; xorriso->libjte_params_given|= 256;
} else if(strcmp(aspect, "exclude") == 0 || } else if(strcmp(aspect, "exclude") == 0 ||
strcmp(aspect, "-jigdo-exclude") == 0) { strcmp(aspect, "-jigdo-exclude") == 0) {
ret= libjte_add_exclude(jte, arg); ret= libjte_add_exclude(jte, arg);
if(ret <= 0) if(ret <= 0)
goto jte_failed; goto jte_failed;
xorriso->libjte_params_given|= 512; xorriso->libjte_params_given|= 512;
} else if(strcmp(aspect, "demand_md5") == 0 || } else if(strcmp(aspect, "demand_md5") == 0 ||
strcmp(aspect, "-jigdo-force-md5") == 0) { strcmp(aspect, "-jigdo-force-md5") == 0 ||
ret= libjte_add_md5_demand(jte, arg); strcmp(aspect, "demand_checksum") == 0 ||
strcmp(aspect, "-jigdo-force-checksum") == 0) {
ret= libjte_add_checksum_demand(jte, arg);
if(ret <= 0) if(ret <= 0)
goto jte_failed; goto jte_failed;
xorriso->libjte_params_given|= 1024; xorriso->libjte_params_given|= 1024;
} else if(strcmp(aspect, "mapping") == 0 || } else if(strcmp(aspect, "mapping") == 0 ||
strcmp(aspect, "-jigdo-map") == 0) { strcmp(aspect, "-jigdo-map") == 0) {
ret= libjte_add_mapping(jte, arg); ret= libjte_add_mapping(jte, arg);
if(ret <= 0) if(ret <= 0)
goto jte_failed; goto jte_failed;
xorriso->libjte_params_given|= 2048; xorriso->libjte_params_given|= 2048;
} else if(strcmp(aspect, "checksum_algorithm") == 0 ||
strcmp(aspect, "-jigdo-checksum-algorithm") == 0) {
int ck_size;
ret= libjte_set_checksum_algorithm(jte, arg, &ck_size);
if(ret <= 0)
goto jte_failed;
xorriso->libjte_params_given|= 4096;
} else { } else {
sprintf(xorriso->info_text, "-jigdo: unknown aspect '%s'", aspect); sprintf(xorriso->info_text, "-jigdo: unknown aspect '%s'", aspect);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0); return(0);
} }
ret= Xorriso_lst_new(&(xorriso->jigdo_params), aspect, xorriso->jigdo_params, ret= Xorriso_lst_new(&(xorriso->jigdo_params), aspect, xorriso->jigdo_params,
1); 1);
if(ret > 0) if(ret > 0)
ret= Xorriso_lst_new(&(xorriso->jigdo_values), arg, xorriso->jigdo_values, ret= Xorriso_lst_new(&(xorriso->jigdo_values), arg, xorriso->jigdo_values,
 End of changes. 9 change blocks. 
7 lines changed or deleted 33 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)