I didn't try it, but looks reasonable to me.  Should we be deleting some of the 
other generated files?  Such as ".ann" and ".ovsidl"?

--Justin


On Mar 27, 2012, at 3:59 PM, Ben Pfaff wrote:

> Codes that uses #include "vswitch-idl.h" can get an older version of this
> header, because this header file moved from vswitchd/ to lib/ and the
> older generated file might still be present.
> 
> This helps out two ways:
> 
>     * "make clean" will delete the generated files from their old
>       locations.
> 
>     * Use #include "lib/vswitch-idl.h" to explicitly avoid including the
>       files from their old locations.
> 
> Reported-by: Justin Pettit <jpet...@nicira.com>
> Signed-off-by: Ben Pfaff <b...@nicira.com>
> ---
> utilities/ovs-vsctl.c   |    2 +-
> vswitchd/automake.mk    |    4 ++++
> vswitchd/bridge.c       |    2 +-
> vswitchd/ovs-vswitchd.c |    2 +-
> 4 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c
> index 86889cc..0caf57e 100644
> --- a/utilities/ovs-vsctl.c
> +++ b/utilities/ovs-vsctl.c
> @@ -41,7 +41,7 @@
> #include "stream-ssl.h"
> #include "sset.h"
> #include "svec.h"
> -#include "vswitch-idl.h"
> +#include "lib/vswitch-idl.h"
> #include "table.h"
> #include "timeval.h"
> #include "util.h"
> diff --git a/vswitchd/automake.mk b/vswitchd/automake.mk
> index 4df5f22..9092129 100644
> --- a/vswitchd/automake.mk
> +++ b/vswitchd/automake.mk
> @@ -95,3 +95,7 @@ vswitchd/vswitch.ovsschema.stamp: vswitchd/vswitch.ovsschema
>         exit 1; \
>       fi
> CLEANFILES += vswitchd/vswitch.ovsschema.stamp
> +
> +# Clean up generated files from older OVS versions.  (This is important so 
> that
> +# #include "vswitch-idl.h" doesn't get the wrong copy.)
> +CLEANFILES += vswitchd/vswitch-idl.c vswitchd/vswitch-idl.h
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> index 1778227..e15d57b 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -50,7 +50,7 @@
> #include "util.h"
> #include "unixctl.h"
> #include "vlandev.h"
> -#include "vswitch-idl.h"
> +#include "lib/vswitch-idl.h"
> #include "xenserver.h"
> #include "vlog.h"
> #include "sflow_api.h"
> diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c
> index ebac1aa..f7ddee1 100644
> --- a/vswitchd/ovs-vswitchd.c
> +++ b/vswitchd/ovs-vswitchd.c
> @@ -49,7 +49,7 @@
> #include "util.h"
> #include "vconn.h"
> #include "vlog.h"
> -#include "vswitch-idl.h"
> +#include "lib/vswitch-idl.h"
> 
> VLOG_DEFINE_THIS_MODULE(vswitchd);
> 
> -- 
> 1.7.2.5
> 

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to