From ea3fe53ac0eb96c7efc367b9acc2907c4b041853 Mon Sep 17 00:00:00 2001 From: Ayush Singh Date: Thu, 20 Nov 2025 10:13:11 +0530 Subject: [PATCH] std: sys: fs: uefi: Fix FileAttr size - The underlying file size is represented by file_size field. The size field is just the size of structure since it is a C DST. Signed-off-by: Ayush Singh --- library/std/src/sys/fs/uefi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/sys/fs/uefi.rs b/library/std/src/sys/fs/uefi.rs index 18c1501a655fe..7625409007a46 100644 --- a/library/std/src/sys/fs/uefi.rs +++ b/library/std/src/sys/fs/uefi.rs @@ -81,7 +81,7 @@ impl FileAttr { unsafe { Self { attr: (*info.as_ptr()).attribute, - size: (*info.as_ptr()).size, + size: (*info.as_ptr()).file_size, modified: uefi_fs::uefi_to_systemtime((*info.as_ptr()).modification_time), accessed: uefi_fs::uefi_to_systemtime((*info.as_ptr()).last_access_time), created: uefi_fs::uefi_to_systemtime((*info.as_ptr()).create_time),