aboutsummaryrefslogtreecommitdiff
path: root/vswitchd
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-07-16 11:02:49 -0700
committerBen Pfaff <blp@nicira.com>2010-07-21 15:47:09 -0700
commit5136ce492c414f377f7be9ae32b259abb9f76580 (patch)
tree3590fa980be1d23746938e60ac992849d0b39edc /vswitchd
parent9200fb9ef9a1c55a76e4c4aa789f3fb0a76f0ed1 (diff)
vlog: Introduce VLOG_DEFINE_THIS_MODULE for declaring vlog module in use.
Adding a macro to define the vlog module in use adds a level of indirection, which makes it easier to change how the vlog module must be defined. A followup commit needs to do that, so getting these widespread changes out of the way first should make that commit easier to review.
Diffstat (limited to 'vswitchd')
-rw-r--r--vswitchd/bridge.c4
-rw-r--r--vswitchd/ovs-brcompatd.c4
-rw-r--r--vswitchd/ovs-vswitchd.c4
-rw-r--r--vswitchd/proc-net-compat.c4
-rw-r--r--vswitchd/xenserver.c6
5 files changed, 11 insertions, 11 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index e4d9cb7b..be0e8758 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -63,11 +63,11 @@
#include "vconn.h"
#include "vswitchd/vswitch-idl.h"
#include "xenserver.h"
+#include "vlog.h"
#include "xtoxll.h"
#include "sflow_api.h"
-#define THIS_MODULE VLM_bridge
-#include "vlog.h"
+VLOG_DEFINE_THIS_MODULE(bridge)
struct dst {
uint16_t vlan;
diff --git a/vswitchd/ovs-brcompatd.c b/vswitchd/ovs-brcompatd.c
index 6e620e1d..5e59373e 100644
--- a/vswitchd/ovs-brcompatd.c
+++ b/vswitchd/ovs-brcompatd.c
@@ -54,10 +54,10 @@
#include "timeval.h"
#include "unixctl.h"
#include "util.h"
+#include "vlog.h"
#include "vswitchd/vswitch-idl.h"
-#include "vlog.h"
-#define THIS_MODULE VLM_brcompatd
+VLOG_DEFINE_THIS_MODULE(brcompatd)
/* xxx Just hangs if datapath is rmmod/insmod. Learn to reconnect? */
diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c
index a027b8cf..541cdcbc 100644
--- a/vswitchd/ovs-vswitchd.c
+++ b/vswitchd/ovs-vswitchd.c
@@ -45,10 +45,10 @@
#include "unixctl.h"
#include "util.h"
#include "vconn.h"
+#include "vlog.h"
#include "vswitchd/vswitch-idl.h"
-#include "vlog.h"
-#define THIS_MODULE VLM_vswitchd
+VLOG_DEFINE_THIS_MODULE(vswitchd)
static unixctl_cb_func ovs_vswitchd_exit;
diff --git a/vswitchd/proc-net-compat.c b/vswitchd/proc-net-compat.c
index 106a7c3f..6a8f8756 100644
--- a/vswitchd/proc-net-compat.c
+++ b/vswitchd/proc-net-compat.c
@@ -31,10 +31,10 @@
#include "hmap.h"
#include "shash.h"
#include "svec.h"
-
-#define THIS_MODULE VLM_proc_net_compat
#include "vlog.h"
+VLOG_DEFINE_THIS_MODULE(proc_net_compat)
+
/* Netlink socket to bridge compatibility kernel module. */
static struct nl_sock *brc_sock;
diff --git a/vswitchd/xenserver.c b/vswitchd/xenserver.c
index 03c49555..976d7162 100644
--- a/vswitchd/xenserver.c
+++ b/vswitchd/xenserver.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009 Nicira Networks
+/* Copyright (c) 2009, 2010 Nicira Networks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,9 +22,9 @@
#include <unistd.h>
#include "dynamic-string.h"
#include "process.h"
-
#include "vlog.h"
-#define THIS_MODULE VLM_xenserver
+
+VLOG_DEFINE_THIS_MODULE(xenserver)
static char *
read_host_uuid(void)