mirror of
https://github.com/vivier/EMILE.git
synced 2025-03-08 20:30:50 +00:00
CDB is unsigned char and buffer is void*
This commit is contained in:
parent
6f93ca663c
commit
a60529b2fd
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user