Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Mar 2017 20:23:05 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314618 - head/usr.sbin/efivar
Message-ID:  <201703032023.v23KN54Y063190@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Mar  3 20:23:05 2017
New Revision: 314618
URL: https://svnweb.freebsd.org/changeset/base/314618

Log:
  Actually implement efivar -L
  
  Sponsored by: Netflix

Modified:
  head/usr.sbin/efivar/efivar.c

Modified: head/usr.sbin/efivar/efivar.c
==============================================================================
--- head/usr.sbin/efivar/efivar.c	Fri Mar  3 20:23:01 2017	(r314617)
+++ head/usr.sbin/efivar/efivar.c	Fri Mar  3 20:23:05 2017	(r314618)
@@ -252,6 +252,17 @@ print_variables(void)
 }
 
 static void
+print_known_guid(void)
+{
+	struct uuid_table *tbl;
+	int i, n;
+
+	n = efi_known_guid(&tbl);
+	for (i = 0; i < n; i++)
+		printf("%s %s\n", tbl[i].uuid_str, tbl[i].name);
+}
+
+static void
 parse_args(int argc, char **argv)
 {
 	int ch, i;
@@ -333,6 +344,8 @@ parse_args(int argc, char **argv)
 		delete_variable(varname);
 	else if (wflag)
 		write_variable(varname, NULL);
+	else if (Lflag)
+		print_known_guid();
 	else if (varname) {
 		pflag++;
 		print_variable(varname);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703032023.v23KN54Y063190>