#include <freeldr.h>
#include <debug.h>
Go to the source code of this file.
|
| | DBG_DEFAULT_CHANNEL (INIFILE) |
| |
| PLIST_ENTRY | IniGetFileSectionListHead (VOID) |
| |
| BOOLEAN | IniOpenSection (PCSTR SectionName, ULONG_PTR *SectionId) |
| |
| ULONG | IniGetNumSectionItems (ULONG_PTR SectionId) |
| |
| PINI_SECTION_ITEM | IniGetSettingByNumber (ULONG_PTR SectionId, ULONG SettingNumber) |
| |
| ULONG | IniGetSectionSettingNameSize (ULONG_PTR SectionId, ULONG SettingIndex) |
| |
| ULONG | IniGetSectionSettingValueSize (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) |
| |
| BOOLEAN | IniAddSection (PCSTR SectionName, ULONG_PTR *SectionId) |
| |
| VOID | IniFreeSection (PINI_SECTION Section) |
| |
| VOID | IniCleanup (VOID) |
| |
| BOOLEAN | IniAddSettingValueToSection (ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue) |
| |
| BOOLEAN | IniModifySettingValue (ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue) |
| |
◆ DBG_DEFAULT_CHANNEL()
◆ IniAddSection()
Definition at line 187 of file inifile.c.
188{
190
191
193 if (!Section)
194 {
196 }
197
199
200
202 if (!Section->SectionName)
203 {
206 }
207
208
209 strcpy(Section->SectionName, SectionName);
211
212
215
217
219}
VOID FrLdrTempFree(PVOID Allocation, ULONG Tag)
PVOID FrLdrTempAlloc(_In_ SIZE_T Size, _In_ ULONG Tag)
_ACRTIMP size_t __cdecl strlen(const char *)
#define InsertHeadList(ListHead, Entry)
#define InitializeListHead(ListHead)
ULONG IniFileSectionCount
LIST_ENTRY IniFileSectionListHead
#define RtlZeroMemory(Destination, Length)
◆ IniAddSettingValueToSection()
◆ IniCleanup()
Definition at line 243 of file inifile.c.
244{
247
248
250 {
251
254
255
257 }
258}
#define IsListEmpty(ListHead)
#define RemoveHeadList(ListHead)
VOID IniFreeSection(PINI_SECTION Section)
#define CONTAINING_RECORD(address, type, field)
Referenced by LoadAndBootWindowsCommon(), and RunLoader().
◆ IniFreeSection()
◆ IniGetFileSectionListHead()
◆ IniGetNumSectionItems()
◆ IniGetSectionSettingNameSize()
Definition at line 95 of file inifile.c.
96{
98
99
101 if (!SectionItem)
102 return 0;
103
104
106}
PINI_SECTION_ITEM IniGetSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber)
_In_ WDFUSBINTERFACE _In_ UCHAR SettingIndex
Referenced by BuildArgvForOsLoader().
◆ IniGetSectionSettingValueSize()
◆ IniGetSettingByNumber()
◆ IniModifySettingValue()
Definition at line 301 of file inifile.c.
302{
307
308
309 for (
Entry = Section->SectionItemList.Flink;
310 Entry != &Section->SectionItemList;
312 {
314
315
317 {
318 break;
319 }
320
321 }
322
323 if (
Entry == &Section->SectionItemList)
324 {
326 }
327
328
330 if (!NewItemValue)
331 {
332
334 }
337
339
341}
BOOLEAN IniAddSettingValueToSection(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue)
Referenced by EditCustomBootReactOS(), GetOSLoadingMethod(), and InitOperatingSystemList().
◆ IniOpenSection()
Definition at line 30 of file inifile.c.
31{
34
35 TRACE(
"IniOpenSection() SectionName = %s\n", SectionName);
36
37
41 {
43
44
45 if (
_stricmp(SectionName, Section->SectionName) == 0)
46 {
47
48 if (SectionId)
50 TRACE(
"IniOpenSection() Found it! SectionId = 0x%x\n", SectionId);
52 }
53 }
54
55 TRACE(
"IniOpenSection() Section not found.\n");
56
58}
struct _LIST_ENTRY * Flink
Referenced by InitOperatingSystemList(), LoadSettings(), and UiInitialize().
◆ IniReadSettingByName()
◆ IniReadSettingByNumber()
Definition at line 121 of file inifile.c.
122{
124 TRACE(
".001 NameSize = %d ValueSize = %d\n", NameSize, ValueSize);
125
126 TRACE(
"IniReadSettingByNumber() SectionId = 0x%x\n", SectionId);
127
128
130 if (!SectionItem)
131 {
132 TRACE(
"IniReadSettingByNumber() Setting number %d not found.\n", SettingNumber);
134 }
135
136 TRACE(
"IniReadSettingByNumber() Setting number %d found.\n", SettingNumber);
137 TRACE(
"IniReadSettingByNumber() Setting name = %s\n", SectionItem->
ItemName);
138 TRACE(
"IniReadSettingByNumber() Setting value = %s\n", SectionItem->
ItemValue);
139
140 TRACE(
"1 NameSize = %d ValueSize = %d\n", NameSize, ValueSize);
141 TRACE(
"2 NameSize = %d ValueSize = %d\n", NameSize, ValueSize);
143 SettingName[NameSize - 1] = '\0';
144 TRACE(
"3 NameSize = %d ValueSize = %d\n", NameSize, ValueSize);
146 SettingValue[ValueSize - 1] = '\0';
147 TRACE(
"4 NameSize = %d ValueSize = %d\n", NameSize, ValueSize);
150
152}
#define DbgDumpBuffer(mask, buf, len)
Referenced by BuildArgvForOsLoader(), InitOperatingSystemList(), and UiShowMessageBoxesInSection().