aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2016-10-15 06:16:35 +0000
committerWarner Losh <imp@FreeBSD.org>2016-10-15 06:16:35 +0000
commit55ff82c0db20fe79c7be2a2e6c5e1ce99f33ffa6 (patch)
tree0d879c721101070fd7dfbb9dcf0583d77a8706dc /usr.sbin
parent40dd3b0bf11c3cded6bde4fd5b31080d3bee3bde (diff)
downloadsrc-55ff82c0db20fe79c7be2a2e6c5e1ce99f33ffa6.tar.gz
src-55ff82c0db20fe79c7be2a2e6c5e1ce99f33ffa6.zip
Implement -t. Use symbolic names in place of the magical 0x7.
Submitted by: ambrisko@
Notes
Notes: svn path=/head/; revision=307339
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/efivar/efivar.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/efivar/efivar.c b/usr.sbin/efivar/efivar.c
index 39ab733fe0a4..a4dac498d680 100644
--- a/usr.sbin/efivar/efivar.c
+++ b/usr.sbin/efivar/efivar.c
@@ -62,7 +62,7 @@ static struct option longopts[] = {
static int aflag, Aflag, bflag, dflag, Dflag, Hflag, Nflag,
lflag, Lflag, Rflag, wflag, pflag;
static char *varname;
-static u_long attrib = 0x7;
+static u_long attrib = EFI_VARIABLE_NON_VOLATILE |EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS;
static void
usage(void)
@@ -294,11 +294,13 @@ parse_args(int argc, char **argv)
case 'R':
Rflag++;
break;
+ case 't':
+ attrib = strtoul(optarg, NULL, 16);
+ break;
case 'w':
wflag++;
break;
case 'f':
- case 't':
case 0:
errx(1, "unknown or unimplemented option\n");
break;