Skip to content

Commit aaec5eb

Browse files
committed
Allow stat() of root directory
1 parent 17d4e43 commit aaec5eb

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

include/libc/unix/stat.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ int stat(const char *orig_name, struct stat *buf)
2222
return _seterror(ENOSYS);
2323
}
2424
memset(buf, 0, sizeof(*buf));
25-
if (name[0] == 0) {
26-
#ifdef _DEBUG
27-
__builtin_printf("stat on root directory\n");
28-
#endif
29-
buf->st_mode = S_IFDIR | 0777;
30-
return 0;
31-
}
3225
#ifdef _DEBUG
3326
{
3427
unsigned *ptr = (unsigned *)v->stat;

0 commit comments

Comments
 (0)