X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utilities%2Fovs-appctl.c;h=27fbe5e69fe539b810ffa71893d558044788cfe3;hb=aa62994cbd99d4538e2b22fade4bd9835037dca0;hp=021ac84efd233aadb6b28e8e4ceece7299e0c2da;hpb=ff8bb7e76b2cdcbcf88cd2fac663ba517e4a659c;p=openvswitch diff --git a/utilities/ovs-appctl.c b/utilities/ovs-appctl.c index 021ac84e..27fbe5e6 100644 --- a/utilities/ovs-appctl.c +++ b/utilities/ovs-appctl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010 Nicira Networks. + * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -65,6 +65,7 @@ main(int argc, char *argv[]) ovs_fatal(error, "%s: transaction error", target); } if (code / 100 != 2) { + fputs(reply, stderr); ovs_error(0, "%s: server returned reply code %03d", target, code); exit(2); } @@ -108,7 +109,7 @@ parse_command_line(int argc, char *argv[]) {"execute", no_argument, NULL, 'e'}, {"help", no_argument, NULL, 'h'}, {"version", no_argument, NULL, 'V'}, - {0, 0, 0, 0}, + {NULL, 0, NULL, 0}, }; const char *target; int e_options; @@ -175,14 +176,14 @@ connect_to_target(const char *target) char *pidfile_name; pid_t pid; - pidfile_name = xasprintf("%s/%s.pid", ovs_rundir, target); + pidfile_name = xasprintf("%s/%s.pid", ovs_rundir(), target); pid = read_pidfile(pidfile_name); if (pid < 0) { ovs_fatal(-pid, "cannot read pidfile \"%s\"", pidfile_name); } free(pidfile_name); socket_name = xasprintf("%s/%s.%ld.ctl", - ovs_rundir, target, (long int) pid); + ovs_rundir(), target, (long int) pid); } else { socket_name = xstrdup(target); }