1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
6 * Add to readline cmdline-editing by
8 * JinHua Luo, GuangDong Linux Center, <luo.jinhua@gd-linux.com>
19 * autoboot_keyed() - check whether keyed autoboot should be used
21 * This is only implemented for sandbox since other platforms don't have a way
22 * of controlling the feature at runtime.
24 * Return: true if enabled, false if not
26 bool autoboot_keyed(void);
29 * autoboot_set_keyed() - set whether keyed autoboot should be used
31 * @autoboot_keyed: true to enable the feature, false to disable
32 * Return: old value of the flag
34 bool autoboot_set_keyed(bool autoboot_keyed);
36 static inline bool autoboot_keyed(void)
38 /* There is no runtime flag, so just use the CONFIG */
39 return IS_ENABLED(CONFIG_AUTOBOOT_KEYED);
42 static inline bool autoboot_set_keyed(bool autoboot_keyed)
44 /* There is no runtime flag to set */
50 #ifdef CONFIG_AUTOBOOT
52 * bootdelay_process() - process the bootd delay
54 * Process the boot delay, boot limit, then get the value of either
55 * bootcmd, failbootcmd or altbootcmd depending on the current state.
56 * Return this command so it can be executed.
58 * Return: command to executed
60 const char *bootdelay_process(void);
63 * autoboot_command() - run the autoboot command
65 * If enabled, run the autoboot command returned from bootdelay_process().
66 * Also do the CONFIG_AUTOBOOT_MENUKEY processing if enabled.
68 * @cmd: Command to run
70 void autoboot_command(const char *cmd);
72 static inline const char *bootdelay_process(void)
77 static inline void autoboot_command(const char *s)