ReactOS 0.4.15-dev-7968-g24a56f8
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
33static VOID
35 _Inout_ OperatingSystemItem* OperatingSystem)
36{
37 EditCustomBootReactOS(OperatingSystem, TRUE);
38}
39
40static VOID
42 _Inout_ OperatingSystemItem* OperatingSystem)
43{
44 EditCustomBootReactOS(OperatingSystem, FALSE);
45}
46
47typedef struct _OS_LOADING_METHOD
48{
53
54static const OS_LOADING_METHOD
56{
58
59#if defined(_M_IX86) || defined(_M_AMD64)
60#ifndef UEFIBOOT
61 {"BootSector", EditCustomBootSector, LoadAndBootSector},
62 {"Linux" , EditCustomBootLinux , LoadAndBootLinux },
63#endif
64#endif
65#ifdef _M_IX86
66 {"WindowsNT40" , EditCustomBootNTOS, LoadAndBootWindows},
67#endif
69 {"Windows2003" , EditCustomBootNTOS, LoadAndBootWindows},
70 {"WindowsVista", EditCustomBootNTOS, LoadAndBootWindows},
71};
72
73/* FUNCTIONS ******************************************************************/
74
75#ifdef HAS_DEPRECATED_OPTIONS
79VOID
81 _In_ PCSTR MsgFmt,
82 ...)
83{
84 va_list ap;
85 CHAR msgString[300];
86
87 va_start(ap, MsgFmt);
88 RtlStringCbVPrintfA(msgString, sizeof(msgString),
89 MsgFmt, ap);
90 va_end(ap);
91
93 " WARNING!\n"
94 "\n"
95 "%s\n"
96 "\n"
97 "Should you need assistance, please contact ReactOS developers\n"
98 "on the official ReactOS Mattermost server <chat.reactos.org>.",
99 msgString);
100}
101#endif // HAS_DEPRECATED_OPTIONS
102
103static const OS_LOADING_METHOD*
105 _In_ ULONG_PTR SectionId)
106{
107 ULONG i;
108 CHAR BootType[80];
109
110 /* The operating system section has been opened by InitOperatingSystemList() */
111 ASSERT(SectionId != 0);
112
113 /* Try to read the boot type. We must have the value (it
114 * has been possibly added by InitOperatingSystemList()) */
115 *BootType = ANSI_NULL;
116 IniReadSettingByName(SectionId, "BootType", BootType, sizeof(BootType));
117 ASSERT(*BootType);
118
120#ifdef HAS_DEPRECATED_OPTIONS
121 if ((_stricmp(BootType, "Drive") == 0) ||
122 (_stricmp(BootType, "Partition") == 0))
123 {
124 /* Display the deprecation warning message */
126 "The '%s' configuration you are booting into is no longer\n"
127 "supported and will be removed in future FreeLoader versions.\n"
128 "\n"
129 "Please edit FREELDR.INI to replace all occurrences of\n"
130 "\n"
131 " %*s to:\n"
132 " BootType=%s ------> BootType=BootSector",
133 BootType,
134 strlen(BootType), "", // Indentation
135 BootType);
136
137 /* Type fixup */
138 strcpy(BootType, "BootSector");
139 if (!IniModifySettingValue(SectionId, "BootType", BootType))
140 {
141 ERR("Could not fixup the BootType entry for OS '%s', ignoring.\n",
142 ((PINI_SECTION)SectionId)->SectionName);
143 }
144 }
145#endif // HAS_DEPRECATED_OPTIONS
147
148 /* Find the suitable OS loading method */
149 for (i = 0; ; ++i)
150 {
152 {
153 UiMessageBox("Unknown boot entry type '%s'", BootType);
154 return NULL;
155 }
156 if (_stricmp(BootType, OSLoadingMethods[i].BootType) == 0)
157 return &OSLoadingMethods[i];
158 }
160}
161
169static PCHAR*
171 _In_ PCSTR LoadIdentifier,
172 _In_ ULONG_PTR SectionId,
173 _Out_ PULONG pArgc)
174{
175 SIZE_T Size;
176 ULONG Count;
177 ULONG i;
178 ULONG Argc;
179 PCHAR* Argv;
180 PCHAR* Args;
181 PCHAR SettingName, SettingValue;
182
183 *pArgc = 0;
184
185 ASSERT(SectionId != 0);
186
187 /* Normalize LoadIdentifier to make subsequent tests simpler */
188 if (LoadIdentifier && !*LoadIdentifier)
189 LoadIdentifier = NULL;
190
191 /* Count the number of operating systems in the section */
192 Count = IniGetNumSectionItems(SectionId);
193
194 /*
195 * The argument vector contains the program name, the SystemPartition,
196 * the LoadIdentifier (optional), and the items in the OS section.
197 * For POSIX compliance, a terminating NULL pointer (not counted in Argc)
198 * is appended, such that Argv[Argc] == NULL.
199 */
200 Argc = 2 + (LoadIdentifier ? 1 : 0) + Count;
201
202 /* Calculate the total size needed for the string buffer of the argument vector */
203 Size = 0;
204 /* i == 0: Program name */
205 // TODO: Provide one in the future...
206 /* i == 1: SystemPartition : from where FreeLdr has been started */
207 Size += (strlen("SystemPartition=") + strlen(FrLdrBootPath) + 1) * sizeof(CHAR);
208 /* i == 2: LoadIdentifier : ASCII string that may be used
209 * to associate an identifier with a set of load parameters */
210 if (LoadIdentifier)
211 {
212 Size += (strlen("LoadIdentifier=") + strlen(LoadIdentifier) + 1) * sizeof(CHAR);
213 }
214 /* The section items */
215 for (i = 0; i < Count; ++i)
216 {
217 Size += IniGetSectionSettingNameSize(SectionId, i); // Counts also the NULL-terminator, that we transform into the '=' sign separator.
218 Size += IniGetSectionSettingValueSize(SectionId, i); // Counts also the NULL-terminator.
219 }
220 Size += sizeof(ANSI_NULL); // Final NULL-terminator.
221
222 /* Allocate memory to hold the argument vector: pointers and string buffer */
223 Argv = FrLdrHeapAlloc((Argc + 1) * sizeof(PCHAR) + Size, TAG_STRING);
224 if (!Argv)
225 return NULL;
226
227 /* Initialize the argument vector: loop through the section and copy the Key=Value options */
228 SettingName = (PCHAR)((ULONG_PTR)Argv + ((Argc + 1) * sizeof(PCHAR)));
229 Args = Argv;
230 /* i == 0: Program name */
231 *Args++ = NULL; // TODO: Provide one in the future...
232 /* i == 1: SystemPartition */
233 {
234 strcpy(SettingName, "SystemPartition=");
235 strcat(SettingName, FrLdrBootPath);
236
237 *Args++ = SettingName;
238 SettingName += (strlen(SettingName) + 1);
239 }
240 /* i == 2: LoadIdentifier */
241 if (LoadIdentifier)
242 {
243 strcpy(SettingName, "LoadIdentifier=");
244 strcat(SettingName, LoadIdentifier);
245
246 *Args++ = SettingName;
247 SettingName += (strlen(SettingName) + 1);
248 }
249 /* The section items */
250 for (i = 0; i < Count; ++i)
251 {
252 Size = IniGetSectionSettingNameSize(SectionId, i);
253 SettingValue = SettingName + Size;
254 IniReadSettingByNumber(SectionId, i,
255 SettingName, Size,
256 SettingValue, IniGetSectionSettingValueSize(SectionId, i));
257 SettingName[Size - 1] = '=';
258
259 *Args++ = SettingName;
260 SettingName += (strlen(SettingName) + 1);
261 }
262 /* Terminating NULL pointer */
263 *Args = NULL;
264
265#if DBG
266 /* Dump the argument vector for debugging */
267 for (i = 0; i < Argc; ++i)
268 {
269 TRACE("Argv[%lu]: '%s'\n", i, Argv[i]);
270 }
271#endif
272
273 *pArgc = Argc;
274 return Argv;
275}
276
277VOID
279 _In_ OperatingSystemItem* OperatingSystem)
280{
281 ULONG_PTR SectionId = OperatingSystem->SectionId;
282 const OS_LOADING_METHOD* OSLoadingMethod;
283 ULONG Argc;
284 PCHAR* Argv;
285
286 /* Find the suitable OS loader to start */
287 OSLoadingMethod = GetOSLoadingMethod(SectionId);
288 if (!OSLoadingMethod)
289 return;
290 ASSERT(OSLoadingMethod->OsLoader);
291
292 /* Build the ARC-compatible argument vector */
293 Argv = BuildArgvForOsLoader(OperatingSystem->LoadIdentifier, SectionId, &Argc);
294 if (!Argv)
295 return; // Unexpected failure.
296
297#ifdef _M_IX86
298#ifndef UEFIBOOT
299 /* Install the drive mapper according to this section drive mappings */
300 DriveMapMapDrivesInSection(SectionId);
301#endif
302#endif
303
304 /* Start the OS loader */
305 OSLoadingMethod->OsLoader(Argc, Argv, NULL);
307}
308
309#ifdef HAS_OPTION_MENU_EDIT_CMDLINE
310VOID
311EditOperatingSystemEntry(
312 _Inout_ OperatingSystemItem* OperatingSystem)
313{
314 /* Find the suitable OS entry editor and open it */
315 const OS_LOADING_METHOD* OSLoadingMethod =
316 GetOSLoadingMethod(OperatingSystem->SectionId);
317 if (OSLoadingMethod)
318 {
319 ASSERT(OSLoadingMethod->EditOsEntry);
320 OSLoadingMethod->EditOsEntry(OperatingSystem);
321 }
322}
323#endif // HAS_OPTION_MENU_EDIT_CMDLINE
324
325static LONG
327 IN ULONG_PTR FrLdrSectionId)
328{
329 LONG TimeOut = -1;
330 CHAR TimeOutText[20];
331
332 TimeOut = CmdLineGetTimeOut();
333 if (TimeOut >= 0)
334 return TimeOut;
335
336 TimeOut = -1;
337
338 if ((FrLdrSectionId != 0) &&
339 IniReadSettingByName(FrLdrSectionId, "TimeOut", TimeOutText, sizeof(TimeOutText)))
340 {
341 TimeOut = atoi(TimeOutText);
342 }
343
344 return TimeOut;
345}
346
349 IN ULONG KeyPress,
350 IN ULONG SelectedMenuItem,
352{
353 switch (KeyPress)
354 {
355 case KEY_F8:
356 DoOptionsMenu(&((OperatingSystemItem*)Context)[SelectedMenuItem]);
357 return TRUE;
358
359#ifdef HAS_OPTION_MENU_EDIT_CMDLINE
360 case KEY_F10:
361 EditOperatingSystemEntry(&((OperatingSystemItem*)Context)[SelectedMenuItem]);
362 return TRUE;
363#endif
364
365 default:
366 /* We didn't handle the key */
367 return FALSE;
368 }
369}
370
372{
373 ULONG_PTR SectionId;
374 LONG TimeOut;
375 ULONG OperatingSystemCount;
376 OperatingSystemItem* OperatingSystemList;
377 PCSTR* OperatingSystemDisplayNames;
378 ULONG DefaultOperatingSystem;
379 ULONG SelectedOperatingSystem;
380 ULONG i;
381
383 {
384 UiMessageBoxCritical("Error when detecting hardware.");
385 return;
386 }
387
388#ifdef _M_IX86
389#ifndef UEFIBOOT
390 /* Load additional SCSI driver (if any) */
392 {
393 UiMessageBoxCritical("Unable to load additional boot device drivers.");
394 }
395#endif
396#endif
397
398 if (!IniFileInitialize())
399 {
400 UiMessageBoxCritical("Error initializing .ini file.");
401 return;
402 }
403
404 /* Open the [FreeLoader] section */
405 if (!IniOpenSection("FreeLoader", &SectionId))
406 {
407 UiMessageBoxCritical("Section [FreeLoader] not found in freeldr.ini.");
408 return;
409 }
410
411 /* Debugger main initialization */
412 DebugInit(SectionId);
413
414 /* Retrieve the default timeout */
415 TimeOut = GetTimeOut(SectionId);
416
417 /* UI main initialization */
418 if (!UiInitialize(TRUE))
419 {
420 UiMessageBoxCritical("Unable to initialize UI.");
421 return;
422 }
423
424 OperatingSystemList = InitOperatingSystemList(SectionId,
425 &OperatingSystemCount,
426 &DefaultOperatingSystem);
427 if (!OperatingSystemList)
428 {
429 UiMessageBox("Unable to read operating systems section in freeldr.ini.\nPress ENTER to reboot.");
430 goto Reboot;
431 }
432 if (OperatingSystemCount == 0)
433 {
434 UiMessageBox("There were no operating systems listed in freeldr.ini.\nPress ENTER to reboot.");
435 goto Reboot;
436 }
437
438 /* Create list of display names */
439 OperatingSystemDisplayNames = FrLdrTempAlloc(sizeof(PCSTR) * OperatingSystemCount, 'mNSO');
440 if (!OperatingSystemDisplayNames)
441 goto Reboot;
442
443 for (i = 0; i < OperatingSystemCount; i++)
444 {
445 OperatingSystemDisplayNames[i] = OperatingSystemList[i].LoadIdentifier;
446 }
447
448 /* Find all the message box settings and run them */
450
451 for (;;)
452 {
453 /* Redraw the backdrop */
455
456 /* Show the operating system list menu */
457 if (!UiDisplayMenu("Please select the operating system to start:",
458 "For troubleshooting and advanced startup options for "
459 "ReactOS, press F8.",
460 TRUE,
461 OperatingSystemDisplayNames,
462 OperatingSystemCount,
463 DefaultOperatingSystem,
464 TimeOut,
465 &SelectedOperatingSystem,
466 FALSE,
468 OperatingSystemList))
469 {
470 UiMessageBox("Press ENTER to reboot.");
471 goto Reboot;
472 }
473
474 TimeOut = -1;
475
476 /* Load the chosen operating system */
477 LoadOperatingSystem(&OperatingSystemList[SelectedOperatingSystem]);
478
479 /* If we get there, the OS loader failed. As it may have
480 * messed up the display, re-initialize the UI. */
481#ifndef _M_ARM
483#endif
485 }
486
487Reboot:
488 UiUnInitialize("Rebooting...");
489 IniCleanup();
490 return;
491}
#define WARNING
Definition: BusLogic958.h:56
unsigned char BOOLEAN
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
char ** Args
Definition: acdebug.h:353
#define VOID
Definition: acefi.h:82
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
ARC_STATUS(__cdecl * ARC_ENTRY_POINT)(_In_ ULONG Argc, _In_ PCHAR Argv[], _In_ PCHAR Envp[])
Definition: arcsupp.h:12
@ Reboot
Definition: bl.h:891
VOID EditCustomBootReactOS(IN OUT OperatingSystemItem *OperatingSystem, IN BOOLEAN IsSetup)
Definition: custom.c:486
ULONG LoadBootDeviceDriver(VOID)
Definition: scsiport.c:1635
#define DebugInit(FrLdrSectionId)
Definition: debug.h:117
#define ERR(fmt,...)
Definition: debug.h:110
#define DBG_DEFAULT_CHANNEL(ch)
Definition: debug.h:103
#define MachInitializeBootDevices()
Definition: machine.h:133
FORCEINLINE VOID FrLdrHeapFree(PVOID MemoryPointer, ULONG Tag)
Definition: mm.h:181
FORCEINLINE PVOID FrLdrTempAlloc(_In_ SIZE_T Size, _In_ ULONG Tag)
Definition: mm.h:188
FORCEINLINE PVOID FrLdrHeapAlloc(SIZE_T MemorySize, ULONG Tag)
Definition: mm.h:174
VOID DoOptionsMenu(IN OperatingSystemItem *OperatingSystem)
Definition: options.c:92
BOOLEAN UiDisplayMenu(IN PCSTR MenuHeader, IN PCSTR MenuFooter OPTIONAL, IN BOOLEAN ShowBootOptions, 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
VOID UiShowMessageBoxesInSection(IN ULONG_PTR SectionId)
Definition: ui.c:524
VOID UiMessageBoxCritical(_In_ PCSTR MessageText)
Definition: ui.c:372
UIVTBL UiVtbl
Definition: ui.c:64
VOID UiUnInitialize(PCSTR BootText)
Definition: ui.c:224
VOID UiDrawBackdrop(VOID)
Definition: ui.c:233
BOOLEAN UiInitialize(BOOLEAN ShowUi)
Definition: ui.c:92
VOID UiMessageBox(_In_ PCSTR Format,...)
Definition: ui.c:359
#define _stricmp
Definition: cat.c:22
LONG CmdLineGetTimeOut(VOID)
Definition: cmdline.c:135
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static VOID EditCustomBootNTOS(_Inout_ OperatingSystemItem *OperatingSystem)
Definition: bootmgr.c:41
VOID LoadOperatingSystem(_In_ OperatingSystemItem *OperatingSystem)
Definition: bootmgr.c:278
BOOLEAN MainBootMenuKeyPressFilter(IN ULONG KeyPress, IN ULONG SelectedMenuItem, IN PVOID Context OPTIONAL)
Definition: bootmgr.c:348
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:170
static LONG GetTimeOut(IN ULONG_PTR FrLdrSectionId)
Definition: bootmgr.c:326
struct _OS_LOADING_METHOD * POS_LOADING_METHOD
static const OS_LOADING_METHOD * GetOSLoadingMethod(_In_ ULONG_PTR SectionId)
Definition: bootmgr.c:104
static const OS_LOADING_METHOD OSLoadingMethods[]
Definition: bootmgr.c:55
struct _OS_LOADING_METHOD OS_LOADING_METHOD
static VOID EditCustomBootReactOSSetup(_Inout_ OperatingSystemItem *OperatingSystem)
Definition: bootmgr.c:34
VOID(* EDIT_OS_ENTRY_PROC)(_Inout_ OperatingSystemItem *OperatingSystem)
Definition: bootmgr.c:30
VOID RunLoader(VOID)
Definition: bootmgr.c:371
CCHAR FrLdrBootPath[MAX_PATH]
Definition: freeldr.c:39
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
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
ARC_STATUS LoadReactOSSetup(IN ULONG Argc, IN PCHAR Argv[], IN PCHAR Envp[])
Definition: setupldr.c:475
ARC_STATUS LoadAndBootWindows(IN ULONG Argc, IN PCHAR Argv[], IN PCHAR Envp[])
Definition: winldr.c:976
ULONG IniGetSectionSettingValueSize(ULONG_PTR SectionId, ULONG SettingIndex)
Definition: inifile.c:103
ULONG IniGetNumSectionItems(ULONG_PTR SectionId)
Definition: inifile.c:55
BOOLEAN IniFileInitialize(VOID)
Definition: ini_init.c:25
BOOLEAN IniModifySettingValue(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue)
Definition: inifile.c:296
ULONG IniGetSectionSettingNameSize(ULONG_PTR SectionId, ULONG SettingIndex)
Definition: inifile.c:90
BOOLEAN IniReadSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize)
Definition: inifile.c:116
BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize)
Definition: inifile.c:149
BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR *SectionId)
Definition: inifile.c:25
VOID IniCleanup(VOID)
Definition: inifile.c:238
#define KEY_F8
Definition: keycodes.h:58
#define KEY_F10
Definition: keycodes.h:60
#define PCHAR
Definition: match.c:90
#define ASSERT(a)
Definition: mode.c:44
#define _Inout_
Definition: ms_sal.h:378
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
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(IN ULONG_PTR FrLdrSectionId, OUT PULONG OperatingSystemCount, OUT PULONG DefaultOperatingSystem)
Definition: oslist.c:46
long LONG
Definition: pedump.c:60
@ ESUCCESS
Definition: arc.h:32
#define TRACE(s)
Definition: solgame.cpp:4
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
EDIT_OS_ENTRY_PROC EditOsEntry
Definition: bootmgr.c:50
ARC_ENTRY_POINT OsLoader
Definition: bootmgr.c:51
VOID(* UnInitialize)(VOID)
Definition: ui.h:251
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
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
void int int ULONGLONG int va_list * ap
Definition: winesup.h:36
char CHAR
Definition: xmlstorage.h:175