diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-07-23 14:48:36 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-07-23 14:48:36 +0000 |
commit | ed0857ebb953f2795c403db9b06a77bfd3fda3dc (patch) | |
tree | c0ca4a674942b22e806860f26909a0a255c4b155 /sys | |
parent | 106728ba284c6febfd03a575c8297455f940f939 (diff) |
Fix a few typos. Set 'error' variable before using it in message.
Makes i386 and amd64 dkcsum.c identical.
ok weingart@ tom@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/dkcsum.c | 7 | ||||
-rw-r--r-- | sys/arch/i386/i386/dkcsum.c | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/sys/arch/amd64/amd64/dkcsum.c b/sys/arch/amd64/amd64/dkcsum.c index 8817d7cb58d..7925a9307b9 100644 --- a/sys/arch/amd64/amd64/dkcsum.c +++ b/sys/arch/amd64/amd64/dkcsum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dkcsum.c,v 1.5 2005/04/01 23:34:38 krw Exp $ */ +/* $OpenBSD: dkcsum.c,v 1.6 2005/07/23 14:48:35 krw Exp $ */ /*- * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. @@ -73,14 +73,13 @@ dkcsumattach(void) pribootdev = altbootdev = 0; /* - * XXX Whatif DEV_BSIZE is changed to something else than the BIOS + * XXX What if DEV_BSIZE is changed to something else than the BIOS * blocksize? Today, /boot doesn't cover that case so neither need * I care here. */ bp = geteblk(bios_cksumlen * DEV_BSIZE); /* XXX error check? */ TAILQ_FOREACH(dv, &alldevs, dv_list) { - if (dv->dv_class != DV_DISK) continue; bp->b_dev = dev = dev_rawpart(dv); @@ -107,7 +106,7 @@ dkcsumattach(void) bp->b_flags = B_BUSY | B_READ; bp->b_cylin = 0; (*bdsw->d_strategy)(bp); - if (biowait(bp)) { + if ((error = biowait(bp))) { /* XXX What to do here? */ printf("dkcsum: read of %s failed (%d)\n", dv->dv_xname, error); diff --git a/sys/arch/i386/i386/dkcsum.c b/sys/arch/i386/i386/dkcsum.c index da3a9bd67e4..958782494b2 100644 --- a/sys/arch/i386/i386/dkcsum.c +++ b/sys/arch/i386/i386/dkcsum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dkcsum.c,v 1.16 2005/04/01 23:34:39 krw Exp $ */ +/* $OpenBSD: dkcsum.c,v 1.17 2005/07/23 14:48:34 krw Exp $ */ /*- * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. @@ -53,7 +53,7 @@ extern bios_diskinfo_t *bios_diskinfo; extern dev_t bootdev; void -dkcsumattach() +dkcsumattach(void) { struct device *dv; struct buf *bp; @@ -106,7 +106,7 @@ dkcsumattach() bp->b_flags = B_BUSY | B_READ; bp->b_cylin = 0; (*bdsw->d_strategy)(bp); - if (biowait(bp)) { + if ((error = biowait(bp))) { /* XXX What to do here? */ printf("dkcsum: read of %s failed (%d)\n", dv->dv_xname, error); |