PUCHAR Buffer;
NTSTATUS Status;
- Buffer = (PUCHAR)AllocateItem(NonPagedPool, sizeof(UCHAR));
+ Buffer = (PUCHAR)ExAllocatePoolWithTag(NonPagedPool, sizeof(UCHAR), USB_STOR_TAG);
if (!Buffer)
{
- FreeItem(Buffer);
return STATUS_INSUFFICIENT_RESOURCES;
}
if (NT_SUCCESS(Status))
{
- if (*Buffer > 0xF)
+ if (*Buffer > MAX_LUN)
{
// invalid response documented in usb mass storage specification
Status = STATUS_DEVICE_DATA_ERROR;
Status = STATUS_SUCCESS;
}
- FreeItem(Buffer);
+ ExFreePoolWithTag(Buffer, USB_STOR_TAG);
return Status;
}
return Status;
}
+// if somebody wants to add UFI support, here is a useful function
#if 0
BOOLEAN
USBSTOR_IsFloppy(