[libvirt] [PATCH] util: clean up #includes of virnetdevopenvswitch.h

virnetdevopenvswitch.h declares a few functions that can be called to add ports to and remove them from OVS bridges, and retrieve the migration data for a port. It does not contain any data definitions that are used by domain_conf.h. But for some reason, domain_conf.h virnetdevopenvswitch.h should be directly #including it. This adds a few lines to the project, but saves all the files that don't need it from the extra computing, and makes the dependencies more clear cut. --- src/conf/domain_conf.h | 1 - src/lxc/lxc_driver.c | 1 + src/lxc/lxc_process.c | 1 + src/qemu/qemu_hotplug.c | 1 + src/qemu/qemu_migration.c | 3 ++- src/qemu/qemu_process.c | 1 + 6 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 4eb7742..9d314fa 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -42,7 +42,6 @@ # include "virnetdevmacvlan.h" # include "virsysinfo.h" # include "virnetdevvportprofile.h" -# include "virnetdevopenvswitch.h" # include "virnetdevbandwidth.h" # include "virnetdevvlan.h" # include "virobject.h" diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 98fbea8..245000d 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -49,6 +49,7 @@ #include "viralloc.h" #include "virnetdevbridge.h" #include "virnetdevveth.h" +#include "virnetdevopenvswitch.h" #include "nodeinfo.h" #include "viruuid.h" #include "virstats.h" diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 1e90c16..6c23a0b 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -37,6 +37,7 @@ #include "virnetdev.h" #include "virnetdevveth.h" #include "virnetdevbridge.h" +#include "virnetdevopenvswitch.h" #include "virtime.h" #include "domain_nwfilter.h" #include "network/bridge_driver.h" diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 32596a7..9e51f31 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -47,6 +47,7 @@ #include "virnetdev.h" #include "virnetdevbridge.h" #include "virnetdevtap.h" +#include "virnetdevopenvswitch.h" #include "virnetdevmidonet.h" #include "device_conf.h" #include "virstoragefile.h" diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 83be435..992e192 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1,7 +1,7 @@ /* * qemu_migration.c: QEMU migration handling * - * Copyright (C) 2006-2014 Red Hat, Inc. + * Copyright (C) 2006-2015 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -45,6 +45,7 @@ #include "virerror.h" #include "viralloc.h" #include "virfile.h" +#include "virnetdevopenvswitch.h" #include "datatypes.h" #include "fdstream.h" #include "viruuid.h" diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index c395b5b..afa2f1d 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -62,6 +62,7 @@ #include "virprocess.h" #include "virtime.h" #include "virnetdevtap.h" +#include "virnetdevopenvswitch.h" #include "virnetdevmidonet.h" #include "virbitmap.h" #include "viratomic.h" -- 2.1.0

On 03/17/2015 11:50 AM, Laine Stump wrote:
virnetdevopenvswitch.h declares a few functions that can be called to add ports to and remove them from OVS bridges, and retrieve the migration data for a port. It does not contain any data definitions that are used by domain_conf.h. But for some reason, domain_conf.h virnetdevopenvswitch.h should be directly #including it. This adds a
That sentence didn't read well. Maybe But for some reason, domain_conf.h was directly #including virnetdevopenvswitch.h.
few lines to the project, but saves all the files that don't need it from the extra computing, and makes the dependencies more clear cut. --- src/conf/domain_conf.h | 1 - src/lxc/lxc_driver.c | 1 + src/lxc/lxc_process.c | 1 + src/qemu/qemu_hotplug.c | 1 + src/qemu/qemu_migration.c | 3 ++- src/qemu/qemu_process.c | 1 + 6 files changed, 6 insertions(+), 2 deletions(-)
ACK. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 03/17/2015 01:54 PM, Eric Blake wrote:
On 03/17/2015 11:50 AM, Laine Stump wrote:
virnetdevopenvswitch.h declares a few functions that can be called to add ports to and remove them from OVS bridges, and retrieve the migration data for a port. It does not contain any data definitions that are used by domain_conf.h. But for some reason, domain_conf.h virnetdevopenvswitch.h should be directly #including it. This adds a That sentence didn't read well. Maybe
But for some reason, domain_conf.h was directly #including virnetdevopenvswitch.h.
Urgh. Yes. Either I accidentally hit an arrow key while typing, or it's another case of artifacts on the screen messing me up (although I've only noticed that with Thunderbird, not with emacs). Thanks!

On 03/17/2015 12:59 PM, Laine Stump wrote:
On 03/17/2015 01:54 PM, Eric Blake wrote:
On 03/17/2015 11:50 AM, Laine Stump wrote:
virnetdevopenvswitch.h declares a few functions that can be called to add ports to and remove them from OVS bridges, and retrieve the migration data for a port. It does not contain any data definitions that are used by domain_conf.h. But for some reason, domain_conf.h virnetdevopenvswitch.h should be directly #including it. This adds a That sentence didn't read well. Maybe
But for some reason, domain_conf.h was directly #including virnetdevopenvswitch.h.
Urgh. Yes. Either I accidentally hit an arrow key while typing, or it's another case of artifacts on the screen messing me up (although I've only noticed that with Thunderbird, not with emacs).
Ah, I know what happened. You typed 'domain_conf.h #includes ...', but since '#includes' was at the start of a new line, git commit treated it as a comment line and nuked that section of your sentence. (I hate when that happens - I've been bit when trying to paste terminal sequences run as root where my prompt was #) -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Laine Stump