aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/cutils.c14
-rw-r--r--util/module.c2
2 files changed, 15 insertions, 1 deletions
diff --git a/util/cutils.c b/util/cutils.c
index 0116fcde74..b337293239 100644
--- a/util/cutils.c
+++ b/util/cutils.c
@@ -27,6 +27,7 @@
#include "qemu/sockets.h"
#include "qemu/iov.h"
+#include "net/net.h"
void strpadcpy(char *buf, int buf_size, const char *str, char pad)
{
@@ -530,3 +531,16 @@ int parse_debug_env(const char *name, int max, int initial)
}
return debug;
}
+
+/*
+ * Helper to print ethernet mac address
+ */
+const char *qemu_ether_ntoa(const MACAddr *mac)
+{
+ static char ret[18];
+
+ snprintf(ret, sizeof(ret), "%02x:%02x:%02x:%02x:%02x:%02x",
+ mac->a[0], mac->a[1], mac->a[2], mac->a[3], mac->a[4], mac->a[5]);
+
+ return ret;
+}
diff --git a/util/module.c b/util/module.c
index 863a8a32a3..214effb39f 100644
--- a/util/module.c
+++ b/util/module.c
@@ -163,7 +163,7 @@ out:
}
#endif
-void module_load(module_init_type type)
+static void module_load(module_init_type type)
{
#ifdef CONFIG_MODULES
char *fname = NULL;