[SETUPLIB] Store the vendor name for each discovered NTOS installation.

Take also the opportunity to simplify a little bit the code.
This commit is contained in:
Hermès Bélusca-Maïto 2017-12-29 19:37:28 +01:00
parent a5bcd956fa
commit f80ec8b822
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 93 additions and 71 deletions

View file

@ -8,11 +8,14 @@
#pragma once
/* Language-independent Vendor strings */
#define VENDOR_REACTOS L"ReactOS"
#define VENDOR_MICROSOFT L"Microsoft"
typedef struct _NTOS_INSTALLATION
{
LIST_ENTRY ListEntry;
// BOOLEAN IsDefault; // TRUE / FALSE whether this installation is marked as "default" in its corresponding loader configuration file.
// Vendor???? (Microsoft / ReactOS)
UNICODE_STRING SystemArcPath; // Normalized ARC path
UNICODE_STRING SystemNtPath; // Corresponding NT path
PCWSTR PathComponent; // Pointer inside SystemNtPath.Buffer
@ -20,6 +23,8 @@ typedef struct _NTOS_INSTALLATION
ULONG PartitionNumber;
PPARTENTRY PartEntry;
WCHAR InstallationName[MAX_PATH];
WCHAR VendorName[MAX_PATH];
// CHAR Data[ANYSIZE_ARRAY];
} NTOS_INSTALLATION, *PNTOS_INSTALLATION;
// EnumerateNTOSInstallations
@ -27,4 +32,11 @@ PGENERIC_LIST
CreateNTOSInstallationsList(
IN PPARTLIST List);
/*
* FindSubStrI(PCWSTR str, PCWSTR strSearch) :
* Searches for a sub-string 'strSearch' inside 'str', similarly to what
* wcsstr(str, strSearch) does, but ignores the case during the comparisons.
*/
PCWSTR FindSubStrI(PCWSTR str, PCWSTR strSearch);
/* EOF */