mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 00:05:42 +00:00
[CDFS]
Fix indentation and coding style. No code changes! svn path=/trunk/; revision=67990
This commit is contained in:
parent
d284e715f4
commit
ef692c9c85
2 changed files with 173 additions and 154 deletions
|
@ -19,7 +19,7 @@
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: drivers/fs/cdfs/fsctl.c
|
* FILE: drivers/filesystems/cdfs/fsctl.c
|
||||||
* PURPOSE: CDROM (ISO 9660) filesystem driver
|
* PURPOSE: CDROM (ISO 9660) filesystem driver
|
||||||
* PROGRAMMER: Art Yerkes
|
* PROGRAMMER: Art Yerkes
|
||||||
* Eric Kohl
|
* Eric Kohl
|
||||||
|
@ -41,8 +41,10 @@ int msf_to_lba (UCHAR m, UCHAR s, UCHAR f)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static VOID
|
static
|
||||||
CdfsGetPVDData(PUCHAR Buffer,
|
VOID
|
||||||
|
CdfsGetPVDData(
|
||||||
|
PUCHAR Buffer,
|
||||||
PCDINFO CdInfo)
|
PCDINFO CdInfo)
|
||||||
{
|
{
|
||||||
PPVD Pvd;
|
PPVD Pvd;
|
||||||
|
@ -150,8 +152,10 @@ CdfsGetPVDData(PUCHAR Buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static VOID
|
static
|
||||||
CdfsGetSVDData(PUCHAR Buffer,
|
VOID
|
||||||
|
CdfsGetSVDData(
|
||||||
|
PUCHAR Buffer,
|
||||||
PCDINFO CdInfo)
|
PCDINFO CdInfo)
|
||||||
{
|
{
|
||||||
PSVD Svd;
|
PSVD Svd;
|
||||||
|
@ -190,8 +194,10 @@ CdfsGetSVDData(PUCHAR Buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static NTSTATUS
|
static
|
||||||
CdfsGetVolumeData(PDEVICE_OBJECT DeviceObject,
|
NTSTATUS
|
||||||
|
CdfsGetVolumeData(
|
||||||
|
PDEVICE_OBJECT DeviceObject,
|
||||||
PCDINFO CdInfo)
|
PCDINFO CdInfo)
|
||||||
{
|
{
|
||||||
PUCHAR Buffer;
|
PUCHAR Buffer;
|
||||||
|
@ -245,7 +251,7 @@ CdfsGetVolumeData(PDEVICE_OBJECT DeviceObject,
|
||||||
for (Sector = CDFS_PRIMARY_DESCRIPTOR_LOCATION; Sector < 100 && Buffer[0] != 255; Sector++)
|
for (Sector = CDFS_PRIMARY_DESCRIPTOR_LOCATION; Sector < 100 && Buffer[0] != 255; Sector++)
|
||||||
{
|
{
|
||||||
/* Read the Primary Volume Descriptor (PVD) */
|
/* Read the Primary Volume Descriptor (PVD) */
|
||||||
Status = CdfsReadSectors (DeviceObject,
|
Status = CdfsReadSectors(DeviceObject,
|
||||||
Sector + Offset,
|
Sector + Offset,
|
||||||
1,
|
1,
|
||||||
Buffer,
|
Buffer,
|
||||||
|
@ -300,12 +306,14 @@ CdfsGetVolumeData(PDEVICE_OBJECT DeviceObject,
|
||||||
|
|
||||||
ExFreePoolWithTag(Buffer, CDFS_TAG);
|
ExFreePoolWithTag(Buffer, CDFS_TAG);
|
||||||
|
|
||||||
return(STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static NTSTATUS
|
static
|
||||||
CdfsMountVolume(PDEVICE_OBJECT DeviceObject,
|
NTSTATUS
|
||||||
|
CdfsMountVolume(
|
||||||
|
PDEVICE_OBJECT DeviceObject,
|
||||||
PIRP Irp)
|
PIRP Irp)
|
||||||
{
|
{
|
||||||
PDEVICE_EXTENSION DeviceExt = NULL;
|
PDEVICE_EXTENSION DeviceExt = NULL;
|
||||||
|
@ -388,6 +396,7 @@ CdfsMountVolume(PDEVICE_OBJECT DeviceObject,
|
||||||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||||
goto ByeBye;
|
goto ByeBye;
|
||||||
}
|
}
|
||||||
|
|
||||||
RtlZeroMemory(Ccb,
|
RtlZeroMemory(Ccb,
|
||||||
sizeof(CCB));
|
sizeof(CCB));
|
||||||
|
|
||||||
|
@ -450,12 +459,14 @@ ByeBye:
|
||||||
|
|
||||||
DPRINT("CdfsMountVolume() done (Status: %lx)\n", Status);
|
DPRINT("CdfsMountVolume() done (Status: %lx)\n", Status);
|
||||||
|
|
||||||
return(Status);
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static NTSTATUS
|
static
|
||||||
CdfsVerifyVolume(PDEVICE_OBJECT DeviceObject,
|
NTSTATUS
|
||||||
|
CdfsVerifyVolume(
|
||||||
|
PDEVICE_OBJECT DeviceObject,
|
||||||
PIRP Irp)
|
PIRP Irp)
|
||||||
{
|
{
|
||||||
PDEVICE_EXTENSION DeviceExt;
|
PDEVICE_EXTENSION DeviceExt;
|
||||||
|
@ -466,7 +477,7 @@ CdfsVerifyVolume(PDEVICE_OBJECT DeviceObject,
|
||||||
PFCB Fcb;
|
PFCB Fcb;
|
||||||
PVPB VpbToVerify;
|
PVPB VpbToVerify;
|
||||||
|
|
||||||
DPRINT1 ("CdfsVerifyVolume() called\n");
|
DPRINT("CdfsVerifyVolume() called\n");
|
||||||
|
|
||||||
DeviceExt = DeviceObject->DeviceExtension;
|
DeviceExt = DeviceObject->DeviceExtension;
|
||||||
|
|
||||||
|
@ -474,12 +485,12 @@ CdfsVerifyVolume(PDEVICE_OBJECT DeviceObject,
|
||||||
VpbToVerify = Stack->Parameters.VerifyVolume.Vpb;
|
VpbToVerify = Stack->Parameters.VerifyVolume.Vpb;
|
||||||
|
|
||||||
FsRtlEnterFileSystem();
|
FsRtlEnterFileSystem();
|
||||||
ExAcquireResourceExclusiveLite (&DeviceExt->VcbResource,
|
ExAcquireResourceExclusiveLite(&DeviceExt->VcbResource,
|
||||||
TRUE);
|
TRUE);
|
||||||
|
|
||||||
if (!(VpbToVerify->RealDevice->Flags & DO_VERIFY_VOLUME))
|
if (!(VpbToVerify->RealDevice->Flags & DO_VERIFY_VOLUME))
|
||||||
{
|
{
|
||||||
DPRINT1 ("Volume has been verified!\n");
|
DPRINT1("Volume has been verified!\n");
|
||||||
ExReleaseResourceLite (&DeviceExt->VcbResource);
|
ExReleaseResourceLite (&DeviceExt->VcbResource);
|
||||||
FsRtlExitFileSystem();
|
FsRtlExitFileSystem();
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
@ -494,7 +505,7 @@ CdfsVerifyVolume(PDEVICE_OBJECT DeviceObject,
|
||||||
CdInfo.VolumeLabelLength == VpbToVerify->VolumeLabelLength &&
|
CdInfo.VolumeLabelLength == VpbToVerify->VolumeLabelLength &&
|
||||||
!wcsncmp(CdInfo.VolumeLabel, VpbToVerify->VolumeLabel, CdInfo.VolumeLabelLength))
|
!wcsncmp(CdInfo.VolumeLabel, VpbToVerify->VolumeLabel, CdInfo.VolumeLabelLength))
|
||||||
{
|
{
|
||||||
DPRINT1 ("Same volume!\n");
|
DPRINT1("Same volume!\n");
|
||||||
|
|
||||||
/* FIXME: Flush and purge metadata */
|
/* FIXME: Flush and purge metadata */
|
||||||
|
|
||||||
|
@ -502,7 +513,7 @@ CdfsVerifyVolume(PDEVICE_OBJECT DeviceObject,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1 ("Different volume!\n");
|
DPRINT1("Different volume!\n");
|
||||||
|
|
||||||
/* FIXME: force volume dismount */
|
/* FIXME: force volume dismount */
|
||||||
Entry = DeviceExt->FcbListHead.Flink;
|
Entry = DeviceExt->FcbListHead.Flink;
|
||||||
|
@ -519,14 +530,15 @@ CdfsVerifyVolume(PDEVICE_OBJECT DeviceObject,
|
||||||
|
|
||||||
VpbToVerify->RealDevice->Flags &= ~DO_VERIFY_VOLUME;
|
VpbToVerify->RealDevice->Flags &= ~DO_VERIFY_VOLUME;
|
||||||
|
|
||||||
ExReleaseResourceLite (&DeviceExt->VcbResource);
|
ExReleaseResourceLite(&DeviceExt->VcbResource);
|
||||||
FsRtlExitFileSystem();
|
FsRtlExitFileSystem();
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS NTAPI
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
CdfsSetCompression(
|
CdfsSetCompression(
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PIRP Irp)
|
IN PIRP Irp)
|
||||||
|
@ -549,7 +561,8 @@ CdfsSetCompression(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS NTAPI
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
CdfsFileSystemControl(
|
CdfsFileSystemControl(
|
||||||
PCDFS_IRP_CONTEXT IrpContext)
|
PCDFS_IRP_CONTEXT IrpContext)
|
||||||
{
|
{
|
||||||
|
@ -602,7 +615,7 @@ CdfsFileSystemControl(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return(Status);
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: services/fs/vfat/volume.c
|
* FILE: drivers/filesystems/cdfs/volume.c
|
||||||
* PURPOSE: CDROM (ISO 9660) filesystem driver
|
* PURPOSE: CDROM (ISO 9660) filesystem driver
|
||||||
* PROGRAMMER: Art Yerkes
|
* PROGRAMMER: Art Yerkes
|
||||||
* Eric Kohl
|
* Eric Kohl
|
||||||
|
@ -34,8 +34,10 @@
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
static NTSTATUS
|
static
|
||||||
CdfsGetFsVolumeInformation(PDEVICE_OBJECT DeviceObject,
|
NTSTATUS
|
||||||
|
CdfsGetFsVolumeInformation(
|
||||||
|
PDEVICE_OBJECT DeviceObject,
|
||||||
PFILE_FS_VOLUME_INFORMATION FsVolumeInfo,
|
PFILE_FS_VOLUME_INFORMATION FsVolumeInfo,
|
||||||
PULONG BufferLength)
|
PULONG BufferLength)
|
||||||
{
|
{
|
||||||
|
@ -72,12 +74,14 @@ CdfsGetFsVolumeInformation(PDEVICE_OBJECT DeviceObject,
|
||||||
|
|
||||||
DPRINT("BufferLength %lu\n", *BufferLength);
|
DPRINT("BufferLength %lu\n", *BufferLength);
|
||||||
|
|
||||||
return(STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static NTSTATUS
|
static
|
||||||
CdfsGetFsAttributeInformation(PDEVICE_EXTENSION DeviceExt,
|
NTSTATUS
|
||||||
|
CdfsGetFsAttributeInformation(
|
||||||
|
PDEVICE_EXTENSION DeviceExt,
|
||||||
PFILE_FS_ATTRIBUTE_INFORMATION FsAttributeInfo,
|
PFILE_FS_ATTRIBUTE_INFORMATION FsAttributeInfo,
|
||||||
PULONG BufferLength)
|
PULONG BufferLength)
|
||||||
{
|
{
|
||||||
|
@ -106,12 +110,13 @@ CdfsGetFsAttributeInformation(PDEVICE_EXTENSION DeviceExt,
|
||||||
*BufferLength -= (sizeof(FILE_FS_ATTRIBUTE_INFORMATION) + 8);
|
*BufferLength -= (sizeof(FILE_FS_ATTRIBUTE_INFORMATION) + 8);
|
||||||
DPRINT("BufferLength %lu\n", *BufferLength);
|
DPRINT("BufferLength %lu\n", *BufferLength);
|
||||||
|
|
||||||
return(STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static NTSTATUS
|
static NTSTATUS
|
||||||
CdfsGetFsSizeInformation(PDEVICE_OBJECT DeviceObject,
|
CdfsGetFsSizeInformation(
|
||||||
|
PDEVICE_OBJECT DeviceObject,
|
||||||
PFILE_FS_SIZE_INFORMATION FsSizeInfo,
|
PFILE_FS_SIZE_INFORMATION FsSizeInfo,
|
||||||
PULONG BufferLength)
|
PULONG BufferLength)
|
||||||
{
|
{
|
||||||
|
@ -122,7 +127,7 @@ CdfsGetFsSizeInformation(PDEVICE_OBJECT DeviceObject,
|
||||||
DPRINT("FsSizeInfo = %p\n", FsSizeInfo);
|
DPRINT("FsSizeInfo = %p\n", FsSizeInfo);
|
||||||
|
|
||||||
if (*BufferLength < sizeof(FILE_FS_SIZE_INFORMATION))
|
if (*BufferLength < sizeof(FILE_FS_SIZE_INFORMATION))
|
||||||
return(STATUS_BUFFER_OVERFLOW);
|
return STATUS_BUFFER_OVERFLOW;
|
||||||
|
|
||||||
DeviceExt = DeviceObject->DeviceExtension;
|
DeviceExt = DeviceObject->DeviceExtension;
|
||||||
|
|
||||||
|
@ -135,17 +140,16 @@ CdfsGetFsSizeInformation(PDEVICE_OBJECT DeviceObject,
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
*BufferLength -= sizeof(FILE_FS_SIZE_INFORMATION);
|
*BufferLength -= sizeof(FILE_FS_SIZE_INFORMATION);
|
||||||
|
|
||||||
return(Status);
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static NTSTATUS
|
static
|
||||||
CdfsGetFsDeviceInformation
|
NTSTATUS
|
||||||
(
|
CdfsGetFsDeviceInformation(
|
||||||
PDEVICE_OBJECT DeviceObject,
|
PDEVICE_OBJECT DeviceObject,
|
||||||
PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
|
PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
|
||||||
PULONG BufferLength
|
PULONG BufferLength)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
DPRINT("CdfsGetFsDeviceInformation()\n");
|
DPRINT("CdfsGetFsDeviceInformation()\n");
|
||||||
DPRINT("FsDeviceInfo = %p\n", FsDeviceInfo);
|
DPRINT("FsDeviceInfo = %p\n", FsDeviceInfo);
|
||||||
|
@ -153,7 +157,7 @@ CdfsGetFsDeviceInformation
|
||||||
DPRINT("Required length %lu\n", sizeof(FILE_FS_DEVICE_INFORMATION));
|
DPRINT("Required length %lu\n", sizeof(FILE_FS_DEVICE_INFORMATION));
|
||||||
|
|
||||||
if (*BufferLength < sizeof(FILE_FS_DEVICE_INFORMATION))
|
if (*BufferLength < sizeof(FILE_FS_DEVICE_INFORMATION))
|
||||||
return(STATUS_BUFFER_OVERFLOW);
|
return STATUS_BUFFER_OVERFLOW;
|
||||||
|
|
||||||
FsDeviceInfo->DeviceType = FILE_DEVICE_CD_ROM;
|
FsDeviceInfo->DeviceType = FILE_DEVICE_CD_ROM;
|
||||||
FsDeviceInfo->Characteristics = DeviceObject->Characteristics;
|
FsDeviceInfo->Characteristics = DeviceObject->Characteristics;
|
||||||
|
@ -163,11 +167,12 @@ CdfsGetFsDeviceInformation
|
||||||
*BufferLength -= sizeof(FILE_FS_DEVICE_INFORMATION);
|
*BufferLength -= sizeof(FILE_FS_DEVICE_INFORMATION);
|
||||||
DPRINT("BufferLength %lu\n", *BufferLength);
|
DPRINT("BufferLength %lu\n", *BufferLength);
|
||||||
|
|
||||||
return(STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS NTAPI
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
CdfsQueryVolumeInformation(
|
CdfsQueryVolumeInformation(
|
||||||
PCDFS_IRP_CONTEXT IrpContext)
|
PCDFS_IRP_CONTEXT IrpContext)
|
||||||
{
|
{
|
||||||
|
@ -230,11 +235,12 @@ CdfsQueryVolumeInformation(
|
||||||
else
|
else
|
||||||
Irp->IoStatus.Information = 0;
|
Irp->IoStatus.Information = 0;
|
||||||
|
|
||||||
return(Status);
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS NTAPI
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
CdfsSetVolumeInformation(
|
CdfsSetVolumeInformation(
|
||||||
PCDFS_IRP_CONTEXT IrpContext)
|
PCDFS_IRP_CONTEXT IrpContext)
|
||||||
{
|
{
|
||||||
|
@ -248,7 +254,7 @@ CdfsSetVolumeInformation(
|
||||||
Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
|
Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
|
||||||
Irp->IoStatus.Information = 0;
|
Irp->IoStatus.Information = 0;
|
||||||
|
|
||||||
return(STATUS_NOT_SUPPORTED);
|
return STATUS_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue