autoboot.h 1.0 KB

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