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