aboutsummaryrefslogtreecommitdiffstats
path: root/tc.c
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2022-05-21 23:44:49 -0400
committerCameron Katri <me@cameronkatri.com>2022-05-21 23:44:49 -0400
commit2288b178e612386e7a75471c8861c3f6d81c300d (patch)
tree18209f47e0bc635000f7bf86b83f43a9ab0aa3ea /tc.c
parentaa035f73ce081b3f07247bd15860d72355a096b2 (diff)
downloadtrustcache-2288b178e612386e7a75471c8861c3f6d81c300d.tar.gz
trustcache-2288b178e612386e7a75471c8861c3f6d81c300d.tar.zst
trustcache-2288b178e612386e7a75471c8861c3f6d81c300d.zip
Add tc remove and append -f flags
Also fix some conflicting types to hopefully prevent possible overflows.
Diffstat (limited to 'tc.c')
-rw-r--r--tc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tc.c b/tc.c
index f6cc759..6142057 100644
--- a/tc.c
+++ b/tc.c
@@ -41,9 +41,10 @@ main(int argc, char **argv)
{
if (argc < 2) {
help:
- fprintf(stderr, "Usage: tc append [-u uuid | 0] infile file ...\n"
+ fprintf(stderr, "Usage: tc append [-f flags] [-u uuid | 0] infile file ...\n"
" tc create [-u uuid] [-v version] outfile file ...\n"
- " tc info [-c] [-h] [-e entrynum] file\n\n"
+ " tc info [-c] [-h] [-e entrynum] file\n"
+ " tc remove [-k] file hash ...\n\n"
"See tc(1) for more information\n");
exit(1);
}
@@ -56,6 +57,8 @@ help:
ret = tccreate(argc - 1, argv + 1);
else if (strcmp(argv[1], "append") == 0)
ret = tcappend(argc - 1, argv + 1);
+ else if (strcmp(argv[1], "remove") == 0)
+ ret = tcremove(argc - 1, argv + 1);
else
fprintf(stderr, "Unknown subcommand %s\n", argv[1]);