- Sync with trunk up to r46941.
[reactos.git] / boot / freeldr / freeldr / options.c
1 /*
2 * FreeLoader
3 * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #include <freeldr.h>
21
22 PCSTR OptionsMenuList[] =
23 {
24 "Safe Mode",
25 "Safe Mode with Networking",
26 "Safe Mode with Command Prompt",
27
28 "SEPARATOR",
29
30 "Enable Boot Logging",
31 "Enable VGA Mode",
32 "Last Known Good Configuration",
33 "Directory Services Restore Mode",
34 "Debugging Mode",
35
36 "SEPARATOR",
37
38 #ifdef HAS_OPTION_MENU_CUSTOM_BOOT
39 "Custom Boot",
40 #endif
41 #ifdef HAS_OPTION_MENU_REBOOT
42 "Reboot",
43 #endif
44 };
45
46 enum OptionMenuItems
47 {
48 SAFE_MODE = 0,
49 SAFE_MODE_WITH_NETWORKING = 1,
50 SAFE_MODE_WITH_COMMAND_PROMPT = 2,
51
52 SEPARATOR1 = 3,
53
54 ENABLE_BOOT_LOGGING = 4,
55 ENABLE_VGA_MODE = 5,
56 LAST_KNOWN_GOOD_CONFIGURATION = 6,
57 DIRECTORY_SERVICES_RESTORE_MODE = 7,
58 DEBUGGING_MODE = 8,
59
60 SEPARATOR2 = 9,
61
62 #ifdef HAS_OPTION_MENU_CUSTOM_BOOT
63 CUSTOM_BOOT = 10,
64 #endif
65 #ifdef HAS_OPTION_MENU_REBOOT
66 REBOOT = 11,
67 #endif
68 };
69
70 ULONG OptionsMenuItemCount = sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]);
71
72 VOID DoOptionsMenu(VOID)
73 {
74 ULONG SelectedMenuItem;
75
76 if (!UiDisplayMenu(OptionsMenuList, OptionsMenuItemCount, 0, -1, &SelectedMenuItem, TRUE, NULL))
77 {
78 // The user pressed ESC
79 return;
80 }
81
82 // Clear the backdrop
83 UiDrawBackdrop();
84
85 switch (SelectedMenuItem)
86 {
87 case SAFE_MODE:
88 break;
89 case SAFE_MODE_WITH_NETWORKING:
90 break;
91 case SAFE_MODE_WITH_COMMAND_PROMPT:
92 break;
93 //case SEPARATOR1:
94 // break;
95 case ENABLE_BOOT_LOGGING:
96 break;
97 case ENABLE_VGA_MODE:
98 break;
99 case LAST_KNOWN_GOOD_CONFIGURATION:
100 break;
101 case DIRECTORY_SERVICES_RESTORE_MODE:
102 break;
103 case DEBUGGING_MODE:
104 break;
105 //case SEPARATOR2:
106 // break;
107 #ifdef HAS_OPTION_MENU_CUSTOM_BOOT
108 case CUSTOM_BOOT:
109 OptionMenuCustomBoot();
110 break;
111 #endif
112 #ifdef HAS_OPTION_MENU_REBOOT
113 case REBOOT:
114 OptionMenuReboot();
115 break;
116 #endif
117 }
118 }
119