From 2288b178e612386e7a75471c8861c3f6d81c300d Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Sat, 21 May 2022 23:44:49 -0400 Subject: Add tc remove and append -f flags Also fix some conflicting types to hopefully prevent possible overflows. --- tc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tc.c') 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]); -- cgit v1.2.3