xref: /titanic_44/usr/src/cmd/format/menu.h (revision 24db46411fd54f70c35b94bb952eb7ba040e43b4)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1991-2003 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_MENU_H
28 #define	_MENU_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * This file contains declarations pertaining to the menus.
38  */
39 /*
40  * This structure defines a menu entry.  It consists of a command
41  * name, the function to run the command, and a function to determine
42  * if the menu entry is enabled at this particular state in the program.
43  * The descriptive text that appears after the command name in the menus
44  * is actually part of the command name to the program.  Since
45  * abbreviation is allowed for commands, the user never notices the
46  * extra characters.
47  */
48 struct menu_item {
49 	char	*menu_cmd;
50 	int	(*menu_func)();
51 	int	(*menu_state)();
52 };
53 
54 
55 /*
56  *	Prototypes for ANSI C compilers
57  */
58 
59 char	**create_menu_list(struct menu_item *menu);
60 void	display_menu_list(char **list);
61 void	redisplay_menu_list(char **list);
62 void	run_menu(struct menu_item *, char *, char *, int);
63 int	true(void);
64 int	embedded_scsi(void);
65 int	not_embedded_scsi(void);
66 int	not_scsi(void);
67 int	not_efi(void);
68 int	disp_expert_change_expert_efi(void);
69 int	disp_all_change_expert_efi(void);
70 int	scsi(void);
71 int	scsi_expert(void);
72 int	expert(void);
73 int	developer(void);
74 int	support_fdisk_on_sparc(void);
75 
76 #ifdef	__cplusplus
77 }
78 #endif
79 
80 #endif	/* _MENU_H */
81