1 /* -*- buffer-read-only: t -*- vi: set ro:
3 * DO NOT EDIT THIS FILE (tpmtool-args.c)
5 * It has been AutoGen-ed
6 * From the definitions tpmtool-args.def
7 * and the template file options
9 * Generated from AutoOpts 41:1:16 templates.
11 * AutoOpts is a copyrighted work. This source file is not encumbered
12 * by AutoOpts licensing, but is provided under the licensing terms chosen
13 * by the tpmtool author or copyright holder. AutoOpts is
14 * licensed under the terms of the LGPL. The redistributable library
15 * (``libopts'') is licensed under the terms of either the LGPL or, at the
16 * users discretion, the BSD license. See the AutoOpts and/or libopts sources
19 * The tpmtool program is copyrighted and licensed
20 * under the following terms:
22 * Copyright (C) 2000-2017 Free Software Foundation, and others, all rights reserved.
23 * This is free software. It is licensed for use, modification and
24 * redistribution under the terms of the GNU General Public License,
25 * version 3 or later <http://gnu.org/licenses/gpl.html>
27 * tpmtool is free software: you can redistribute it and/or modify it
28 * under the terms of the GNU General Public License as published by the
29 * Free Software Foundation, either version 3 of the License, or
30 * (at your option) any later version.
32 * tpmtool is distributed in the hope that it will be useful, but
33 * WITHOUT ANY WARRANTY; without even the implied warranty of
34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35 * See the GNU General Public License for more details.
37 * You should have received a copy of the GNU General Public License along
38 * with this program. If not, see <http://www.gnu.org/licenses/>.
42 #define OPTION_CODE_COMPILE 1
43 #include "tpmtool-args.h"
44 #include <sys/types.h>
54 extern FILE * option_usage_fp;
55 #define zCopyright (tpmtool_opt_strs+0)
56 #define zLicenseDescrip (tpmtool_opt_strs+283)
64 * static const strings for tpmtool options
66 static char const tpmtool_opt_strs[2178] =
67 /* 0 */ "tpmtool 3.3.27\n"
68 "Copyright (C) 2000-2017 Free Software Foundation, and others, all rights reserved.\n"
69 "This is free software. It is licensed for use, modification and\n"
70 "redistribution under the terms of the GNU General Public License,\n"
71 "version 3 or later <http://gnu.org/licenses/gpl.html>\n\0"
72 /* 283 */ "tpmtool is free software: you can redistribute it and/or modify it under\n"
73 "the terms of the GNU General Public License as published by the Free\n"
74 "Software Foundation, either version 3 of the License, or (at your option)\n"
75 "any later version.\n\n"
76 "tpmtool is distributed in the hope that it will be useful, but WITHOUT ANY\n"
77 "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n"
78 "FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n"
80 "You should have received a copy of the GNU General Public License along\n"
81 "with this program. If not, see <http://www.gnu.org/licenses/>.\n\0"
82 /* 886 */ "Enable debugging\0"
85 /* 915 */ "Input file\0"
88 /* 940 */ "Output file\0"
91 /* 968 */ "Generate an RSA private-public key pair\0"
92 /* 1008 */ "GENERATE_RSA\0"
93 /* 1021 */ "generate-rsa\0"
94 /* 1034 */ "Any generated key will be registered in the TPM\0"
95 /* 1082 */ "REGISTER\0"
96 /* 1091 */ "register\0"
97 /* 1100 */ "Any generated key will be a signing key\0"
98 /* 1140 */ "SIGNING\0"
99 /* 1148 */ "signing\0"
100 /* 1156 */ "Any generated key will be a legacy key\0"
101 /* 1195 */ "LEGACY\0"
102 /* 1202 */ "legacy\0"
103 /* 1209 */ "Any registered key will be a user key\0"
106 /* 1257 */ "Any registred key will be a system key\0"
107 /* 1296 */ "SYSTEM\0"
108 /* 1303 */ "system\0"
109 /* 1310 */ "Prints the public key of the provided key\0"
110 /* 1352 */ "PUBKEY\0"
111 /* 1359 */ "pubkey\0"
112 /* 1366 */ "Lists all stored keys in the TPM\0"
115 /* 1409 */ "Delete the key identified by the given URL (UUID).\0"
116 /* 1460 */ "DELETE\0"
117 /* 1467 */ "delete\0"
118 /* 1474 */ "Tests the signature operation of the provided object\0"
119 /* 1527 */ "TEST_SIGN\0"
120 /* 1537 */ "test-sign\0"
121 /* 1547 */ "Specify the security level [low, legacy, medium, high, ultra].\0"
122 /* 1610 */ "SEC_PARAM\0"
123 /* 1620 */ "sec-param\0"
124 /* 1630 */ "Specify the number of bits for key generate\0"
127 /* 1684 */ "Use the DER format for keys.\0"
129 /* 1719 */ "no-inder\0"
131 /* 1731 */ "Use DER format for output keys\0"
132 /* 1762 */ "OUTDER\0"
133 /* 1769 */ "no-outder\0"
134 /* 1779 */ "display extended usage information and exit\0"
136 /* 1828 */ "extended usage information passed thru pager\0"
137 /* 1873 */ "more-help\0"
138 /* 1883 */ "output version information and exit\0"
139 /* 1919 */ "version\0"
140 /* 1927 */ "TPMTOOL\0"
141 /* 1935 */ "tpmtool - GnuTLS TPM tool\n"
142 "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
143 /* 2019 */ "bugs@gnutls.org\0"
145 /* 2037 */ "Program that allows handling cryptographic data from the TPM chip.\n\0"
146 /* 2105 */ "tpmtool 3.3.27\0"
147 /* 2120 */ "tpmtool [options]\n"
148 "tpmtool --help for usage instructions.\n";
151 * debug option description:
153 /** Descriptive text for the debug option */
154 #define DEBUG_DESC (tpmtool_opt_strs+886)
155 /** Upper-cased name for the debug option */
156 #define DEBUG_NAME (tpmtool_opt_strs+903)
157 /** Name string for the debug option */
158 #define DEBUG_name (tpmtool_opt_strs+909)
159 /** Compiled in flag settings for the debug option */
160 #define DEBUG_FLAGS (OPTST_DISABLED \
161 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
164 * infile option description:
166 /** Descriptive text for the infile option */
167 #define INFILE_DESC (tpmtool_opt_strs+915)
168 /** Upper-cased name for the infile option */
169 #define INFILE_NAME (tpmtool_opt_strs+926)
170 /** Name string for the infile option */
171 #define INFILE_name (tpmtool_opt_strs+933)
172 /** Compiled in flag settings for the infile option */
173 #define INFILE_FLAGS (OPTST_DISABLED \
174 | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
177 * outfile option description:
179 /** Descriptive text for the outfile option */
180 #define OUTFILE_DESC (tpmtool_opt_strs+940)
181 /** Upper-cased name for the outfile option */
182 #define OUTFILE_NAME (tpmtool_opt_strs+952)
183 /** Name string for the outfile option */
184 #define OUTFILE_name (tpmtool_opt_strs+960)
185 /** Compiled in flag settings for the outfile option */
186 #define OUTFILE_FLAGS (OPTST_DISABLED \
187 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
190 * generate-rsa option description:
192 /** Descriptive text for the generate-rsa option */
193 #define GENERATE_RSA_DESC (tpmtool_opt_strs+968)
194 /** Upper-cased name for the generate-rsa option */
195 #define GENERATE_RSA_NAME (tpmtool_opt_strs+1008)
196 /** Name string for the generate-rsa option */
197 #define GENERATE_RSA_name (tpmtool_opt_strs+1021)
198 /** Compiled in flag settings for the generate-rsa option */
199 #define GENERATE_RSA_FLAGS (OPTST_DISABLED)
202 * register option description with
203 * "Must also have options" and "Incompatible options":
205 /** Descriptive text for the register option */
206 #define REGISTER_DESC (tpmtool_opt_strs+1034)
207 /** Upper-cased name for the register option */
208 #define REGISTER_NAME (tpmtool_opt_strs+1082)
209 /** Name string for the register option */
210 #define REGISTER_name (tpmtool_opt_strs+1091)
211 /** Other options that are required by the register option */
212 static int const aRegisterMustList[] = {
213 INDEX_OPT_GENERATE_RSA, NO_EQUIVALENT };
214 /** Compiled in flag settings for the register option */
215 #define REGISTER_FLAGS (OPTST_DISABLED)
218 * signing option description with
219 * "Must also have options" and "Incompatible options":
221 /** Descriptive text for the signing option */
222 #define SIGNING_DESC (tpmtool_opt_strs+1100)
223 /** Upper-cased name for the signing option */
224 #define SIGNING_NAME (tpmtool_opt_strs+1140)
225 /** Name string for the signing option */
226 #define SIGNING_name (tpmtool_opt_strs+1148)
227 /** Other options that are required by the signing option */
228 static int const aSigningMustList[] = {
229 INDEX_OPT_GENERATE_RSA, NO_EQUIVALENT };
230 /** Other options that appear in conjunction with the signing option */
231 static int const aSigningCantList[] = {
232 INDEX_OPT_LEGACY, NO_EQUIVALENT };
233 /** Compiled in flag settings for the signing option */
234 #define SIGNING_FLAGS (OPTST_DISABLED)
237 * legacy option description with
238 * "Must also have options" and "Incompatible options":
240 /** Descriptive text for the legacy option */
241 #define LEGACY_DESC (tpmtool_opt_strs+1156)
242 /** Upper-cased name for the legacy option */
243 #define LEGACY_NAME (tpmtool_opt_strs+1195)
244 /** Name string for the legacy option */
245 #define LEGACY_name (tpmtool_opt_strs+1202)
246 /** Other options that are required by the legacy option */
247 static int const aLegacyMustList[] = {
248 INDEX_OPT_GENERATE_RSA, NO_EQUIVALENT };
249 /** Other options that appear in conjunction with the legacy option */
250 static int const aLegacyCantList[] = {
251 INDEX_OPT_SIGNING, NO_EQUIVALENT };
252 /** Compiled in flag settings for the legacy option */
253 #define LEGACY_FLAGS (OPTST_DISABLED)
256 * user option description with
257 * "Must also have options" and "Incompatible options":
259 /** Descriptive text for the user option */
260 #define USER_DESC (tpmtool_opt_strs+1209)
261 /** Upper-cased name for the user option */
262 #define USER_NAME (tpmtool_opt_strs+1247)
263 /** Name string for the user option */
264 #define USER_name (tpmtool_opt_strs+1252)
265 /** Other options that are required by the user option */
266 static int const aUserMustList[] = {
267 INDEX_OPT_REGISTER, NO_EQUIVALENT };
268 /** Other options that appear in conjunction with the user option */
269 static int const aUserCantList[] = {
270 INDEX_OPT_SYSTEM, NO_EQUIVALENT };
271 /** Compiled in flag settings for the user option */
272 #define USER_FLAGS (OPTST_DISABLED)
275 * system option description with
276 * "Must also have options" and "Incompatible options":
278 /** Descriptive text for the system option */
279 #define SYSTEM_DESC (tpmtool_opt_strs+1257)
280 /** Upper-cased name for the system option */
281 #define SYSTEM_NAME (tpmtool_opt_strs+1296)
282 /** Name string for the system option */
283 #define SYSTEM_name (tpmtool_opt_strs+1303)
284 /** Other options that are required by the system option */
285 static int const aSystemMustList[] = {
286 INDEX_OPT_REGISTER, NO_EQUIVALENT };
287 /** Other options that appear in conjunction with the system option */
288 static int const aSystemCantList[] = {
289 INDEX_OPT_USER, NO_EQUIVALENT };
290 /** Compiled in flag settings for the system option */
291 #define SYSTEM_FLAGS (OPTST_DISABLED)
294 * pubkey option description:
296 /** Descriptive text for the pubkey option */
297 #define PUBKEY_DESC (tpmtool_opt_strs+1310)
298 /** Upper-cased name for the pubkey option */
299 #define PUBKEY_NAME (tpmtool_opt_strs+1352)
300 /** Name string for the pubkey option */
301 #define PUBKEY_name (tpmtool_opt_strs+1359)
302 /** Compiled in flag settings for the pubkey option */
303 #define PUBKEY_FLAGS (OPTST_DISABLED \
304 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
307 * list option description:
309 /** Descriptive text for the list option */
310 #define LIST_DESC (tpmtool_opt_strs+1366)
311 /** Upper-cased name for the list option */
312 #define LIST_NAME (tpmtool_opt_strs+1399)
313 /** Name string for the list option */
314 #define LIST_name (tpmtool_opt_strs+1404)
315 /** Compiled in flag settings for the list option */
316 #define LIST_FLAGS (OPTST_DISABLED)
319 * delete option description:
321 /** Descriptive text for the delete option */
322 #define DELETE_DESC (tpmtool_opt_strs+1409)
323 /** Upper-cased name for the delete option */
324 #define DELETE_NAME (tpmtool_opt_strs+1460)
325 /** Name string for the delete option */
326 #define DELETE_name (tpmtool_opt_strs+1467)
327 /** Compiled in flag settings for the delete option */
328 #define DELETE_FLAGS (OPTST_DISABLED \
329 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
332 * test-sign option description:
334 /** Descriptive text for the test-sign option */
335 #define TEST_SIGN_DESC (tpmtool_opt_strs+1474)
336 /** Upper-cased name for the test-sign option */
337 #define TEST_SIGN_NAME (tpmtool_opt_strs+1527)
338 /** Name string for the test-sign option */
339 #define TEST_SIGN_name (tpmtool_opt_strs+1537)
340 /** Compiled in flag settings for the test-sign option */
341 #define TEST_SIGN_FLAGS (OPTST_DISABLED \
342 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
345 * sec-param option description:
347 /** Descriptive text for the sec-param option */
348 #define SEC_PARAM_DESC (tpmtool_opt_strs+1547)
349 /** Upper-cased name for the sec-param option */
350 #define SEC_PARAM_NAME (tpmtool_opt_strs+1610)
351 /** Name string for the sec-param option */
352 #define SEC_PARAM_name (tpmtool_opt_strs+1620)
353 /** Compiled in flag settings for the sec-param option */
354 #define SEC_PARAM_FLAGS (OPTST_DISABLED \
355 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
358 * bits option description:
360 /** Descriptive text for the bits option */
361 #define BITS_DESC (tpmtool_opt_strs+1630)
362 /** Upper-cased name for the bits option */
363 #define BITS_NAME (tpmtool_opt_strs+1674)
364 /** Name string for the bits option */
365 #define BITS_name (tpmtool_opt_strs+1679)
366 /** Compiled in flag settings for the bits option */
367 #define BITS_FLAGS (OPTST_DISABLED \
368 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
371 * inder option description:
373 /** Descriptive text for the inder option */
374 #define INDER_DESC (tpmtool_opt_strs+1684)
375 /** Upper-cased name for the inder option */
376 #define INDER_NAME (tpmtool_opt_strs+1713)
377 /** disablement name for the inder option */
378 #define NOT_INDER_name (tpmtool_opt_strs+1719)
379 /** disablement prefix for the inder option */
380 #define NOT_INDER_PFX (tpmtool_opt_strs+1728)
381 /** Name string for the inder option */
382 #define INDER_name (NOT_INDER_name + 3)
383 /** Compiled in flag settings for the inder option */
384 #define INDER_FLAGS (OPTST_DISABLED)
387 * outder option description:
389 /** Descriptive text for the outder option */
390 #define OUTDER_DESC (tpmtool_opt_strs+1731)
391 /** Upper-cased name for the outder option */
392 #define OUTDER_NAME (tpmtool_opt_strs+1762)
393 /** disablement name for the outder option */
394 #define NOT_OUTDER_name (tpmtool_opt_strs+1769)
395 /** disablement prefix for the outder option */
396 #define NOT_OUTDER_PFX (tpmtool_opt_strs+1728)
397 /** Name string for the outder option */
398 #define OUTDER_name (NOT_OUTDER_name + 3)
399 /** Compiled in flag settings for the outder option */
400 #define OUTDER_FLAGS (OPTST_DISABLED)
403 * Help/More_Help/Version option descriptions:
405 #define HELP_DESC (tpmtool_opt_strs+1779)
406 #define HELP_name (tpmtool_opt_strs+1823)
407 #ifdef HAVE_WORKING_FORK
408 #define MORE_HELP_DESC (tpmtool_opt_strs+1828)
409 #define MORE_HELP_name (tpmtool_opt_strs+1873)
410 #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
412 #define MORE_HELP_DESC HELP_DESC
413 #define MORE_HELP_name HELP_name
414 #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
416 #ifdef NO_OPTIONAL_OPT_ARGS
417 # define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT)
419 # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
420 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
422 #define VER_DESC (tpmtool_opt_strs+1883)
423 #define VER_name (tpmtool_opt_strs+1919)
425 * Declare option callback procedures
428 optionBooleanVal, optionNestedVal, optionNumericVal,
429 optionPagedUsage, optionPrintVersion, optionResetOpt,
430 optionStackArg, optionTimeDate, optionTimeVal,
431 optionUnstackArg, optionVendorOption;
433 doOptDebug, doOptInfile, doUsageOpt;
434 #define VER_PROC optionPrintVersion
436 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
438 * Define the tpmtool Option Descriptions.
439 * This is an array of OPTION_CT entries, one for each
440 * option that the tpmtool program responds to.
442 static tOptDesc optDesc[OPTION_CT] = {
443 { /* entry idx, value */ 0, VALUE_OPT_DEBUG,
444 /* equiv idx, value */ 0, VALUE_OPT_DEBUG,
445 /* equivalenced to */ NO_EQUIVALENT,
446 /* min, max, act ct */ 0, 1, 0,
447 /* opt state flags */ DEBUG_FLAGS, 0,
448 /* last opt argumnt */ { NULL }, /* --debug */
449 /* arg list/cookie */ NULL,
450 /* must/cannot opts */ NULL, NULL,
451 /* option proc */ doOptDebug,
452 /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name,
453 /* disablement strs */ NULL, NULL },
455 { /* entry idx, value */ 1, VALUE_OPT_INFILE,
456 /* equiv idx, value */ 1, VALUE_OPT_INFILE,
457 /* equivalenced to */ NO_EQUIVALENT,
458 /* min, max, act ct */ 0, 1, 0,
459 /* opt state flags */ INFILE_FLAGS, 0,
460 /* last opt argumnt */ { NULL }, /* --infile */
461 /* arg list/cookie */ NULL,
462 /* must/cannot opts */ NULL, NULL,
463 /* option proc */ doOptInfile,
464 /* desc, NAME, name */ INFILE_DESC, INFILE_NAME, INFILE_name,
465 /* disablement strs */ NULL, NULL },
467 { /* entry idx, value */ 2, VALUE_OPT_OUTFILE,
468 /* equiv idx, value */ 2, VALUE_OPT_OUTFILE,
469 /* equivalenced to */ NO_EQUIVALENT,
470 /* min, max, act ct */ 0, 1, 0,
471 /* opt state flags */ OUTFILE_FLAGS, 0,
472 /* last opt argumnt */ { NULL }, /* --outfile */
473 /* arg list/cookie */ NULL,
474 /* must/cannot opts */ NULL, NULL,
475 /* option proc */ NULL,
476 /* desc, NAME, name */ OUTFILE_DESC, OUTFILE_NAME, OUTFILE_name,
477 /* disablement strs */ NULL, NULL },
479 { /* entry idx, value */ 3, VALUE_OPT_GENERATE_RSA,
480 /* equiv idx, value */ 3, VALUE_OPT_GENERATE_RSA,
481 /* equivalenced to */ NO_EQUIVALENT,
482 /* min, max, act ct */ 0, 1, 0,
483 /* opt state flags */ GENERATE_RSA_FLAGS, 0,
484 /* last opt argumnt */ { NULL }, /* --generate-rsa */
485 /* arg list/cookie */ NULL,
486 /* must/cannot opts */ NULL, NULL,
487 /* option proc */ NULL,
488 /* desc, NAME, name */ GENERATE_RSA_DESC, GENERATE_RSA_NAME, GENERATE_RSA_name,
489 /* disablement strs */ NULL, NULL },
491 { /* entry idx, value */ 4, VALUE_OPT_REGISTER,
492 /* equiv idx, value */ 4, VALUE_OPT_REGISTER,
493 /* equivalenced to */ NO_EQUIVALENT,
494 /* min, max, act ct */ 0, 1, 0,
495 /* opt state flags */ REGISTER_FLAGS, 0,
496 /* last opt argumnt */ { NULL }, /* --register */
497 /* arg list/cookie */ NULL,
498 /* must/cannot opts */ aRegisterMustList, NULL,
499 /* option proc */ NULL,
500 /* desc, NAME, name */ REGISTER_DESC, REGISTER_NAME, REGISTER_name,
501 /* disablement strs */ NULL, NULL },
503 { /* entry idx, value */ 5, VALUE_OPT_SIGNING,
504 /* equiv idx, value */ 5, VALUE_OPT_SIGNING,
505 /* equivalenced to */ NO_EQUIVALENT,
506 /* min, max, act ct */ 0, 1, 0,
507 /* opt state flags */ SIGNING_FLAGS, 0,
508 /* last opt argumnt */ { NULL }, /* --signing */
509 /* arg list/cookie */ NULL,
510 /* must/cannot opts */ aSigningMustList, aSigningCantList,
511 /* option proc */ NULL,
512 /* desc, NAME, name */ SIGNING_DESC, SIGNING_NAME, SIGNING_name,
513 /* disablement strs */ NULL, NULL },
515 { /* entry idx, value */ 6, VALUE_OPT_LEGACY,
516 /* equiv idx, value */ 6, VALUE_OPT_LEGACY,
517 /* equivalenced to */ NO_EQUIVALENT,
518 /* min, max, act ct */ 0, 1, 0,
519 /* opt state flags */ LEGACY_FLAGS, 0,
520 /* last opt argumnt */ { NULL }, /* --legacy */
521 /* arg list/cookie */ NULL,
522 /* must/cannot opts */ aLegacyMustList, aLegacyCantList,
523 /* option proc */ NULL,
524 /* desc, NAME, name */ LEGACY_DESC, LEGACY_NAME, LEGACY_name,
525 /* disablement strs */ NULL, NULL },
527 { /* entry idx, value */ 7, VALUE_OPT_USER,
528 /* equiv idx, value */ 7, VALUE_OPT_USER,
529 /* equivalenced to */ NO_EQUIVALENT,
530 /* min, max, act ct */ 0, 1, 0,
531 /* opt state flags */ USER_FLAGS, 0,
532 /* last opt argumnt */ { NULL }, /* --user */
533 /* arg list/cookie */ NULL,
534 /* must/cannot opts */ aUserMustList, aUserCantList,
535 /* option proc */ NULL,
536 /* desc, NAME, name */ USER_DESC, USER_NAME, USER_name,
537 /* disablement strs */ NULL, NULL },
539 { /* entry idx, value */ 8, VALUE_OPT_SYSTEM,
540 /* equiv idx, value */ 8, VALUE_OPT_SYSTEM,
541 /* equivalenced to */ NO_EQUIVALENT,
542 /* min, max, act ct */ 0, 1, 0,
543 /* opt state flags */ SYSTEM_FLAGS, 0,
544 /* last opt argumnt */ { NULL }, /* --system */
545 /* arg list/cookie */ NULL,
546 /* must/cannot opts */ aSystemMustList, aSystemCantList,
547 /* option proc */ NULL,
548 /* desc, NAME, name */ SYSTEM_DESC, SYSTEM_NAME, SYSTEM_name,
549 /* disablement strs */ NULL, NULL },
551 { /* entry idx, value */ 9, VALUE_OPT_PUBKEY,
552 /* equiv idx, value */ 9, VALUE_OPT_PUBKEY,
553 /* equivalenced to */ NO_EQUIVALENT,
554 /* min, max, act ct */ 0, 1, 0,
555 /* opt state flags */ PUBKEY_FLAGS, 0,
556 /* last opt argumnt */ { NULL }, /* --pubkey */
557 /* arg list/cookie */ NULL,
558 /* must/cannot opts */ NULL, NULL,
559 /* option proc */ NULL,
560 /* desc, NAME, name */ PUBKEY_DESC, PUBKEY_NAME, PUBKEY_name,
561 /* disablement strs */ NULL, NULL },
563 { /* entry idx, value */ 10, VALUE_OPT_LIST,
564 /* equiv idx, value */ 10, VALUE_OPT_LIST,
565 /* equivalenced to */ NO_EQUIVALENT,
566 /* min, max, act ct */ 0, 1, 0,
567 /* opt state flags */ LIST_FLAGS, 0,
568 /* last opt argumnt */ { NULL }, /* --list */
569 /* arg list/cookie */ NULL,
570 /* must/cannot opts */ NULL, NULL,
571 /* option proc */ NULL,
572 /* desc, NAME, name */ LIST_DESC, LIST_NAME, LIST_name,
573 /* disablement strs */ NULL, NULL },
575 { /* entry idx, value */ 11, VALUE_OPT_DELETE,
576 /* equiv idx, value */ 11, VALUE_OPT_DELETE,
577 /* equivalenced to */ NO_EQUIVALENT,
578 /* min, max, act ct */ 0, 1, 0,
579 /* opt state flags */ DELETE_FLAGS, 0,
580 /* last opt argumnt */ { NULL }, /* --delete */
581 /* arg list/cookie */ NULL,
582 /* must/cannot opts */ NULL, NULL,
583 /* option proc */ NULL,
584 /* desc, NAME, name */ DELETE_DESC, DELETE_NAME, DELETE_name,
585 /* disablement strs */ NULL, NULL },
587 { /* entry idx, value */ 12, VALUE_OPT_TEST_SIGN,
588 /* equiv idx, value */ 12, VALUE_OPT_TEST_SIGN,
589 /* equivalenced to */ NO_EQUIVALENT,
590 /* min, max, act ct */ 0, 1, 0,
591 /* opt state flags */ TEST_SIGN_FLAGS, 0,
592 /* last opt argumnt */ { NULL }, /* --test-sign */
593 /* arg list/cookie */ NULL,
594 /* must/cannot opts */ NULL, NULL,
595 /* option proc */ NULL,
596 /* desc, NAME, name */ TEST_SIGN_DESC, TEST_SIGN_NAME, TEST_SIGN_name,
597 /* disablement strs */ NULL, NULL },
599 { /* entry idx, value */ 13, VALUE_OPT_SEC_PARAM,
600 /* equiv idx, value */ 13, VALUE_OPT_SEC_PARAM,
601 /* equivalenced to */ NO_EQUIVALENT,
602 /* min, max, act ct */ 0, 1, 0,
603 /* opt state flags */ SEC_PARAM_FLAGS, 0,
604 /* last opt argumnt */ { NULL }, /* --sec-param */
605 /* arg list/cookie */ NULL,
606 /* must/cannot opts */ NULL, NULL,
607 /* option proc */ NULL,
608 /* desc, NAME, name */ SEC_PARAM_DESC, SEC_PARAM_NAME, SEC_PARAM_name,
609 /* disablement strs */ NULL, NULL },
611 { /* entry idx, value */ 14, VALUE_OPT_BITS,
612 /* equiv idx, value */ 14, VALUE_OPT_BITS,
613 /* equivalenced to */ NO_EQUIVALENT,
614 /* min, max, act ct */ 0, 1, 0,
615 /* opt state flags */ BITS_FLAGS, 0,
616 /* last opt argumnt */ { NULL }, /* --bits */
617 /* arg list/cookie */ NULL,
618 /* must/cannot opts */ NULL, NULL,
619 /* option proc */ optionNumericVal,
620 /* desc, NAME, name */ BITS_DESC, BITS_NAME, BITS_name,
621 /* disablement strs */ NULL, NULL },
623 { /* entry idx, value */ 15, VALUE_OPT_INDER,
624 /* equiv idx, value */ 15, VALUE_OPT_INDER,
625 /* equivalenced to */ NO_EQUIVALENT,
626 /* min, max, act ct */ 0, 1, 0,
627 /* opt state flags */ INDER_FLAGS, 0,
628 /* last opt argumnt */ { NULL }, /* --inder */
629 /* arg list/cookie */ NULL,
630 /* must/cannot opts */ NULL, NULL,
631 /* option proc */ NULL,
632 /* desc, NAME, name */ INDER_DESC, INDER_NAME, INDER_name,
633 /* disablement strs */ NOT_INDER_name, NOT_INDER_PFX },
635 { /* entry idx, value */ 16, VALUE_OPT_OUTDER,
636 /* equiv idx, value */ 16, VALUE_OPT_OUTDER,
637 /* equivalenced to */ NO_EQUIVALENT,
638 /* min, max, act ct */ 0, 1, 0,
639 /* opt state flags */ OUTDER_FLAGS, 0,
640 /* last opt argumnt */ { NULL }, /* --outder */
641 /* arg list/cookie */ NULL,
642 /* must/cannot opts */ NULL, NULL,
643 /* option proc */ NULL,
644 /* desc, NAME, name */ OUTDER_DESC, OUTDER_NAME, OUTDER_name,
645 /* disablement strs */ NOT_OUTDER_name, NOT_OUTDER_PFX },
647 { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
648 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION,
649 /* equivalenced to */ NO_EQUIVALENT,
650 /* min, max, act ct */ 0, 1, 0,
651 /* opt state flags */ VER_FLAGS, AOUSE_VERSION,
652 /* last opt argumnt */ { NULL },
653 /* arg list/cookie */ NULL,
654 /* must/cannot opts */ NULL, NULL,
655 /* option proc */ VER_PROC,
656 /* desc, NAME, name */ VER_DESC, NULL, VER_name,
657 /* disablement strs */ NULL, NULL },
661 { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
662 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
663 /* equivalenced to */ NO_EQUIVALENT,
664 /* min, max, act ct */ 0, 1, 0,
665 /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
666 /* last opt argumnt */ { NULL },
667 /* arg list/cookie */ NULL,
668 /* must/cannot opts */ NULL, NULL,
669 /* option proc */ doUsageOpt,
670 /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
671 /* disablement strs */ NULL, NULL },
673 { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
674 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
675 /* equivalenced to */ NO_EQUIVALENT,
676 /* min, max, act ct */ 0, 1, 0,
677 /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
678 /* last opt argumnt */ { NULL },
679 /* arg list/cookie */ NULL,
680 /* must/cannot opts */ NULL, NULL,
681 /* option proc */ optionPagedUsage,
682 /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
683 /* disablement strs */ NULL, NULL }
687 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
688 /** Reference to the upper cased version of tpmtool. */
689 #define zPROGNAME (tpmtool_opt_strs+1927)
690 /** Reference to the title line for tpmtool usage. */
691 #define zUsageTitle (tpmtool_opt_strs+1935)
692 /** There is no tpmtool configuration file. */
694 /** There are no directories to search for tpmtool config files. */
695 #define apzHomeList NULL
696 /** The tpmtool program bug email address. */
697 #define zBugsAddr (tpmtool_opt_strs+2019)
698 /** Clarification/explanation of what tpmtool does. */
699 #define zExplain (tpmtool_opt_strs+2035)
700 /** Extra detail explaining what tpmtool does. */
701 #define zDetail (tpmtool_opt_strs+2037)
702 /** The full version string for tpmtool. */
703 #define zFullVersion (tpmtool_opt_strs+2105)
704 /* extracted from optcode.tlib near line 364 */
706 #if defined(ENABLE_NLS)
707 # define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT
708 static tOptionXlateProc translate_option_strings;
710 # define OPTPROC_BASE OPTPROC_NONE
711 # define translate_option_strings NULL
712 #endif /* ENABLE_NLS */
714 #define tpmtool_full_usage (NULL)
715 #define tpmtool_short_usage (tpmtool_opt_strs+2120)
717 #endif /* not defined __doxygen__ */
720 * Create the static procedure(s) declared above.
723 * The callout function that invokes the optionUsage function.
725 * @param[in] opts the AutoOpts option description structure
726 * @param[in] od the descriptor for the "help" (usage) option.
730 doUsageOpt(tOptions * opts, tOptDesc * od)
733 ex_code = TPMTOOL_EXIT_SUCCESS;
734 optionUsage(&tpmtoolOptions, ex_code);
736 exit(TPMTOOL_EXIT_FAILURE);
741 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
743 * Code to handle the debug option.
744 * Specifies the debug level.
745 * @param[in] pOptions the tpmtool options data structure
746 * @param[in,out] pOptDesc the option descriptor for this option.
749 doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc)
751 static struct {long rmin, rmax;} const rng[1] = {
755 if (pOptions <= OPTPROC_EMIT_LIMIT)
757 optionNumericVal(pOptions, pOptDesc);
759 for (ix = 0; ix < 1; ix++) {
760 if (pOptDesc->optArg.argInt < rng[ix].rmin)
761 continue; /* ranges need not be ordered. */
762 if (pOptDesc->optArg.argInt == rng[ix].rmin)
764 if (rng[ix].rmax == LONG_MIN)
766 if (pOptDesc->optArg.argInt <= rng[ix].rmax)
770 option_usage_fp = stderr;
773 optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
776 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
778 * Code to handle the infile option.
780 * @param[in] pOptions the tpmtool options data structure
781 * @param[in,out] pOptDesc the option descriptor for this option.
784 doOptInfile(tOptions* pOptions, tOptDesc* pOptDesc)
786 static teOptFileType const type =
787 FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
788 static tuFileMode mode;
792 mode.file_flags = O_CLOEXEC;
795 * This function handles special invalid values for "pOptions"
797 optionFileCheck(pOptions, pOptDesc, type, mode);
799 /* extracted from optmain.tlib near line 1250 */
802 * The directory containing the data associated with tpmtool.
805 # define PKGDATADIR ""
809 * Information about the person or institution that packaged tpmtool
810 * for the current distribution.
812 #ifndef WITH_PACKAGER
813 # define tpmtool_packager_info NULL
815 /** Packager information for tpmtool. */
816 static char const tpmtool_packager_info[] =
817 "Packaged by " WITH_PACKAGER
819 # ifdef WITH_PACKAGER_VERSION
820 " ("WITH_PACKAGER_VERSION")"
823 # ifdef WITH_PACKAGER_BUG_REPORTS
824 "\nReport tpmtool bugs to " WITH_PACKAGER_BUG_REPORTS
830 #endif /* __doxygen__ */
832 * The option definitions for tpmtool. The one structure that
835 tOptions tpmtoolOptions = {
836 OPTIONS_STRUCT_VERSION,
837 0, NULL, /* original argc + argv */
847 0, NULL, /* current option index, current option */
848 NULL, NULL, zPROGNAME,
849 zRcName, zCopyright, zLicenseDescrip,
850 zFullVersion, apzHomeList, zUsageTitle,
851 zExplain, zDetail, optDesc,
852 zBugsAddr, /* address to send bugs to */
853 NULL, NULL, /* extensions/saved state */
854 optionUsage, /* usage procedure */
855 translate_option_strings, /* translation procedure */
857 * Indexes to special options
859 { INDEX_OPT_MORE_HELP, /* more-help option index */
860 NO_EQUIVALENT, /* save option index */
861 NO_EQUIVALENT, /* '-#' option index */
862 NO_EQUIVALENT /* index of default opt */
864 20 /* full option count */, 17 /* user option count */,
865 tpmtool_full_usage, tpmtool_short_usage,
867 PKGDATADIR, tpmtool_packager_info
872 * This code is designed to translate translatable option text for the
873 * tpmtool program. These translations happen upon entry
874 * to optionProcess().
880 #ifdef HAVE_DCGETTEXT
881 # include <gettext.h>
883 #include <autoopts/usage-txt.h>
885 static char * AO_gettext(char const * pz);
886 static void coerce_it(void ** s);
889 * AutoGen specific wrapper function for gettext. It relies on the macro _()
890 * to convert from English to the target language, then strdup-duplicates the
891 * result string. It tries the "libopts" domain first, then whatever has been
892 * set via the \a textdomain(3) call.
894 * @param[in] pz the input text used as a lookup key.
895 * @returns the translated text (if there is one),
896 * or the original text (if not).
899 AO_gettext(char const * pz)
904 #ifdef HAVE_DCGETTEXT
906 * While processing the option_xlateable_txt data, try to use the
907 * "libopts" domain. Once we switch to the option descriptor data,
908 * do *not* use that domain.
910 if (option_xlateable_txt.field_ct != 0) {
911 res = dgettext("libopts", pz);
913 res = (char *)VOIDP(_(pz));
915 res = (char *)VOIDP(_(pz));
917 res = (char *)VOIDP(_(pz));
923 fputs(_("No memory for duping translated strings\n"), stderr);
924 exit(TPMTOOL_EXIT_FAILURE);
930 * All the pointers we use are marked "* const", but they are stored in
931 * writable memory. Coerce the mutability and set the pointer.
933 static void coerce_it(void ** s) { *s = AO_gettext(*s);
937 * Translate all the translatable strings in the tpmtoolOptions
938 * structure defined above. This is done only once.
941 translate_option_strings(void)
943 tOptions * const opts = &tpmtoolOptions;
946 * Guard against re-translation. It won't work. The strings will have
947 * been changed by the first pass through this code. One shot only.
949 if (option_xlateable_txt.field_ct != 0) {
951 * Do the translations. The first pointer follows the field count
952 * field. The field count field is the size of a pointer.
954 char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
955 int ix = option_xlateable_txt.field_ct;
958 ppz++; /* skip over field_ct */
959 *ppz = AO_gettext(*ppz);
961 /* prevent re-translation and disable "libopts" domain lookup */
962 option_xlateable_txt.field_ct = 0;
964 coerce_it(VOIDP(&(opts->pzCopyright)));
965 coerce_it(VOIDP(&(opts->pzCopyNotice)));
966 coerce_it(VOIDP(&(opts->pzFullVersion)));
967 coerce_it(VOIDP(&(opts->pzUsageTitle)));
968 coerce_it(VOIDP(&(opts->pzExplain)));
969 coerce_it(VOIDP(&(opts->pzDetail)));
971 tOptDesc * od = opts->pOptDesc;
972 for (ix = opts->optCt; ix > 0; ix--, od++)
973 coerce_it(VOIDP(&(od->pzText)));
977 #endif /* ENABLE_NLS */
979 #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
980 /** I18N function strictly for xgettext. Do not compile. */
981 static void bogus_function(void) {
984 The following dummy function was crated solely so that xgettext can
985 extract the correct strings. These strings are actually referenced
986 by a field name in the tpmtoolOptions structure noted in the
987 comments below. The literal text is defined in tpmtool_opt_strs.
989 NOTE: the strings below are segmented with respect to the source string
990 tpmtool_opt_strs. The strings above are handed off for translation
991 at run time a paragraph at a time. Consequently, they are presented here
992 for translation a paragraph at a time.
994 ALSO: often the description for an option will reference another option
995 by name. These are set off with apostrophe quotes (I hope). Do not
996 translate option names.
998 /* referenced via tpmtoolOptions.pzCopyright */
999 puts(_("tpmtool 3.3.27\n\
1000 Copyright (C) 2000-2017 Free Software Foundation, and others, all rights reserved.\n\
1001 This is free software. It is licensed for use, modification and\n\
1002 redistribution under the terms of the GNU General Public License,\n\
1003 version 3 or later <http://gnu.org/licenses/gpl.html>\n"));
1005 /* referenced via tpmtoolOptions.pzCopyNotice */
1006 puts(_("tpmtool is free software: you can redistribute it and/or modify it under\n\
1007 the terms of the GNU General Public License as published by the Free\n\
1008 Software Foundation, either version 3 of the License, or (at your option)\n\
1009 any later version.\n\n"));
1010 puts(_("tpmtool is distributed in the hope that it will be useful, but WITHOUT ANY\n\
1011 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n\
1012 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n\
1014 puts(_("You should have received a copy of the GNU General Public License along\n\
1015 with this program. If not, see <http://www.gnu.org/licenses/>.\n"));
1017 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1018 puts(_("Enable debugging"));
1020 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1021 puts(_("Input file"));
1023 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1024 puts(_("Output file"));
1026 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1027 puts(_("Generate an RSA private-public key pair"));
1029 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1030 puts(_("Any generated key will be registered in the TPM"));
1032 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1033 puts(_("Any generated key will be a signing key"));
1035 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1036 puts(_("Any generated key will be a legacy key"));
1038 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1039 puts(_("Any registered key will be a user key"));
1041 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1042 puts(_("Any registred key will be a system key"));
1044 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1045 puts(_("Prints the public key of the provided key"));
1047 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1048 puts(_("Lists all stored keys in the TPM"));
1050 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1051 puts(_("Delete the key identified by the given URL (UUID)."));
1053 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1054 puts(_("Tests the signature operation of the provided object"));
1056 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1057 puts(_("Specify the security level [low, legacy, medium, high, ultra]."));
1059 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1060 puts(_("Specify the number of bits for key generate"));
1062 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1063 puts(_("Use the DER format for keys."));
1065 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1066 puts(_("Use DER format for output keys"));
1068 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1069 puts(_("display extended usage information and exit"));
1071 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1072 puts(_("extended usage information passed thru pager"));
1074 /* referenced via tpmtoolOptions.pOptDesc->pzText */
1075 puts(_("output version information and exit"));
1077 /* referenced via tpmtoolOptions.pzUsageTitle */
1078 puts(_("tpmtool - GnuTLS TPM tool\n\
1079 Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
1081 /* referenced via tpmtoolOptions.pzExplain */
1084 /* referenced via tpmtoolOptions.pzDetail */
1085 puts(_("Program that allows handling cryptographic data from the TPM chip.\n"));
1087 /* referenced via tpmtoolOptions.pzFullVersion */
1088 puts(_("tpmtool 3.3.27"));
1090 /* referenced via tpmtoolOptions.pzFullUsage */
1091 puts(_("<<<NOT-FOUND>>>"));
1093 /* referenced via tpmtoolOptions.pzShortUsage */
1094 puts(_("tpmtool [options]\n\
1095 tpmtool --help for usage instructions.\n"));
1096 /* LIBOPTS-MESSAGES: */
1097 #line 67 "../autoopts.c"
1098 puts(_("allocation of %d bytes failed\n"));
1099 #line 93 "../autoopts.c"
1100 puts(_("allocation of %d bytes failed\n"));
1101 #line 53 "../init.c"
1102 puts(_("AutoOpts function called without option descriptor\n"));
1103 #line 86 "../init.c"
1104 puts(_("\tThis exceeds the compiled library version: "));
1105 #line 84 "../init.c"
1106 puts(_("Automated Options Processing Error!\n"
1107 "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
1108 #line 80 "../autoopts.c"
1109 puts(_("realloc of %d bytes at 0x%p failed\n"));
1110 #line 88 "../init.c"
1111 puts(_("\tThis is less than the minimum library version: "));
1112 #line 121 "../version.c"
1113 puts(_("Automated Options version %s\n"
1114 "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
1115 #line 87 "../makeshell.c"
1116 puts(_("(AutoOpts bug): %s.\n"));
1117 #line 90 "../reset.c"
1118 puts(_("optionResetOpt() called, but reset-option not configured"));
1119 #line 295 "../usage.c"
1120 puts(_("could not locate the 'help' option"));
1121 #line 336 "../autoopts.c"
1122 puts(_("optionProcess() was called with invalid data"));
1123 #line 751 "../usage.c"
1124 puts(_("invalid argument type specified"));
1125 #line 598 "../find.c"
1126 puts(_("defaulted to option with optional arg"));
1127 #line 76 "../alias.c"
1128 puts(_("aliasing option is out of range."));
1129 #line 235 "../enum.c"
1130 puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
1131 #line 108 "../find.c"
1132 puts(_(" The following options match:\n"));
1133 #line 293 "../find.c"
1134 puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
1135 #line 161 "../check.c"
1136 puts(_("%s: Command line arguments required\n"));
1137 #line 43 "../alias.c"
1138 puts(_("%d %s%s options allowed\n"));
1139 #line 94 "../makeshell.c"
1140 puts(_("%s error %d (%s) calling %s for '%s'\n"));
1141 #line 306 "../makeshell.c"
1142 puts(_("interprocess pipe"));
1143 #line 168 "../version.c"
1144 puts(_("error: version option argument '%c' invalid. Use:\n"
1145 "\t'v' - version only\n"
1146 "\t'c' - version and copyright\n"
1147 "\t'n' - version and full copyright notice\n"));
1148 #line 58 "../check.c"
1149 puts(_("%s error: the '%s' and '%s' options conflict\n"));
1150 #line 217 "../find.c"
1151 puts(_("%s: The '%s' option has been disabled."));
1152 #line 430 "../find.c"
1153 puts(_("%s: The '%s' option has been disabled."));
1154 #line 38 "../alias.c"
1155 puts(_("-equivalence"));
1156 #line 469 "../find.c"
1157 puts(_("%s: illegal option -- %c\n"));
1158 #line 110 "../reset.c"
1159 puts(_("%s: illegal option -- %c\n"));
1160 #line 271 "../find.c"
1161 puts(_("%s: illegal option -- %s\n"));
1162 #line 755 "../find.c"
1163 puts(_("%s: illegal option -- %s\n"));
1164 #line 118 "../reset.c"
1165 puts(_("%s: illegal option -- %s\n"));
1166 #line 335 "../find.c"
1167 puts(_("%s: unknown vendor extension option -- %s\n"));
1168 #line 160 "../enum.c"
1169 puts(_(" or an integer from %d through %d\n"));
1170 #line 170 "../enum.c"
1171 puts(_(" or an integer from %d through %d\n"));
1172 #line 750 "../usage.c"
1173 puts(_("%s error: invalid option descriptor for %s\n"));
1174 #line 1084 "../usage.c"
1175 puts(_("%s error: invalid option descriptor for %s\n"));
1176 #line 385 "../find.c"
1177 puts(_("%s: invalid option name: %s\n"));
1178 #line 527 "../find.c"
1179 puts(_("%s: The '%s' option requires an argument.\n"));
1180 #line 156 "../autoopts.c"
1181 puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
1182 "\t'%s' and '%s'."));
1183 #line 94 "../check.c"
1184 puts(_("%s error: The %s option is required\n"));
1185 #line 632 "../find.c"
1186 puts(_("%s: The '%s' option cannot have an argument.\n"));
1187 #line 151 "../check.c"
1188 puts(_("%s: Command line arguments are not allowed.\n"));
1189 #line 536 "../save.c"
1190 puts(_("error %d (%s) creating %s\n"));
1191 #line 235 "../enum.c"
1192 puts(_("%s error: '%s' does not match any %s keywords.\n"));
1193 #line 93 "../reset.c"
1194 puts(_("%s error: The '%s' option requires an argument.\n"));
1195 #line 186 "../save.c"
1196 puts(_("error %d (%s) stat-ing %s\n"));
1197 #line 239 "../save.c"
1198 puts(_("error %d (%s) stat-ing %s\n"));
1199 #line 143 "../restore.c"
1200 puts(_("%s error: no saved option state\n"));
1201 #line 231 "../autoopts.c"
1202 puts(_("'%s' is not a command line option.\n"));
1203 #line 113 "../time.c"
1204 puts(_("%s error: '%s' is not a recognizable date/time.\n"));
1205 #line 131 "../save.c"
1206 puts(_("'%s' not defined\n"));
1207 #line 50 "../time.c"
1208 puts(_("%s error: '%s' is not a recognizable time duration.\n"));
1209 #line 92 "../check.c"
1210 puts(_("%s error: The %s option must appear %d times.\n"));
1211 #line 165 "../numeric.c"
1212 puts(_("%s error: '%s' is not a recognizable number.\n"));
1213 #line 201 "../enum.c"
1214 puts(_("%s error: %s exceeds %s keyword count\n"));
1215 #line 333 "../usage.c"
1216 puts(_("Try '%s %s' for more information.\n"));
1217 #line 45 "../alias.c"
1218 puts(_("one %s%s option allowed\n"));
1219 #line 208 "../makeshell.c"
1220 puts(_("standard output"));
1221 #line 943 "../makeshell.c"
1222 puts(_("standard output"));
1223 #line 277 "../usage.c"
1224 puts(_("standard output"));
1225 #line 418 "../usage.c"
1226 puts(_("standard output"));
1227 #line 628 "../usage.c"
1228 puts(_("standard output"));
1229 #line 175 "../version.c"
1230 puts(_("standard output"));
1231 #line 277 "../usage.c"
1232 puts(_("standard error"));
1233 #line 418 "../usage.c"
1234 puts(_("standard error"));
1235 #line 628 "../usage.c"
1236 puts(_("standard error"));
1237 #line 175 "../version.c"
1238 puts(_("standard error"));
1239 #line 208 "../makeshell.c"
1241 #line 943 "../makeshell.c"
1243 #line 276 "../usage.c"
1245 #line 417 "../usage.c"
1247 #line 627 "../usage.c"
1249 #line 174 "../version.c"
1251 #line 60 "../numeric.c"
1252 puts(_("%s error: %s option value %ld is out of range.\n"));
1253 #line 44 "../check.c"
1254 puts(_("%s error: %s option requires the %s option\n"));
1255 #line 130 "../save.c"
1256 puts(_("%s warning: cannot save options - %s not regular file\n"));
1257 #line 185 "../save.c"
1258 puts(_("%s warning: cannot save options - %s not regular file\n"));
1259 #line 238 "../save.c"
1260 puts(_("%s warning: cannot save options - %s not regular file\n"));
1261 #line 257 "../save.c"
1262 puts(_("%s warning: cannot save options - %s not regular file\n"));
1263 #line 535 "../save.c"
1264 puts(_("%s warning: cannot save options - %s not regular file\n"));
1265 /* END-LIBOPTS-MESSAGES */
1268 #line 876 "../usage.c"
1269 puts(_("\t\t\t\t- an alternate for '%s'\n"));
1270 #line 1151 "../usage.c"
1271 puts(_("Version, usage and configuration options:"));
1272 #line 927 "../usage.c"
1273 puts(_("\t\t\t\t- default option for unnamed options\n"));
1274 #line 840 "../usage.c"
1275 puts(_("\t\t\t\t- disabled as '--%s'\n"));
1276 #line 1120 "../usage.c"
1277 puts(_(" --- %-14s %s\n"));
1278 #line 1118 "../usage.c"
1279 puts(_("This option has been disabled"));
1280 #line 867 "../usage.c"
1281 puts(_("\t\t\t\t- enabled by default\n"));
1282 #line 40 "../alias.c"
1283 puts(_("%s error: only "));
1284 #line 1197 "../usage.c"
1285 puts(_(" - examining environment variables named %s_*\n"));
1286 #line 168 "../file.c"
1287 puts(_("\t\t\t\t- file must not pre-exist\n"));
1288 #line 172 "../file.c"
1289 puts(_("\t\t\t\t- file must pre-exist\n"));
1290 #line 383 "../usage.c"
1291 puts(_("Options are specified by doubled hyphens and their name or by a single\n"
1292 "hyphen and the flag character.\n"));
1293 #line 921 "../makeshell.c"
1295 "= = = = = = = =\n\n"
1296 "This incarnation of genshell will produce\n"
1297 "a shell script to parse the options for %s:\n\n"));
1298 #line 167 "../enum.c"
1299 puts(_(" or an integer mask with any of the lower %d bits set\n"));
1300 #line 900 "../usage.c"
1301 puts(_("\t\t\t\t- is a set membership option\n"));
1302 #line 921 "../usage.c"
1303 puts(_("\t\t\t\t- must appear between %d and %d times\n"));
1304 #line 385 "../usage.c"
1305 puts(_("Options are specified by single or double hyphens and their name.\n"));
1306 #line 907 "../usage.c"
1307 puts(_("\t\t\t\t- may appear multiple times\n"));
1308 #line 894 "../usage.c"
1309 puts(_("\t\t\t\t- may not be preset\n"));
1310 #line 1312 "../usage.c"
1311 puts(_(" Arg Option-Name Description\n"));
1312 #line 1248 "../usage.c"
1313 puts(_(" Flg Arg Option-Name Description\n"));
1314 #line 1306 "../usage.c"
1315 puts(_(" Flg Arg Option-Name Description\n"));
1316 #line 1307 "../usage.c"
1318 #line 1313 "../usage.c"
1320 #line 390 "../usage.c"
1321 puts(_("The '-#<number>' option may omit the hash char\n"));
1322 #line 386 "../usage.c"
1323 puts(_("All arguments are named options.\n"));
1324 #line 974 "../usage.c"
1325 puts(_(" - reading file %s"));
1326 #line 412 "../usage.c"
1328 "Please send bug reports to: <%s>\n"));
1329 #line 100 "../version.c"
1331 "Please send bug reports to: <%s>\n"));
1332 #line 129 "../version.c"
1334 "Please send bug reports to: <%s>\n"));
1335 #line 906 "../usage.c"
1336 puts(_("\t\t\t\t- may NOT appear - preset only\n"));
1337 #line 947 "../usage.c"
1339 "The following option preset mechanisms are supported:\n"));
1340 #line 1195 "../usage.c"
1342 "The following option preset mechanisms are supported:\n"));
1343 #line 685 "../usage.c"
1344 puts(_("prohibits these options:\n"));
1345 #line 680 "../usage.c"
1346 puts(_("prohibits the option '%s'\n"));
1347 #line 81 "../numeric.c"
1348 puts(_("%s%ld to %ld"));
1349 #line 79 "../numeric.c"
1350 puts(_("%sgreater than or equal to %ld"));
1351 #line 75 "../numeric.c"
1352 puts(_("%s%ld exactly"));
1353 #line 68 "../numeric.c"
1354 puts(_("%sit must lie in one of the ranges:\n"));
1355 #line 68 "../numeric.c"
1356 puts(_("%sit must be in the range:\n"));
1357 #line 88 "../numeric.c"
1359 #line 66 "../numeric.c"
1360 puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
1361 #line 77 "../numeric.c"
1362 puts(_("%sless than or equal to %ld"));
1363 #line 393 "../usage.c"
1364 puts(_("Operands and options may be intermixed. They will be reordered.\n"));
1365 #line 655 "../usage.c"
1366 puts(_("requires the option '%s'\n"));
1367 #line 658 "../usage.c"
1368 puts(_("requires these options:\n"));
1369 #line 1324 "../usage.c"
1370 puts(_(" Arg Option-Name Req? Description\n"));
1371 #line 1318 "../usage.c"
1372 puts(_(" Flg Arg Option-Name Req? Description\n"));
1373 #line 168 "../enum.c"
1374 puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
1375 "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
1376 "will set them all. Multiple entries may be passed as an option\n"
1377 "argument list.\n"));
1378 #line 913 "../usage.c"
1379 puts(_("\t\t\t\t- may appear up to %d times\n"));
1380 #line 77 "../enum.c"
1381 puts(_("The valid \"%s\" option keywords are:\n"));
1382 #line 1155 "../usage.c"
1383 puts(_("The next option supports vendor supported extra options:"));
1384 #line 776 "../usage.c"
1385 puts(_("These additional options are:"));
1386 /* END-USAGE-TEXT */
1388 #endif /* uncompilable code */
1392 /* tpmtool-args.c ends here */