(get_long) and add missing {} in devsw[1] initialization.
Most from 2011 NetBSD commit by tsutui.
No functional change.
Build tested and ok kn@
-/* $OpenBSD: boot.c,v 1.42 2023/06/01 17:24:56 krw Exp $ */
+/* $OpenBSD: boot.c,v 1.43 2023/06/03 21:37:53 krw Exp $ */
/* $NetBSD: boot.c,v 1.3 2001/05/31 08:55:19 mrg Exp $ */
/*
* Copyright (c) 1997, 1999 Eduardo E. Horvath. All rights reserved.
parseargs(char *str, int *howtop)
{
char *cp;
- int i;
*howtop = 0;
cp = str;
loadrandom(char *path, char *buf, size_t buflen)
{
struct stat sb;
- int fd, i, error = 0;
+ int fd, error = 0;
fd = open(path, O_RDONLY);
if (fd == -1)
int chosen;
char bootline[512]; /* Should check size? */
char *cp;
- int i, fd;
+ int fd;
#ifdef SOFTRAID
int err;
#endif
-/* $OpenBSD: elf64_exec.c,v 1.15 2023/06/02 00:10:25 krw Exp $ */
+/* $OpenBSD: elf64_exec.c,v 1.16 2023/06/03 21:37:53 krw Exp $ */
/* $NetBSD: elfXX_exec.c,v 1.2 2001/08/15 20:08:15 eeh Exp $ */
/*
size_t size;
u_int align;
int i, first = 1;
- int n;
struct openbsd_bootdata *obd;
#ifdef SOFTRAID
struct sr_boot_volume *bv;
-/* $OpenBSD: netif_of.c,v 1.8 2023/06/01 17:24:56 krw Exp $ */
+/* $OpenBSD: netif_of.c,v 1.9 2023/06/03 21:37:53 krw Exp $ */
/* $NetBSD: netif_of.c,v 1.1 2000/08/20 14:58:39 mrg Exp $ */
/*
{
struct of_dev *op = machdep_hint;
struct iodesc *io;
- int fd, error;
- char addr[32];
DNPRINTF(BOOT_D_OFNET, "netif_open...");
-/* $OpenBSD: ofdev.c,v 1.38 2023/06/01 17:24:56 krw Exp $ */
+/* $OpenBSD: ofdev.c,v 1.39 2023/06/03 21:37:53 krw Exp $ */
/* $NetBSD: ofdev.c,v 1.1 2000/08/20 14:58:41 mrg Exp $ */
/*
}
struct devsw devsw[1] = {
- "OpenFirmware",
- strategy,
- (int (*)(struct open_file *, ...))nodev,
- devclose,
- noioctl
+ {
+ "OpenFirmware",
+ strategy,
+ (int (*)(struct open_file *, ...))nodev,
+ devclose,
+ noioctl
+ }
};
int ndevs = sizeof devsw / sizeof devsw[0];
char opened_name[256];
-static u_long
-get_long(const void *p)
-{
- const unsigned char *cp = p;
-
- return cp[0] | (cp[1] << 8) | (cp[2] << 16) | (cp[3] << 24);
-}
-
/************************************************************************
*
* The rest of this was taken from arch/sparc64/scsi/sun_disklabel.c
-/* $OpenBSD: softraid_sparc64.c,v 1.7 2023/06/01 17:24:56 krw Exp $ */
+/* $OpenBSD: softraid_sparc64.c,v 1.8 2023/06/03 21:37:53 krw Exp $ */
/*
* Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
sr_getdisklabel(struct sr_boot_volume *bv, struct disklabel *label)
{
struct of_dev ofdev;
- int err;
#ifdef DEBUG
int i;
#endif