27#define TAG_OS_ITEM 'tISO'
56 PCHAR TitleStart, TitleEnd;
60 CHAR SettingName[260];
61 CHAR SettingValue[260];
66 *OperatingSystemCount = 0;
71 UiMessageBox(
"Operating Systems section not found in freeldr.ini");
92 SettingName,
sizeof(SettingName),
93 SettingValue,
sizeof(SettingValue));
96 ERR(
"Invalid OS entry %lu, skipping.\n",
i);
101 TitleStart = SettingValue;
103 while (*TitleStart ==
' ' || *TitleStart ==
'\t' || *TitleStart ==
'"')
105 TitleEnd = TitleStart;
107 while (*TitleEnd !=
ANSI_NULL && *TitleEnd !=
'"')
118 while (*TitleEnd ==
' ' || *TitleEnd ==
'\t' || *TitleEnd ==
'"')
121 OsLoadOptions = (*TitleEnd ? TitleEnd :
NULL);
130 if (DefaultOSName &&
_stricmp(DefaultOSName, SettingName) == 0)
133 DefaultOSName =
NULL;
173 HadNoBootType = (*BootType ==
ANSI_NULL);
181 strcpy(BootType,
"BootSector");
186 strcpy(BootType,
"Windows");
200 if (
_stricmp(BootType,
"BootSector") == 0)
203 "BootSectorFile%u%u%u%u%u%u",
207 else if (
_stricmp(BootType,
"Windows") == 0)
210 "Windows%u%u%u%u%u%u",
222 ERR(
"Could not convert legacy OS entry %lu, skipping.\n",
i);
227 if (
_stricmp(BootType,
"BootSector") == 0)
231 ERR(
"Could not convert legacy OS entry %lu, skipping.\n",
i);
235 else if (
_stricmp(BootType,
"Windows") == 0)
239 ERR(
"Could not convert legacy OS entry %lu, skipping.\n",
i);
251 ERR(
"Could not convert legacy OS entry %lu, skipping.\n",
i);
259 ERR(
"Could not fixup the BootType entry for OS '%s', ignoring.\n", SettingName);
266 if (HadSection && OsLoadOptions && *OsLoadOptions)
271 TRACE(
"No 'Options' value found for OS '%s', ignoring.\n", SettingName);
279 ERR(
"Could not modify the options for OS '%s', ignoring.\n", SettingName);
290 *OperatingSystemCount =
Count;
291 *DefaultOperatingSystem = DefaultOS;
TIMEINFO * ArcGetTime(VOID)
#define DBG_DEFAULT_CHANNEL(ch)
ARC_STATUS ArcOpen(CHAR *Path, OPENMODE OpenMode, ULONG *FileId)
ARC_STATUS ArcClose(_In_ ULONG FileId)
PVOID FrLdrHeapAlloc(SIZE_T MemorySize, ULONG Tag)
PBOOTMGRINFO GetBootMgrInfo(VOID)
VOID UiMessageBox(_In_ PCSTR Format,...)
_ACRTIMP size_t __cdecl strlen(const char *)
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
PINI_SECTION IniAddSection(_In_ PINICACHE Cache, _In_ PCWSTR Name)
ULONG IniGetNumSectionItems(ULONG_PTR SectionId)
BOOLEAN IniAddSettingValueToSection(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue)
BOOLEAN IniModifySettingValue(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue)
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)
BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR *SectionId)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
NTSTRSAFEAPI RtlStringCbCatA(_Inout_updates_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ NTSTRSAFE_PCSTR pszSrc)
NTSTRSAFEVAPI RtlStringCbPrintfA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,...)
NTSTRSAFEAPI RtlStringCbCopyA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ NTSTRSAFE_PCSTR pszSrc)
static PCSTR CopyString(PCSTR Source)
OperatingSystemItem * InitOperatingSystemList(_Out_ PULONG OperatingSystemCount, _Out_ PULONG DefaultOperatingSystem)