X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=vswitchd%2Fovs-vswitchd.c;h=d98af469dc894ee4eb98077beb9a9add3c5fc62c;hb=f4ade10529d5a3882ff1d6937c19f5c1585eb8b1;hp=a7b43f7b4f34535e3ce429e0f416bb579c8e5a20;hpb=8b61709d5ec6c4ef58a04fcaefde617ff63fa10d;p=openvswitch diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c index a7b43f7b..d98af469 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. @@ -81,7 +81,10 @@ main(int argc, char *argv[]) } unixctl_command_register("vswitchd/reload", reload); - cfg_read(); + retval = cfg_read(); + if (retval) { + ovs_fatal(retval, "could not read config file"); + } mgmt_init(); bridge_init(); mgmt_reconfigure(); @@ -119,7 +122,7 @@ main(int argc, char *argv[]) } static void -reload(struct unixctl_conn *conn, const char *args UNUSED) +reload(struct unixctl_conn *conn, const char *args OVS_UNUSED) { need_reconfigure = true; conns = xrealloc(conns, sizeof *conns * (n_conns + 1)); @@ -222,6 +225,7 @@ parse_options(int argc, char *argv[]) "use --help for usage"); } + cfg_init(); config_file = argv[0]; error = cfg_set_file(config_file); if (error) {