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