summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-11-20 13:10:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-11-20 13:10:43 +0000
commit7f474332e48e1508c540a29f43e5f4ad8698695e (patch)
treeaa2cc6b7e01d671e61fbd455f6b274e983c4343a /sys/arch
parent652cbf04211ee24c295b4c27b53e24a6a72d05bc (diff)
some more installboot cleanup from gapz@dud-t.org
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvme68k/stand/installboot/installboot.c4
-rw-r--r--sys/arch/mvme88k/stand/installboot/installboot.c6
-rw-r--r--sys/arch/sparc64/stand/installboot/installboot.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/mvme68k/stand/installboot/installboot.c b/sys/arch/mvme68k/stand/installboot/installboot.c
index c88e4095c4a..fadceec218c 100644
--- a/sys/arch/mvme68k/stand/installboot/installboot.c
+++ b/sys/arch/mvme68k/stand/installboot/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.13 2010/11/19 18:11:19 deraadt Exp $ */
+/* $OpenBSD: installboot.c,v 1.14 2010/11/20 13:10:41 deraadt Exp $ */
/* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */
/*
@@ -414,7 +414,7 @@ vid_to_disklabel(char *dkname, char *bootproto)
pcpul->version = 1;
strncpy(pcpul->vid_id, "M68K", 4);
- if (fstat(exe_file, &sb);
+ if (fstat(exe_file, &sb) == -1)
err(1, "fstat: %s", bootproto);
if (sb.st_size < 0x20)
errx(1, "%s is too small", bootproto);
diff --git a/sys/arch/mvme88k/stand/installboot/installboot.c b/sys/arch/mvme88k/stand/installboot/installboot.c
index 14ad8ae8772..c83a445a33d 100644
--- a/sys/arch/mvme88k/stand/installboot/installboot.c
+++ b/sys/arch/mvme88k/stand/installboot/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.11 2010/11/19 18:11:21 deraadt Exp $ */
+/* $OpenBSD: installboot.c,v 1.12 2010/11/20 13:10:42 deraadt Exp $ */
/* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */
/*
@@ -333,10 +333,10 @@ int devfd;
/* Sanity-check super-block. */
- if (fs->fs_magic != FS_MAGIC)
+ if (fs->fs_magic != FS_MAGIC)
errx(1, "Bad magic number in superblock");
- if (fs->fs_inopb <= 0)
+ if (fs->fs_inopb <= 0)
err(1, "Bad inopb=%d in superblock", fs->fs_inopb);
/* Read inode */
diff --git a/sys/arch/sparc64/stand/installboot/installboot.c b/sys/arch/sparc64/stand/installboot/installboot.c
index 0699cda4257..1b94d2193a9 100644
--- a/sys/arch/sparc64/stand/installboot/installboot.c
+++ b/sys/arch/sparc64/stand/installboot/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.8 2010/11/19 18:11:21 deraadt Exp $ */
+/* $OpenBSD: installboot.c,v 1.9 2010/11/20 13:10:42 deraadt Exp $ */
/* $NetBSD: installboot.c,v 1.8 2001/02/19 22:48:59 cgd Exp $ */
/*-
@@ -194,7 +194,7 @@ main(argc, argv)
if ((protofd = open(proto, O_RDONLY)) < 0)
err(1, "open: %s", proto);
- if (fstat(protofd, &sb) < 0)
+ if (fstat(protofd, &sb) == -1)
err(1, "fstat: %s", proto);
if (sb.st_size == 0)
errx(1, "%s is empty", proto);