]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/windows/eal/eal_debug.c
eal/windows: add minimum viable code
[dpdk.git] / lib / librte_eal / windows / eal / eal_debug.c
index a9705e2576e1aec36b5aed6463c7f0fff3c40493..edcf257cc3f1fb9cda0a223e7fecaac1be01f0c0 100644 (file)
@@ -2,14 +2,18 @@
  * Copyright(c) 2019 Intel Corporation
  */
 
-#include <rte_common.h>
+#include <stdarg.h>
+#include <rte_log.h>
 
  /* call abort(), it will generate a coredump if enabled */
 void
-__rte_panic(const char *funcname __rte_unused,
-               const char *format __rte_unused, ...)
+__rte_panic(const char *funcname, const char *format, ...)
 {
-       /* TODO */
-       /* This is a stub, not the expected result */
+       va_list ap;
+
+       rte_log(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, "PANIC in %s():\n", funcname);
+       va_start(ap, format);
+       rte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap);
+       va_end(ap);
        abort();
 }