Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legacy fields from stat struct. NFC #19569

Merged
merged 1 commit into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions src/generated_struct_info32.json
Original file line number Diff line number Diff line change
Expand Up @@ -1459,33 +1459,32 @@
"sin6_port": 2
},
"stat": {
"__size__": 112,
"__st_ino_truncated": 8,
"__size__": 96,
"st_atim": {
"__size__": 16,
"tv_nsec": 64,
"tv_sec": 56
"tv_nsec": 48,
"tv_sec": 40
},
"st_blksize": 48,
"st_blocks": 52,
"st_blksize": 32,
"st_blocks": 36,
"st_ctim": {
"__size__": 16,
"tv_nsec": 96,
"tv_sec": 88
"tv_nsec": 80,
"tv_sec": 72
},
"st_dev": 0,
"st_gid": 24,
"st_ino": 104,
"st_mode": 12,
"st_gid": 16,
"st_ino": 88,
"st_mode": 4,
"st_mtim": {
"__size__": 16,
"tv_nsec": 80,
"tv_sec": 72
"tv_nsec": 64,
"tv_sec": 56
},
"st_nlink": 16,
"st_rdev": 28,
"st_size": 40,
"st_uid": 20
"st_nlink": 8,
"st_rdev": 20,
"st_size": 24,
"st_uid": 12
},
"statfs": {
"__size__": 64,
Expand Down
33 changes: 16 additions & 17 deletions src/generated_struct_info64.json
Original file line number Diff line number Diff line change
Expand Up @@ -1459,33 +1459,32 @@
"sin6_port": 2
},
"stat": {
"__size__": 120,
"__st_ino_truncated": 8,
"__size__": 104,
"st_atim": {
"__size__": 16,
"tv_nsec": 72,
"tv_sec": 64
"tv_nsec": 56,
"tv_sec": 48
},
"st_blksize": 56,
"st_blocks": 60,
"st_blksize": 40,
"st_blocks": 44,
"st_ctim": {
"__size__": 16,
"tv_nsec": 104,
"tv_sec": 96
"tv_nsec": 88,
"tv_sec": 80
},
"st_dev": 0,
"st_gid": 36,
"st_ino": 112,
"st_mode": 16,
"st_gid": 20,
"st_ino": 96,
"st_mode": 4,
"st_mtim": {
"__size__": 16,
"tv_nsec": 88,
"tv_sec": 80
"tv_nsec": 72,
"tv_sec": 64
},
"st_nlink": 24,
"st_rdev": 40,
"st_size": 48,
"st_uid": 32
"st_nlink": 8,
"st_rdev": 24,
"st_size": 32,
"st_uid": 16
},
"statfs": {
"__size__": 104,
Expand Down
1 change: 0 additions & 1 deletion src/library_syscall.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ var SyscallsLibrary = {
throw e;
}
{{{ makeSetValue('buf', C_STRUCTS.stat.st_dev, 'stat.dev', 'i32') }}};
{{{ makeSetValue('buf', C_STRUCTS.stat.__st_ino_truncated, 'stat.ino', 'i32') }}};
{{{ makeSetValue('buf', C_STRUCTS.stat.st_mode, 'stat.mode', 'i32') }}};
{{{ makeSetValue('buf', C_STRUCTS.stat.st_nlink, 'stat.nlink', SIZE_TYPE) }}};
{{{ makeSetValue('buf', C_STRUCTS.stat.st_uid, 'stat.uid', 'i32') }}};
Expand Down
1 change: 0 additions & 1 deletion src/struct_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"structs": {
"stat": [
"st_dev",
"__st_ino_truncated",
"st_mode",
"st_nlink",
"st_uid",
Expand Down
4 changes: 4 additions & 0 deletions system/lib/libc/musl/arch/emscripten/bits/stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
struct stat
{
dev_t st_dev;
#ifndef __EMSCRIPTEN__
int __st_dev_padding;
long __st_ino_truncated;
#endif
mode_t st_mode;
nlink_t st_nlink;
uid_t st_uid;
gid_t st_gid;
dev_t st_rdev;
#ifndef __EMSCRIPTEN__
int __st_rdev_padding;
#endif
off_t st_size;
blksize_t st_blksize;
blkcnt_t st_blocks;
Expand Down