The structure was moved to the efivarfs internals in commit 2d82e6227ea1 ("efi: vars: Move efivar caching layer into efivarfs") after previously being used as the data ABI for efivars until its removal in commit 0f5b2c69a4cb ("efi: vars: Remove deprecated 'efivars' sysfs interface"). As efivarfs only uses the structure for the variable name caching layer, the data-related members were never in use. Remove them to avoid implying that efivarfs is bound by the same restrictions that efivars once had. Since we are changing the last copy of "struct efi_variable", document the former layout in the ABI documentation of /sys/firmware/efi/vars that is still left over. Signed-off-by: Tim Schumacher <timschumi@xxxxxx> --- I'm unsure if this is how documentation of removed interfaces is/should be handled, input on this would be greatly appreciated. Of course, the alternative to what I did here is to remove the documentation completely. If someone is running a kernel old enough to have this interface, then the matching kernel source will still contain said documentation. --- Documentation/ABI/stable/sysfs-firmware-efi-vars | 12 ++++++++++-- fs/efivarfs/internal.h | 3 --- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Documentation/ABI/stable/sysfs-firmware-efi-vars b/Documentation/ABI/stable/sysfs-firmware-efi-vars index 46ccd233e359..461b9139cedb 100644 --- a/Documentation/ABI/stable/sysfs-firmware-efi-vars +++ b/Documentation/ABI/stable/sysfs-firmware-efi-vars @@ -41,8 +41,16 @@ Description: raw_var: A binary file that can be read to obtain a structure that contains everything there is to know about the variable. - For structure definition see "struct - efi_variable" in the kernel sources. + + The structure is defined as follows: + struct efi_variable { + efi_char16_t VariableName[512]; + efi_guid_t VendorGuid; + unsigned long DataSize; + __u8 Data[1024]; + efi_status_t Status; + __u32 Attributes; + } __attribute__((packed)); This file can also be written to in order to update the value of a variable. diff --git a/fs/efivarfs/internal.h b/fs/efivarfs/internal.h index f7206158ee81..971560a01320 100644 --- a/fs/efivarfs/internal.h +++ b/fs/efivarfs/internal.h @@ -24,9 +24,6 @@ struct efivarfs_fs_info { struct efi_variable { efi_char16_t VariableName[EFI_VAR_NAME_LEN/sizeof(efi_char16_t)]; efi_guid_t VendorGuid; - unsigned long DataSize; - __u8 Data[1024]; - efi_status_t Status; __u32 Attributes; } __attribute__((packed)); -- 2.44.0