autoboot.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2000
  4. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  5. *
  6. * Add to readline cmdline-editing by
  7. * (C) Copyright 2005
  8. * JinHua Luo, GuangDong Linux Center, <luo.jinhua@gd-linux.com>
  9. */
  10. #ifndef __AUTOBOOT_H
  11. #define __AUTOBOOT_H
  12. #ifdef CONFIG_AUTOBOOT
  13. /**
  14. * bootdelay_process() - process the bootd delay
  15. *
  16. * Process the boot delay, boot limit, then get the value of either
  17. * bootcmd, failbootcmd or altbootcmd depending on the current state.
  18. * Return this command so it can be executed.
  19. *
  20. * @return command to executed
  21. */
  22. const char *bootdelay_process(void);
  23. /**
  24. * autoboot_command() - run the autoboot command
  25. *
  26. * If enabled, run the autoboot command returned from bootdelay_process().
  27. * Also do the CONFIG_AUTOBOOT_MENUKEY processing if enabled.
  28. *
  29. * @cmd: Command to run
  30. */
  31. void autoboot_command(const char *cmd);
  32. #else
  33. static inline const char *bootdelay_process(void)
  34. {
  35. return NULL;
  36. }
  37. static inline void autoboot_command(const char *s)
  38. {
  39. }
  40. #endif
  41. #endif