Module Name:    src
Committed By:   martin
Date:           Fri Nov  3 09:59:04 UTC 2023

Modified Files:
        src/sys/stand/efiboot [netbsd-10]: Makefile.efiboot boot.c efiblock.c
            exec.c

Log Message:
Pull up following revision(s) (requested by rin in ticket #451):

        sys/stand/efiboot/efiblock.c: revision 1.20
        sys/stand/efiboot/exec.c: revision 1.24
        sys/stand/efiboot/Makefile.efiboot: revision 1.29
        sys/stand/efiboot/boot.c: revision 1.45

Add missing member for terminating sentinel.

Avoid void * pointer arithmetic; cast to UINT8 * explicitly.
No binary changes for aarch64 at least.

Use %zd instead of %ld for ssize_t.

Add missing include paths for libz. Not used at the moment although.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.4.1 src/sys/stand/efiboot/Makefile.efiboot
cvs rdiff -u -r1.44 -r1.44.4.1 src/sys/stand/efiboot/boot.c
cvs rdiff -u -r1.19 -r1.19.4.1 src/sys/stand/efiboot/efiblock.c
cvs rdiff -u -r1.23 -r1.23.4.1 src/sys/stand/efiboot/exec.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/Makefile.efiboot
diff -u src/sys/stand/efiboot/Makefile.efiboot:1.26 src/sys/stand/efiboot/Makefile.efiboot:1.26.4.1
--- src/sys/stand/efiboot/Makefile.efiboot:1.26	Fri Mar 25 21:23:00 2022
+++ src/sys/stand/efiboot/Makefile.efiboot	Fri Nov  3 09:59:04 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.efiboot,v 1.26 2022/03/25 21:23:00 jmcneill Exp $
+# $NetBSD: Makefile.efiboot,v 1.26.4.1 2023/11/03 09:59:04 martin Exp $
 
 S=		${.CURDIR}/../../..
 
@@ -133,6 +133,7 @@ LIBKERN= ${KERNLIB}
 ### find out what to use for libz
 Z_AS= library
 .include "${S}/lib/libz/Makefile.inc"
+CPPFLAGS+=	-I${S}/lib/libz -I${S}/../common/dist/zlib
 LIBZ= ${ZLIB}
 
 ### find out what to use for libgnuefi

Index: src/sys/stand/efiboot/boot.c
diff -u src/sys/stand/efiboot/boot.c:1.44 src/sys/stand/efiboot/boot.c:1.44.4.1
--- src/sys/stand/efiboot/boot.c:1.44	Sun Aug 14 11:26:41 2022
+++ src/sys/stand/efiboot/boot.c	Fri Nov  3 09:59:04 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.44 2022/08/14 11:26:41 jmcneill Exp $	*/
+/*	$NetBSD: boot.c,v 1.44.4.1 2023/11/03 09:59:04 martin Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka <non...@netbsd.org>
@@ -148,7 +148,7 @@ const struct boot_command commands[] = {
 	{ "help",	command_help,		"help|?" },
 	{ "?",		command_help,		NULL },
 	{ "quit",	command_quit,		"quit" },
-	{ NULL,		NULL },
+	{ NULL,		NULL,			NULL },
 };
 
 static int

Index: src/sys/stand/efiboot/efiblock.c
diff -u src/sys/stand/efiboot/efiblock.c:1.19 src/sys/stand/efiboot/efiblock.c:1.19.4.1
--- src/sys/stand/efiboot/efiblock.c:1.19	Sun Apr 24 06:49:38 2022
+++ src/sys/stand/efiboot/efiblock.c	Fri Nov  3 09:59:04 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: efiblock.c,v 1.19 2022/04/24 06:49:38 mlelstv Exp $ */
+/* $NetBSD: efiblock.c,v 1.19.4.1 2023/11/03 09:59:04 martin Exp $ */
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka <non...@netbsd.org>
@@ -442,7 +442,7 @@ efi_block_find_partitions_gpt(struct efi
 	}
 
 	for (entry = 0; entry < le32toh(hdr.hdr_entries); entry++) {
-		memcpy(&ent, buf + (entry * le32toh(hdr.hdr_entsz)),
+		memcpy(&ent, (UINT8 *)buf + (entry * le32toh(hdr.hdr_entsz)),
 			sizeof(ent));
 		efi_block_find_partitions_gpt_entry(bdev, &hdr, &ent, entry);
 	}

Index: src/sys/stand/efiboot/exec.c
diff -u src/sys/stand/efiboot/exec.c:1.23 src/sys/stand/efiboot/exec.c:1.23.4.1
--- src/sys/stand/efiboot/exec.c:1.23	Wed Oct  6 10:13:19 2021
+++ src/sys/stand/efiboot/exec.c	Fri Nov  3 09:59:04 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: exec.c,v 1.23 2021/10/06 10:13:19 jmcneill Exp $ */
+/* $NetBSD: exec.c,v 1.23.4.1 2023/11/03 09:59:04 martin Exp $ */
 
 /*-
  * Copyright (c) 2019 Jason R. Thorpe
@@ -109,7 +109,7 @@ load_file(const char *path, u_long extra
 		if (len < 0) {
 			printf(": %s\n", strerror(errno));
 		} else {
-			printf(": returned %ld (expected %ld)\n", len,
+			printf(": returned %zd (expected %zd)\n", len,
 			    expectedlen);
 		}
 		return EIO;

Reply via email to