diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-03-06 22:52:43 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-03-06 22:52:43 +0000 |
commit | 668d64dd6cbef2feeae3a446f5b7806a28efb45d (patch) | |
tree | 0e412d4acacb506304261162f5dfe845ef72a451 /sys/arch/hp300/dev | |
parent | 799496ad4d549d5c11ba25a8cea28c67d3af98a5 (diff) |
Keep gcc from addint an implicit memset() behind our back. Thanks
to Niklas and Theo for help in tracking down what was going on.
Diffstat (limited to 'sys/arch/hp300/dev')
-rw-r--r-- | sys/arch/hp300/dev/sd.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/arch/hp300/dev/sd.c b/sys/arch/hp300/dev/sd.c index f168510a78c..de2a243c8d7 100644 --- a/sys/arch/hp300/dev/sd.c +++ b/sys/arch/hp300/dev/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.12 1997/07/13 09:48:00 downsj Exp $ */ +/* $OpenBSD: sd.c,v 1.13 1998/03/06 22:52:42 millert Exp $ */ /* $NetBSD: sd.c,v 1.34 1997/07/10 18:14:10 kleink Exp $ */ /* @@ -150,12 +150,16 @@ sdgetgeom(sc) struct scsi_modesense_hdr header; struct scsi_geometry geom; } sensebuf; - struct scsi_fmt_cdb modesense_geom = { - 6, - { CMD_MODE_SENSE, 0, 0x04, 0, sizeof(sensebuf), 0 } - }; + struct scsi_fmt_cdb modesense_geom; int ctlr, slave, unit; + /* XXX - if we try to do this in the declaration gcc uses memset() */ + bzero(&modesense_geom, sizeof(modesense_geom)); + modesense_geom.len = 6; + modesense_geom.cdb[0] = CMD_MODE_SENSE; + modesense_geom.cdb[2] = 0x04; + modesense_geom.cdb[4] = sizeof(sensebuf); + ctlr = sc->sc_dev.dv_parent->dv_unit; slave = sc->sc_target; unit = sc->sc_lun; |