aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ata/atapi-cd.h
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2009-12-13 18:26:19 +0000
committerMarius Strobl <marius@FreeBSD.org>2009-12-13 18:26:19 +0000
commit4640fdb5b63d5e628088598b795087e118012b7f (patch)
treedf82df39cc26e99f34a5b658f0466356fa048181 /sys/dev/ata/atapi-cd.h
parentf96264e3750dd670e5b78ecf9bb360ae17f91f5f (diff)
downloadsrc-4640fdb5b63d5e628088598b795087e118012b7f.tar.gz
src-4640fdb5b63d5e628088598b795087e118012b7f.zip
Specify the capability and media bits of the capabilities page in
native, i.e. big-endian, format and convert as appropriate like we also do with the multibyte fields of the other pages. This fixes the output of acd_describe() to match reality on big-endian machines without breaking it on little-endian ones. While at it, also convert the remaining multibyte fields of the pages read although they are currently unused for consistency and in order to prevent possible similar bugs in the future. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=200481
Diffstat (limited to 'sys/dev/ata/atapi-cd.h')
-rw-r--r--sys/dev/ata/atapi-cd.h52
1 files changed, 26 insertions, 26 deletions
diff --git a/sys/dev/ata/atapi-cd.h b/sys/dev/ata/atapi-cd.h
index d78771a29aa3..74ce82e4f136 100644
--- a/sys/dev/ata/atapi-cd.h
+++ b/sys/dev/ata/atapi-cd.h
@@ -112,34 +112,34 @@ struct cappage {
u_int8_t param_len;
u_int16_t media;
-#define MST_READ_CDR 0x0001
-#define MST_READ_CDRW 0x0002
-#define MST_READ_PACKET 0x0004
-#define MST_READ_DVDROM 0x0008
-#define MST_READ_DVDR 0x0010
-#define MST_READ_DVDRAM 0x0020
-#define MST_WRITE_CDR 0x0100
-#define MST_WRITE_CDRW 0x0200
-#define MST_WRITE_TEST 0x0400
-#define MST_WRITE_DVDR 0x1000
-#define MST_WRITE_DVDRAM 0x2000
+#define MST_READ_CDR 0x0100
+#define MST_READ_CDRW 0x0200
+#define MST_READ_PACKET 0x0400
+#define MST_READ_DVDROM 0x0800
+#define MST_READ_DVDR 0x1000
+#define MST_READ_DVDRAM 0x2000
+#define MST_WRITE_CDR 0x0001
+#define MST_WRITE_CDRW 0x0002
+#define MST_WRITE_TEST 0x0004
+#define MST_WRITE_DVDR 0x0010
+#define MST_WRITE_DVDRAM 0x0020
u_int16_t capabilities;
-#define MST_AUDIO_PLAY 0x0001
-#define MST_COMPOSITE 0x0002
-#define MST_AUDIO_P1 0x0004
-#define MST_AUDIO_P2 0x0008
-#define MST_MODE2_f1 0x0010
-#define MST_MODE2_f2 0x0020
-#define MST_MULTISESSION 0x0040
-#define MST_BURNPROOF 0x0080
-#define MST_READ_CDDA 0x0100
-#define MST_CDDA_STREAM 0x0200
-#define MST_COMBINED_RW 0x0400
-#define MST_CORRECTED_RW 0x0800
-#define MST_SUPPORT_C2 0x1000
-#define MST_ISRC 0x2000
-#define MST_UPC 0x4000
+#define MST_AUDIO_PLAY 0x0100
+#define MST_COMPOSITE 0x0200
+#define MST_AUDIO_P1 0x0400
+#define MST_AUDIO_P2 0x0800
+#define MST_MODE2_f1 0x1000
+#define MST_MODE2_f2 0x2000
+#define MST_MULTISESSION 0x4000
+#define MST_BURNPROOF 0x8000
+#define MST_READ_CDDA 0x0001
+#define MST_CDDA_STREAM 0x0002
+#define MST_COMBINED_RW 0x0004
+#define MST_CORRECTED_RW 0x0008
+#define MST_SUPPORT_C2 0x0010
+#define MST_ISRC 0x0020
+#define MST_UPC 0x0040
u_int8_t mechanism;
#define MST_LOCKABLE 0x01