New read option isoburn_ropt_lfa_only_settable

This commit is contained in:
Thomas Schmitt 2024-08-31 00:26:40 +02:00
parent ffe18475a4
commit 9a42f2a8ae
6 changed files with 36 additions and 12 deletions

View File

@ -346,6 +346,9 @@ int isoburn_is_intermediate_dvd_rw(struct burn_drive *d, int flag)
bit10= if not bit6: accept all xattr namespaces from external bit10= if not bit6: accept all xattr namespaces from external
filesystems, not only "user.". filesystems, not only "user.".
bit11= load lfa_flags (chattr) from external filesystems bit11= load lfa_flags (chattr) from external filesystems
bit15= ignore non-settable lfa_flags when importing files from
disk and do not record "isofs.fa" if the other flags
are all zero
*/ */
static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d, static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
int flag) int flag)
@ -391,7 +394,8 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
(*o)->msgs_submit_flag= libisoburn_default_msgs_submit_flag; (*o)->msgs_submit_flag= libisoburn_default_msgs_submit_flag;
iso_image_set_ignore_aclea((*o)->image, iso_image_set_ignore_aclea((*o)->image,
((flag >> 5 ) & 3) | ((!!(flag & 1024)) << 3) | ((flag >> 5 ) & 3) | ((!!(flag & 1024)) << 3) |
((!!(flag & (1 << 11))) << 2)); ((!!(flag & (1 << 11))) << 2) |
((!!(flag & (1 << 15))) << 5));
#ifdef Hardcoded_cd_rW #ifdef Hardcoded_cd_rW
/* <<< A70929 : hardcoded CD-RW with fabricated -msinfo */ /* <<< A70929 : hardcoded CD-RW with fabricated -msinfo */
@ -544,6 +548,9 @@ ex:
bit10= if not bit6: accept all xattr namespaces from external bit10= if not bit6: accept all xattr namespaces from external
filesystems, not only "user.". filesystems, not only "user.".
bit11= load lfa_flags (chattr) from external filesystems bit11= load lfa_flags (chattr) from external filesystems
bit15= ignore non-settable lfa_flags when importing files from
disk and do not record "isofs.fa" if the other flags
are all zero
*/ */
int isoburn_drive_aquire(struct burn_drive_info *drive_infos[], int isoburn_drive_aquire(struct burn_drive_info *drive_infos[],
char *adr, int flag) char *adr, int flag)
@ -570,7 +577,7 @@ int isoburn_drive_aquire(struct burn_drive_info *drive_infos[],
goto ex; goto ex;
drive_grabbed= 1; drive_grabbed= 1;
ret= isoburn_welcome_media(&o, (*drive_infos)[0].drive, ret= isoburn_welcome_media(&o, (*drive_infos)[0].drive,
(flag & (8 | 16 | 32 | 64 | 128 | 512 | 1024 | (1 << 11))) | (flag & (8 | 16 | 32 | 64 | 128 | 512 | 1024 | (1 << 11) | ( 1 << 15))) |
!!(flag & 2)); !!(flag & 2));
if(ret<=0) if(ret<=0)
goto ex; goto ex;

View File

@ -985,6 +985,7 @@ int isoburn_ropt_set_extensions(struct isoburn_read_opts *o, int ext)
o->do_joliet_map= !!(ext & 16384); o->do_joliet_map= !!(ext & 16384);
o->joliet_map_mode= !!(ext & 32768); o->joliet_map_mode= !!(ext & 32768);
o->lfa_flags= !!(ext & (1 << 16)); o->lfa_flags= !!(ext & (1 << 16));
o->lfa_only_settable= !!(ext & (1 << 17));
return(1); return(1);
} }
@ -996,7 +997,8 @@ int isoburn_ropt_get_extensions(struct isoburn_read_opts *o, int *ext)
((!!o->noaaip) << 5) | ((!!o->noacl) << 6) | ((!!o->noea) << 7) | ((!!o->noaaip) << 5) | ((!!o->noacl) << 6) | ((!!o->noea) << 7) |
((!!o->noino) << 8) | ((o->nomd5 & 3) << 9) | ((!!o->noino) << 8) | ((o->nomd5 & 3) << 9) |
((!!o->do_ecma119_map) << 11) | ((o->map_mode & 3) << 12) | ((!!o->do_ecma119_map) << 11) | ((o->map_mode & 3) << 12) |
((!!o->do_joliet_map) << 14) | ((!!o->joliet_map_mode) << 15); ((!!o->do_joliet_map) << 14) | ((!!o->joliet_map_mode) << 15) |
((!!o->lfa_flags) << 16) | ((!!o->lfa_only_settable) << 17);
return(1); return(1);
} }

View File

@ -335,8 +335,13 @@ struct isoburn_read_opts {
unsigned int noea:1; /* Do not read XFS-style EA from externals */ unsigned int noea:1; /* Do not read XFS-style EA from externals */
/* ts C40716 */ /* ts C40716 */
unsigned int lfa_flags:1; /* Read Linux file attribute flags (chattr) */ unsigned int lfa_flags:1; /* Read Linux file attribute flags (chattr)
from external filesystem objects
*/
/* ts C40826 */
unsigned int lfa_only_settable:1; /* Ignore non-settable flags from
from external filesystem objects
*/
/* ts A90508 */ /* ts A90508 */
unsigned int noino:1; /* Discard eventual PX inode numbers */ unsigned int noino:1; /* Discard eventual PX inode numbers */

View File

@ -354,7 +354,8 @@ create_blank_image:;
goto create_blank_image; goto create_blank_image;
} }
iso_image_set_ignore_aclea(o->image, read_opts->noacl | (read_opts->noea << 1) iso_image_set_ignore_aclea(o->image, read_opts->noacl | (read_opts->noea << 1)
| (read_opts->lfa_flags << 2)); | (read_opts->lfa_flags << 2)
| (read_opts->lfa_only_settable << 5));
/* Important: do not return until iso_read_opts_free() */ /* Important: do not return until iso_read_opts_free() */

View File

@ -462,6 +462,9 @@ int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[],
This can later be overriden by isoburn_read_image() This can later be overriden by isoburn_read_image()
according to its isoburn_read_opts. according to its isoburn_read_opts.
@since 1.5.8 @since 1.5.8
bit15= ignore non-settable lfa_flags when importing files from
disk and do not record "isofs.fa" if the other flags
are all zero
@return 1 = success , 0 = drive not found , <0 = other error @return 1 = success , 0 = drive not found , <0 = other error
Please excuse the typo "aquire" in the function name. Please excuse the typo "aquire" in the function name.
@ -927,8 +930,9 @@ int isoburn_ropt_get_data_cache(struct isoburn_read_opts *o,
int *set_flag, int flag); int *set_flag, int flag);
/** Which existing ISO 9660 extensions in the image to read or not to read. /** Which existing ISO 9660 extensions in the image or in external filesystems
Whether to read the content of an existing image at all. to read or not to read, and whether to read the content of an existing
image at all.
The bits can be combined by | and inquired by &. The bits can be combined by | and inquired by &.
@since 0.1.0 @since 0.1.0
@param ext Bitfield: @param ext Bitfield:
@ -1005,7 +1009,11 @@ int isoburn_ropt_get_data_cache(struct isoburn_read_opts *o,
external filesystem objects (e.g. local filesystem files). external filesystem objects (e.g. local filesystem files).
This overrides the setting by isoburn_drive_aquire(). This overrides the setting by isoburn_drive_aquire().
@since 1.5.8 @since 1.5.8
bit17= lfa_only_settable
gnore non-settable lfa_flags when importing files from
external filesystem objects (e.g. local filesystem files).
This overrides the setting by isoburn_drive_aquire().
@since 1.5.8
@return 1 success, <=0 failure @return 1 success, <=0 failure
*/ */
#define isoburn_ropt_norock 1 #define isoburn_ropt_norock 1
@ -1026,6 +1034,7 @@ int isoburn_ropt_get_data_cache(struct isoburn_read_opts *o,
#define isoburn_ropt_joliet_unmapped ( 16384 | 0) #define isoburn_ropt_joliet_unmapped ( 16384 | 0)
#define isoburn_ropt_joliet_stripped ( 16384 | 32768) #define isoburn_ropt_joliet_stripped ( 16384 | 32768)
#define isoburn_ropt_lfa_flags (1 << 16) #define isoburn_ropt_lfa_flags (1 << 16)
#define isoburn_ropt_lfa_only_settable (1 << 17)
int isoburn_ropt_set_extensions(struct isoburn_read_opts *o, int ext); 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_get_extensions(struct isoburn_read_opts *o, int *ext);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2024.08.28.143041" #define Xorriso_timestamP "2024.08.30.222518"