CDB is unsigned char and buffer is void*

This commit is contained in:
Laurent Vivier 2007-03-22 17:00:50 +00:00
parent 6f93ca663c
commit a60529b2fd
7 changed files with 15 additions and 15 deletions

View File

@ -13,13 +13,13 @@ typedef struct {
unsigned long capacity;
} scsi_device_t;
extern int scsi_command(int target, char* cdb, int count, TIB_t* tib);
extern int scsi_INQUIRY(int target, char* buffer, size_t count);
extern int scsi_command(int target, unsigned char* cdb, int count, TIB_t* tib);
extern int scsi_INQUIRY(int target, void* buffer, size_t count);
extern int scsi_READ(int target, unsigned long offset, unsigned short nb_blocks,
char *buffer, int buffer_size);
extern int scsi_READ_CAPACITY(int target, char *buffer, size_t count);
void *buffer, int buffer_size);
extern int scsi_READ_CAPACITY(int target, void *buffer, size_t count);
extern int scsi_TEST_UNIT_READY(int target);
extern int scsi_REQUEST_SENSE(int target, char* buffer, size_t count);
extern int scsi_REQUEST_SENSE(int target, void* buffer, size_t count);
extern scsi_device_t *scsi_open(int target);
extern int scsi_read_sector(scsi_device_t *device, off_t offset, void* buffer, size_t size);

View File

@ -13,9 +13,9 @@
#include "libscsi.h"
int scsi_INQUIRY(int target, char *buffer, size_t count)
int scsi_INQUIRY(int target, void *buffer, size_t count)
{
char cdb[6];
unsigned char cdb[6];
TIB_t tib[2];
cdb[0] = INQUIRY;

View File

@ -40,9 +40,9 @@
******************************************************************************/
int scsi_READ(int target, unsigned long offset, unsigned short nb_blocks,
char *buffer, int buffer_size)
void *buffer, int buffer_size)
{
char cdb[10];
unsigned char cdb[10];
TIB_t tib[2];
cdb[0] = READ_10;

View File

@ -11,9 +11,9 @@
#include "libscsi.h"
int scsi_READ_CAPACITY(int target, char *buffer, size_t count)
int scsi_READ_CAPACITY(int target, void *buffer, size_t count)
{
char cdb[10];
unsigned char cdb[10];
TIB_t tib[2];
cdb[0] = READ_CAPACITY;

View File

@ -13,9 +13,9 @@
#include "libscsi.h"
int scsi_REQUEST_SENSE(int target, char *buffer, size_t count)
int scsi_REQUEST_SENSE(int target, void *buffer, size_t count)
{
char cdb[6];
unsigned char cdb[6];
TIB_t tib[2];
cdb[0] = REQUEST_SENSE;

View File

@ -16,7 +16,7 @@
int scsi_TEST_UNIT_READY(int target)
{
char cdb[6];
unsigned char cdb[6];
cdb[0] = TEST_UNIT_READY;
cdb[1] = 0;

View File

@ -37,7 +37,7 @@ static inline int scsi_wait_bus()
return noErr;
}
int scsi_command(int target, char* cdb, int count, TIB_t* tib)
int scsi_command(int target, unsigned char* cdb, int count, TIB_t* tib)
{
int err;
short stat;