mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:05:43 +00:00
[FLOPPY] Implement IOCTL_MOUNTDEV_QUERY_DEVICE_NAME
This commit is contained in:
parent
bf6215c601
commit
20b4f0a231
2 changed files with 25 additions and 0 deletions
|
@ -74,6 +74,7 @@ DeviceIoctlPassive(PDRIVE_INFO DriveInfo, PIRP Irp)
|
||||||
PVOID OutputBuffer = Irp->AssociatedIrp.SystemBuffer;
|
PVOID OutputBuffer = Irp->AssociatedIrp.SystemBuffer;
|
||||||
ULONG Code = Stack->Parameters.DeviceIoControl.IoControlCode;
|
ULONG Code = Stack->Parameters.DeviceIoControl.IoControlCode;
|
||||||
BOOLEAN DiskChanged;
|
BOOLEAN DiskChanged;
|
||||||
|
PMOUNTDEV_NAME Name;
|
||||||
|
|
||||||
TRACE_(FLOPPY, "DeviceIoctl called\n");
|
TRACE_(FLOPPY, "DeviceIoctl called\n");
|
||||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||||
|
@ -255,6 +256,29 @@ DeviceIoctlPassive(PDRIVE_INFO DriveInfo, PIRP Irp)
|
||||||
Irp->IoStatus.Information = 0;
|
Irp->IoStatus.Information = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case IOCTL_MOUNTDEV_QUERY_DEVICE_NAME:
|
||||||
|
if (OutputLength < sizeof(MOUNTDEV_NAME)) {
|
||||||
|
Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL;
|
||||||
|
Irp->IoStatus.Information = sizeof(MOUNTDEV_NAME);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
Name = Irp->AssociatedIrp.SystemBuffer;
|
||||||
|
Name->NameLength = wcslen(&DriveInfo->SymLinkBuffer[0]) * sizeof(WCHAR);
|
||||||
|
|
||||||
|
if (OutputLength < sizeof(USHORT) + Name->NameLength) {
|
||||||
|
Irp->IoStatus.Status = STATUS_BUFFER_OVERFLOW;
|
||||||
|
Irp->IoStatus.Information = sizeof(MOUNTDEV_NAME);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
RtlCopyMemory(Name->Name, &DriveInfo->SymLinkBuffer[0],
|
||||||
|
Name->NameLength);
|
||||||
|
|
||||||
|
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||||
|
Irp->IoStatus.Information = sizeof(USHORT) + Name->NameLength;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ERR_(FLOPPY, "UNKNOWN IOCTL CODE: 0x%x\n", Code);
|
ERR_(FLOPPY, "UNKNOWN IOCTL CODE: 0x%x\n", Code);
|
||||||
Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
|
Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define _FLOPPY_PCH_
|
#define _FLOPPY_PCH_
|
||||||
|
|
||||||
#include <wdm.h>
|
#include <wdm.h>
|
||||||
|
#include <mountdev.h>
|
||||||
|
|
||||||
#include "floppy.h"
|
#include "floppy.h"
|
||||||
#include "csqrtns.h"
|
#include "csqrtns.h"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue