diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-08-29 00:33:56 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-08-29 00:33:56 +0000 |
commit | 4388cdbf7bffc03e4e7b8d51e512ffe71fddc35c (patch) | |
tree | 3e48088d43381a698f1150caa12aa4f9898bdd90 /sys | |
parent | 4d0541ff5c6d1adf758dd0fe89a0019634afa21d (diff) |
Make sure certain architectures/compilers don't round up the size of
struct scsi_mode_sense_buf to 256, a value which doesn't fit in the 1
byte length field of a scsi command.
Found by aoyama@ on luna88k.
Suggested by miod@. ok deraadt@.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/scsi_all.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/scsi/scsi_all.h b/sys/scsi/scsi_all.h index 718af139184..0ef1485d3bc 100644 --- a/sys/scsi/scsi_all.h +++ b/sys/scsi/scsi_all.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_all.h,v 1.32 2005/08/17 02:40:53 dlg Exp $ */ +/* $OpenBSD: scsi_all.h,v 1.33 2005/08/29 00:33:55 krw Exp $ */ /* $NetBSD: scsi_all.h,v 1.10 1996/09/12 01:57:17 thorpej Exp $ */ /* @@ -343,8 +343,8 @@ struct scsi_mode_sense_buf { struct scsi_mode_header hdr; struct scsi_mode_header_big hdr_big; u_char buf[255]; /* 256 bytes breaks some devices. */ - } headers; -}; + } __packed headers; /* Ensure sizeof() is 255! */ +} __packed; /* * SPI status information unit. See section 14.3.5 of SPI-3. |