From bbcb38b9682e95bf2ca750658af34023e8343127 Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Sun, 6 Dec 2009 18:49:19 +0000 Subject: [PATCH] Set filesystem characteristics. Floppy disks and cdroms are now reported as removable. svn path=/trunk/; revision=44442 --- reactos/drivers/filesystems/cdfs/fsctl.c | 2 +- reactos/drivers/filesystems/cdfs/volinfo.c | 13 +++++++++---- reactos/drivers/filesystems/fastfat/fsctl.c | 2 +- reactos/drivers/filesystems/fastfat/volume.c | 13 +++++++++---- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/reactos/drivers/filesystems/cdfs/fsctl.c b/reactos/drivers/filesystems/cdfs/fsctl.c index 146344fcd8f..897c08155c7 100644 --- a/reactos/drivers/filesystems/cdfs/fsctl.c +++ b/reactos/drivers/filesystems/cdfs/fsctl.c @@ -332,7 +332,7 @@ CdfsMountVolume(PDEVICE_OBJECT DeviceObject, sizeof(DEVICE_EXTENSION), NULL, FILE_DEVICE_CD_ROM_FILE_SYSTEM, - 0, + DeviceToMount->Characteristics, FALSE, &NewDeviceObject); if (!NT_SUCCESS(Status)) diff --git a/reactos/drivers/filesystems/cdfs/volinfo.c b/reactos/drivers/filesystems/cdfs/volinfo.c index d0716329c41..0198335162d 100644 --- a/reactos/drivers/filesystems/cdfs/volinfo.c +++ b/reactos/drivers/filesystems/cdfs/volinfo.c @@ -139,8 +139,12 @@ CdfsGetFsSizeInformation(PDEVICE_OBJECT DeviceObject, static NTSTATUS -CdfsGetFsDeviceInformation(PFILE_FS_DEVICE_INFORMATION FsDeviceInfo, - PULONG BufferLength) +CdfsGetFsDeviceInformation +( + PDEVICE_OBJECT DeviceObject, + PFILE_FS_DEVICE_INFORMATION FsDeviceInfo, + PULONG BufferLength +) { DPRINT("CdfsGetFsDeviceInformation()\n"); DPRINT("FsDeviceInfo = %p\n", FsDeviceInfo); @@ -151,7 +155,7 @@ CdfsGetFsDeviceInformation(PFILE_FS_DEVICE_INFORMATION FsDeviceInfo, return(STATUS_BUFFER_OVERFLOW); FsDeviceInfo->DeviceType = FILE_DEVICE_CD_ROM; - FsDeviceInfo->Characteristics = 0; /* FIXME: fix this !! */ + FsDeviceInfo->Characteristics = DeviceObject->Characteristics; DPRINT("FsdGetFsDeviceInformation() finished.\n"); @@ -203,7 +207,8 @@ CdfsQueryVolumeInformation(PDEVICE_OBJECT DeviceObject, break; case FileFsDeviceInformation: - Status = CdfsGetFsDeviceInformation(SystemBuffer, + Status = CdfsGetFsDeviceInformation(DeviceObject, + SystemBuffer, &BufferLength); break; diff --git a/reactos/drivers/filesystems/fastfat/fsctl.c b/reactos/drivers/filesystems/fastfat/fsctl.c index b064619a558..8b47aa82837 100644 --- a/reactos/drivers/filesystems/fastfat/fsctl.c +++ b/reactos/drivers/filesystems/fastfat/fsctl.c @@ -425,7 +425,7 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext) ROUND_UP(sizeof (DEVICE_EXTENSION), sizeof(ULONG)) + sizeof(HASHENTRY*) * HashTableSize, NULL, FILE_DEVICE_DISK_FILE_SYSTEM, - 0, + DeviceToMount->Characteristics, FALSE, &DeviceObject); if (!NT_SUCCESS(Status)) diff --git a/reactos/drivers/filesystems/fastfat/volume.c b/reactos/drivers/filesystems/fastfat/volume.c index 4bf4ffeea40..d91e44fa99c 100644 --- a/reactos/drivers/filesystems/fastfat/volume.c +++ b/reactos/drivers/filesystems/fastfat/volume.c @@ -129,8 +129,12 @@ FsdGetFsSizeInformation(PDEVICE_OBJECT DeviceObject, static NTSTATUS -FsdGetFsDeviceInformation(PFILE_FS_DEVICE_INFORMATION FsDeviceInfo, - PULONG BufferLength) +FsdGetFsDeviceInformation +( + PDEVICE_OBJECT DeviceObject, + PFILE_FS_DEVICE_INFORMATION FsDeviceInfo, + PULONG BufferLength +) { DPRINT("FsdGetFsDeviceInformation()\n"); DPRINT("FsDeviceInfo = %p\n", FsDeviceInfo); @@ -141,7 +145,7 @@ FsdGetFsDeviceInformation(PFILE_FS_DEVICE_INFORMATION FsDeviceInfo, return(STATUS_BUFFER_OVERFLOW); FsDeviceInfo->DeviceType = FILE_DEVICE_DISK; - FsDeviceInfo->Characteristics = 0; /* FIXME: fix this !! */ + FsDeviceInfo->Characteristics = DeviceObject->Characteristics; DPRINT("FsdGetFsDeviceInformation() finished.\n"); @@ -343,7 +347,8 @@ NTSTATUS VfatQueryVolumeInformation(PVFAT_IRP_CONTEXT IrpContext) break; case FileFsDeviceInformation: - RC = FsdGetFsDeviceInformation(SystemBuffer, + RC = FsdGetFsDeviceInformation(IrpContext->DeviceObject, + SystemBuffer, &BufferLength); break; -- 2.17.1