aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/efivar/efivar.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/usr.sbin/efivar/efivar.c b/usr.sbin/efivar/efivar.c
index 994cc8dfb19e..7801b926978d 100644
--- a/usr.sbin/efivar/efivar.c
+++ b/usr.sbin/efivar/efivar.c
@@ -205,21 +205,20 @@ print_var(efi_guid_t *guid, char *name)
int rv;
efi_guid_to_str(guid, &gname);
- if (!Nflag)
- printf("%s-%s", gname, name);
if (pflag) {
rv = efi_get_variable(*guid, name, &data, &datalen, &att);
if (rv < 0)
- printf("\n --- Error getting value --- %d", errno);
- else {
- if (Aflag)
- asciidump(data, datalen);
- else if (bflag)
- bindump(data, datalen);
- else
- hexdump(data, datalen);
- }
+ err(1, "%s-%s", gname, name);
+
+ if (!Nflag)
+ printf("%s-%s", gname, name);
+ if (Aflag)
+ asciidump(data, datalen);
+ else if (bflag)
+ bindump(data, datalen);
+ else
+ hexdump(data, datalen);
}
free(gname);
if (!Nflag)