summaryrefslogtreecommitdiff
path: root/sys/scsi/scsi_all.h
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2010-12-24 02:45:34 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2010-12-24 02:45:34 +0000
commit5c52b0beb6503713c8a44e3a72a39488315033dd (patch)
tree36205830aaa9be0877f5d081fbbaebe96c4cd9e6 /sys/scsi/scsi_all.h
parent6dcaa262bc27b5670726959bb425bb0d3f9c7e9d (diff)
Have sd(4) devices check for and respect read-only information the
way st(4) does. Have both decline to open read-only devices for anything but read-only access. Suggestion to fail opens rather than individual i/o's from deraadt@. Problem USB device found and donated by chefren, who also tested diffs. Thanks! ok dlg@ marco@
Diffstat (limited to 'sys/scsi/scsi_all.h')
-rw-r--r--sys/scsi/scsi_all.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/scsi/scsi_all.h b/sys/scsi/scsi_all.h
index bd3690bf6d8..f8399c40652 100644
--- a/sys/scsi/scsi_all.h
+++ b/sys/scsi/scsi_all.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_all.h,v 1.51 2010/09/02 11:54:44 dlg Exp $ */
+/* $OpenBSD: scsi_all.h,v 1.52 2010/12/24 02:45:33 krw Exp $ */
/* $NetBSD: scsi_all.h,v 1.10 1996/09/12 01:57:17 thorpej Exp $ */
/*
@@ -431,6 +431,9 @@ struct scsi_mode_header_big {
u_int8_t blk_desc_len[2];
};
+/* Both disks and tapes use dev_spec to report READONLY status. */
+#define SMH_DSP_WRITE_PROT 0x80
+
union scsi_mode_sense_buf {
struct scsi_mode_header hdr;
struct scsi_mode_header_big hdr_big;