Andrey Korotaev <unC0Rr@inbox.ru>

- Fix inverted logic in fs recognizer, and some comment fixes.
See issue #2325 for more details.

svn path=/trunk/; revision=30615
This commit is contained in:
Aleksey Bragin 2007-11-21 09:18:32 +00:00
parent 4f69fa75ae
commit fb08021b40

View file

@ -24,8 +24,8 @@ FsRecIsNtfsVolume(IN PPACKED_BOOT_SECTOR BootSector,
PAGED_CODE();
BOOLEAN Result;
/* Assume success */
Result = TRUE;
/* Assume failure */
Result = FALSE;
if ((BootSector->Oem[0] == 'N') &&
(BootSector->Oem[1] == 'T') &&
@ -36,8 +36,8 @@ FsRecIsNtfsVolume(IN PPACKED_BOOT_SECTOR BootSector,
(BootSector->Oem[6] == ' ') &&
(BootSector->Oem[7] == ' '))
{
/* Fail */
Result = FALSE;
/* Success */
Result = TRUE;
}
/* Return the result */
@ -84,7 +84,7 @@ FsRecNtfsFsControl(IN PDEVICE_OBJECT DeviceObject,
(PVOID)&Bpb,
NULL))
{
/* Check if it's an actual FAT volume */
/* Check if it's an actual NTFS volume */
if (FsRecIsNtfsVolume(Bpb, SectorSize, &SectorCount))
{
/* It is! */
@ -98,7 +98,7 @@ FsRecNtfsFsControl(IN PDEVICE_OBJECT DeviceObject,
(PVOID)&Bpb,
NULL))
{
/* Check if it's an actual FAT volume */
/* Check if it's an actual NTFS volume */
if (FsRecIsNtfsVolume(Bpb, SectorSize, &SectorCount))
{
/* It is! */
@ -112,7 +112,7 @@ FsRecNtfsFsControl(IN PDEVICE_OBJECT DeviceObject,
(PVOID)&Bpb,
NULL))
{
/* Check if it's an actual FAT volume */
/* Check if it's an actual NTFS volume */
if (FsRecIsNtfsVolume(Bpb, SectorSize, &SectorCount))
{
/* It is! */