|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH 1/6] lib/vfscore: Revert __fxstatat() implementation to original Osv behavior
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);
--
2.20.1
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |