summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-11-14 22:57:43 +0300
committerTom Rini <trini@konsulko.com>2019-12-03 02:25:02 +0300
commit288b29e44d30afd946724ac577125ea9f80c8aca (patch)
tree357715f6c9b5bf4202930c0604bc530a928611d9 /include
parent36bf446b642d5759981f5adf547b4a7aeb15eee3 (diff)
downloadu-boot-288b29e44d30afd946724ac577125ea9f80c8aca.tar.xz
common: Move command functions out of common.h
Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include')
-rw-r--r--include/command.h16
-rw-r--r--include/common.h17
2 files changed, 17 insertions, 16 deletions
diff --git a/include/command.h b/include/command.h
index f6170e7151..d1063774ce 100644
--- a/include/command.h
+++ b/include/command.h
@@ -199,6 +199,22 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size);
* @return 0 if OK, 1 for error
*/
int board_run_command(const char *cmdline);
+
+int run_command(const char *cmd, int flag);
+int run_command_repeatable(const char *cmd, int flag);
+
+/**
+ * Run a list of commands separated by ; or even \0
+ *
+ * Note that if 'len' is not -1, then the command does not need to be nul
+ * terminated, Memory will be allocated for the command in that case.
+ *
+ * @param cmd List of commands to run, each separated bu semicolon
+ * @param len Length of commands excluding terminator if known (-1 if not)
+ * @param flag Execution flags (CMD_FLAG_...)
+ * @return 0 on success, or != 0 on error.
+ */
+int run_command_list(const char *cmd, int len, int flag);
#endif /* __ASSEMBLY__ */
/*
diff --git a/include/common.h b/include/common.h
index c22eb63501..5bd778a4f4 100644
--- a/include/common.h
+++ b/include/common.h
@@ -3,7 +3,7 @@
* Common header file for U-Boot
*
* This file still includes quite a bit of stuff that should be in separate
- * headers like command.h. Please think before adding more things.
+ * headers. Please think before adding more things.
* Patches to remove things are welcome.
*
* (C) Copyright 2000-2009
@@ -66,21 +66,6 @@ void hang (void) __attribute__ ((noreturn));
/* common/main.c */
void main_loop (void);
-int run_command(const char *cmd, int flag);
-int run_command_repeatable(const char *cmd, int flag);
-
-/**
- * Run a list of commands separated by ; or even \0
- *
- * Note that if 'len' is not -1, then the command does not need to be nul
- * terminated, Memory will be allocated for the command in that case.
- *
- * @param cmd List of commands to run, each separated bu semicolon
- * @param len Length of commands excluding terminator if known (-1 if not)
- * @param flag Execution flags (CMD_FLAG_...)
- * @return 0 on success, or != 0 on error.
- */
-int run_command_list(const char *cmd, int len, int flag);
int checkflash(void);
int checkdram(void);