1*4882a593SmuzhiyunFrom 07f080184d067c1ebc3fec1b53dd4a06d1a2566a Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Alexander Kanavin <alex@linutronix.de>
3*4882a593SmuzhiyunDate: Mon, 17 Jan 2022 23:24:34 +0100
4*4882a593SmuzhiyunSubject: [PATCH] src: make compatible with efivar 38
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunUpstream-Status: Backport
7*4882a593SmuzhiyunSigned-off-by: Alexander Kanavin <alex@linutronix.de>
8*4882a593Smuzhiyun---
9*4882a593Smuzhiyun src/efibootdump.c | 2 +-
10*4882a593Smuzhiyun src/efibootmgr.c  | 4 ++--
11*4882a593Smuzhiyun 2 files changed, 3 insertions(+), 3 deletions(-)
12*4882a593Smuzhiyun
13*4882a593Smuzhiyundiff --git a/src/efibootdump.c b/src/efibootdump.c
14*4882a593Smuzhiyunindex eceffd6..09bd76e 100644
15*4882a593Smuzhiyun--- a/src/efibootdump.c
16*4882a593Smuzhiyun+++ b/src/efibootdump.c
17*4882a593Smuzhiyun@@ -69,7 +69,7 @@ print_boot_entry(efi_load_option *loadopt, size_t data_size)
18*4882a593Smuzhiyun 	text_path = alloca(text_path_len);
19*4882a593Smuzhiyun 	if (!text_path)
20*4882a593Smuzhiyun 		error(100, "Couldn't allocate memory");
21*4882a593Smuzhiyun-	rc = efidp_format_device_path(text_path, text_path_len,
22*4882a593Smuzhiyun+	rc = efidp_format_device_path((unsigned char *)text_path, text_path_len,
23*4882a593Smuzhiyun 				      dp, pathlen);
24*4882a593Smuzhiyun 	if (rc < 0) {
25*4882a593Smuzhiyun 		printf("<bad device path>");
26*4882a593Smuzhiyundiff --git a/src/efibootmgr.c b/src/efibootmgr.c
27*4882a593Smuzhiyunindex 4e1a680..b77b1fb 100644
28*4882a593Smuzhiyun--- a/src/efibootmgr.c
29*4882a593Smuzhiyun+++ b/src/efibootmgr.c
30*4882a593Smuzhiyun@@ -949,7 +949,7 @@ show_vars(const char *prefix)
31*4882a593Smuzhiyun 			pathlen = efi_loadopt_pathlen(load_option,
32*4882a593Smuzhiyun 						      boot->data_size);
33*4882a593Smuzhiyun 			dp = efi_loadopt_path(load_option, boot->data_size);
34*4882a593Smuzhiyun-			rc = efidp_format_device_path(text_path, text_path_len,
35*4882a593Smuzhiyun+			rc = efidp_format_device_path((unsigned char *)text_path, text_path_len,
36*4882a593Smuzhiyun 						      dp, pathlen);
37*4882a593Smuzhiyun 			if (rc < 0)
38*4882a593Smuzhiyun 				error(18, "Could not parse device path");
39*4882a593Smuzhiyun@@ -960,7 +960,7 @@ show_vars(const char *prefix)
40*4882a593Smuzhiyun 			if (!text_path)
41*4882a593Smuzhiyun 				error(19, "Could not parse device path");
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun-			rc = efidp_format_device_path(text_path, text_path_len,
44*4882a593Smuzhiyun+			rc = efidp_format_device_path((unsigned char *)text_path, text_path_len,
45*4882a593Smuzhiyun 						      dp, pathlen);
46*4882a593Smuzhiyun 			if (rc < 0)
47*4882a593Smuzhiyun 				error(20, "Could not parse device path");
48