Source-Changes-HG archive

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

[src/trunk]: src/sys/stand/efiboot If a path is not specified, assume /. This...



details:   https://anonhg.NetBSD.org/src/rev/3ae7821638d8
branches:  trunk
changeset: 1024640:3ae7821638d8
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Oct 30 11:18:51 2021 +0000

description:
If a path is not specified, assume /. This makes "ls" and "ls hd0b:" work
as expected.

diffstat:

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

diffs (20 lines):

diff -r c473ccf2cd92 -r 3ae7821638d8 sys/stand/efiboot/efiblock.c
--- a/sys/stand/efiboot/efiblock.c      Sat Oct 30 11:10:36 2021 +0000
+++ b/sys/stand/efiboot/efiblock.c      Sat Oct 30 11:18:51 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efiblock.c,v 1.17 2021/06/23 21:42:43 jmcneill Exp $ */
+/* $NetBSD: efiblock.c,v 1.18 2021/10/30 11:18:51 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -85,6 +85,10 @@
                *pfile = strchr(fname, ':') + 1;
        }
 
+       if (*pfile[0] == '\0') {
+               *pfile = __UNCONST("/");
+       }
+
        if (strncasecmp(full_path, "hd", 2) != 0)
                return EINVAL;
        dev = strtoimax(full_path + 2, &ep, 10);



Home | Main Index | Thread Index | Old Index