mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 17:33:18 +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),
|
sizeof(DEVICE_EXTENSION),
|
||||||
NULL,
|
NULL,
|
||||||
FILE_DEVICE_CD_ROM_FILE_SYSTEM,
|
FILE_DEVICE_CD_ROM_FILE_SYSTEM,
|
||||||
0,
|
DeviceToMount->Characteristics,
|
||||||
FALSE,
|
FALSE,
|
||||||
&NewDeviceObject);
|
&NewDeviceObject);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
|
|
@ -139,8 +139,12 @@ CdfsGetFsSizeInformation(PDEVICE_OBJECT DeviceObject,
|
||||||
|
|
||||||
|
|
||||||
static NTSTATUS
|
static NTSTATUS
|
||||||
CdfsGetFsDeviceInformation(PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
|
CdfsGetFsDeviceInformation
|
||||||
PULONG BufferLength)
|
(
|
||||||
|
PDEVICE_OBJECT DeviceObject,
|
||||||
|
PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
|
||||||
|
PULONG BufferLength
|
||||||
|
)
|
||||||
{
|
{
|
||||||
DPRINT("CdfsGetFsDeviceInformation()\n");
|
DPRINT("CdfsGetFsDeviceInformation()\n");
|
||||||
DPRINT("FsDeviceInfo = %p\n", FsDeviceInfo);
|
DPRINT("FsDeviceInfo = %p\n", FsDeviceInfo);
|
||||||
|
@ -151,7 +155,7 @@ CdfsGetFsDeviceInformation(PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
|
||||||
return(STATUS_BUFFER_OVERFLOW);
|
return(STATUS_BUFFER_OVERFLOW);
|
||||||
|
|
||||||
FsDeviceInfo->DeviceType = FILE_DEVICE_CD_ROM;
|
FsDeviceInfo->DeviceType = FILE_DEVICE_CD_ROM;
|
||||||
FsDeviceInfo->Characteristics = 0; /* FIXME: fix this !! */
|
FsDeviceInfo->Characteristics = DeviceObject->Characteristics;
|
||||||
|
|
||||||
DPRINT("FsdGetFsDeviceInformation() finished.\n");
|
DPRINT("FsdGetFsDeviceInformation() finished.\n");
|
||||||
|
|
||||||
|
@ -203,7 +207,8 @@ CdfsQueryVolumeInformation(PDEVICE_OBJECT DeviceObject,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FileFsDeviceInformation:
|
case FileFsDeviceInformation:
|
||||||
Status = CdfsGetFsDeviceInformation(SystemBuffer,
|
Status = CdfsGetFsDeviceInformation(DeviceObject,
|
||||||
|
SystemBuffer,
|
||||||
&BufferLength);
|
&BufferLength);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -425,7 +425,7 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext)
|
||||||
ROUND_UP(sizeof (DEVICE_EXTENSION), sizeof(ULONG)) + sizeof(HASHENTRY*) * HashTableSize,
|
ROUND_UP(sizeof (DEVICE_EXTENSION), sizeof(ULONG)) + sizeof(HASHENTRY*) * HashTableSize,
|
||||||
NULL,
|
NULL,
|
||||||
FILE_DEVICE_DISK_FILE_SYSTEM,
|
FILE_DEVICE_DISK_FILE_SYSTEM,
|
||||||
0,
|
DeviceToMount->Characteristics,
|
||||||
FALSE,
|
FALSE,
|
||||||
&DeviceObject);
|
&DeviceObject);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
|
|
@ -129,8 +129,12 @@ FsdGetFsSizeInformation(PDEVICE_OBJECT DeviceObject,
|
||||||
|
|
||||||
|
|
||||||
static NTSTATUS
|
static NTSTATUS
|
||||||
FsdGetFsDeviceInformation(PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
|
FsdGetFsDeviceInformation
|
||||||
PULONG BufferLength)
|
(
|
||||||
|
PDEVICE_OBJECT DeviceObject,
|
||||||
|
PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
|
||||||
|
PULONG BufferLength
|
||||||
|
)
|
||||||
{
|
{
|
||||||
DPRINT("FsdGetFsDeviceInformation()\n");
|
DPRINT("FsdGetFsDeviceInformation()\n");
|
||||||
DPRINT("FsDeviceInfo = %p\n", FsDeviceInfo);
|
DPRINT("FsDeviceInfo = %p\n", FsDeviceInfo);
|
||||||
|
@ -141,7 +145,7 @@ FsdGetFsDeviceInformation(PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
|
||||||
return(STATUS_BUFFER_OVERFLOW);
|
return(STATUS_BUFFER_OVERFLOW);
|
||||||
|
|
||||||
FsDeviceInfo->DeviceType = FILE_DEVICE_DISK;
|
FsDeviceInfo->DeviceType = FILE_DEVICE_DISK;
|
||||||
FsDeviceInfo->Characteristics = 0; /* FIXME: fix this !! */
|
FsDeviceInfo->Characteristics = DeviceObject->Characteristics;
|
||||||
|
|
||||||
DPRINT("FsdGetFsDeviceInformation() finished.\n");
|
DPRINT("FsdGetFsDeviceInformation() finished.\n");
|
||||||
|
|
||||||
|
@ -343,7 +347,8 @@ NTSTATUS VfatQueryVolumeInformation(PVFAT_IRP_CONTEXT IrpContext)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FileFsDeviceInformation:
|
case FileFsDeviceInformation:
|
||||||
RC = FsdGetFsDeviceInformation(SystemBuffer,
|
RC = FsdGetFsDeviceInformation(IrpContext->DeviceObject,
|
||||||
|
SystemBuffer,
|
||||||
&BufferLength);
|
&BufferLength);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue