TESTS: remove compiler warnings
This commit is contained in:
@@ -25,11 +25,8 @@ int T0360_startstopunit_simple(const char *initiator, const char *url, int data_
|
||||
{
|
||||
struct iscsi_context *iscsi;
|
||||
struct scsi_task *task;
|
||||
struct scsi_readcapacity16 *rc16;
|
||||
struct scsi_inquiry_standard *inq;
|
||||
int ret, lun, removable;
|
||||
uint32_t block_size;
|
||||
uint64_t num_blocks;
|
||||
int full_size;
|
||||
|
||||
printf("0360_startstopunit_simple:\n");
|
||||
@@ -48,30 +45,6 @@ int T0360_startstopunit_simple(const char *initiator, const char *url, int data_
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* find the size of the LUN */
|
||||
task = iscsi_readcapacity16_sync(iscsi, lun);
|
||||
if (task == NULL) {
|
||||
printf("Failed to send READCAPACITY16 command: %s\n", iscsi_get_error(iscsi));
|
||||
ret = -1;
|
||||
goto finished;
|
||||
}
|
||||
if (task->status != SCSI_STATUS_GOOD) {
|
||||
printf("READCAPACITY16 command: failed with sense. %s\n", iscsi_get_error(iscsi));
|
||||
ret = -1;
|
||||
scsi_free_scsi_task(task);
|
||||
goto finished;
|
||||
}
|
||||
rc16 = scsi_datain_unmarshall(task);
|
||||
if (rc16 == NULL) {
|
||||
printf("failed to unmarshall READCAPACITY16 data. %s\n", iscsi_get_error(iscsi));
|
||||
ret = -1;
|
||||
scsi_free_scsi_task(task);
|
||||
goto finished;
|
||||
}
|
||||
block_size = rc16->block_length;
|
||||
num_blocks = rc16->returned_lba;
|
||||
scsi_free_scsi_task(task);
|
||||
|
||||
/* See how big this inquiry data is */
|
||||
task = iscsi_inquiry_sync(iscsi, lun, 0, 0, 64);
|
||||
if (task == NULL || task->status != SCSI_STATUS_GOOD) {
|
||||
|
||||
Reference in New Issue
Block a user