Go to the source code of this file.
|
NTSTATUS | GetFileSystemName_UStr (IN PUNICODE_STRING PartitionPath OPTIONAL, IN HANDLE PartitionHandle OPTIONAL, IN OUT PWSTR FileSystemName, IN SIZE_T FileSystemNameSize) |
|
NTSTATUS | GetFileSystemName (IN PCWSTR PartitionPath OPTIONAL, IN HANDLE PartitionHandle OPTIONAL, IN OUT PWSTR FileSystemName, IN SIZE_T FileSystemNameSize) |
|
NTSTATUS | InferFileSystem (IN PCWSTR PartitionPath OPTIONAL, IN HANDLE PartitionHandle OPTIONAL, IN OUT PWSTR FileSystemName, IN SIZE_T FileSystemNameSize) |
|
UCHAR | FileSystemToMBRPartitionType (IN PCWSTR FileSystem, IN ULONGLONG StartSector, IN ULONGLONG SectorCount) |
|
◆ FileSystemToMBRPartitionType()
Definition at line 333 of file fsrec.c.
337{
339
342
346 {
348 {
349
351 }
352 else if (StartSector < 1450560ULL)
353 {
354
355
357 {
358
360 }
362 {
363
365 }
366 else
367 {
368
370 }
371 }
372 else
373 {
374
375
377 {
378
380 }
381 else
382 {
383
385 }
386 }
387 }
389 {
391 }
396 {
398 }
399 else
400 {
401
404 }
405}
#define PARTITION_ENTRY_UNUSED
#define PARTITION_FAT32_XINT13
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
Referenced by FormatPartition(), and InitializePartitionEntry().
◆ GetFileSystemName()
Definition at line 112 of file fsrec.c.
117{
119
120 if (PartitionPath && PartitionHandle)
122
123 if (PartitionPath)
125
127 PartitionPath ?
NULL : PartitionHandle,
128 FileSystemName,
129 FileSystemNameSize);
130}
NTSTATUS GetFileSystemName_UStr(IN PUNICODE_STRING PartitionPath OPTIONAL, IN HANDLE PartitionHandle OPTIONAL, IN OUT PWSTR FileSystemName, IN SIZE_T FileSystemNameSize)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define STATUS_INVALID_PARAMETER
◆ GetFileSystemName_UStr()
Definition at line 55 of file fsrec.c.
60{
64
65 if (PartitionPath && PartitionHandle)
67
68
69
70 if (PartitionPath)
71 {
73 PartitionPath,
82 0 );
84 {
85 DPRINT1(
"Failed to open partition '%wZ', Status 0x%08lx\n",
88 }
89 }
90
91
94 FileSystemName,
95 FileSystemNameSize);
97 {
98 DPRINT1(
"GetFileSystemName() failed for partition '%wZ' (0x%p), Status 0x%08lx\n",
99 PartitionPath, PartitionHandle,
Status);
100 }
101
102 if (PartitionPath)
103 {
104
106 }
107
109}
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
static NTSTATUS GetFileSystemNameWorker(IN HANDLE PartitionHandle, OUT PIO_STATUS_BLOCK IoStatusBlock, IN OUT PWSTR FileSystemName, IN SIZE_T FileSystemNameSize)
#define OBJ_CASE_INSENSITIVE
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define FILE_GENERIC_READ
Referenced by GetFileSystemName(), InferFileSystemWorker(), and InstallBootManagerAndBootEntries().
◆ InferFileSystem()
Definition at line 269 of file fsrec.c.
274{
279
280 if (PartitionPath && PartitionHandle)
282
283
284
285 if (PartitionPath)
286 {
289 &PartitionPathU,
298 0 );
300 {
301 DPRINT1(
"Failed to open partition '%S', Status 0x%08lx\n",
304 }
305 }
306
307
310 FileSystemName,
311 FileSystemNameSize);
313 {
314 DPRINT1(
"InferFileSystem() failed for partition '%S' (0x%p), Status 0x%08lx\n",
315 PartitionPath, PartitionHandle,
Status);
316 }
317 else
318 {
319 DPRINT1(
"InferFileSystem(): FileSystem (guessed): %S\n",
320 *FileSystemName ? FileSystemName :
L"None");
321 }
322
323 if (PartitionPath)
324 {
325
327 }
328
330}
static NTSTATUS InferFileSystemWorker(IN HANDLE PartitionHandle, OUT PIO_STATUS_BLOCK IoStatusBlock, IN OUT PWSTR FileSystemName, IN SIZE_T FileSystemNameSize)
Referenced by MountVolume().