Skip to content

Commit d5bff30

Browse files
committed
Truncate inode number when writing to st_ino_truncated. NFC
This field is designed to hold a potentially truncated inode number, as opposes the st_ino which hold the full 64-bit value. Fixes: #19567
1 parent 120241d commit d5bff30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/library_syscall.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var SyscallsLibrary = {
5252
throw e;
5353
}
5454
{{{ makeSetValue('buf', C_STRUCTS.stat.st_dev, 'stat.dev', 'i32') }}};
55-
{{{ makeSetValue('buf', C_STRUCTS.stat.__st_ino_truncated, 'stat.ino', 'i32') }}};
55+
{{{ makeSetValue('buf', C_STRUCTS.stat.__st_ino_truncated, 'stat.ino >>> 0', 'i32') }}};
5656
{{{ makeSetValue('buf', C_STRUCTS.stat.st_mode, 'stat.mode', 'i32') }}};
5757
{{{ makeSetValue('buf', C_STRUCTS.stat.st_nlink, 'stat.nlink', SIZE_TYPE) }}};
5858
{{{ makeSetValue('buf', C_STRUCTS.stat.st_uid, 'stat.uid', 'i32') }}};

0 commit comments

Comments
 (0)