X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fcommand.h;h=a8a153cb0fca3b9bde3b503aef719388d335d0fb;hb=cf7e399fb35b3aea90a27d1df72f45f5d6156204;hp=4a27e9724768c8b5cf916684e9bf01770f32256d;hpb=1ca9950b46c0aded14c80f728f6238625d723a19;p=oweals%2Fu-boot.git diff --git a/include/command.h b/include/command.h index 4a27e97247..a8a153cb0f 100644 --- a/include/command.h +++ b/include/command.h @@ -45,7 +45,7 @@ struct cmd_tbl_s { /* Implementation function */ int (*cmd)(struct cmd_tbl_s *, int, int, char *[]); char *usage; /* Usage message (short) */ -#ifdef CFG_LONGHELP +#ifdef CONFIG_SYS_LONGHELP char *help; /* Help message (long) */ #endif #ifdef CONFIG_AUTO_COMPLETE @@ -62,6 +62,7 @@ extern cmd_tbl_t __u_boot_cmd_end; /* common/command.c */ cmd_tbl_t *find_cmd(const char *cmd); +cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len); #ifdef CONFIG_AUTO_COMPLETE extern void install_auto_complete(void); @@ -78,6 +79,15 @@ extern int cmd_auto_complete(const char *const prompt, char *buf, int *np, int * typedef void command_t (cmd_tbl_t *, int, int, char *[]); +#if defined(CONFIG_CMD_MEMORY) \ + || defined(CONFIG_CMD_I2C) \ + || defined(CONFIG_CMD_ITEST) \ + || defined(CONFIG_CMD_PCI) \ + || defined(CONFIG_CMD_PORTIO) +#define CMD_DATA_SIZE +extern int cmd_get_data_size(char* arg, int default_size); +#endif + #endif /* __ASSEMBLY__ */ /* @@ -88,16 +98,22 @@ typedef void command_t (cmd_tbl_t *, int, int, char *[]); #define Struct_Section __attribute__ ((unused,section (".u_boot_cmd"))) -#ifdef CFG_LONGHELP +#ifdef CONFIG_SYS_LONGHELP #define U_BOOT_CMD(name,maxargs,rep,cmd,usage,help) \ cmd_tbl_t __u_boot_cmd_##name Struct_Section = {#name, maxargs, rep, cmd, usage, help} +#define U_BOOT_CMD_MKENT(name,maxargs,rep,cmd,usage,help) \ +{#name, maxargs, rep, cmd, usage, help} + #else /* no long help info */ #define U_BOOT_CMD(name,maxargs,rep,cmd,usage,help) \ cmd_tbl_t __u_boot_cmd_##name Struct_Section = {#name, maxargs, rep, cmd, usage} -#endif /* CFG_LONGHELP */ +#define U_BOOT_CMD_MKENT(name,maxargs,rep,cmd,usage,help) \ +{#name, maxargs, rep, cmd, usage} + +#endif /* CONFIG_SYS_LONGHELP */ #endif /* __COMMAND_H */