27#define TAG_OS_ITEM 'tISO'
56 PCHAR TitleStart, TitleEnd;
60 CHAR SettingName[260];
61 CHAR SettingValue[260];
84 SettingName,
sizeof(SettingName),
85 SettingValue,
sizeof(SettingValue));
88 ERR(
"Invalid OS entry %lu, skipping.\n",
i);
93 TitleStart = SettingValue;
95 while (*TitleStart ==
' ' || *TitleStart ==
'\t' || *TitleStart ==
'"')
97 TitleEnd = TitleStart;
99 while (*TitleEnd !=
ANSI_NULL && *TitleEnd !=
'"')
110 while (*TitleEnd ==
' ' || *TitleEnd ==
'\t' || *TitleEnd ==
'"')
113 OsLoadOptions = (*TitleEnd ? TitleEnd :
NULL);
122 if (DefaultOSName &&
_stricmp(DefaultOSName, SettingName) == 0)
125 DefaultOSName =
NULL;
165 HadNoBootType = (*BootType ==
ANSI_NULL);
173 strcpy(BootType,
"BootSector");
178 strcpy(BootType,
"Windows");
192 if (
_stricmp(BootType,
"BootSector") == 0)
195 "BootSectorFile%u%u%u%u%u%u",
199 else if (
_stricmp(BootType,
"Windows") == 0)
202 "Windows%u%u%u%u%u%u",
214 ERR(
"Could not convert legacy OS entry %lu, skipping.\n",
i);
219 if (
_stricmp(BootType,
"BootSector") == 0)
223 ERR(
"Could not convert legacy OS entry %lu, skipping.\n",
i);
227 else if (
_stricmp(BootType,
"Windows") == 0)
231 ERR(
"Could not convert legacy OS entry %lu, skipping.\n",
i);
243 ERR(
"Could not convert legacy OS entry %lu, skipping.\n",
i);
251 ERR(
"Could not fixup the BootType entry for OS '%s', ignoring.\n", SettingName);
258 if (HadSection && OsLoadOptions && *OsLoadOptions)
263 TRACE(
"No 'Options' value found for OS '%s', ignoring.\n", SettingName);
271 ERR(
"Could not modify the options for OS '%s', ignoring.\n", SettingName);
282 *OperatingSystemCount =
Count;
283 *DefaultOperatingSystem = DefaultOS;
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
TIMEINFO * ArcGetTime(VOID)
#define DBG_DEFAULT_CHANNEL(ch)
ARC_STATUS ArcOpen(CHAR *Path, OPENMODE OpenMode, ULONG *FileId)
ARC_STATUS ArcClose(_In_ ULONG FileId)
FORCEINLINE PVOID FrLdrHeapAlloc(SIZE_T MemorySize, ULONG Tag)
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)