sys: DeviceExtensionKindSym

This commit is contained in:
Bill Zissimopoulos 2016-03-11 16:52:35 -08:00
parent 92020807a6
commit 5a240fdcbe
2 changed files with 19 additions and 3 deletions

View File

@ -264,6 +264,21 @@ const char *FsInformationClassSym(FS_INFORMATION_CLASS FsInformationClass)
}
}
const char *DeviceExtensionKindSym(UINT32 Kind)
{
switch (Kind)
{
case FspFsctlDeviceExtensionKind:
return "Ctl";
case FspFsvrtDeviceExtensionKind:
return "Vrt";
case FspFsvolDeviceExtensionKind:
return "Vol";
default:
return "***";
}
}
ULONG DebugRandom(VOID)
{
static KSPIN_LOCK SpinLock = 0;

View File

@ -162,7 +162,7 @@ extern __declspec(selectany) int fsp_dt = 1;
FSP_STATUS_IOQ_POST == Result || FSP_STATUS_IOQ_POST_BEST_EFFORT == Result);\
FSP_DEBUGLOG_("%p, %s%c, %s%s, " fmt, " = %s[%lld]",\
Irp, \
(const char *)&FspDeviceExtension(IrpSp->DeviceObject)->Kind,\
DeviceExtensionKindSym(FspDeviceExtension(IrpSp->DeviceObject)->Kind),\
Irp->RequestorMode == KernelMode ? 'K' : 'U',\
IrpMajorFunctionSym(IrpSp->MajorFunction),\
IrpMinorFunctionSym(IrpSp->MajorFunction, IrpSp->MinorFunction),\
@ -197,7 +197,7 @@ extern __declspec(selectany) int fsp_dt = 1;
ASSERT(0 == (FSP_STATUS_PRIVATE_BIT & Result));\
FSP_DEBUGLOG_NOCRIT_("%p, %s%c, %s%s, " fmt, " = %s[%lld]",\
Irp, \
(const char *)&FspDeviceExtension(IrpSp->DeviceObject)->Kind,\
DeviceExtensionKindSym(FspDeviceExtension(IrpSp->DeviceObject)->Kind),\
Irp->RequestorMode == KernelMode ? 'K' : 'U',\
IrpMajorFunctionSym(IrpSp->MajorFunction),\
IrpMinorFunctionSym(IrpSp->MajorFunction, IrpSp->MinorFunction),\
@ -866,6 +866,7 @@ const char *IrpMinorFunctionSym(UCHAR MajorFunction, UCHAR MinorFunction);
const char *IoctlCodeSym(ULONG ControlCode);
const char *FileInformationClassSym(FILE_INFORMATION_CLASS FileInformationClass);
const char *FsInformationClassSym(FS_INFORMATION_CLASS FsInformationClass);
const char *DeviceExtensionKindSym(UINT32 Kind);
ULONG DebugRandom(VOID);
static inline
VOID FspDebugLogIrp(const char *func, PIRP Irp, NTSTATUS Result)
@ -875,7 +876,7 @@ VOID FspDebugLogIrp(const char *func, PIRP Irp, NTSTATUS Result)
KeGetCurrentIrql(),
func,
Irp,
(const char *)&FspDeviceExtension(IrpSp->DeviceObject)->Kind,
DeviceExtensionKindSym(FspDeviceExtension(IrpSp->DeviceObject)->Kind),
Irp->RequestorMode == KernelMode ? 'K' : 'U',
IrpMajorFunctionSym(IrpSp->MajorFunction),
IrpMinorFunctionSym(IrpSp->MajorFunction, IrpSp->MinorFunction),