summaryrefslogtreecommitdiff
path: root/lib/efi_loader
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2019-09-04 12:52:01 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2019-09-05 23:18:51 +0200
commit8254f8feb71a93a4d87aa68d900660ef445d44cd (patch)
tree3f9d9c440397e5e06a410c987c4712ad29e48b8c /lib/efi_loader
parentb5b9eff26d28feb7dc59661b78e5844d12fca0c8 (diff)
efi_loader: correct text conversion for vendor DP
Vendor device paths may contain data. When converting vendor device paths to text this binary data has to be rendered. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader')
-rw-r--r--lib/efi_loader/efi_device_path_to_text.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c
index 96fd08971b..133542ad40 100644
--- a/lib/efi_loader/efi_device_path_to_text.c
+++ b/lib/efi_loader/efi_device_path_to_text.c
@@ -60,9 +60,18 @@ static char *dp_hardware(char *s, struct efi_device_path *dp)
break;
}
case DEVICE_PATH_SUB_TYPE_VENDOR: {
+ int i, n;
struct efi_device_path_vendor *vdp =
(struct efi_device_path_vendor *)dp;
- s += sprintf(s, "VenHw(%pUl)", &vdp->guid);
+
+ s += sprintf(s, "VenHw(%pUl", &vdp->guid);
+ n = (int)vdp->dp.length - sizeof(struct efi_device_path_vendor);
+ if (n > 0) {
+ s += sprintf(s, ",");
+ for (i = 0; i < n; ++i)
+ s += sprintf(s, "%02x", vdp->vendor_data[i]);
+ }
+ s += sprintf(s, ")");
break;
}
default: