diff options
author | Ben Pfaff <blp@ovn.org> | 2018-07-24 09:58:56 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-08-03 09:22:00 -0700 |
commit | 4c36252dce687a53e39a37b2acbdbb20a965217d (patch) | |
tree | 5954962972e9487d07879ce4e264c91961aea17c | |
parent | 4d8f04b3e93d7a853619e664abde955d0dfe0c48 (diff) | |
download | openvswitch-4c36252dce687a53e39a37b2acbdbb20a965217d.tar.gz |
unixctl: Use absolute paths on Windows too.
When this case was adapted for Windows, asb_file_name() simply didn't work
at all there. Now, it should work OK, and it seems like the right thing
to do, and it makes the code more straightforward too.
Acked-by: Alin Gabriel Serdean <aserdean@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
-rw-r--r-- | lib/unixctl.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/unixctl.c b/lib/unixctl.c index df9c2bdc3..bd9c1caee 100644 --- a/lib/unixctl.c +++ b/lib/unixctl.c @@ -228,11 +228,7 @@ unixctl_server_create(const char *path, struct unixctl_server **serverp) if (path) { char *abs_path; -#ifndef _WIN32 abs_path = abs_file_name(ovs_rundir(), path); -#else - abs_path = xstrdup(path); -#endif punix_path = xasprintf("punix:%s", abs_path); free(abs_path); } else { @@ -451,16 +447,11 @@ unixctl_server_destroy(struct unixctl_server *server) int unixctl_client_create(const char *path, struct jsonrpc **client) { - char *abs_path, *unix_path; struct stream *stream; int error; -#ifdef _WIN32 - abs_path = xstrdup(path); -#else - abs_path = abs_file_name(ovs_rundir(), path); -#endif - unix_path = xasprintf("unix:%s", abs_path); + char *abs_path = abs_file_name(ovs_rundir(), path); + char *unix_path = xasprintf("unix:%s", abs_path); *client = NULL; |