ReactOS 0.4.15-dev-8241-g63935f8
settings.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _BOOTMGRINFO
 

Typedefs

typedef struct _BOOTMGRINFO BOOTMGRINFO
 
typedef struct _BOOTMGRINFOPBOOTMGRINFO
 

Functions

VOID LoadSettings (_In_opt_ PCSTR CmdLine)
 

Variables

BOOTMGRINFO BootMgrInfo
 

Typedef Documentation

◆ BOOTMGRINFO

◆ PBOOTMGRINFO

Function Documentation

◆ LoadSettings()

VOID LoadSettings ( _In_opt_ PCSTR  CmdLine)

Definition at line 119 of file settings.c.

121{
122 /* Pre-initialization: The settings originate from the command-line.
123 * Main initialization: Overwrite them if needed with those from freeldr.ini */
124 if (CmdLine)
125 {
127 return;
128 }
130 {
131 // ERR("LoadSettings() called but no freeldr.ini\n");
132 return;
133 }
134
135 /* Open the [FreeLoader] section and load the settings */
136 if ((BootMgrInfo.FrLdrSection == 0) &&
137 !IniOpenSection("FreeLoader", &BootMgrInfo.FrLdrSection))
138 {
139 UiMessageBoxCritical("Section [FreeLoader] not found in freeldr.ini");
140 return;
141 }
142
143 /* Get the debug string. Always override it with the one from freeldr.ini */
145 DebugString, sizeof(DebugString)))
146 {
148 }
149
150 /* Get the timeout. Keep the existing one if it is valid,
151 * otherwise retrieve it from freeldr.ini */
152 if (BootMgrInfo.TimeOut < 0)
153 {
154 CHAR TimeOutText[20];
155 BootMgrInfo.TimeOut = -1;
157 TimeOutText, sizeof(TimeOutText)))
158 {
159 BootMgrInfo.TimeOut = atoi(TimeOutText);
160 }
161 }
162
163 /* Get the default OS */
165 {
167 DefaultOs, sizeof(DefaultOs)))
168 {
170 }
171 }
172}
VOID UiMessageBoxCritical(_In_ PCSTR MessageText)
Definition: ui.c:372
static CCHAR DebugString[256]
Definition: settings.c:16
BOOTMGRINFO BootMgrInfo
Definition: settings.c:18
static VOID CmdLineParse(_In_ PCSTR CmdLine)
Definition: settings.c:23
static CCHAR DefaultOs[256]
Definition: settings.c:17
static const WCHAR CmdLine[]
Definition: install.c:48
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
LIST_ENTRY IniFileSectionListHead
Definition: parse.c:25
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
PCSTR DefaultOs
Definition: settings.h:13
LONG TimeOut
Definition: settings.h:14
PCSTR DebugString
Definition: settings.h:12
ULONG_PTR FrLdrSection
Definition: settings.h:15
char CHAR
Definition: xmlstorage.h:175

Variable Documentation

◆ BootMgrInfo