Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/stand/efiboot command_version: print config file path



details:   https://anonhg.NetBSD.org/src/rev/85d62bf7c60a
branches:  trunk
changeset: 935221:85d62bf7c60a
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Jun 27 18:52:24 2020 +0000

description:
command_version: print config file path

diffstat:

 sys/stand/efiboot/boot.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r 3694fc7867fa -r 85d62bf7c60a sys/stand/efiboot/boot.c
--- a/sys/stand/efiboot/boot.c  Sat Jun 27 18:44:02 2020 +0000
+++ b/sys/stand/efiboot/boot.c  Sat Jun 27 18:52:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boot.c,v 1.25 2020/06/27 17:23:08 jmcneill Exp $       */
+/*     $NetBSD: boot.c,v 1.26 2020/06/27 18:52:24 jmcneill Exp $       */
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -360,6 +360,7 @@
 void
 command_version(char *arg)
 {
+       char pathbuf[80];
        char *ufirmware;
        int rv;
 
@@ -373,6 +374,10 @@
                    ST->FirmwareRevision);
                FreePool(ufirmware);
        }
+       if (efi_bootdp != NULL &&
+           efi_file_path(efi_bootdp, BOOTCFG_FILENAME, pathbuf, sizeof(pathbuf)) == 0) {
+               printf("Config path: %s\n", pathbuf);
+       }
 
        efi_fdt_show();
        efi_acpi_show();



Home | Main Index | Thread Index | Old Index