summaryrefslogtreecommitdiff
path: root/usr.sbin/efibootmgr
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2017-12-09 07:44:00 +0000
committerWarner Losh <imp@FreeBSD.org>2017-12-09 07:44:00 +0000
commita2aa66719e675f8b4dbecbd65576536a558526c0 (patch)
treebb88b680758920957595885116e4beb83bd80b75 /usr.sbin/efibootmgr
parent1127aea3e71f07fc8fb8814b942639e53abc2219 (diff)
downloadsrc-test2-a2aa66719e675f8b4dbecbd65576536a558526c0.tar.gz
src-test2-a2aa66719e675f8b4dbecbd65576536a558526c0.zip
Indent multiple device path entries correctly.
Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=326728
Diffstat (limited to 'usr.sbin/efibootmgr')
-rw-r--r--usr.sbin/efibootmgr/efibootmgr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/efibootmgr/efibootmgr.c b/usr.sbin/efibootmgr/efibootmgr.c
index b900d17762ab..a60d58f78d21 100644
--- a/usr.sbin/efibootmgr/efibootmgr.c
+++ b/usr.sbin/efibootmgr/efibootmgr.c
@@ -704,6 +704,7 @@ print_loadopt_str(uint8_t *data, size_t datalen)
int len;
int optlen;
int rv;
+ int indent;
if (datalen < sizeof(attr) + sizeof(fplen) + sizeof(efi_char))
return;
@@ -729,13 +730,15 @@ print_loadopt_str(uint8_t *data, size_t datalen)
opt = walker;
optlen = ep - walker;
+ indent = 1;
while (dp < edp) {
efidp_format_device_path(buf, sizeof(buf), dp,
(intptr_t)(void *)edp - (intptr_t)(void *)dp);
- printf(" %s\n", buf);
+ printf("%*s%s\n", indent, "", buf);
+ indent = 10 + len + 1;
rv = efivar_device_path_to_unix_path(dp, &dev, &relpath, &abspath);
if (rv == 0) {
- printf(" %s:%s %s\n", dev, relpath, abspath);
+ printf("%*s%s:%s %s\n", indent + 4, "", dev, relpath, abspath);
free(dev);
free(relpath);
free(abspath);