From 739c746b2f57fe890874220d5f49dcac03fb851e Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 14 May 2015 13:12:44 +0000 Subject: [PATCH] Enabled output of volume id und modification date with -report_system_area cmd --- xorriso/iso_img.c | 25 +++++++++++++++++++++++++ xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/xorriso/iso_img.c b/xorriso/iso_img.c index 730cfedc..88b5ab51 100644 --- a/xorriso/iso_img.c +++ b/xorriso/iso_img.c @@ -1584,6 +1584,8 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso, uint32_t img_blocks= 0; struct FindjoB *job= NULL; struct stat dir_stbuf; + IsoImage *image; + char *volid, *crt, *mdt, *ext, *eft, uuid[17]; struct mbr_par { uint8_t ptype; @@ -1686,6 +1688,29 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso, ptable_killer= (mbr_count > 0) | ((gpt_count > 0) << 1) | ((apm_count > 0) << 2); + /* Report volume id and GRUB2 modification date */; + ret= Xorriso_get_volume(xorriso, &image, 0); + if(ret <= 0) + goto ex; + if(mkisofs) + sprintf(buf, "-V "); + else + sprintf(buf, "-volid "); + volid= (char *) un0(iso_image_get_volume_id(image)); + Text_shellsafe(volid, buf, 1); + Xorriso_record_cmd_linE + ret= iso_image_get_pvd_times(image, &crt, &mdt, &ext, &eft); + if(ret == ISO_SUCCESS) { + if(mkisofs) + sprintf(buf, "--modification-date="); + else + sprintf(buf, "-volume_date uuid "); + strncpy(uuid, crt, 16); + uuid[16]= 0; + Text_shellsafe(uuid, buf, 1); + } + Xorriso_record_cmd_linE + /* First pass: set up objects, record El Torito and info needed in 2nd pass */ for(i= 0; i < line_count; i++) { buf[0]= 0; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index ca9a4a80..3f2dde52 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2015.05.14.113925" +#define Xorriso_timestamP "2015.05.14.131152"