svn commit: r307339 - head/usr.sbin/efivar
Warner Losh
imp at FreeBSD.org
Sat Oct 15 06:16:36 UTC 2016
Author: imp
Date: Sat Oct 15 06:16:35 2016
New Revision: 307339
URL: https://svnweb.freebsd.org/changeset/base/307339
Log:
Implement -t. Use symbolic names in place of the magical 0x7.
Submitted by: ambrisko@
Modified:
head/usr.sbin/efivar/efivar.c
Modified: head/usr.sbin/efivar/efivar.c
==============================================================================
--- head/usr.sbin/efivar/efivar.c Sat Oct 15 05:53:09 2016 (r307338)
+++ head/usr.sbin/efivar/efivar.c Sat Oct 15 06:16:35 2016 (r307339)
@@ -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;
More information about the svn-src-all
mailing list