1 // SPDX-License-Identifier: GPL-2.0
4 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
5 * Use is subject to license terms.
7 * Copyright (c) 2014, 2017, Intel Corporation.
12 * This file is part of Lustre, http://www.lustre.org/
14 * libcfs/include/libcfs/util/parser.h
16 * A command line parser.
27 #define CMD_COMPLETE 0
28 #define CMD_INCOMPLETE 1
33 typedef struct parser_cmd {
35 int (* pc_func)(int, char **);
36 struct parser_cmd * pc_sub_cmd;
40 typedef struct argcmd {
42 int (*ac_func)(int, char **);
46 typedef struct network {
52 int cfs_parser(int argc, char **argv, command_t cmds[]);