ReactOS 0.4.16-dev-2610-ge2c92c0
bootmgr.c
Go to the documentation of this file.
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/* INCLUDES *******************************************************************/
21
22#include <freeldr.h>
23
24#include <debug.h>
26
27/* GLOBALS ********************************************************************/
28
29typedef VOID
31 _Inout_ OperatingSystemItem* OperatingSystem);
32
33typedef VOID
35 _Inout_ OperatingSystemItem* OperatingSystem);
36
37static VOID
39 _Inout_ OperatingSystemItem* OperatingSystem)
40{
41 EditCustomBootReactOS(OperatingSystem, TRUE);
42}
43
44static VOID
46 _Inout_ OperatingSystemItem* OperatingSystem)
47{
48 EditCustomBootReactOS(OperatingSystem, FALSE);
49}
50
51typedef struct _OS_LOADING_METHOD
52{
58
59static const OS_LOADING_METHOD
61{
62#if defined(_M_IX86) || defined(_M_AMD64)
63#ifndef UEFIBOOT
64 {"BootSector", EditCustomBootSector, NULL, LoadAndBootSector},
65 {"Linux" , EditCustomBootLinux , NULL, LoadAndBootLinux },
66#endif
67#endif
68#ifdef _M_IX86
69 {"WindowsNT40" , EditCustomBootNTOS, NULL, LoadAndBootWindows},
70#endif
75};
76
77/* FUNCTIONS ******************************************************************/
78
79#ifdef HAS_DEPRECATED_OPTIONS
83VOID
85 _In_ PCSTR MsgFmt,
86 ...)
87{
88 va_list ap;
89 CHAR msgString[300];
90
91 /* If the user didn't cancel the timeout, don't display the warning */
92 if (GetBootMgrInfo()->TimeOut >= 0)
93 return;
94
95 va_start(ap, MsgFmt);
96 RtlStringCbVPrintfA(msgString, sizeof(msgString),
97 MsgFmt, ap);
98 va_end(ap);
99
101 " WARNING!\n"
102 "\n"
103 "%s\n"
104 "\n"
105 "Should you need assistance, please contact ReactOS developers\n"
106 "on the official ReactOS Mattermost server <chat.reactos.org>.",
107 msgString);
108}
109#endif // HAS_DEPRECATED_OPTIONS
110
111static const OS_LOADING_METHOD*
113 _In_ ULONG_PTR SectionId)
114{
115 ULONG i;
116 CHAR BootType[80];
117
118 /* The operating system section has been opened by InitOperatingSystemList() */
119 ASSERT(SectionId != 0);
120
121 /* Try to read the boot type. We must have the value (it
122 * has been possibly added by InitOperatingSystemList()) */
123 *BootType = ANSI_NULL;
124 IniReadSettingByName(SectionId, "BootType", BootType, sizeof(BootType));
125 ASSERT(*BootType);
126
128#ifdef HAS_DEPRECATED_OPTIONS
129 if ((_stricmp(BootType, "Drive") == 0) ||
130 (_stricmp(BootType, "Partition") == 0))
131 {
132 /* Display the deprecation warning message */
134 "The '%s' configuration you are booting into is no longer\n"
135 "supported and will be removed in future FreeLoader versions.\n"
136 "\n"
137 "Please edit FREELDR.INI to replace all occurrences of\n"
138 "\n"
139 " %*s to:\n"
140 " BootType=%s ------> BootType=BootSector",
141 BootType,
142 strlen(BootType), "", // Indentation
143 BootType);
144
145 /* Type fixup */
146 strcpy(BootType, "BootSector");
147 if (!IniModifySettingValue(SectionId, "BootType", BootType))
148 {
149 ERR("Could not fixup the BootType entry for OS '%s', ignoring.\n",
150 ((PINI_SECTION)SectionId)->SectionName);
151 }
152 }
153#endif // HAS_DEPRECATED_OPTIONS
155
156 /* Find the suitable OS loading method */
157 for (i = 0; ; ++i)
158 {
160 {
161 UiMessageBox("Unknown boot entry type '%s'", BootType);
162 return NULL;
163 }
164 if (_stricmp(BootType, OSLoadingMethods[i].BootType) == 0)
165 return &OSLoadingMethods[i];
166 }
168}
169
177static PCHAR*
179 _In_ PCSTR LoadIdentifier,
180 _In_ ULONG_PTR SectionId,
181 _Out_ PULONG pArgc)
182{
183 SIZE_T Size;
184 ULONG Count;
185 ULONG i;
186 ULONG Argc;
187 PCHAR* Argv;
188 PCHAR* Args;
189 PCHAR SettingName, SettingValue;
190 PCCHAR BootPath = FrLdrGetBootPath();
191
192 *pArgc = 0;
193
194 ASSERT(SectionId != 0);
195
196 /* Normalize LoadIdentifier to make subsequent tests simpler */
197 if (LoadIdentifier && !*LoadIdentifier)
198 LoadIdentifier = NULL;
199
200 /* Count the number of operating systems in the section */
201 Count = IniGetNumSectionItems(SectionId);
202
203 /*
204 * The argument vector contains the program name, the SystemPartition,
205 * the LoadIdentifier (optional), and the items in the OS section.
206 * For POSIX compliance, a terminating NULL pointer (not counted in Argc)
207 * is appended, such that Argv[Argc] == NULL.
208 */
209 Argc = 2 + (LoadIdentifier ? 1 : 0) + Count;
210
211 /* Calculate the total size needed for the string buffer of the argument vector */
212 Size = 0;
213 /* i == 0: Program name */
214 // TODO: Provide one in the future...
215 /* i == 1: SystemPartition : from where FreeLdr has been started */
216 Size += (strlen("SystemPartition=") + strlen(BootPath) + 1) * sizeof(CHAR);
217 /* i == 2: LoadIdentifier : ASCII string that may be used
218 * to associate an identifier with a set of load parameters */
219 if (LoadIdentifier)
220 {
221 Size += (strlen("LoadIdentifier=") + strlen(LoadIdentifier) + 1) * sizeof(CHAR);
222 }
223 /* The section items */
224 for (i = 0; i < Count; ++i)
225 {
226 Size += IniGetSectionSettingNameSize(SectionId, i); // Counts also the NULL-terminator, that we transform into the '=' sign separator.
227 Size += IniGetSectionSettingValueSize(SectionId, i); // Counts also the NULL-terminator.
228 }
229 Size += sizeof(ANSI_NULL); // Final NULL-terminator.
230
231 /* Allocate memory to hold the argument vector: pointers and string buffer */
232 Argv = FrLdrHeapAlloc((Argc + 1) * sizeof(PCHAR) + Size, TAG_STRING);
233 if (!Argv)
234 return NULL;
235
236 /* Initialize the argument vector: loop through the section and copy the Key=Value options */
237 SettingName = (PCHAR)((ULONG_PTR)Argv + ((Argc + 1) * sizeof(PCHAR)));
238 Args = Argv;
239 /* i == 0: Program name */
240 *Args++ = NULL; // TODO: Provide one in the future...
241 /* i == 1: SystemPartition */
242 {
243 strcpy(SettingName, "SystemPartition=");
244 strcat(SettingName, BootPath);
245
246 *Args++ = SettingName;
247 SettingName += (strlen(SettingName) + 1);
248 }
249 /* i == 2: LoadIdentifier */
250 if (LoadIdentifier)
251 {
252 strcpy(SettingName, "LoadIdentifier=");
253 strcat(SettingName, LoadIdentifier);
254
255 *Args++ = SettingName;
256 SettingName += (strlen(SettingName) + 1);
257 }
258 /* The section items */
259 for (i = 0; i < Count; ++i)
260 {
261 Size = IniGetSectionSettingNameSize(SectionId, i);
262 SettingValue = SettingName + Size;
263 IniReadSettingByNumber(SectionId, i,
264 SettingName, Size,
265 SettingValue, IniGetSectionSettingValueSize(SectionId, i));
266 SettingName[Size - 1] = '=';
267
268 *Args++ = SettingName;
269 SettingName += (strlen(SettingName) + 1);
270 }
271 /* Terminating NULL pointer */
272 *Args = NULL;
273
274#if DBG
275 /* Dump the argument vector for debugging */
276 for (i = 0; i < Argc; ++i)
277 {
278 TRACE("Argv[%lu]: '%s'\n", i, Argv[i]);
279 }
280#endif
281
282 *pArgc = Argc;
283 return Argv;
284}
285
286VOID
288 _In_ OperatingSystemItem* OperatingSystem)
289{
290 ULONG_PTR SectionId = OperatingSystem->SectionId;
291 const OS_LOADING_METHOD* OSLoadingMethod;
292 ULONG Argc;
293 PCHAR* Argv;
294
295 /* Find the suitable OS loader to start */
296 OSLoadingMethod = GetOSLoadingMethod(SectionId);
297 if (!OSLoadingMethod)
298 return;
299 ASSERT(OSLoadingMethod->OsLoader);
300
301 /* Build the ARC-compatible argument vector */
302 Argv = BuildArgvForOsLoader(OperatingSystem->LoadIdentifier, SectionId, &Argc);
303 if (!Argv)
304 return; // Unexpected failure.
305
306#ifdef _M_IX86
307#ifndef UEFIBOOT
308 /* Install the drive mapper according to this section drive mappings */
309 DriveMapMapDrivesInSection(SectionId);
310#endif
311#endif
312
313 /* Start the OS loader */
314 OSLoadingMethod->OsLoader(Argc, Argv, NULL);
316}
317
318#ifdef HAS_OPTION_MENU_EDIT_CMDLINE
319VOID
320EditOperatingSystemEntry(
321 _Inout_ OperatingSystemItem* OperatingSystem)
322{
323 /* Find the suitable OS entry editor and open it */
324 const OS_LOADING_METHOD* OSLoadingMethod =
325 GetOSLoadingMethod(OperatingSystem->SectionId);
326 if (OSLoadingMethod)
327 {
328 ASSERT(OSLoadingMethod->EditOsEntry);
329 OSLoadingMethod->EditOsEntry(OperatingSystem);
330 }
331}
332#endif // HAS_OPTION_MENU_EDIT_CMDLINE
333
336 IN ULONG KeyPress,
337 IN ULONG SelectedMenuItem,
339{
340 OperatingSystemItem* OperatingSystem =
341 &((OperatingSystemItem*)Context)[SelectedMenuItem];
342
343 /* Any key-press cancels the global timeout */
344 GetBootMgrInfo()->TimeOut = -1;
345
346 switch (KeyPress)
347 {
348#if 0
349 /* Help */
350 case KEY_F1:
351 DoHelp();
352 return TRUE;
353#endif
354
355 /* FreeLdr Setup menu */
356 case KEY_F2:
357 FreeLdrSetupMenu(OperatingSystem);
358 return TRUE;
359
360 /* Boot entry-specific advanced boot menu */
361 case KEY_F5:
362 case KEY_F8:
363 {
364 /* Find the suitable OS menu procedure and display it */
365 const OS_LOADING_METHOD* OSLoadingMethod =
366 GetOSLoadingMethod(OperatingSystem->SectionId);
367 if (OSLoadingMethod && OSLoadingMethod->OsMenu)
368 OSLoadingMethod->OsMenu(OperatingSystem);
369 DisplayBootTimeOptions(OperatingSystem); // TODO: Do this also elsewhere
370 return TRUE;
371 }
372
373#ifdef HAS_OPTION_MENU_EDIT_CMDLINE
374 /* Boot entry editor */
375 case KEY_F10:
376 EditOperatingSystemEntry(OperatingSystem);
377 return TRUE;
378#endif
379
380 default:
381 /* We didn't handle the key */
382 return FALSE;
383 }
384}
385
387{
388 OperatingSystemItem* OperatingSystemList;
389 PCSTR* OperatingSystemDisplayNames;
390 ULONG OperatingSystemCount;
391 ULONG SelectedOperatingSystem;
392 ULONG i;
393
394#ifdef _M_IX86
395#ifndef UEFIBOOT
396 /* Load additional SCSI driver (if any) */
398 UiMessageBoxCritical("Unable to load additional boot device drivers.");
399#endif
400#endif
401
402 /* Open FREELDR.INI and load the global FreeLoader settings */
403 if (!IniFileInitialize())
404 UiMessageBoxCritical("Error initializing .ini file.");
406#if 0
407 if (FALSE)
408 UiMessageBoxCritical("Could not load global FreeLoader settings.");
409#endif
410
411 /* Debugger main initialization */
413
414 /* UI main initialization. If it fails, fall back to default UI. */
415 if (!UiInitialize(TRUE))
416 UiMessageBoxCritical("Unable to initialize UI.");
417
418 /* If no FREELDR.INI, skip everything else and fall back to the FreeLdr setup menu */
420 goto Fallback;
421
422 /* Find all the message box settings and run them */
424
425 /* Retrieve the list of boot entries */
426 OperatingSystemList = InitOperatingSystemList(&OperatingSystemCount,
427 &SelectedOperatingSystem);
428 if (!OperatingSystemList)
429 {
430 UiMessageBox("There are no operating systems listed in freeldr.ini.");
431 goto Fallback;
432 }
433 ASSERT(OperatingSystemCount != 0);
434
435 /* Create list of display names */
436 OperatingSystemDisplayNames = FrLdrTempAlloc(sizeof(PCSTR) * OperatingSystemCount, 'mNSO');
437 if (!OperatingSystemDisplayNames)
438 goto Fallback;
439
440 for (i = 0; i < OperatingSystemCount; i++)
441 {
442 OperatingSystemDisplayNames[i] = OperatingSystemList[i].LoadIdentifier;
443 }
444
445 for (;;)
446 {
447 /* Redraw the backdrop, but don't overwrite boot options */
449 DisplayBootTimeOptions(&OperatingSystemList[SelectedOperatingSystem]);
450
451 /* Show the operating system list menu */
452 if (!UiDisplayMenu("Please select the operating system to start:",
453 /* The string is 80 characters long; don't make it longer! */
454 "Press F8 for troubleshooting and advanced startup options."
455 " F2: FreeLdr SETUP",
456 OperatingSystemDisplayNames,
457 OperatingSystemCount,
458 SelectedOperatingSystem,
459 GetBootMgrInfo()->TimeOut,
460 &SelectedOperatingSystem,
461 FALSE,
463 OperatingSystemList))
464 {
465 UiMessageBox("Press ENTER to reboot.");
466 goto Reboot;
467 }
468
469 /* Load the chosen operating system */
470 LoadOperatingSystem(&OperatingSystemList[SelectedOperatingSystem]);
471
472 GetBootMgrInfo()->TimeOut = -1;
473
474 /* If we get there, the OS loader failed. As it may have
475 * messed up the display, re-initialize the UI. */
476#ifndef _M_ARM
477 UiUnInitialize("");
478#endif
480 }
481
483 /* Fall back to the FreeLdr setup menu */
485 UiMessageBox("The system will now reboot.");
486
487Reboot:
488 UiUnInitialize("Rebooting...");
489 IniCleanup();
490 return;
491}
#define WARNING
Definition: BusLogic958.h:56
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
char ** Args
Definition: acdebug.h:353
#define VOID
Definition: acefi.h:82
unsigned char BOOLEAN
Definition: actypes.h:127
xD9 x84 xD8 xAD xD9 x80 xF0 x90 xAC x9A xE0 xA7 xA6 xE0 xA7 xAA xF0 x91 x84 xA4 xF0 x91 x84 x89 xF0 x91 x84 x9B xF0 x90 x8A xAB xF0 x90 x8B x89 xE2 xB2 x9E xE2 xB2 x9F xD0 xBE xD0 x9E xF0 x90 x90 x84 xF0 x90 x90 xAC xE1 x83 x98 xE1 x83 x94 xE1 x83 x90 xE1 xB2 xBF xE2 xB0 x95 xE2 xB1 x85 xCE xBF xCE x9F xE0 xA8 xA0 xE0 xA8 xB0 xE0 xA9 xA6 Kayah xEA xA4 x8D xEA xA4 x80 Khmer xE1 xA7 xA1 xE1 xA7 xAA xE0 xBB x90 Latin Subscript Fallback
Definition: afscript.h:223
ARC_STATUS(__cdecl * ARC_ENTRY_POINT)(_In_ ULONG Argc, _In_ PCHAR Argv[], _In_ PCHAR Envp[])
Definition: arcsupp.h:12
void LoadSettings(void)
Definition: settings.c:53
#define ERR(fmt,...)
Definition: precomp.h:57
VOID EditCustomBootReactOS(IN OUT OperatingSystemItem *OperatingSystem, IN BOOLEAN IsSetup)
Definition: custom.c:485
ULONG LoadBootDeviceDriver(VOID)
Definition: scsiport.c:1656
#define DebugInit(DebugString)
Definition: debug.h:120
#define DBG_DEFAULT_CHANNEL(ch)
Definition: debug.h:106
VOID FrLdrHeapFree(PVOID MemoryPointer, ULONG Tag)
Definition: heap.c:539
PVOID FrLdrHeapAlloc(SIZE_T MemorySize, ULONG Tag)
Definition: heap.c:533
PVOID FrLdrTempAlloc(_In_ SIZE_T Size, _In_ ULONG Tag)
Definition: heap.c:545
VOID FreeLdrSetupMenu(_In_opt_ OperatingSystemItem *OperatingSystem)
Definition: options.c:53
VOID DisplayBootTimeOptions(_In_ OperatingSystemItem *OperatingSystem)
Definition: options.c:115
PBOOTMGRINFO GetBootMgrInfo(VOID)
Definition: settings.c:214
VOID UiShowMessageBoxesInSection(IN ULONG_PTR SectionId)
Definition: ui.c:524
VOID UiDrawBackdrop(ULONG DrawHeight)
Definition: ui.c:233
VOID UiMessageBoxCritical(_In_ PCSTR MessageText)
Definition: ui.c:372
ULONG UiGetScreenHeight(VOID)
Definition: ui.c:655
VOID UiUnInitialize(PCSTR BootText)
Definition: ui.c:224
BOOLEAN UiDisplayMenu(IN PCSTR MenuHeader, IN PCSTR MenuFooter OPTIONAL, IN PCSTR MenuItemList[], IN ULONG MenuItemCount, IN ULONG DefaultMenuItem, IN LONG MenuTimeOut, OUT PULONG SelectedMenuItem, IN BOOLEAN CanEscape, IN UiMenuKeyPressFilterCallback KeyPressFilter OPTIONAL, IN PVOID Context OPTIONAL)
Definition: ui.c:605
BOOLEAN UiInitialize(BOOLEAN ShowUi)
Definition: ui.c:92
VOID UiMessageBox(_In_ PCSTR Format,...)
Definition: ui.c:359
static CCHAR DebugString[256]
Definition: settings.c:16
static VOID EditCustomBootNTOS(_Inout_ OperatingSystemItem *OperatingSystem)
Definition: bootmgr.c:45
VOID(* OS_MENU_PROC)(_Inout_ OperatingSystemItem *OperatingSystem)
Definition: bootmgr.c:34
VOID LoadOperatingSystem(_In_ OperatingSystemItem *OperatingSystem)
Definition: bootmgr.c:287
BOOLEAN MainBootMenuKeyPressFilter(IN ULONG KeyPress, IN ULONG SelectedMenuItem, IN PVOID Context OPTIONAL)
Definition: bootmgr.c:335
static PCHAR * BuildArgvForOsLoader(_In_ PCSTR LoadIdentifier, _In_ ULONG_PTR SectionId, _Out_ PULONG pArgc)
This function converts the list of Key=Value options in the given operating system section into an AR...
Definition: bootmgr.c:178
struct _OS_LOADING_METHOD * POS_LOADING_METHOD
static const OS_LOADING_METHOD * GetOSLoadingMethod(_In_ ULONG_PTR SectionId)
Definition: bootmgr.c:112
static const OS_LOADING_METHOD OSLoadingMethods[]
Definition: bootmgr.c:60
struct _OS_LOADING_METHOD OS_LOADING_METHOD
static VOID EditCustomBootReactOSSetup(_Inout_ OperatingSystemItem *OperatingSystem)
Definition: bootmgr.c:38
VOID(* EDIT_OS_ENTRY_PROC)(_Inout_ OperatingSystemItem *OperatingSystem)
Definition: bootmgr.c:30
VOID RunLoader(VOID)
Definition: bootmgr.c:386
#define _stricmp
Definition: cat.c:22
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define va_end(v)
Definition: stdarg.h:28
#define va_start(v, l)
Definition: stdarg.h:26
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1592
char * va_list
Definition: vadefs.h:50
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
PCCHAR FrLdrGetBootPath(VOID)
Definition: freeldr.c:197
VOID WarnDeprecated(_In_ PCSTR MsgFmt,...)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
ARC_STATUS LoadReactOSSetup(IN ULONG Argc, IN PCHAR Argv[], IN PCHAR Envp[])
Definition: setupldr.c:492
ARC_STATUS LoadAndBootWindows(IN ULONG Argc, IN PCHAR Argv[], IN PCHAR Envp[])
Definition: winldr.c:1179
VOID MenuNTOptions(_Inout_ OperatingSystemItem *OperatingSystem)
Definition: advopts.c:106
ULONG IniGetSectionSettingValueSize(ULONG_PTR SectionId, ULONG SettingIndex)
Definition: inifile.c:108
ULONG IniGetNumSectionItems(ULONG_PTR SectionId)
Definition: inifile.c:60
BOOLEAN IniFileInitialize(VOID)
Definition: ini_init.c:25
BOOLEAN IniModifySettingValue(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue)
Definition: inifile.c:301
ULONG IniGetSectionSettingNameSize(ULONG_PTR SectionId, ULONG SettingIndex)
Definition: inifile.c:95
BOOLEAN IniReadSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize)
Definition: inifile.c:121
BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize)
Definition: inifile.c:154
PLIST_ENTRY IniGetFileSectionListHead(VOID)
Definition: inifile.c:25
VOID IniCleanup(VOID)
Definition: inifile.c:243
#define KEY_F1
Definition: keycodes.h:51
#define KEY_F5
Definition: keycodes.h:55
#define KEY_F8
Definition: keycodes.h:58
#define KEY_F10
Definition: keycodes.h:60
#define KEY_F2
Definition: keycodes.h:52
#define PCHAR
Definition: match.c:90
#define ASSERT(a)
Definition: mode.c:44
#define _Inout_
Definition: no_sal2.h:162
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
int Count
Definition: noreturn.cpp:7
#define UNREACHABLE
#define ANSI_NULL
NTSTRSAFEAPI RtlStringCbVPrintfA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat, _In_ va_list argList)
Definition: ntstrsafe.h:1034
#define TAG_STRING
Definition: oslist.h:22
OperatingSystemItem * InitOperatingSystemList(_Out_ PULONG OperatingSystemCount, _Out_ PULONG DefaultOperatingSystem)
Definition: oslist.c:46
char CHAR
Definition: pedump.c:57
@ ESUCCESS
Definition: arc.h:32
strcat
Definition: string.h:92
strcpy
Definition: string.h:131
#define TRACE(s)
Definition: solgame.cpp:4
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
_In_ PVOID Context
Definition: storport.h:2269
LONG TimeOut
Definition: settings.h:15
EDIT_OS_ENTRY_PROC EditOsEntry
Definition: bootmgr.c:54
OS_MENU_PROC OsMenu OPTIONAL
Definition: bootmgr.c:55
ARC_ENTRY_POINT OsLoader
Definition: bootmgr.c:56
ULONG_PTR SectionId
Definition: oslist.h:26
uint32_t * PULONG
Definition: typedefs.h:59
ULONG_PTR SIZE_T
Definition: typedefs.h:80
const char * PCSTR
Definition: typedefs.h:52
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
DECLSPEC_NORETURN VOID __cdecl Reboot(VOID)
Definition: uefildr.c:99
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
void int int ULONGLONG int va_list * ap
Definition: winesup.h:36