diff options
author | Gurucharan Shetty <gshetty@nicira.com> | 2014-03-28 08:37:36 -0700 |
---|---|---|
committer | Gurucharan Shetty <gshetty@nicira.com> | 2014-03-28 11:09:31 -0700 |
commit | a085daef8a77a441a4e28c33517ead15d4399253 (patch) | |
tree | 2f7c709a5d47e0ab8010503de33023d368129944 /utilities/ovs-appctl.c | |
parent | cb54a8c57646a1549dcff0c2ad4c2d8b46bc2880 (diff) | |
download | openvswitch-a085daef8a77a441a4e28c33517ead15d4399253.tar.gz |
ovs-appctl: A port for Windows.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'utilities/ovs-appctl.c')
-rw-r--r-- | utilities/ovs-appctl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/utilities/ovs-appctl.c b/utilities/ovs-appctl.c index c6a7fd489..a6fbebd0e 100644 --- a/utilities/ovs-appctl.c +++ b/utilities/ovs-appctl.c @@ -181,6 +181,7 @@ connect_to_target(const char *target) char *socket_name; int error; +#ifndef _WIN32 if (target[0] != '/') { char *pidfile_name; pid_t pid; @@ -193,6 +194,12 @@ connect_to_target(const char *target) free(pidfile_name); socket_name = xasprintf("%s/%s.%ld.ctl", ovs_rundir(), target, (long int) pid); +#else + /* On windows, if the 'target' contains ':', we make an assumption that + * it is an absolute path. */ + if (!strchr(target, ':')) { + socket_name = xasprintf("%s/%s.ctl", ovs_rundir(), target); +#endif } else { socket_name = xstrdup(target); } |