bootmenu.h revision 1.1
11.1Sad/*	$NetBSD: bootmenu.h,v 1.1 2008/11/25 13:23:54 ad Exp $	*/
21.1Sad
31.1Sad/*-
41.1Sad * Copyright (c) 2008 The NetBSD Foundation, Inc.
51.1Sad * All rights reserved.
61.1Sad *
71.1Sad * Redistribution and use in source and binary forms, with or without
81.1Sad * modification, are permitted provided that the following conditions
91.1Sad * are met:
101.1Sad * 1. Redistributions of source code must retain the above copyright
111.1Sad *    notice, this list of conditions and the following disclaimer.
121.1Sad * 2. Redistributions in binary form must reproduce the above copyright
131.1Sad *    notice, this list of conditions and the following disclaimer in the
141.1Sad *    documentation and/or other materials provided with the distribution.
151.1Sad *
161.1Sad * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
171.1Sad * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
181.1Sad * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
191.1Sad * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
201.1Sad * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
211.1Sad * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
221.1Sad * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
231.1Sad * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
241.1Sad * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
251.1Sad * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
261.1Sad * POSSIBILITY OF SUCH DAMAGE.
271.1Sad */
281.1Sad
291.1Sad#ifndef _BOOTMENU_H
301.1Sad#define _BOOTMENU_H
311.1Sad
321.1Sad#define BOOTCONF "boot.cfg"
331.1Sad#define MAXMENU 20
341.1Sad#define MAXBANNER 12
351.1Sad#define COMMAND_SEPARATOR ';'
361.1Sad
371.1Sadvoid parsebootconf(const char *);
381.1Sadvoid doboottypemenu(void);
391.1Sadint atoi(const char *);
401.1Sad
411.1Sadstruct bootconf_def {
421.1Sad	char *banner[MAXBANNER];	/* Banner text */
431.1Sad	char *command[MAXMENU];		/* Menu commands per entry*/
441.1Sad	char *consdev;			/* Console device */
451.1Sad	int def;			/* Default menu option */
461.1Sad	char *desc[MAXMENU];		/* Menu text per entry */
471.1Sad	int nummenu;			/* Number of menu items */
481.1Sad	int timeout;		 	/* Timeout in seconds */
491.1Sad	int menuformat;			/* Print letters instead of numbers? */
501.1Sad} extern bootconf;
511.1Sad
521.1Sad#endif /* !_BOOTMENU_H */
53