diff options
author | Richard Henderson <rth@twiddle.net> | 2013-01-04 16:39:33 -0800 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2013-01-12 12:25:22 +0000 |
commit | 338d80dd353c50b6397723ffecf7e5bc3ba1651d (patch) | |
tree | cc35917f36a3397ae6e678bd1eb8f70e81f12890 /path.c | |
parent | d2565875ec5a483ddcdf3cec821830bd1f082cf6 (diff) |
user: Consider symbolic links as possible directories
Commit 2296f194dfde4c0a54f249d3fdb8c8ca21dc611b reduced the number
of syscalls performed during user emulation startup, but failed to
consider the use of symbolic links in creating directory structures.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'path.c')
-rw-r--r-- | path.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -58,9 +58,10 @@ static struct pathelem *new_entry(const char *root, #define streq(a,b) (strcmp((a), (b)) == 0) /* Not all systems provide this feature */ -#if defined(DT_DIR) && defined(DT_UNKNOWN) +#if defined(DT_DIR) && defined(DT_UNKNOWN) && defined(DT_LNK) # define dirent_type(dirent) ((dirent)->d_type) -# define is_dir_maybe(type) ((type) == DT_DIR || (type) == DT_UNKNOWN) +# define is_dir_maybe(type) \ + ((type) == DT_DIR || (type) == DT_UNKNOWN || (type) == DT_LNK) #else # define dirent_type(dirent) (1) # define is_dir_maybe(type) (type) |