#ifndef __BOOTMENU_H__
#define __BOOTMENU_H__

#include <linux/list.h>

#define TYPE_FLASH	0
#define TYPE_SDCARD	1
#define TYPE_CFCARD	2
#define TYPE_USBCARD	3
#define TYPE_TFTP	4
#define TYPE_YMODEM	5
#define TYPE_EPROM	6

#define TYPE_CARD 	10 /* Either SDCARD of CFCARD (fat doesn't know the difference) */

#define FILE_NAME_MAX_LEN CONFIG_SYS_CBSIZE
typedef struct
{
	struct list_head list;
	u8 fs_type;
	char file_name[FILE_NAME_MAX_LEN+1];
	long file_len;
} boot_file;

void	bootmenu(void);

void	bootmenu_file_add(long, const char *, u8, u8, int);
int	bootmenu_one_off_boot(int, int);
int	bootmenu_set_sdcard_boot(int);
int	bootmenu_set_cfcard_boot(int);
int	bootmenu_set_usbcard_boot(int);
int	bootmenu_set_flash_boot(int);
int	bootmenu_set_tftp_boot(int);
void	bootmenu_set_default_boot(void);
int	bootmenu_set_ymodem_boot(int);
int	bootmenu_set_eprom_boot(int);
int	bootmenu_stricmp (const char *, const char *t);
void	bootmenu_printf (const char *, ...);
void	bootmenu_load_file(int);

int	bootmenu_get_string(char *, int max);
int	bootmenu_string_prompt(char *, char *, char *, int);
int	bootmenu_get_int(u32 *);
void	bootmenu_tftp_error(char *, u32);
void	bootmenu_tftp_timeout(int);
void	bootmenu_system_boot(void);
void	bootmenu_set_system_boot(boot_file *, int);
void	bootmenu_system_update(void);
void	bootmenu_restore_default_settings(int);
void	bootmenu_baudrate(void);
int	bootmenu_special(void);
int	bootmenu_sysinfo(void);
int	bootmenu_developer(void);
void	bootmenu_print_checksums(void *location, u32 size);

#endif
