Skip to content

Commit

Permalink
[CLASS2]
Browse files Browse the repository at this point in the history
It's up to class drivers to handle MountMgr requests. So, make it handle them, even though that's just to fail because it's not implemented.
This will stop IOCTLs to be sent down in the storage stack.

svn path=/trunk/; revision=76032
  • Loading branch information
HeisSpiter committed Oct 3, 2017
1 parent 350ede0 commit b94e2d8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions reactos/drivers/storage/class/class2/class2.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <ntddk.h>
#include <ntdddisk.h>
#include <mountdev.h>
#include <scsi.h>
#include <include/class2.h>
#include <stdio.h>
Expand Down Expand Up @@ -4040,6 +4041,17 @@ Return Value:
goto SetStatusAndReturn;
}

if (irpStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_MOUNTDEV_QUERY_DEVICE_NAME ||
irpStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_MOUNTDEV_QUERY_UNIQUE_ID ||
irpStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_MOUNTDEV_QUERY_SUGGESTED_LINK_NAME) {
UNIMPLEMENTED;
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
status = STATUS_NOT_IMPLEMENTED;
goto SetStatusAndReturn;
}

srb = ExAllocatePool(NonPagedPool, SCSI_REQUEST_BLOCK_SIZE);

if (srb == NULL) {
Expand Down

0 comments on commit b94e2d8

Please sign in to comment.