Author: spetreolle Date: Sun Dec 6 19:49:19 2009 New Revision: 44442
URL: http://svn.reactos.org/svn/reactos?rev=44442&view=rev Log: Set filesystem characteristics. Floppy disks and cdroms are now reported as removable.
Modified: trunk/reactos/drivers/filesystems/cdfs/fsctl.c trunk/reactos/drivers/filesystems/cdfs/volinfo.c trunk/reactos/drivers/filesystems/fastfat/fsctl.c trunk/reactos/drivers/filesystems/fastfat/volume.c
Modified: trunk/reactos/drivers/filesystems/cdfs/fsctl.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/fs... ============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/fsctl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/fsctl.c [iso-8859-1] Sun Dec 6 19:49:19 2009 @@ -332,7 +332,7 @@ sizeof(DEVICE_EXTENSION), NULL, FILE_DEVICE_CD_ROM_FILE_SYSTEM, - 0, + DeviceToMount->Characteristics, FALSE, &NewDeviceObject); if (!NT_SUCCESS(Status))
Modified: trunk/reactos/drivers/filesystems/cdfs/volinfo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/vo... ============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/volinfo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/volinfo.c [iso-8859-1] Sun Dec 6 19:49:19 2009 @@ -139,8 +139,12 @@
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 @@ 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 @@ break;
case FileFsDeviceInformation: - Status = CdfsGetFsDeviceInformation(SystemBuffer, + Status = CdfsGetFsDeviceInformation(DeviceObject, + SystemBuffer, &BufferLength); break;
Modified: trunk/reactos/drivers/filesystems/fastfat/fsctl.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfat... ============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/fsctl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/fsctl.c [iso-8859-1] Sun Dec 6 19:49:19 2009 @@ -425,7 +425,7 @@ 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))
Modified: trunk/reactos/drivers/filesystems/fastfat/volume.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfat... ============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/volume.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/volume.c [iso-8859-1] Sun Dec 6 19:49:19 2009 @@ -129,8 +129,12 @@
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 @@ 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 @@ break;
case FileFsDeviceInformation: - RC = FsdGetFsDeviceInformation(SystemBuffer, + RC = FsdGetFsDeviceInformation(IrpContext->DeviceObject, + SystemBuffer, &BufferLength); break;