[ovs-git] [openvswitch/ovs] 631762: util: Fix abs_file_name() bugs on Windows.
GitHub
noreply at github.com
Fri Aug 3 17:48:33 UTC 2018
Branch: refs/heads/branch-2.10
Home: https://github.com/openvswitch/ovs
Commit: 631762192b939e4571d44c818b4f5d2492100205
https://github.com/openvswitch/ovs/commit/631762192b939e4571d44c818b4f5d2492100205
Author: Ben Pfaff <blp at ovn.org>
Date: 2018-08-03 (Fri, 03 Aug 2018)
Changed paths:
M Documentation/intro/install/windows.rst
M appveyor.yml
M lib/util.c
M lib/util.h
Log Message:
-----------
util: Fix abs_file_name() bugs on Windows.
abs_file_name() believed that a file name that begins with / or contains :
is absolute and that any other file name is relative. On Windows, this is
wrong in at least the following ways:
* / and \ are interchangeable on Windows.
* A name that begins with \\ or // is also absolute.
* A name that begins with X: but not X:\ is not absolute.
* A name with : in some position other than the second position is
not absolute (although it might not be valid either?).
Furthermore, Windows has more than one current working directory (one per
volume letter), so trying to make a file name absolute by just prefixing
the current working directory for the current volume results in silliness.
This patch attempts to fix the problem.
This makes OVS link against shlwapi, which is needed to use
PathIsRelative().
Found by inspection.
Acked-by: Alin Gabriel Serdean <aserdean at ovn.org>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Commit: 060e82cdcdba86744d96415444ca28921156db00
https://github.com/openvswitch/ovs/commit/060e82cdcdba86744d96415444ca28921156db00
Author: Ben Pfaff <blp at ovn.org>
Date: 2018-08-03 (Fri, 03 Aug 2018)
Changed paths:
M lib/unixctl.c
Log Message:
-----------
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 at ovn.org>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Compare: https://github.com/openvswitch/ovs/compare/011b3f9b99b8...060e82cdcdba
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
More information about the git
mailing list