make mt-sosd use the newly added dispatch reason
[archipelago] / xseg / sys / kernel / xsegmod.c
index 75a2a55..2e6832b 100644 (file)
@@ -5,14 +5,13 @@
 #include <linux/time.h>
 
 #include <sys/domain.h>
+#include <sys/util.h>
 #include <xtypes/domain.h>
 #include <xseg/domain.h>
 
 int (*xseg_snprintf)(char *str, size_t size, const char *format, ...) = snprintf;
-EXPORT_SYMBOL(xseg_snprintf);
 
 char __xseg_errbuf[4096];
-EXPORT_SYMBOL(__xseg_errbuf);
 
 static spinlock_t __lock;
 
@@ -45,7 +44,6 @@ void __xseg_log(const char *msg)
 {
        (void)printk(KERN_INFO "%s\n", msg);
 }
-EXPORT_SYMBOL(__xseg_log);
 
 void *xtypes_malloc(unsigned long size)
 {
@@ -74,13 +72,7 @@ static void __exit xsegmod_exit(void)
        return;
 }
 
-struct log_ctx {
-       void *logfile;
-       char *peer_name;
-       unsigned int log_level; 
-};
-
-int kernel_init_logctx(struct log_ctx *lc, char *peer_name, unsigned int log_level, char *logfile)
+int kernel_init_logctx(struct log_ctx *lc, char *peer_name, enum log_level log_level, char *logfile)
 {
        lc->peer_name = peer_name;
        lc->log_level = log_level;
@@ -94,7 +86,7 @@ void __xseg_log2(struct log_ctx *lc, unsigned int level, char *fmt, ...)
        va_list ap;
        struct timeval t;
        struct tm broken;
-       char timebuf[1024], buffer[4096];
+       char buffer[1500];
        char *buf = buffer;
        char *type = NULL, *pn = NULL;
 
@@ -125,6 +117,11 @@ void __xseg_log2(struct log_ctx *lc, unsigned int level, char *fmt, ...)
        return;
 }
 
+void xseg_printtrace(void)
+{
+       dump_stack();
+}
+
 module_init(xsegmod_init);
 module_exit(xsegmod_exit);