mountmgr: Frame device service functions with IoGetCurrentIrpStackLocation and IoCompleteRequest.
This commit is contained in:
parent
394839fecf
commit
63bc9c484a
|
@ -858,7 +858,7 @@ NTSTATUS query_dos_device( int letter, enum device_type *type, char **device, ch
|
||||||
/* handler for ioctls on the harddisk device */
|
/* handler for ioctls on the harddisk device */
|
||||||
static NTSTATUS WINAPI harddisk_ioctl( DEVICE_OBJECT *device, IRP *irp )
|
static NTSTATUS WINAPI harddisk_ioctl( DEVICE_OBJECT *device, IRP *irp )
|
||||||
{
|
{
|
||||||
IO_STACK_LOCATION *irpsp = irp->Tail.Overlay.s.u2.CurrentStackLocation;
|
IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp );
|
||||||
struct disk_device *dev = device->DeviceExtension;
|
struct disk_device *dev = device->DeviceExtension;
|
||||||
|
|
||||||
TRACE( "ioctl %x insize %u outsize %u\n",
|
TRACE( "ioctl %x insize %u outsize %u\n",
|
||||||
|
@ -904,6 +904,7 @@ static NTSTATUS WINAPI harddisk_ioctl( DEVICE_OBJECT *device, IRP *irp )
|
||||||
}
|
}
|
||||||
|
|
||||||
LeaveCriticalSection( &device_section );
|
LeaveCriticalSection( &device_section );
|
||||||
|
IoCompleteRequest( irp, IO_NO_INCREMENT );
|
||||||
return irp->IoStatus.u.Status;
|
return irp->IoStatus.u.Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -351,7 +351,7 @@ done:
|
||||||
/* handler for ioctls on the mount manager device */
|
/* handler for ioctls on the mount manager device */
|
||||||
static NTSTATUS WINAPI mountmgr_ioctl( DEVICE_OBJECT *device, IRP *irp )
|
static NTSTATUS WINAPI mountmgr_ioctl( DEVICE_OBJECT *device, IRP *irp )
|
||||||
{
|
{
|
||||||
IO_STACK_LOCATION *irpsp = irp->Tail.Overlay.s.u2.CurrentStackLocation;
|
IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp );
|
||||||
|
|
||||||
TRACE( "ioctl %x insize %u outsize %u\n",
|
TRACE( "ioctl %x insize %u outsize %u\n",
|
||||||
irpsp->Parameters.DeviceIoControl.IoControlCode,
|
irpsp->Parameters.DeviceIoControl.IoControlCode,
|
||||||
|
@ -390,6 +390,7 @@ static NTSTATUS WINAPI mountmgr_ioctl( DEVICE_OBJECT *device, IRP *irp )
|
||||||
irp->IoStatus.u.Status = STATUS_NOT_SUPPORTED;
|
irp->IoStatus.u.Status = STATUS_NOT_SUPPORTED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
IoCompleteRequest( irp, IO_NO_INCREMENT );
|
||||||
return irp->IoStatus.u.Status;
|
return irp->IoStatus.u.Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue