[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] [PATCH]Adding FORCE (x) to kentry
Here is the patch to add the kernel debug function FORCE(x) to the
kentry struct.
Because kentry is modified remember that a new recompilation of xaaes
will be needed with new kernels.
Comment:
Add the debug function FORCE(x) to kentry.
Index: libkern/kernel_module.h
===================================================================
RCS file: /mint/freemint/sys/libkern/kernel_module.h,v
retrieving revision 1.41
diff -u -8 -r1.41 kernel_module.h
--- libkern/kernel_module.h 13 Aug 2011 18:11:05 -0000 1.41
+++ libkern/kernel_module.h 29 Nov 2011 16:53:23 -0000
@@ -941,17 +941,17 @@
/*
* kentry_debug
*/
# define DEBUG_LEVEL (*KENTRY->vec_debug.debug_level)
# define KERNEL_TRACE (*KENTRY->vec_debug.trace)
# define KERNEL_DEBUG (*KENTRY->vec_debug.debug)
# define KERNEL_ALERT (*KENTRY->vec_debug.alert)
# define KERNEL_FATAL (*KENTRY->vec_debug.fatal)
-
+# define KERNEL_FORCE (*KENTRY->vec_debug.force)
/*
* kentry_libkern
*/
# define _ctype ( KENTRY->vec_libkern._ctype)
# define tolower (*KENTRY->vec_libkern.tolower)
Index: mint/kentry.h
===================================================================
RCS file: /mint/freemint/sys/mint/kentry.h,v
retrieving revision 1.43
diff -u -8 -r1.43 kentry.h
--- mint/kentry.h 7 May 2011 04:27:27 -0000 1.43
+++ mint/kentry.h 29 Nov 2011 16:53:27 -0000
@@ -105,19 +105,19 @@
* Every structure size modification *must* increase the major version.
* Every other modifcation must increase the minor version.
*
* major and minor are of type unsigned char. I hope 255 major and minor
* versions are enough :-)
*/
#define KENTRY_MAJ_VERSION 0
#ifdef XHDI_MASS_STORAGE_SUPPORT
-#define KENTRY_MIN_VERSION 17
+#define KENTRY_MIN_VERSION 18
#else
-#define KENTRY_MIN_VERSION 16
+#define KENTRY_MIN_VERSION 17
#endif
/* hardware dependant vector
*/
struct kentry_mch
{
/* global values/flags */
const struct global * const global;
@@ -614,31 +614,34 @@
{
/* Debugging stuff
* ---------------
*
* trace - informational messages
* debug - error messages
* alert - really serious errors
* fatal - fatal errors
+ * force - always prints, even with debug level 0
*/
int *debug_level;
void _cdecl (*trace)(const char *, ...);
void _cdecl (*debug)(const char *, ...);
void _cdecl (*alert)(const char *, ...);
EXITING _cdecl (*fatal)(const char *, ...) NORETURN;
+ void _cdecl (*force)(const char *, ...);
};
extern int debug_level;
#define DEFAULTS_kentry_debug \
{ \
&debug_level, \
Trace, \
Debug, \
ALERT, \
FATAL, \
+ FORCE, \
}
/* libkern exported functions
*/
struct kentry_libkern
{
/*