[SETUPLIB][USETUP] Bring some suggestions from PR #59 in.

- Use OBJ_CASE_INSENSITIVE when initializing object attributes
  (no actual reason why to keep case sensitivity there).

- Check the success of a RtlStringCchPrintfW call in EnumerateReactOSEntries().

- Explicitly check for returned STATUS_NOT_SUPPORTED from ChkdskPartition()
  or FormatPartition(), and display an appropriate error message.

- Remove some left-over comments but also explain why I kept some
  commented code (mainly for future reference).
This commit is contained in:
Hermès Bélusca-Maïto 2017-12-23 20:17:38 +01:00
parent a7a11dd60d
commit 765994c9e3
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
7 changed files with 99 additions and 54 deletions

View file

@ -212,8 +212,8 @@ InstallSetupInfFile(
PINICACHE UnattendCache;
PINICACHEITERATOR Iterator;
#else
// PCWSTR CrLf = L"\r\n";
PCSTR CrLf = "\r\n";
// WCHAR CrLf[] = {L'\r', L'\n'};
CHAR CrLf[] = {'\r', '\n'};
HANDLE FileHandle, UnattendFileHandle, SectionHandle;
FILE_STANDARD_INFORMATION FileInfo;
ULONG FileSize;
@ -360,7 +360,7 @@ Quit:
NULL,
&IoStatusBlock,
(PVOID)CrLf,
2 * sizeof(CHAR), // 2 * sizeof(WCHAR),
sizeof(CrLf),
&FileInfo.EndOfFile,
NULL);