Date: Tue, 1 Dec 2015 22:35:11 GMT From: def@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r294716 - soc2013/def/crashdump-head/sbin/decryptcore Message-ID: <201512012235.tB1MZBKD080181@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: def Date: Tue Dec 1 22:35:10 2015 New Revision: 294716 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=294716 Log: Change decryptcore arguments. Modified: soc2013/def/crashdump-head/sbin/decryptcore/decryptcore.c Modified: soc2013/def/crashdump-head/sbin/decryptcore/decryptcore.c ============================================================================== --- soc2013/def/crashdump-head/sbin/decryptcore/decryptcore.c Tue Dec 1 22:14:46 2015 (r294715) +++ soc2013/def/crashdump-head/sbin/decryptcore/decryptcore.c Tue Dec 1 22:35:10 2015 (r294716) @@ -23,7 +23,7 @@ usage(void) { - pjdlog_exitx(1, "usage: decryptcore [-Lv] -p privatekey -k encryptedkey -i encryptedcore -o decryptedcore"); + pjdlog_exitx(1, "usage: decryptcore [-Lv] privatekey encryptedkey encryptedcore decryptedcore"); } static int @@ -273,23 +273,11 @@ debug = 0; rsakeyfile = NULL; usesyslog = false; - while ((ch = getopt(argc, argv, "Li:k:o:p:v")) != -1) { + while ((ch = getopt(argc, argv, "Lv")) != -1) { switch (ch) { case 'L': usesyslog = true; break; - case 'i': - input = optarg; - break; - case 'k': - keyfile = optarg; - break; - case 'o': - output = optarg; - break; - case 'p': - rsakeyfile = optarg; - break; case 'v': debug++; break; @@ -300,12 +288,29 @@ argc -= optind; argv += optind; - if (argc != 0) + rsakeyfile = *argv; + argc--; + argv++; + if (rsakeyfile == NULL) usage(); - if (input == NULL || keyfile == NULL || output == NULL || - rsakeyfile == NULL) { + keyfile = *argv; + argc--; + argv++; + if (keyfile == NULL) + usage(); + input = *argv; + argc--; + argv++; + if (input == NULL) + usage(); + output = *argv; + argc--; + argv++; + if (output == NULL) + usage(); + + if (argc != 0) usage(); - } if (usesyslog) pjdlog_mode_set(PJDLOG_MODE_SYSLOG);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512012235.tB1MZBKD080181>