From d5bff30350131c8614489f10d50f5dba4b10d361 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 8 Jun 2023 15:05:36 -0700 Subject: [PATCH] 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 --- src/library_syscall.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library_syscall.js b/src/library_syscall.js index 6c3e6f2f7beb4..8606a22472ae5 100644 --- a/src/library_syscall.js +++ b/src/library_syscall.js @@ -52,7 +52,7 @@ 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_ino_truncated, 'stat.ino >>> 0', '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') }}};