]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - include/command.h
fat ls: works again
[z180-stamp.git] / include / command.h
index 5e55e471e885dda39822bd07e696a82094169164..d7eccc932da18dbb624ce3186412f0729b627978 100644 (file)
@@ -80,8 +80,7 @@ cmd_process(uint_fast8_t flag, int argc, char * const argv[], uint_fast8_t *repe
 
 
 /* command.c */
-command_ret_t _do_help (cmd_tbl_t *cmd_start, cmd_tbl_t * cmdtp, uint_fast8_t flag, int argc, char * const argv[]);
-cmd_tbl_t *find_cmd (const char *cmd, cmd_tbl_t *table);
+command_ret_t do_help(cmd_tbl_t *cmdtp, uint_fast8_t flag, int argc, char * const argv[]);
 
 int cmd_tbl_item_count(cmd_tbl_t *p);
 command_ret_t cmd_usage(cmd_tbl_t *cmdtp);
@@ -125,8 +124,6 @@ static inline int bootm_maybe_autostart(cmd_tbl_t *cmdtp UNUSED, const char *cmd
 extern int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
                           char *const argv[]);
 
-extern command_ret_t do_reset(cmd_tbl_t *cmdtp, uint_fast8_t flag, int argc, char * const argv[]);
-
 /*
  * Command Flags:
  */
@@ -136,8 +133,10 @@ extern command_ret_t do_reset(cmd_tbl_t *cmdtp, uint_fast8_t flag, int argc, cha
 /*
  * Flags for command table:
  */
-#define CTBL_REPEAT                    0x01    /* command is repeatable        */
+#define CTBL_RPT                       0x01    /* command is repeatable        */
 #define CTBL_SUBCMD                    0x02    /* command has subcommands      */
+#define CTBL_SUBCMDAUTO                0x04    /* execute subcommands whithout prefix */
+#define CTBL_DBG                       0x08    /* command is  only for debugging */
 
 #ifdef CONFIG_AUTO_COMPLETE
 # define _CMD_COMPLETE(x) x,
@@ -169,6 +168,8 @@ extern command_ret_t do_reset(cmd_tbl_t *cmdtp, uint_fast8_t flag, int argc, cha
        CMD_TBL_ITEM_FULL(_name, _maxargs, _rep, _cmd,                             \
                                        _usage, _help, _subtbl, NULL)
 
+#define CMD_TBL_END(_table_start)      { .subcmd = _table_start }
+
 typedef command_ret_t (*do_cmd_t)(cmd_tbl_t *, uint_fast8_t, int, char * const []);
 
 extern  cmd_tbl_t cmd_tbl[];