summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-03-04 20:00:29 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-03-05 16:28:06 +0100
commitb2e6b2ebb0a09226d9481f90cc033796502b78fa (patch)
treeb5d930ff79a6b9a7eacdf54fe8a1879dd2bdb965
parent58f24203d77d5b1d513ed8a0cd7558e444ecb6af (diff)
downloadbarebox-b2e6b2ebb0a0.tar.gz
barebox-b2e6b2ebb0a0.tar.xz
efi: devicepath: use flexible array members for trailing strings
When we start using fortified string operations in the future, we will need to replace zero and one sized trailing arrays with flexible arrays where required everywhere, but for now let's just avoid having any in the EFI code. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240304190038.3486881-105-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--include/efi/device-path.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/efi/device-path.h b/include/efi/device-path.h
index 8d64ac4900..433233f38c 100644
--- a/include/efi/device-path.h
+++ b/include/efi/device-path.h
@@ -65,7 +65,7 @@ struct efi_device_path_expanded_acpi {
u32 HID;
u32 UID;
u32 CID;
- u8 hid_str[1];
+ u8 hid_str[];
};
#define DEVICE_PATH_SUB_TYPE_ACPI_ADR_DEVICE 3
@@ -164,7 +164,7 @@ struct efi_device_path_usb_wwid {
u16 interface_number;
u16 vendor_id;
u16 product_id;
- s16 serial_number[1]; /* UTF-16 characters of the USB serial number */
+ s16 serial_number[]; /* UTF-16 characters of the USB serial number */
};
/**
@@ -321,7 +321,7 @@ struct efi_device_path_cdrom_path {
#define DEVICE_PATH_SUB_TYPE_FILE_PATH 0x04
struct efi_device_path_file_path {
struct efi_device_path header;
- s16 path_name[1];
+ s16 path_name[];
};
#define SIZE_OF_FILEPATH_DEVICE_PATH offsetof(FILEPATH_DEVICE_PATH,path_name)
@@ -374,7 +374,7 @@ struct efi_device_path_bbs_bbs {
struct efi_device_path header;
u16 device_type;
u16 status_flag;
- s8 String[1];
+ s8 String[];
};
/* device_type definitions - from BBS specification */