[PATCH 1/2] Add helper function to read file link targets

Jouni Malinen j at w1.fi
Mon Nov 8 09:57:00 PST 2021


On Tue, Apr 06, 2021 at 11:45:48PM +0000, Andrew Beltrano wrote:
> diff --git a/src/utils/common.c b/src/utils/common.c

> +#include <sys/stat.h>
> +int read_link_target(const char *name, char **target)
> +   if (lstat(name, &statbuf) < 0)
..

src/utils/common.c is supposed to be mostly platform independent
functionality while platform/operating system specific functionality
would be in src/utils/os_*.c. This function seems to be in that latter
category and I'd assume it would have quite different behavior on
Windows, for example, and maybe not even applicable for that case to
meet the patch 2/2 need.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list