diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2006-05-25 22:04:36 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2006-05-25 22:04:36 +0000 |
commit | 9bc1c7e04acf976015059d416c8ced1979a803ef (patch) | |
tree | 39b8d698a96ce145929168db158dc2630d3edb0a /sys | |
parent | 56a7b8e90c6f296e9a15330dc0e6595a350e4dd8 (diff) |
Move a int i; to top of function so that it compiles on non c99 compilers.
Pointed out by miod@
The enclosure id modifier didn't reflect reality so move it back to whatever
the raid card uses.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/mfi.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index aec2068866e..8fb7fd9f5d8 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfi.c,v 1.56 2006/05/25 04:23:57 marco Exp $ */ +/* $OpenBSD: mfi.c,v 1.57 2006/05/25 22:04:35 marco Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -401,6 +401,9 @@ mfi_initialize_firmware(struct mfi_softc *sc) int mfi_get_info(struct mfi_softc *sc) { +#ifdef MFI_DEBUG + int i; +#endif DNPRINTF(MFI_D_MISC, "%s: mfi_get_info\n", DEVNAME(sc)); if (mfi_mgmt(sc, MR_DCMD_CTRL_GET_INFO, MFI_DATA_IN, @@ -408,7 +411,6 @@ mfi_get_info(struct mfi_softc *sc) return (1); #ifdef MFI_DEBUG - int i; for (i = 0; i < sc->sc_info.mci_image_component_count; i++) { printf("%s: active FW %s Version %s date %s time %s\n", @@ -1450,10 +1452,7 @@ mfi_ioctl_disk(struct mfi_softc *sc, struct bioc_disk *bd) bd->bd_size = pd->mpd_size; /* if pd->mpd_enc_idx is 0 then it is not in an enclosure */ - if (pd->mpd_enc_idx) - bd->bd_channel = pd->mpd_enc_idx - 1; /* fw numbers ch from 1 */ - else - bd->bd_channel = 0; + bd->bd_channel = pd->mpd_enc_idx; inqbuf = (struct scsi_inquiry_data *)&pd->mpd_inq_data; memcpy(vend, inqbuf->vendor, sizeof vend - 1); |