aboutsummaryrefslogtreecommitdiff
path: root/tar
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-10-06 12:49:59 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-10-06 12:49:59 +0200
commitbe78958a2f132a5907b0f5beafe7c33a67125eb8 (patch)
tree4557d48f42e8215b77379f51f003edc81019156d /tar
parent2b7df394057c013fd042b85a4d5fd0104ba4a9be (diff)
Make --keep-time the default for tar2sqfs
It is IMO more intuitive to use the timestamps from the archive by default and only replacing them if explicitly specified. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tar')
-rw-r--r--tar/tar2sqfs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tar/tar2sqfs.c b/tar/tar2sqfs.c
index 375a413..a22f2fe 100644
--- a/tar/tar2sqfs.c
+++ b/tar/tar2sqfs.c
@@ -25,7 +25,7 @@ static struct option long_opts[] = {
{ "comp-extra", required_argument, NULL, 'X' },
{ "no-skip", no_argument, NULL, 's' },
{ "no-xattr", no_argument, NULL, 'x' },
- { "keep-time", no_argument, NULL, 'k' },
+ { "no-keep-time", no_argument, NULL, 'k' },
{ "exportable", no_argument, NULL, 'e' },
{ "force", no_argument, NULL, 'f' },
{ "quiet", no_argument, NULL, 'q' },
@@ -69,8 +69,8 @@ static const char *usagestr =
" --no-skip, -s Abort if a tar record cannot be read instead\n"
" of skipping it.\n"
" --no-xattr, -x Do not copy extended attributes from archive.\n"
-" --keep-time, -k Keep the time stamps stored in the archive\n"
-" instead of setting defaults on all files.\n"
+" --no-keep-time, -k Do not keep the time stamps stored in the\n"
+" archive. Instead, set defaults on all files.\n"
" --exportable, -e Generate an export table for NFS support.\n"
" --force, -f Overwrite the output file if it exists.\n"
" --quiet, -q Do not print out progress reports.\n"
@@ -85,7 +85,7 @@ static const char *usagestr =
"\n";
static bool dont_skip = false;
-static bool keep_time = false;
+static bool keep_time = true;
static sqfs_writer_cfg_t cfg;
static sqfs_writer_t sqfs;
@@ -144,7 +144,7 @@ static void process_args(int argc, char **argv)
cfg.no_xattr = true;
break;
case 'k':
- keep_time = true;
+ keep_time = false;
break;
case 's':
dont_skip = true;