Skip to content

Commit 3013e15

Browse files
committed
[FASTFAT_NEW] Fix build with FASTFATDBG set
1 parent 0daa554 commit 3013e15

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

drivers/filesystems/fastfat_new/fatdata.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ extern LONG FatDebugTraceIndent;
234234
} \
235235
}
236236

237+
#ifdef _MSC_VER
237238
#define DebugDump(STR,LEVEL,PTR) { \
238239
__pragma(warning(push)) \
239240
__pragma(warning(disable:4210)) \
@@ -248,9 +249,22 @@ extern LONG FatDebugTraceIndent;
248249
} \
249250
__pragma(warning(pop)) \
250251
}
252+
#else
253+
#define DebugDump(STR,LEVEL,PTR) { \
254+
ULONG _i; \
255+
VOID FatDump(IN PVOID Ptr); \
256+
if (((LEVEL) == 0) || (FatDebugTraceLevel & (LEVEL))) { \
257+
_i = (ULONG)PsGetCurrentThread(); \
258+
DbgPrint("%08lx:",_i); \
259+
DbgPrint(STR); \
260+
if (PTR != NULL) {FatDump(PTR);} \
261+
NT_ASSERT(FALSE); \
262+
} \
263+
}
264+
#endif
251265

252266
#define DebugUnwind(X) { \
253-
if (AbnormalTermination()) { \
267+
if (_SEH2_AbnormalTermination()) { \
254268
DebugTrace(0, DEBUG_TRACE_UNWIND, #X ", Abnormal termination.\n", 0); \
255269
} \
256270
}

0 commit comments

Comments
 (0)