mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 08:53:01 -05:00
sys: FSP_ENTER_MJ, FSP_LEAVE_MJ overhaul
This commit is contained in:
parent
bde11ce1ad
commit
6d8e820067
@ -62,21 +62,29 @@
|
|||||||
FSP_ENTER_(__VA_ARGS__)
|
FSP_ENTER_(__VA_ARGS__)
|
||||||
#define FSP_LEAVE_MJ(fmt, ...) \
|
#define FSP_LEAVE_MJ(fmt, ...) \
|
||||||
FSP_LEAVE_( \
|
FSP_LEAVE_( \
|
||||||
FSP_DEBUGLOG_("%c%c, %s%s, IrpSp->Flags=%x, " fmt, " = %s",\
|
FSP_DEBUGLOG_("%c%c, %s%s, IrpSp->Flags=%x, " fmt, " = %s%s%lld%s",\
|
||||||
FspDeviceExtension(DeviceObject)->Kind,\
|
FspDeviceExtension(DeviceObject)->Kind,\
|
||||||
Irp->RequestorMode == KernelMode ? 'K' : 'U',\
|
Irp->RequestorMode == KernelMode ? 'K' : 'U',\
|
||||||
IrpMajorFunctionSym(IrpSp->MajorFunction),\
|
IrpMajorFunctionSym(IrpSp->MajorFunction),\
|
||||||
IrpMinorFunctionSym(IrpSp->MajorFunction, IrpSp->MajorFunction),\
|
IrpMinorFunctionSym(IrpSp->MajorFunction, IrpSp->MajorFunction),\
|
||||||
IrpSp->Flags, \
|
IrpSp->Flags, \
|
||||||
__VA_ARGS__, \
|
__VA_ARGS__, \
|
||||||
NtStatusSym(Result)); \
|
NtStatusSym(Result), \
|
||||||
|
NT_SUCCESS(Result) ? "[" : "",\
|
||||||
|
Irp->IoStatus.Information, \
|
||||||
|
NT_SUCCESS(Result) ? "]" : "");\
|
||||||
if (STATUS_PENDING != Result) \
|
if (STATUS_PENDING != Result) \
|
||||||
{ \
|
{ \
|
||||||
if (!NT_SUCCESS(Result)) \
|
if (!NT_SUCCESS(Result)) \
|
||||||
Irp->IoStatus.Information = 0;\
|
Irp->IoStatus.Information = 0;\
|
||||||
Irp->IoStatus.Status = Result;\
|
Irp->IoStatus.Status = Result;\
|
||||||
IoCompleteRequest(Irp, FSP_IO_INCREMENT);\
|
IoCompleteRequest(Irp, FSP_IO_INCREMENT);\
|
||||||
}); \
|
} \
|
||||||
|
else \
|
||||||
|
{ \
|
||||||
|
IoMarkIrpPending(Irp); \
|
||||||
|
} \
|
||||||
|
); \
|
||||||
return Result
|
return Result
|
||||||
#define FSP_ENTER_BOOL(...) \
|
#define FSP_ENTER_BOOL(...) \
|
||||||
BOOLEAN Result = TRUE; FSP_ENTER_(__VA_ARGS__)
|
BOOLEAN Result = TRUE; FSP_ENTER_(__VA_ARGS__)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user