Set filesystem characteristics.

Floppy disks and cdroms are now reported as removable.

svn path=/trunk/; revision=44442
This commit is contained in:
Sylvain Petreolle 2009-12-06 18:49:19 +00:00
parent b0bec1e996
commit bbcb38b968
4 changed files with 20 additions and 10 deletions

View file

@ -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))

View file

@ -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;

View file

@ -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))

View file

@ -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;