1 /*
2  * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef CMD_OPT_H
8 #define CMD_OPT_H
9 
10 #include <getopt.h>
11 
12 #define CMD_OPT_MAX_NUM			64
13 
14 /* Supported long command line option types */
15 enum {
16 	CMD_OPT_CERT,
17 	CMD_OPT_KEY,
18 	CMD_OPT_EXT
19 };
20 
21 /* Structure to define a command line option */
22 typedef struct cmd_opt_s {
23 	struct option long_opt;
24 	const char *help_msg;
25 } cmd_opt_t;
26 
27 /* Exported API*/
28 void cmd_opt_add(const cmd_opt_t *cmd_opt);
29 const struct option *cmd_opt_get_array(void);
30 const char *cmd_opt_get_name(int idx);
31 const char *cmd_opt_get_help_msg(int idx);
32 
33 #endif /* CMD_OPT_H */
34