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