Implement -t. Use symbolic names in place of the magical 0x7.

Submitted by: ambrisko@
This commit is contained in:
Warner Losh 2016-10-15 06:16:35 +00:00
parent 40dd3b0bf1
commit 55ff82c0db
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=307339

View File

@ -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;