From 6011dff707063b01e981566b7ffee002f6ca476c Mon Sep 17 00:00:00 2001 From: Chris Oei Date: Sat, 8 Sep 2012 17:39:35 -0700 Subject: [PATCH] Update usage message --- main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index d5d139f..2bae4cf 100644 --- a/main.c +++ b/main.c @@ -41,10 +41,14 @@ usage(void) { fprintf(stderr, - "usage: scrypt-genpass [-l LEN] [-m MAXMEM] [-n] [-o MAXOPS] [-k KEYFILE] [-p PASS] \n"); + "Usage: scrypt-genpass [-l LEN] [-m MAXMEM] [-n] [-o MAXOPS] [-k KEYFILE]\n"); + fprintf(stderr, + " [-p PASS] \n"); fprintf(stderr, " scrypt-genpass -t\n"); - fprintf(stderr, "Version: %s\n", SGVERSION); + fprintf(stderr, + "\nFor documentation, see https://github.com/chrisoei/scrypt-genpass/wiki\n\n"); + fprintf(stderr, "Commit hash: %s\n", SGVERSION); exit(1); } @@ -160,13 +164,13 @@ main(int argc, char *argv[]) size_t n = fread(combinedkey + sg_parms.passwdlen, keyfilelen, 1, fp); fclose(fp); if (n != 1) { - warn("Unable to read keyfile"); + warnx("Unable to read keyfile"); exit(1); } sg_parms.passwd = combinedkey; sg_parms.passwdlen += keyfilelen; } else { - warn("Unable to allocate memory for combined key"); + warnx("Unable to allocate memory for combined key"); exit(1); } } else {