Wed Jun 14 00:42:21 2023 UTC ()
Add missing member for terminating sentinel.


(rin)
diff -r1.44 -r1.45 src/sys/stand/efiboot/boot.c

cvs diff -r1.44 -r1.45 src/sys/stand/efiboot/boot.c (expand / switch to unified diff)

--- src/sys/stand/efiboot/boot.c 2022/08/14 11:26:41 1.44
+++ src/sys/stand/efiboot/boot.c 2023/06/14 00:42:21 1.45
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: boot.c,v 1.44 2022/08/14 11:26:41 jmcneill Exp $ */ 1/* $NetBSD: boot.c,v 1.45 2023/06/14 00:42:21 rin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2016 Kimihiro Nonaka <nonaka@netbsd.org> 4 * Copyright (c) 2016 Kimihiro Nonaka <nonaka@netbsd.org>
5 * Copyright (c) 2018 Jared McNeill <jmcneill@invisible.ca> 5 * Copyright (c) 2018 Jared McNeill <jmcneill@invisible.ca>
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -138,27 +138,27 @@ const struct boot_command commands[] = { @@ -138,27 +138,27 @@ const struct boot_command commands[] = {
138 { "ls", command_ls, "ls [hdNn:/path]" }, 138 { "ls", command_ls, "ls [hdNn:/path]" },
139 { "gop", command_gop, "gop [mode]" }, 139 { "gop", command_gop, "gop [mode]" },
140 { "mem", command_mem, "mem" }, 140 { "mem", command_mem, "mem" },
141 { "menu", command_menu, "menu" }, 141 { "menu", command_menu, "menu" },
142 { "reboot", command_reset, "reboot|reset" }, 142 { "reboot", command_reset, "reboot|reset" },
143 { "reset", command_reset, NULL }, 143 { "reset", command_reset, NULL },
144 { "setup", command_setup, "setup" }, 144 { "setup", command_setup, "setup" },
145 { "userconf", command_userconf, "userconf <command>" }, 145 { "userconf", command_userconf, "userconf <command>" },
146 { "version", command_version, "version" }, 146 { "version", command_version, "version" },
147 { "ver", command_version, NULL }, 147 { "ver", command_version, NULL },
148 { "help", command_help, "help|?" }, 148 { "help", command_help, "help|?" },
149 { "?", command_help, NULL }, 149 { "?", command_help, NULL },
150 { "quit", command_quit, "quit" }, 150 { "quit", command_quit, "quit" },
151 { NULL, NULL }, 151 { NULL, NULL, NULL },
152}; 152};
153 153
154static int 154static int
155bootcfg_path(char *pathbuf, size_t pathbuflen) 155bootcfg_path(char *pathbuf, size_t pathbuflen)
156{ 156{
157 157
158 /* 158 /*
159 * Fallback to default_device 159 * Fallback to default_device
160 * - for ISO9660 (efi_file_path() succeeds but does not work correctly) 160 * - for ISO9660 (efi_file_path() succeeds but does not work correctly)
161 * - or whenever efi_file_path() fails (due to broken firmware) 161 * - or whenever efi_file_path() fails (due to broken firmware)
162 */ 162 */
163 if (default_fstype == FS_ISO9660 || efi_bootdp == NULL || 163 if (default_fstype == FS_ISO9660 || efi_bootdp == NULL ||
164 efi_file_path(efi_bootdp, BOOTCFG_FILENAME, pathbuf, pathbuflen)) 164 efi_file_path(efi_bootdp, BOOTCFG_FILENAME, pathbuf, pathbuflen))