59#if defined(_M_IX86) || defined(_M_AMD64)
61 {
"BootSector", EditCustomBootSector, LoadAndBootSector},
62 {
"Linux" , EditCustomBootLinux , LoadAndBootLinux },
75#ifdef HAS_DEPRECATED_OPTIONS
101 "Should you need assistance, please contact ReactOS developers\n"
102 "on the official ReactOS Mattermost server <chat.reactos.org>.",
124#ifdef HAS_DEPRECATED_OPTIONS
125 if ((
_stricmp(BootType,
"Drive") == 0) ||
126 (
_stricmp(BootType,
"Partition") == 0))
130 "The '%s' configuration you are booting into is no longer\n"
131 "supported and will be removed in future FreeLoader versions.\n"
133 "Please edit FREELDR.INI to replace all occurrences of\n"
136 " BootType=%s ------> BootType=BootSector",
142 strcpy(BootType,
"BootSector");
145 ERR(
"Could not fixup the BootType entry for OS '%s', ignoring.\n",
185 PCHAR SettingName, SettingValue;
192 if (LoadIdentifier && !*LoadIdentifier)
193 LoadIdentifier =
NULL;
204 Argc = 2 + (LoadIdentifier ? 1 : 0) +
Count;
238 strcpy(SettingName,
"SystemPartition=");
241 *
Args++ = SettingName;
242 SettingName += (
strlen(SettingName) + 1);
247 strcpy(SettingName,
"LoadIdentifier=");
248 strcat(SettingName, LoadIdentifier);
250 *
Args++ = SettingName;
251 SettingName += (
strlen(SettingName) + 1);
257 SettingValue = SettingName +
Size;
261 SettingName[
Size - 1] =
'=';
263 *
Args++ = SettingName;
264 SettingName += (
strlen(SettingName) + 1);
271 for (
i = 0;
i < Argc; ++
i)
273 TRACE(
"Argv[%lu]: '%s'\n",
i, Argv[
i]);
285 ULONG_PTR SectionId = OperatingSystem->SectionId;
292 if (!OSLoadingMethod)
304 DriveMapMapDrivesInSection(SectionId);
313#ifdef HAS_OPTION_MENU_EDIT_CMDLINE
315EditOperatingSystemEntry(
344#ifdef HAS_OPTION_MENU_EDIT_CMDLINE
359 PCSTR* OperatingSystemDisplayNames;
360 ULONG OperatingSystemCount;
361 ULONG DefaultOperatingSystem;
362 ULONG SelectedOperatingSystem;
407 &DefaultOperatingSystem);
408 if (!OperatingSystemList)
410 UiMessageBox(
"Unable to read operating systems section in freeldr.ini.\nPress ENTER to reboot.");
413 if (OperatingSystemCount == 0)
415 UiMessageBox(
"There were no operating systems listed in freeldr.ini.\nPress ENTER to reboot.");
420 OperatingSystemDisplayNames =
FrLdrTempAlloc(
sizeof(
PCSTR) * OperatingSystemCount,
'mNSO');
421 if (!OperatingSystemDisplayNames)
424 for (
i = 0;
i < OperatingSystemCount;
i++)
438 if (!
UiDisplayMenu(
"Please select the operating system to start:",
439 "For troubleshooting and advanced startup options for "
440 "ReactOS, press F8.",
442 OperatingSystemDisplayNames,
443 OperatingSystemCount,
444 DefaultOperatingSystem,
446 &SelectedOperatingSystem,
449 OperatingSystemList))
char * strcat(char *DstString, const char *SrcString)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
ARC_STATUS(__cdecl * ARC_ENTRY_POINT)(_In_ ULONG Argc, _In_ PCHAR Argv[], _In_ PCHAR Envp[])
VOID EditCustomBootReactOS(IN OUT OperatingSystemItem *OperatingSystem, IN BOOLEAN IsSetup)
ULONG LoadBootDeviceDriver(VOID)
#define DebugInit(DebugString)
#define DBG_DEFAULT_CHANNEL(ch)
#define MachInitializeBootDevices()
FORCEINLINE VOID FrLdrHeapFree(PVOID MemoryPointer, ULONG Tag)
FORCEINLINE PVOID FrLdrTempAlloc(_In_ SIZE_T Size, _In_ ULONG Tag)
FORCEINLINE PVOID FrLdrHeapAlloc(SIZE_T MemorySize, ULONG Tag)
VOID DoOptionsMenu(IN OperatingSystemItem *OperatingSystem)
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)
VOID UiShowMessageBoxesInSection(IN ULONG_PTR SectionId)
VOID UiMessageBoxCritical(_In_ PCSTR MessageText)
VOID UiUnInitialize(PCSTR BootText)
VOID UiDrawBackdrop(VOID)
BOOLEAN UiInitialize(BOOLEAN ShowUi)
VOID UiMessageBox(_In_ PCSTR Format,...)
static VOID EditCustomBootNTOS(_Inout_ OperatingSystemItem *OperatingSystem)
VOID LoadOperatingSystem(_In_ OperatingSystemItem *OperatingSystem)
BOOLEAN MainBootMenuKeyPressFilter(IN ULONG KeyPress, IN ULONG SelectedMenuItem, IN PVOID Context OPTIONAL)
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...
struct _OS_LOADING_METHOD * POS_LOADING_METHOD
static const OS_LOADING_METHOD * GetOSLoadingMethod(_In_ ULONG_PTR SectionId)
static const OS_LOADING_METHOD OSLoadingMethods[]
struct _OS_LOADING_METHOD OS_LOADING_METHOD
static VOID EditCustomBootReactOSSetup(_Inout_ OperatingSystemItem *OperatingSystem)
VOID(* EDIT_OS_ENTRY_PROC)(_Inout_ OperatingSystemItem *OperatingSystem)
CCHAR FrLdrBootPath[MAX_PATH]
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
ARC_STATUS LoadReactOSSetup(IN ULONG Argc, IN PCHAR Argv[], IN PCHAR Envp[])
ARC_STATUS LoadAndBootWindows(IN ULONG Argc, IN PCHAR Argv[], IN PCHAR Envp[])
ULONG IniGetSectionSettingValueSize(ULONG_PTR SectionId, ULONG SettingIndex)
ULONG IniGetNumSectionItems(ULONG_PTR SectionId)
BOOLEAN IniFileInitialize(VOID)
BOOLEAN IniModifySettingValue(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue)
ULONG IniGetSectionSettingNameSize(ULONG_PTR SectionId, ULONG SettingIndex)
BOOLEAN IniReadSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize)
BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize)
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)
OperatingSystemItem * InitOperatingSystemList(_Out_ PULONG OperatingSystemCount, _Out_ PULONG DefaultOperatingSystem)
PULONG MinorVersion OPTIONAL
EDIT_OS_ENTRY_PROC EditOsEntry
VOID(* UnInitialize)(VOID)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
void int int ULONGLONG int va_list * ap