aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-22 03:28:05 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-22 17:12:45 +0200
commitadc8e37d7f86d661ab54adf9c43e4b0aa67a939c (patch)
treed075abb80d7cd22935a32e20e5bfcb53acef087d /doc
parentc673f305ec0c2c80bc3873bcc8718d9ba85340c9 (diff)
Add a way to optionally keep the original time stamps
First of all, this commit adds a mod_time field to a tree node. When creating the tree node, the field is set from the struct stat. When scanning a directory, the time stamps from the input are used if set. Second, the libsqfs code that reads inodes is modified to store the mod_time from the inode in the fstree node and to write the tree node into a generated inode. Finally, tar2sqfs is modified to optionally keep the timestamps from the tar archive instead of setting defaults. gensquashfs is similarly modified to keep the input timestamps if specified. The result is as follows: - sqfs2tar will always carry the timestamps from the squashfs over to the tar ball. - tar2sqfs will set defaults, unless explicitly asked to preserve the mtime from the tar ball. - gensquashfs can optionally preserve the mtime from the input hierarchy it processes if only --pack-dir is specified. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'doc')
-rw-r--r--doc/gensquashfs.15
-rw-r--r--doc/tar2sqfs.15
2 files changed, 10 insertions, 0 deletions
diff --git a/doc/gensquashfs.1 b/doc/gensquashfs.1
index a880453..d7b78a1 100644
--- a/doc/gensquashfs.1
+++ b/doc/gensquashfs.1
@@ -37,6 +37,11 @@ Defaults to 131072.
Device block size to padd the image to.
Defaults to 4096.
.TP
+\fB\-\-keep\-time\fR, \fB\-k\fR
+Whe using \fB\-\-pack\-dir\fR only, use the timestamps from the input files
+instead of setting defaults on all input paths. The root inode and the
+modification time on the SquashFS image itself will still be set to defaults.
+.TP
\fB\-\-defaults\fR, \fB\-d\fR <options>
A comma seperated list of default values for
implicitly created directories.
diff --git a/doc/tar2sqfs.1 b/doc/tar2sqfs.1
index 8c7d20d..a6646c6 100644
--- a/doc/tar2sqfs.1
+++ b/doc/tar2sqfs.1
@@ -31,6 +31,11 @@ Defaults to 131072.
Device block size to padd the image to.
Defaults to 4096.
.TP
+\fB\-\-keep\-time\fR, \fB\-k\fR
+Keep the same time stamps stored in the tar archive for the SquashFS instead of
+setting defaults on all files. The root inode and the modification time on the
+SquashFS image itself will still be set to defaults.
+.TP
\fB\-\-defaults\fR, \fB\-d\fR <options>
A comma seperated list of default values for
implicitly created directories.