Author: hbelusca
Date: Thu Mar 17 01:11:10 2016
New Revision: 71016
URL:
http://svn.reactos.org/svn/reactos?rev=71016&view=rev
Log:
[VFATLIB]: Few "adjustments" (inspired from the code of DPRINT1) to diagnose
CORE-10932 CORE-10981 #comment Please retest with revision 71016 and make a debug log!
Modified:
trunk/reactos/lib/fslib/vfatlib/check/common.c
trunk/reactos/lib/fslib/vfatlib/check/common.h
Modified: trunk/reactos/lib/fslib/vfatlib/check/common.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fslib/vfatlib/check/co…
==============================================================================
--- trunk/reactos/lib/fslib/vfatlib/check/common.c [iso-8859-1] (original)
+++ trunk/reactos/lib/fslib/vfatlib/check/common.c [iso-8859-1] Thu Mar 17 01:11:10 2016
@@ -42,7 +42,7 @@
DECLSPEC_NORETURN // __attribute((noreturn))
void exit(int exitcode)
{
- DbgBreakPoint();
+ // DbgBreakPoint();
NtTerminateProcess(NtCurrentProcess(), exitcode);
/* Should never get here */
@@ -50,7 +50,7 @@
}
DECLSPEC_NORETURN // __attribute((noreturn))
-void die(const char *msg, ...)
+void die_func(const char *msg, ...) // die
{
va_list args;
@@ -59,14 +59,14 @@
DPRINT1("Unrecoverable problem!\n");
VfatPrintV((char*)msg, args);
va_end(args);
- // fprintf(stderr, "\n");
- VfatPrint("\n");
+ // // fprintf(stderr, "\n");
+ // VfatPrint("\n");
exit(1);
}
DECLSPEC_NORETURN // __attribute((noreturn))
-void pdie(const char *msg, ...)
+void pdie_func(const char *msg, ...) // pdie
{
va_list args;
@@ -75,9 +75,9 @@
DPRINT1("Unrecoverable problem!\n");
VfatPrintV((char*)msg, args);
va_end(args);
- // fprintf(stderr, ":%s\n", strerror(errno));
- // VfatPrint(":%s\n", strerror(errno));
- VfatPrint("\n");
+ // // fprintf(stderr, ":%s\n", strerror(errno));
+ // // VfatPrint(":%s\n", strerror(errno));
+ // VfatPrint("\n");
exit(1);
}
Modified: trunk/reactos/lib/fslib/vfatlib/check/common.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fslib/vfatlib/check/co…
==============================================================================
--- trunk/reactos/lib/fslib/vfatlib/check/common.h [iso-8859-1] (original)
+++ trunk/reactos/lib/fslib/vfatlib/check/common.h [iso-8859-1] Thu Mar 17 01:11:10 2016
@@ -28,12 +28,22 @@
#define _COMMON_H
DECLSPEC_NORETURN // __attribute((noreturn))
-void die(const char *msg, ...);
+// void die(const char *msg, ...);
+void die_func(const char *msg, ...);
+#define die(msg, ...) \
+do { \
+ die_func("DIE! (%s:%d) " msg "\n", __RELFILE__, __LINE__,
##__VA_ARGS__) \
+} while (0)
/* Displays a prinf-style message and terminates the program. */
DECLSPEC_NORETURN // __attribute((noreturn))
-void pdie(const char *msg, ...);
+// void pdie(const char *msg, ...);
+void pdie_func(const char *msg, ...);
+#define pdie(msg, ...) \
+do { \
+ pdie_func("P-DIE! (%s:%d) " msg "\n", __RELFILE__, __LINE__,
##__VA_ARGS__) \
+} while (0)
/* Like die, but appends an error message according to the state of errno. */