[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH 1/6] lib/vfscore: Revert __fxstatat() implementation to original Osv behavior
Hey Costin,thanks for the work. The code changes look fine to me. Maybe you could mention in your description that the patch is bringing back the handling of the AT_SYMLINK_NOFOLLOW flag to __fxstatat. Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx> On 06.12.19 14:41, Costin Lupu wrote: We simply brought back the handling of flags, just as it was in Osv. Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx> --- lib/vfscore/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c index cf84a0e0..d6145a2b 100644 --- a/lib/vfscore/main.c +++ b/lib/vfscore/main.c @@ -567,10 +567,6 @@ LFS64(fstat); int __fxstatat(int ver __unused, int dirfd, const char *pathname, struct stat *st, int flags) { - if (flags & AT_SYMLINK_NOFOLLOW) { - UK_CRASH("UNIMPLEMENTED: fstatat() with AT_SYMLINK_NOFOLLOW"); - } - if (pathname[0] == '/' || dirfd == AT_FDCWD) { return stat(pathname, st); } @@ -597,7 +593,10 @@ int __fxstatat(int ver __unused, int dirfd, const char *pathname, struct stat *s strlcat(p, "/", PATH_MAX); strlcat(p, pathname, PATH_MAX);- error = stat(p, st);+ if (flags & AT_SYMLINK_NOFOLLOW) + error = lstat(p, st); + else + error = stat(p, st);vn_unlock(vp);fdrop(fp); _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |