[PATCH 17/26] efi: loader: file: report cdev block size in file info
Ahmad Fatoum <[email protected]> Fri, 26 Jun 2026 10:42:28 +0200
| Newsgroups | org.infradead.lists.barebox |
|---|---|
| Message-ID | <[email protected]> |
In a similar vein to the changes to the block I/O protocol, also adapt the file protocol, so EFI_FILE_SYSTEM_INFO reports the actual block size. Signed-off-by: Ahmad Fatoum <[email protected]> --- efi/loader/protocols/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/efi/loader/protocols/file.c b/efi/loader/protocols/file.c index 0796b3f0c26a..ea7b0df82ea8 100644 --- a/efi/loader/protocols/file.c +++ b/efi/loader/protocols/file.c @@ -24,6 +24,7 @@ #include <wchar.h> #include <string.h> #include <libfile.h> +#include <block.h> #include <disks.h> #include <charset.h> #include <malloc.h> @@ -743,7 +744,7 @@ static efi_status_t EFIAPI efi_file_get_info(struct efi_file_handle *file, * space. The volume size is the best upper bound we have. */ info->free_space = info->volume_size; - info->block_size = SECTOR_SIZE; + info->block_size = cdev_blocksize(fh->fs->cdev); /* * TODO: The volume label is not available in barebox. */ -- 2.47.3