From b3adff1daa032ca110ba60b5963372ce2e4559b5 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 7 Dec 2020 19:37:31 +0100 Subject: [PATCH] New API call isoburn_ropt_get_tree_loaded() --- libisoburn/isoburn.c | 11 ++++++++++- libisoburn/isoburn.h | 7 ++++++- libisoburn/isofs_wrap.c | 6 ++++-- libisoburn/libisoburn.h | 27 +++++++++++++++++++++------ libisoburn/libisoburn.ver | 1 + xorriso/xorriso_timestamp.h | 2 +- 6 files changed, 43 insertions(+), 11 deletions(-) diff --git a/libisoburn/isoburn.c b/libisoburn/isoburn.c index 1931d549..b6f50378 100644 --- a/libisoburn/isoburn.c +++ b/libisoburn/isoburn.c @@ -7,7 +7,7 @@ Class core of libisoburn. Copyright 2007 - 2009 Vreixo Formoso Lopes - Copyright 2007 - 2019 Thomas Schmitt + Copyright 2007 - 2020 Thomas Schmitt Provided under GPL version 2 or later. */ @@ -1106,6 +1106,15 @@ int isoburn_ropt_get_size_what(struct isoburn_read_opts *o, } +int isoburn_ropt_get_tree_loaded(struct isoburn_read_opts *o, + int *tree, int *rr) +{ + *tree= o->tree_loaded; + *rr= o->rr_loaded; + return(1); +} + + /* ----------------------------------------------------------------------- */ /* Options for image generation by libisofs and image transport to libburn. diff --git a/libisoburn/isoburn.h b/libisoburn/isoburn.h index 089bef98..51caa0df 100644 --- a/libisoburn/isoburn.h +++ b/libisoburn/isoburn.h @@ -3,7 +3,7 @@ Class struct of libisoburn. Copyright 2007 - 2009 Vreixo Formoso Lopes - Copyright 2007 - 2019 Thomas Schmitt + Copyright 2007 - 2020 Thomas Schmitt Provided under GPL version 2 or later. */ @@ -388,6 +388,11 @@ struct isoburn_read_opts { uint32_t size; /**< Will be filled with the size (in 2048 byte block) of * the image, as reported in the PVM. */ + + int tree_loaded; /* from iso_read_image_features_tree_loaded() */ + int rr_loaded; /* from iso_read_image_features_rr_loaded */ + + unsigned int pretend_blank:1; /* always create empty image */ uint32_t displacement; diff --git a/libisoburn/isofs_wrap.c b/libisoburn/isofs_wrap.c index 9438aff8..0ad683d4 100644 --- a/libisoburn/isofs_wrap.c +++ b/libisoburn/isofs_wrap.c @@ -6,8 +6,8 @@ /* libisofs related functions of libisoburn. - Copyright 2007 - 2017 Vreixo Formoso Lopes - Thomas Schmitt + Copyright 2007 - 2009 Vreixo Formoso Lopes + Copyright 2007 - 2020 Thomas Schmitt Provided under GPL version 2 or later. */ @@ -332,6 +332,8 @@ displacement_rollover:; read_opts->hasIso1999 = iso_read_image_features_has_iso1999(features); read_opts->hasElTorito = iso_read_image_features_has_eltorito(features); read_opts->size = iso_read_image_features_get_size(features); + read_opts->tree_loaded = iso_read_image_features_tree_loaded(features); + read_opts->rr_loaded = iso_read_image_features_rr_loaded(features); ret= 1; ex:; if(msg != NULL) diff --git a/libisoburn/libisoburn.h b/libisoburn/libisoburn.h index 205a8c38..80340046 100644 --- a/libisoburn/libisoburn.h +++ b/libisoburn/libisoburn.h @@ -6,7 +6,7 @@ Lower level API definition of libisoburn. Copyright 2007-2009 Vreixo Formoso Lopes - Copyright 2007-2019 Thomas Schmitt + Copyright 2007-2020 Thomas Schmitt Provided under GPL version 2 or later. */ @@ -1063,7 +1063,8 @@ int isoburn_ropt_get_truncate_mode(struct isoburn_read_opts *o, /** After calling function isoburn_read_image() there are information - available in the option set. + available in the option set about the size and the available extra trees + and extensions in the ISO filesystem. This info can be obtained as bits in parameter has_what. Like: joliet_available = (has_what & isoburn_ropt_has_joliet); @since 0.1.0 @@ -1071,12 +1072,13 @@ int isoburn_ropt_get_truncate_mode(struct isoburn_read_opts *o, @param size Number of image data blocks, 2048 bytes each. @param has_what Bitfield: bit0= has_rockridge - RockRidge extension info is available (POSIX filesystem) + RockRidge extension info is available in the ISO 9660 tree + (POSIX filesystem) bit1= has_joliet - Joliet extension info is available (suitable for MS-Windows) + Joliet tree is available (suitable for MS-Windows) bit2= has_iso1999 - ISO version 2 Enhanced Volume Descriptor is available. - This is rather exotic. + ISO version 2 Enhanced Volume Descriptor aka ISO 9660:1999 + and its tree is available. This is rather exotic. bit3= has_el_torito El-Torito boot record is present @return 1 success, <=0 failure @@ -1096,6 +1098,19 @@ int isoburn_ropt_get_size_what(struct isoburn_read_opts *o, */ +/** After calling function isoburn_read_image() there are information + available in the option set about which tree was used for image loading + and whether Rock Ridge information was actually used. + @since 1.5.4 + @param o The option set to work on + @param tree The tree which was loaded: + 0= ISO 9660 , 1 = Joliet , 2 = ISO 9660:1999 + @param rr 1= Rock Ridge information was used, 0 = No Rock Ridge was used + @return 1 success, <=0 failure +*/ +int isoburn_ropt_get_tree_loaded(struct isoburn_read_opts *o, + int *tree, int *rr); + /* ----------------------------------------------------------------------- */ /* End of Options for image reading */ diff --git a/libisoburn/libisoburn.ver b/libisoburn/libisoburn.ver index d86f9358..3da3df2f 100644 --- a/libisoburn/libisoburn.ver +++ b/libisoburn/libisoburn.ver @@ -111,6 +111,7 @@ isoburn_ropt_get_displacement; isoburn_ropt_get_extensions; isoburn_ropt_get_input_charset; isoburn_ropt_get_size_what; +isoburn_ropt_get_tree_loaded; isoburn_ropt_get_truncate_mode; isoburn_ropt_new; isoburn_ropt_set_auto_incharset; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index c603e02f..2656055a 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2020.12.05.085329" +#define Xorriso_timestamP "2020.12.07.183710"