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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to