From ddcd968807624037003d6d9e1b16f4f8784b7819 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Wed, 21 Nov 2007 15:40:41 +0000 Subject: [PATCH] initialize Bios Parameter Block fix building with msvc svn path=/trunk/; revision=30627 --- reactos/drivers/filesystems/fs_rec/fat.c | 2 ++ reactos/drivers/filesystems/fs_rec/fs_rec.c | 4 ++++ reactos/drivers/filesystems/fs_rec/ntfs.c | 7 +++---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/reactos/drivers/filesystems/fs_rec/fat.c b/reactos/drivers/filesystems/fs_rec/fat.c index ade1f6b0945..48cacc72fd4 100644 --- a/reactos/drivers/filesystems/fs_rec/fat.c +++ b/reactos/drivers/filesystems/fs_rec/fat.c @@ -23,6 +23,8 @@ FsRecIsFatVolume(IN PPACKED_BOOT_SECTOR PackedBootSector) BOOLEAN Result = TRUE; PAGED_CODE(); + RtlZeroMemory(&Bpb, sizeof(BIOS_PARAMETER_BLOCK)); + /* Unpack the BPB and do a small fix up */ FatUnpackBios(&Bpb, &PackedBootSector->PackedBpb); if (Bpb.Sectors) Bpb.LargeSectors = 0; diff --git a/reactos/drivers/filesystems/fs_rec/fs_rec.c b/reactos/drivers/filesystems/fs_rec/fs_rec.c index c5cb0b460e5..0ed579ca70e 100644 --- a/reactos/drivers/filesystems/fs_rec/fs_rec.c +++ b/reactos/drivers/filesystems/fs_rec/fs_rec.c @@ -74,6 +74,7 @@ FsRecLoadFileSystem(IN PDEVICE_OBJECT DeviceObject, return Status; } +DRIVER_DISPATCH FsRecCreate; NTSTATUS STDCALL FsRecCreate(IN PDEVICE_OBJECT DeviceObject, @@ -102,6 +103,7 @@ FsRecCreate(IN PDEVICE_OBJECT DeviceObject, return Status; } +DRIVER_DISPATCH FsRecClose; NTSTATUS STDCALL FsRecClose(IN PDEVICE_OBJECT DeviceObject, @@ -114,6 +116,7 @@ FsRecClose(IN PDEVICE_OBJECT DeviceObject, return STATUS_SUCCESS; } +DRIVER_DISPATCH FsRecFsControl; NTSTATUS STDCALL FsRecFsControl(IN PDEVICE_OBJECT DeviceObject, @@ -162,6 +165,7 @@ FsRecFsControl(IN PDEVICE_OBJECT DeviceObject, return Status; } +DRIVER_UNLOAD FsRecUnload; VOID STDCALL FsRecUnload(IN PDRIVER_OBJECT DriverObject) diff --git a/reactos/drivers/filesystems/fs_rec/ntfs.c b/reactos/drivers/filesystems/fs_rec/ntfs.c index 97b221c716a..a939337502c 100644 --- a/reactos/drivers/filesystems/fs_rec/ntfs.c +++ b/reactos/drivers/filesystems/fs_rec/ntfs.c @@ -21,11 +21,10 @@ FsRecIsNtfsVolume(IN PPACKED_BOOT_SECTOR BootSector, IN ULONG BytesPerSector, IN PLARGE_INTEGER NumberOfSectors) { - PAGED_CODE(); - BOOLEAN Result; - /* Assume failure */ - Result = FALSE; + BOOLEAN Result = FALSE; + + PAGED_CODE(); if ((BootSector->Oem[0] == 'N') && (BootSector->Oem[1] == 'T') &&