diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2013-12-31 03:08:49 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2013-12-31 03:08:49 +0000 |
commit | ca34830b5a8f84cbf1fd74850b5cfa6c56bea946 (patch) | |
tree | abd96b2df0c7571b90482c76dc03ca03a4a56c0a /usr.bin | |
parent | 1ce40a8346bda9cb58794300c4eeee515da56885 (diff) |
wha! commit a working version
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/signify/signify.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c index c5d9b52ea89..98447d3a7d4 100644 --- a/usr.bin/signify/signify.c +++ b/usr.bin/signify/signify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: signify.c,v 1.1 2013/12/31 03:03:32 tedu Exp $ */ +/* $OpenBSD: signify.c,v 1.2 2013/12/31 03:08:48 tedu Exp $ */ /* * Copyright (c) 2013 Ted Unangst <tedu@openbsd.org> * @@ -65,7 +65,7 @@ static void usage(void) { fprintf(stderr, "usage: %s [-P] [-i input] [-p pubkey] [-s seckey] " - "generate|sign|verify", __progname); + "generate|sign|verify\n", __progname); exit(1); } @@ -324,7 +324,7 @@ main(int argc, char **argv) rounds = 42; - while ((ch = getopt(argc, argv, "I:NO:P:S:")) != -1) { + while ((ch = getopt(argc, argv, "I:NO:P:S:V:")) != -1) { switch (ch) { case 'I': inputfile = optarg; @@ -349,12 +349,13 @@ main(int argc, char **argv) break; } } + argc -= optind; if (argc != 0) usage(); if (inputfile && !sigfile) { if (snprintf(sigfilebuf, sizeof(sigfilebuf), "%s.sig", - inputfile) >= sizeof(sigfile)) + inputfile) >= sizeof(sigfilebuf)) errx(1, "path too long"); sigfile = sigfilebuf; } |