From 2306175432ef98ef94979a50e3f50e4fcf27e07f Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 28 Jun 2024 15:56:45 +0200 Subject: [PATCH] New info return modes 3 "Creation Time" and 4 "Modification Time" with isoburn_read_iso_head() and isoburn_read_iso_head_v2() --- libisoburn/burn_wrap.c | 10 +++++++++- libisoburn/libisoburn.h | 11 +++++++++-- xorriso/xorriso_timestamp.h | 2 +- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/libisoburn/burn_wrap.c b/libisoburn/burn_wrap.c index a36ab1bd..c6f8d4e5 100644 --- a/libisoburn/burn_wrap.c +++ b/libisoburn/burn_wrap.c @@ -1295,6 +1295,8 @@ int isoburn_report_iso_error(int iso_error_code, char msg_text[], int os_errno, 0= do not return anything in info (do not even touch it) 1= copy volume id to info (info needs 33 bytes) 2= do not touch info (caller will copy 64 kB header to it) + 3= copy creation time to info (info needs 18 bytes) + 4= copy modification time to info (info needs 18 bytes) bit14= -reserved - bit15= -reserved- @return 1 seems to be a valid ISO image , 0 format not recognized, <0 error @@ -1315,7 +1317,7 @@ int isoburn_read_iso_head_parse(unsigned char *data, info_mode= flag&255; if(info_mode==0) { ; - } else if(info_mode==1) { + } else if(info_mode==1) { /* Volume Id */ strncpy(info, (char *) (data+40), 32); info[32]= 0; for(i= strlen(info)-1; i>=0; i--) @@ -1325,6 +1327,12 @@ int isoburn_read_iso_head_parse(unsigned char *data, info[i]= 0; } else if(info_mode==2) { ; + } else if(info_mode == 3) { /* Creation Time */ + strncpy(info, (char *) (data + 813), 17); + info[17]= 0; + } else if(info_mode == 4) { /* Modification Time */ + strncpy(info, (char *) (data + 830), 17); + info[17]= 0; } else { isoburn_msgs_submit(NULL, 0x00060000, "Program error: Unknown info mode with isoburn_read_iso_head()", diff --git a/libisoburn/libisoburn.h b/libisoburn/libisoburn.h index 1b5450bd..1b9e50ae 100644 --- a/libisoburn/libisoburn.h +++ b/libisoburn/libisoburn.h @@ -730,7 +730,7 @@ void isoburn_toc_disc_free(struct isoburn_toc_disc *disc); /** 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. + one string of text information or data can be retrieved too. @since 0.1.6 @param d The drive with the medium to inspect @param lba The block number from where to read @@ -740,7 +740,14 @@ void isoburn_toc_disc_free(struct isoburn_toc_disc *disc); 0= do not return anything in info (do not even touch it) 1= copy volume id to info (info needs 33 bytes) 2= @since 0.2.2 : - copy 64 kB header to info (needs 65536 bytes) + copy 64 kB header to info (needs 65536 bytes) . + No trailing zero gets appended. + 3= @since 1.5.8 : + copy creation time to info (info needs 18 bytes). + info[16] is the binary timezone offset x 15 minutes east + 4= @since 1.5.8 : + copy modification time to info (info needs 18 bytes). + info[16] is the binary timezone offset x 15 minutes east bit12= @since 1.5.6 : Read even if the start of multi-session emulation yielded a read error diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 4a5d01b0..a4efc86f 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2024.06.28.065555" +#define Xorriso_timestamP "2024.06.28.135605"