scsi: consistent use of __u8 in scsi/scsi.h
PATCH v2 1/4 scsi: consistent use of __u8 in scsi/scsi.h
In reply to a message not in the archivescsi/scsi.h is exported to userspace, so it should use __u8 instead of u8 as other userspace-visible headers do.
This fixes the following errors when application includes scsi/scsi.h
generated with make headers_install:include/scsi/scsi.h:145: error: expected specifier-qualifier-list before ‘u8’ include/scsi/scsi.h: In function ‘scsi_varlen_cdb_length’:include/scsi/scsi.h:156: error: ‘struct scsi_varlen_cdb_hdr’ has no member named ‘additional_cdb_length’
--- include/scsi/scsi.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
include/scsi/scsi.h +4 -4
@@ -142,10 +142,10 @@ struct scsi_cmnd;/* defined in T10 SCSI Primary Commands-2 (SPC2) */ struct scsi_varlen_cdb_hdr { -u8 opcode;/* opcode always == VARIABLE_LENGTH_CMD */ -u8 control; -u8 misc[5 ]; -u8 additional_cdb_length;/* total cdb length - 8 */ +__u8 opcode;/* opcode always == VARIABLE_LENGTH_CMD */ +__u8 control; +__u8 misc[5 ]; +__u8 additional_cdb_length;/* total cdb length - 8 */ __be16 service_action;/* service specific data follows */ };
Signature · 1 line
1.6.5.rc2
PATCH v2 2/4 scsi: make scsi/scsi.h headers_check clean
In reply to a message not in the archiveplace extern declarations in scsi/scsi.h within ifdef __KERNEL__ so that make headers_install strips them out.
--- include/scsi/scsi.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
include/scsi/scsi.h +4 -0
@@ -150,6 +150,7 @@ struct scsi_varlen_cdb_hdr {/* service specific data follows */ }; +#ifdef __KERNEL__static inline unsigned scsi_varlen_cdb_length (const void *hdr) {
@@ -165,6 +166,7 @@ scsi_command_size(const unsigned char *cmnd)return (cmnd[0 ] ==VARIABLE_LENGTH_CMD ) ? scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]); } +#endif /* * SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft
@@ -281,8 +283,10 @@ enum scsi_protocol { SCSI_PROTOCOL_UNSPEC = 0xf, /* No specific protocol */ }; +#ifdef __KERNEL__/* Returns a human-readable name for the device */ extern const char *scsi_device_type (unsigned type); +#endif /* * standard mode-select header prepended to all mode-select commands
Signature · 1 line
1.6.5.rc2
PATCH v2 3/4 scsi: export scsi_ioctl.h and sg.h headers
In reply to a message not in the archiveglibc uses scsi/sg.h and scsi/scsi_ioctl.h, so we need to export these headers.
--- include/scsi/Kbuild | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
include/scsi/Kbuild +2 -0
@@ -1,3 +1,5 @@ +header-y += sg.h +header-y += scsi_ioctl.h header-y += scsi.h header-y += scsi_netlink.h header-y += scsi_netlink_fc.h
Signature · 1 line
1.6.5.rc2
PATCH v2 4/4 scsi: export scsi_tgt_if.h
In reply to a message not in the archiveThe header scsi_tgt_if.h is used by the SCSI target framework (tgt) (http://stgt.berlios.de/).
Export it from kernel.
--- include/scsi/Kbuild | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/scsi/Kbuild +1 -0
@@ -4,3 +4,4 @@ header-y += scsi.h header-y += scsi_netlink.h header-y += scsi_netlink_fc.h header-y += scsi_bsg_fc.h +header-y += scsi_tgt_if.h
Signature · 1 line
1.6.5.rc2