summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2008-04-10 13:18:07 +0000
committerdlg <dlg@openbsd.org>2008-04-10 13:18:07 +0000
commit95acbd04275de7610fc9bda693189bc6d9ea9240 (patch)
tree59951fb347b7239a949ad4a46a85be2943d92588
parentFix MJPEG Video Frame Descriptor struct. (diff)
downloadwireguard-openbsd-95acbd04275de7610fc9bda693189bc6d9ea9240.tar.xz
wireguard-openbsd-95acbd04275de7610fc9bda693189bc6d9ea9240.zip
fix the macros that are used to read the devid vpd page.
-rw-r--r--sys/scsi/scsi_all.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/scsi/scsi_all.h b/sys/scsi/scsi_all.h
index 5eb63b5de24..21c34501178 100644
--- a/sys/scsi/scsi_all.h
+++ b/sys/scsi/scsi_all.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_all.h,v 1.44 2007/12/28 16:19:15 dlg Exp $ */
+/* $OpenBSD: scsi_all.h,v 1.45 2008/04/10 13:18:07 dlg Exp $ */
/* $NetBSD: scsi_all.h,v 1.10 1996/09/12 01:57:17 thorpej Exp $ */
/*
@@ -291,11 +291,11 @@ struct scsi_vpd_devid_hdr {
#define VPD_DEVID_CODE_UTF8 0x3
u_int8_t flags;
#define VPD_DEVID_PIV 0x80
-#define VPD_DEVID_ASSOC 0x30
+#define VPD_DEVID_ASSOC(_f) ((_f) & 0x30)
#define VPD_DEVID_ASSOC_LU 0x00
#define VPD_DEVID_ASSOC_PORT 0x10
#define VPD_DEVID_ASSOC_TARG 0x20
-#define VPD_DEVID_TYPE (((_f) >> 0) & 0x0f)
+#define VPD_DEVID_TYPE(_f) ((_f) & 0x0f)
#define VPD_DEVID_TYPE_VENDOR 0x0
#define VPD_DEVID_TYPE_T10 0x1
#define VPD_DEVID_TYPE_EUI64 0x2