summaryrefslogtreecommitdiff
path: root/include/command.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-03-31 10:04:23 -0400
committerTom Rini <trini@konsulko.com>2023-03-31 10:04:23 -0400
commitb8deed53fe6a55ef76b4f9038bb419a9c853a9fa (patch)
tree2f0cdb8f35d7c51611417bab680583a65bf21306 /include/command.h
parentf1617e99b933d2c3ecb381954148284d37bf922e (diff)
parentf98b112f9e0516fc9333611d1228d0b634aa353e (diff)
Merge branch '2023-03-30-assorted-general-upates' into next
- RTC cleanups / improvements, run_commandf() cleanups, fs bugfixes, socrates config fix, PCI MPS support, GPIO improvements, other code cleanups
Diffstat (limited to 'include/command.h')
-rw-r--r--include/command.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/command.h b/include/command.h
index 1b018cb98e7..c4e3170967d 100644
--- a/include/command.h
+++ b/include/command.h
@@ -13,6 +13,8 @@
#include <env.h>
#include <linker_lists.h>
+#include <linux/compiler_attributes.h>
+
#ifndef NULL
#define NULL 0
#endif
@@ -260,12 +262,17 @@ int run_command_repeatable(const char *cmd, int flag);
/**
* run_commandf() - Run a command created by a format string
*
- * The command cannot be larger than 127 characters
- *
* @fmt: printf() format string
* @...: Arguments to use (flag is always 0)
+ *
+ * The command cannot be larger than (CONFIG_SYS_CBSIZE - 1) characters.
+ *
+ * Return:
+ * Returns 0 on success, -EIO if internal output error occurred, -ENOSPC in
+ * case of 'fmt' string truncation, or != 0 on error, specific for
+ * run_command().
*/
-int run_commandf(const char *fmt, ...);
+int run_commandf(const char *fmt, ...) __printf(1, 2);
/**
* Run a list of commands separated by ; or even \0