diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-07 11:10:58 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-07 11:24:37 +0200 |
commit | 740b161bfaddbd236c9d052546f27dd4af30582c (patch) | |
tree | 6635a86cf206f4111dcceb0f46c34691ccaf3ca3 /difftool/sqfsdiff.c | |
parent | 55914564db1ce7a4fc71e9dc34156aa144661d0d (diff) |
Add flag to difftool to also compare time stamps
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'difftool/sqfsdiff.c')
-rw-r--r-- | difftool/sqfsdiff.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/difftool/sqfsdiff.c b/difftool/sqfsdiff.c index 02de33a..d23a724 100644 --- a/difftool/sqfsdiff.c +++ b/difftool/sqfsdiff.c @@ -10,11 +10,12 @@ static struct option long_opts[] = { { "no-owner", no_argument, NULL, 'O' }, { "no-permissions", no_argument, NULL, 'P' }, { "no-contents", no_argument, NULL, 'C' }, + { "timestamps", no_argument, NULL, 'T' }, { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, 'V' }, }; -static const char *short_opts = "OPChV"; +static const char *short_opts = "OPCThV"; static const char *usagestr = "Usage: sqfsdiff [OPTIONS...] <first> <second>\n" @@ -38,6 +39,8 @@ static const char *usagestr = " --no-owner, -O Do not compare file owners.\n" " --no-permissions, -P Do not compare permission bits.\n" "\n" +" --timestamps, -T Compare file timestamps.\n" +"\n" " --help, -h Print help text and exit.\n" " --version, -V Print version information and exit.\n" "\n"; @@ -67,6 +70,9 @@ static void process_options(int argc, char **argv) case 'C': compare_flags |= COMPARE_NO_CONTENTS; break; + case 'T': + compare_flags |= COMPARE_TIMESTAMP; + break; case 'h': fputs(usagestr, stdout); exit(EXIT_SUCCESS); |