From: Gurucharan Shetty Date: Thu, 13 Feb 2014 18:34:39 +0000 (-0800) Subject: util: follow_symlinks() for windows. X-Git-Tag: sliver-openvswitch-2.1.90-1~1^2~54 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=e9f56e849cf6ca4c150d527099f58623e790afbc util: follow_symlinks() for windows. Start with not supporting symbolic links for windows. This is useful for an upcoming commit. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- diff --git a/lib/util.c b/lib/util.c index 6490b4783..45efdb709 100644 --- a/lib/util.c +++ b/lib/util.c @@ -779,10 +779,14 @@ xreadlink(const char *filename) * * - Only symlinks in the final component of 'filename' are dereferenced. * + * For Windows platform, this function returns a string that has the same + * value as the passed string. + * * The caller must eventually free the returned string (with free()). */ char * follow_symlinks(const char *filename) { +#ifndef _WIN32 struct stat s; char *fn; int i; @@ -827,6 +831,7 @@ follow_symlinks(const char *filename) VLOG_WARN("%s: too many levels of symlinks", filename); free(fn); +#endif return xstrdup(filename); }