mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 05:20:54 +00:00
Set filesystem characteristics.
Floppy disks and cdroms are now reported as removable. svn path=/trunk/; revision=44442
This commit is contained in:
parent
b0bec1e996
commit
bbcb38b968
4 changed files with 20 additions and 10 deletions
|
@ -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))
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue