summaryrefslogtreecommitdiffstats
path: root/common/efi
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-12-09 12:24:30 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-12-13 23:37:31 +0100
commita1d63bebb3ae02dd7c51f683c363608ef2b37403 (patch)
tree804f47da528bd57f0e09c95ad05085233f2eb539 /common/efi
parentfdf3c5e3cfa9de9302f783452807244112db558a (diff)
downloadbarebox-a1d63bebb3ae02dd7c51f683c363608ef2b37403.tar.gz
barebox-a1d63bebb3ae02dd7c51f683c363608ef2b37403.tar.xz
efi-devicepath: Make efi_device_path argument const
unpack_device_path() must not modify the efi_device_path * argument, so make that sure by making it const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/efi')
-rw-r--r--common/efi/devicepath.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/efi/devicepath.c b/common/efi/devicepath.c
index 6341ca005b..d50d4f9469 100644
--- a/common/efi/devicepath.c
+++ b/common/efi/devicepath.c
@@ -470,9 +470,10 @@ device_path_from_handle(efi_handle_t Handle)
}
static struct efi_device_path *
-unpack_device_path(struct efi_device_path *dev_path)
+unpack_device_path(const struct efi_device_path *dev_path)
{
- struct efi_device_path *Src, *Dest, *new_path;
+ const struct efi_device_path *Src;
+ struct efi_device_path *Dest, *new_path;
unsigned long Size;
/* Walk device path and round sizes to valid boundaries */