[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 8/8] user: Consider symbolic links as possible direc
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 8/8] user: Consider symbolic links as possible directories |
Date: |
Fri, 4 Jan 2013 16:39:33 -0800 |
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 <address@hidden>
---
path.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/path.c b/path.c
index ef3f277..4c5b0f6 100644
--- a/path.c
+++ b/path.c
@@ -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)
--
1.7.11.7
- [Qemu-devel] [PATCH v2 0/8] linux-user fixes, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 1/8] fdt: Use bswapN instead of bswap_N, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 4/8] bswap: Rewrite all ld<type>_<endian>_p functions, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 2/8] bswap: Tidy base definitions of bswapN, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 5/8] bswap: Rewrite cpu_to_<endian><type>u with {ld, st}<type>_<endian>_p, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 3/8] bswap: Add host endian unaligned access functions, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 8/8] user: Consider symbolic links as possible directories,
Richard Henderson <=
- [Qemu-devel] [PATCH 6/8] linux-user: Rewrite __get_user/__put_user with __builtin_choose_expr, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 7/8] alpha-linux-user: Fix sigaction, Richard Henderson, 2013/01/04
- Re: [Qemu-devel] [PATCH v2 0/8] linux-user fixes, Blue Swirl, 2013/01/12