[PATCH] efi: Restrict the simple file system protocol to support only FAT
masami.hiramatsu at linaro.org
Thu Jun 3 08:52:18 CEST 2021
2021年6月3日(木) 15:14 Heinrich Schuchardt <xypron.glpk at gmx.de>:
> If a volume or file is read only the UEFI spec requires to report this
> in EFI_FILE_PROTOCOL.GetInfo().
> On partition level we have the following deficiencies in U-Boot:
> * we cannot (re-)mount a partition read-only
> * we cannot determine if a partition is read-only
Hmm, but I think the filesystem driver itself defined it in fstype_info.
Thus we can check it as below.
fsinfo = fs_get_info(fs_get_type());
if (fsinfo->write == fs_write_unsupported)
// then set the volume readonly
BTW, it seems fsinfo->opendir and readdir are also required for
EFI_FILE_PROTOCOL, unless it, UEFI application can not follow the
directory tree. Hmm.
> * we can neither read nor write the volume label
> * we cannot determine the free space.
> The current implementation of the FAT driver does not support reading
> attributes and dates. I have started looking into what is needed in the
> FAT driver.
> But it is not ready for submission.
Ah, that's great! I would like to test it.
More information about the U-Boot