TEST_UNIT_READY doesn't need buffer

This commit is contained in:
Laurent Vivier 2006-11-01 17:44:33 +00:00
parent 5feb420909
commit ed0b247d09

View File

@ -5,6 +5,7 @@
*/
#include <sys/types.h>
#include <stdio.h>
#include <scsi/scsi.h>
@ -13,24 +14,16 @@
#include "libscsi.h"
int scsi_TEST_UNIT_READY(int target, char *buffer, size_t count)
int scsi_TEST_UNIT_READY(int target)
{
char cdb[6];
TIB_t tib[2];
cdb[0] = TEST_UNIT_READY;
cdb[1] = 0;
cdb[2] = 0;
cdb[3] = 0;
cdb[4] = count;
cdb[4] = 0;
cdb[5] = 0;
tib[0].opcode = op_no_inc;
tib[0].param1 = (int)buffer;
tib[0].param2 = count;
tib[1].opcode = op_stop;
tib[1].param1 = 0;
tib[1].param2 = 0;
return scsi_command(target, cdb, 6, tib);
return scsi_command(target, cdb, 6, NULL);
}