summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2005-08-16 01:12:47 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2005-08-16 01:12:47 +0000
commita1752dda0b048972402c297a55e5073bf69fac20 (patch)
treecb3a013b16e7bb8410f8849498e8cbfa88e78b37
parent08292787802a803cd3887751840486d134097773 (diff)
Fix a few retardos. Yelled at by deraadt@
-rw-r--r--sys/dev/biovar.h12
-rw-r--r--sys/dev/ic/ami.c6
2 files changed, 6 insertions, 12 deletions
diff --git a/sys/dev/biovar.h b/sys/dev/biovar.h
index 3434944346c..e580cbc7831 100644
--- a/sys/dev/biovar.h
+++ b/sys/dev/biovar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: biovar.h,v 1.13 2005/08/09 14:29:18 marco Exp $ */
+/* $OpenBSD: biovar.h,v 1.14 2005/08/16 01:12:46 marco Exp $ */
/*
* Copyright (c) 2002 Niklas Hallqvist. All rights reserved.
@@ -90,10 +90,7 @@ struct bioc_disk {
u_int16_t bd_target;
u_int16_t bd_lun;
u_int16_t bd_other_id; /* unused for now but needed for sas/fc */
- char bd_vendor[8]; /* vendor string */
- char bd_product[16]; /* product string */
- char bd_revision[4]; /* revision string */
- char bd_pad[4]; /* zero terminate in here */
+ char bd_vendor[32]; /* scsi string */
char bd_serial[32]; /* serial number */
char bd_procdev[16]; /* processor device */
};
@@ -120,10 +117,7 @@ struct bioc_vol {
int bv_nodisk; /* nr of drives */
char bv_dev[16]; /* device */
- char bv_vendor[8]; /* vendor string */
- char bv_product[16]; /* product string */
- char bv_revision[4]; /* revision string */
- char bv_pad[4]; /* zero terminate in here */
+ char bv_vendor[32]; /* scsi string */
};
#define BIOCALARM _IOWR('B', 35, struct bioc_alarm)
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index cbe5d0bd331..8adfe551b44 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.58 2005/08/15 23:22:45 marco Exp $ */
+/* $OpenBSD: ami.c,v 1.59 2005/08/16 01:12:46 marco Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -2119,7 +2119,7 @@ ami_global_hsdisk(sc, bd, p)
if (!ami_drv_inq(sc, ch, tg, 0, &inqbuf))
strlcpy(bd->bd_vendor, inqbuf.vendor,
- 8 + 16 + 4 + 1);
+ sizeof(bd->bd_vendor));
if (!ami_drv_inq(sc, ch, tg, 0x80, &vpdbuf))
strlcpy(bd->bd_serial, vpdbuf.serial,
@@ -2304,7 +2304,7 @@ ami_ioctl_disk(sc, bd)
if (!ami_drv_inq(sc, ch, tg, 0, &inqbuf))
strlcpy(bd->bd_vendor, inqbuf.vendor,
- 8 + 16 + 4 + 1); /* vendor prod rev zero */
+ sizeof(bd->bd_vendor));
if (!ami_drv_inq(sc, ch, tg, 0x80, &vpdbuf))
strlcpy(bd->bd_serial, vpdbuf.serial,