From b14ee71d510fc410c0e4e72c8cfe16a0865f60a6 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 7 Aug 2016 21:11:08 +0200 Subject: [PATCH] Setting El torito boot catalog file timestamps to Ecma119Image.now. --- libisofs/ecma119.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libisofs/ecma119.c b/libisofs/ecma119.c index dad1398..9d13ffc 100644 --- a/libisofs/ecma119.c +++ b/libisofs/ecma119.c @@ -2448,6 +2448,16 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *in_opts, Ecma119Image **img) target->boot_intvl_start[i] = 0; target->boot_intvl_size[i] = 0; } + /* It is not easy to predict when the node gets created and can be + manipulated. So it is better for reproducibility to derive its + timestamps from the well controllable now-time. + */ + if (target->catalog->node != NULL) { + iso_node_set_mtime((IsoNode *) target->catalog->node, target->now); + iso_node_set_atime((IsoNode *) target->catalog->node, target->now); + iso_node_set_ctime((IsoNode *) target->catalog->node, target->now); + } + } else { target->num_bootsrc = 0; target->bootsrc = NULL;