]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.sbin/sade/menus.c
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / usr.sbin / sade / menus.c
1 /*
2  * Copyright (c) 1995
3  *      Jordan Hubbard.  All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer,
10  *    verbatim and that no modifications are made prior to this
11  *    point in the file.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED.  IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
20  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22  * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
23  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  * SUCH DAMAGE.
27  *
28  */
29
30 #ifndef lint
31 static const char rcsid[] =
32   "$FreeBSD$";
33 #endif
34
35 #include "sade.h"
36
37 /* All the system menus go here.
38  *
39  * Hardcoded things like version number strings will disappear from
40  * these menus just as soon as I add the code for doing inline variable
41  * expansion.
42  */
43
44 DMenu MenuDiskDevices = {
45     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
46     "Select Drive(s)",
47     "Please select the drive, or drives, on which you wish to perform\n"
48     "this operation.  If you are attempting to install a boot partition\n"
49     "on a drive other than the first one or have multiple operating\n"
50     "systems on your machine, you will have the option to install a boot\n"
51     "manager later.  To select a drive, use the arrow keys to move to it\n"
52     "and press [SPACE] or [ENTER].  To de-select it, press it again.\n\n"
53     "Use [TAB] to get to the buttons and leave this menu.",
54     "Press F1 for important information regarding disk geometry!",
55     "drives",
56     { { NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0 } },
57 };
58
59 DMenu MenuMain = {
60     DMENU_NORMAL_TYPE,
61     "Disklabel and partitioning utility",
62     "This is a utility for partitioning and/or labelling your disks.",
63     "DISKUTIL",
64     "main",
65     { 
66 #ifdef WITH_SLICES
67       { "1 Partition",          "Managing disk partitions",     NULL, diskPartitionEditor, NULL, NULL, 0, 0, 0, 0 },
68 #endif
69       { "2 Label",              "Label allocated disk partitions",      NULL, diskLabelEditor, NULL, NULL, 0, 0, 0, 0 },
70       { NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0 }
71     },
72 };
73
74 #if defined(__i386__) || defined(__amd64__)
75 #ifdef PC98
76 /* IPL type menu */
77 DMenu MenuIPLType = {
78     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
79     "overwrite me",             /* will be disk specific label */
80     "If you want a FreeBSD Boot Manager, select \"BootMgr\".  If you would\n"
81     "prefer your Boot Manager to remain untouched then select \"None\".\n\n",
82     "Press F1 to read about drive setup",
83     "drives",
84     { { "BootMgr",      "Install the FreeBSD Boot Manager",
85         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, 0, 0, 0, 0 },
86       { "None",         "Leave the IPL untouched",
87         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 },
88       { NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0 } },
89 };
90 #else
91 /* MBR type menu */
92 DMenu MenuMBRType = {
93     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
94     "overwrite me",             /* will be disk specific label */
95     "FreeBSD comes with a boot manager that allows you to easily\n"
96     "select between FreeBSD and any other operating systems on your machine\n"
97     "at boot time.  If you have more than one drive and want to boot\n"
98     "from the second one, the boot manager will also make it possible\n"
99     "to do so (limitations in the PC BIOS usually prevent this otherwise).\n"
100     "If you have other operating systems installed and would like a choice when\n"
101     "booting, choose \"BootMgr\". If you would prefer to keep your existing\n"
102     "boot manager, select \"None\".\n\n",
103     "",
104     "drives",
105     { { "Standard",     "Install a standard MBR (non-interactive boot manager)",
106         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 },
107       { "BootMgr",      "Install the FreeBSD boot manager",
108         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 0 },
109       { "None",         "Do not install a boot manager",
110         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 2 },
111       { NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0 } }
112 };
113 #endif /* PC98 */
114 #endif /* __i386__ */
115
116