mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-24 22:21:27 +00:00
Follow up for r5418: some cleanups and fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5420 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1824,17 +1824,18 @@ static vdisk_op_fn nullio_ops[256] = {
|
||||
SHARED_OPS
|
||||
};
|
||||
|
||||
#define VDISK_OPCODE_DESCRIPTORS \
|
||||
/* &scst_op_descr_get_lba_status, */ \
|
||||
&scst_op_descr_read_capacity16, \
|
||||
&scst_op_descr_write_same10, \
|
||||
&scst_op_descr_write_same16, \
|
||||
&scst_op_descr_unmap, \
|
||||
&scst_op_descr_format_unit, \
|
||||
&scst_op_descr_cwr,
|
||||
|
||||
static const struct scst_opcode_descriptor *vdisk_opcode_descriptors[] = {
|
||||
SHARED_OPCODE_DESCRIPTORS
|
||||
#if 0 /* it's INVALID OPCODE currently */
|
||||
&scst_op_descr_get_lba_status,
|
||||
#endif
|
||||
&scst_op_descr_read_capacity16,
|
||||
&scst_op_descr_write_same10,
|
||||
&scst_op_descr_write_same16,
|
||||
&scst_op_descr_unmap,
|
||||
&scst_op_descr_format_unit,
|
||||
&scst_op_descr_cwr,
|
||||
VDISK_OPCODE_DESCRIPTORS
|
||||
SCST_OPCODE_DESCRIPTORS
|
||||
};
|
||||
|
||||
|
||||
@@ -2229,7 +2229,7 @@ static int scst_report_supported_opcodes(struct scst_cmd *cmd)
|
||||
buf = address;
|
||||
inline_buf = true;
|
||||
} else {
|
||||
buf = vzalloc(buf_len); /* it can be big */
|
||||
buf = vmalloc(buf_len); /* it can be big */
|
||||
if (buf == NULL) {
|
||||
PRINT_ERROR("Unable to allocate REPORT SUPPORTED "
|
||||
"OPERATION CODES buffer with size %d", buf_len);
|
||||
@@ -2239,7 +2239,7 @@ static int scst_report_supported_opcodes(struct scst_cmd *cmd)
|
||||
inline_buf = false;
|
||||
}
|
||||
|
||||
memset(buf, 0, sizeof(buf));
|
||||
memset(buf, 0, buf_len);
|
||||
|
||||
switch(options) {
|
||||
case 0: /* all */
|
||||
|
||||
Reference in New Issue
Block a user