Module Name:    src
Committed By:   jmcneill
Date:           Sat Oct 30 11:18:51 UTC 2021

Modified Files:
        src/sys/stand/efiboot: efiblock.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/stand/efiboot/efiblock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/stand/efiboot/efiblock.c
diff -u src/sys/stand/efiboot/efiblock.c:1.17 src/sys/stand/efiboot/efiblock.c:1.18
--- src/sys/stand/efiboot/efiblock.c:1.17	Wed Jun 23 21:42:43 2021
+++ src/sys/stand/efiboot/efiblock.c	Sat Oct 30 11:18:51 2021
@@ -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 <non...@netbsd.org>
@@ -85,6 +85,10 @@ efi_block_parse(const char *fname, struc
 		*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);

Reply via email to