[ovs-dev] [PATCH 3/9] unixctl: Avoid double error reporting.

Justin Pettit jpettit at nicira.com
Fri Jan 15 21:20:49 UTC 2010


Looks good.

--Justin


On Jan 15, 2010, at 1:09 PM, Ben Pfaff wrote:

> All of these programs were re-reporting an error that
> unixctl_server_create() had already reported.  There's no need for that.
> ---
> ovsdb/ovsdb-server.c       |    2 +-
> utilities/ovs-controller.c |    4 ++--
> utilities/ovs-discover.c   |    2 +-
> utilities/ovs-openflowd.c  |    2 +-
> vswitchd/ovs-brcompatd.c   |    2 +-
> vswitchd/ovs-vswitchd.c    |    4 ++--
> 6 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c
> index 17f16b9..e3740a3 100644
> --- a/ovsdb/ovsdb-server.c
> +++ b/ovsdb/ovsdb-server.c
> @@ -92,7 +92,7 @@ main(int argc, char *argv[])
> 
>     retval = unixctl_server_create(unixctl_path, &unixctl);
>     if (retval) {
> -        ovs_fatal(retval, "could not listen for control connections");
> +        exit(EXIT_FAILURE);
>     }
> 
>     daemonize_complete();
> diff --git a/utilities/ovs-controller.c b/utilities/ovs-controller.c
> index 56a5307..34198b5 100644
> --- a/utilities/ovs-controller.c
> +++ b/utilities/ovs-controller.c
> @@ -1,5 +1,5 @@
> /*
> - * Copyright (c) 2008, 2009 Nicira Networks.
> + * Copyright (c) 2008, 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.
> @@ -129,7 +129,7 @@ main(int argc, char *argv[])
> 
>     retval = unixctl_server_create(NULL, &unixctl);
>     if (retval) {
> -        ovs_fatal(retval, "Could not listen for unixctl connections");
> +        exit(EXIT_FAILURE);
>     }
> 
>     daemonize_complete();
> diff --git a/utilities/ovs-discover.c b/utilities/ovs-discover.c
> index 9210d4d..1c3afd0 100644
> --- a/utilities/ovs-discover.c
> +++ b/utilities/ovs-discover.c
> @@ -115,7 +115,7 @@ main(int argc, char *argv[])
> 
>     retval = unixctl_server_create(NULL, &unixctl);
>     if (retval) {
> -        ovs_fatal(retval, "Could not listen for unixctl connections");
> +        exit(EXIT_FAILURE);
>     }
> 
>     die_if_already_running();
> diff --git a/utilities/ovs-openflowd.c b/utilities/ovs-openflowd.c
> index 5f4b24b..43cbd6e 100644
> --- a/utilities/ovs-openflowd.c
> +++ b/utilities/ovs-openflowd.c
> @@ -124,7 +124,7 @@ main(int argc, char *argv[])
>     /* Start listening for ovs-appctl requests. */
>     error = unixctl_server_create(NULL, &unixctl);
>     if (error) {
> -        ovs_fatal(error, "Could not listen for unixctl connections");
> +        exit(EXIT_FAILURE);
>     }
> 
>     VLOG_INFO("Open vSwitch version %s", VERSION BUILDNR);
> diff --git a/vswitchd/ovs-brcompatd.c b/vswitchd/ovs-brcompatd.c
> index 70921f2..04ee2c0 100644
> --- a/vswitchd/ovs-brcompatd.c
> +++ b/vswitchd/ovs-brcompatd.c
> @@ -1159,7 +1159,7 @@ main(int argc, char *argv[])
> 
>     retval = unixctl_server_create(NULL, &unixctl);
>     if (retval) {
> -        ovs_fatal(retval, "could not listen for vlog connections");
> +        exit(EXIT_FAILURE);
>     }
> 
>     if (brc_open(&brc_sock)) {
> diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c
> index 604ee1b..d9086dc 100644
> --- a/vswitchd/ovs-vswitchd.c
> +++ b/vswitchd/ovs-vswitchd.c
> @@ -1,4 +1,4 @@
> -/* Copyright (c) 2008, 2009 Nicira Networks
> +/* Copyright (c) 2008, 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.
> @@ -75,7 +75,7 @@ main(int argc, char *argv[])
> 
>     retval = unixctl_server_create(NULL, &unixctl);
>     if (retval) {
> -        ovs_fatal(retval, "could not listen for control connections");
> +        exit(EXIT_FAILURE);
>     }
> 
>     daemonize_complete();
> -- 
> 1.6.3.3
> 
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org





More information about the dev mailing list