remove useless memzone includes
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal_log.c
index a2d9056..c088bd9 100644 (file)
@@ -39,8 +39,6 @@
 #include <sys/queue.h>
 
 #include <rte_memory.h>
-#include <rte_memzone.h>
-#include <rte_tailq.h>
 #include <rte_eal.h>
 #include <rte_launch.h>
 #include <rte_per_lcore.h>
@@ -51,8 +49,7 @@
 #include "eal_private.h"
 
 /*
- * default log function, used once mempool (hence log history) is
- * available
+ * default log function
  */
 static ssize_t
 console_log_write(__attribute__((unused)) void *c, const char *buf, size_t size)
@@ -61,9 +58,6 @@ console_log_write(__attribute__((unused)) void *c, const char *buf, size_t size)
        ssize_t ret;
        uint32_t loglevel;
 
-       /* add this log in history */
-       rte_log_add_in_history(buf, size);
-
        /* write on stdout */
        ret = fwrite(buf, 1, size, stdout);
        fflush(stdout);
@@ -102,46 +96,7 @@ rte_eal_log_init(const char *id, int facility)
 
        openlog(id, LOG_NDELAY | LOG_PID, facility);
 
-       if (rte_eal_common_log_init(log_stream) < 0)
-               return -1;
-
-       return 0;
-}
-
-/* early logs */
+       eal_log_set_default(log_stream);
 
-/*
- * early log function, used during boot when mempool (hence log
- * history) is not available
- */
-static ssize_t
-early_log_write(__attribute__((unused)) void *c, const char *buf, size_t size)
-{
-       ssize_t ret;
-       ret = fwrite(buf, size, 1, stdout);
-       fflush(stdout);
-       if (ret == 0)
-               return -1;
-       return ret;
-}
-
-static cookie_io_functions_t early_log_func = {
-       .write = early_log_write,
-};
-static FILE *early_log_stream;
-
-/*
- * init the log library, called by rte_eal_init() to enable early
- * logs
- */
-int
-rte_eal_log_early_init(void)
-{
-       early_log_stream = fopencookie(NULL, "w+", early_log_func);
-       if (early_log_stream == NULL) {
-               printf("Cannot configure early_log_stream\n");
-               return -1;
-       }
-       rte_openlog_stream(early_log_stream);
        return 0;
 }