Commit 297cff99 authored by James Bottomley's avatar James Bottomley

make osst compile again after st structure changes

In a recent patch, all the ST_ typedefs were removed from st.h.  One of
the side effects of this makes osst no longer compile.  This patch
replaces all of the typedef uses from st.h with their struct
equivalents.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 6cc68b05
...@@ -473,7 +473,7 @@ static int osst_verify_frame(OS_Scsi_Tape * STp, int frame_seq_number, int quiet ...@@ -473,7 +473,7 @@ static int osst_verify_frame(OS_Scsi_Tape * STp, int frame_seq_number, int quiet
char * name = tape_name(STp); char * name = tape_name(STp);
os_aux_t * aux = STp->buffer->aux; os_aux_t * aux = STp->buffer->aux;
os_partition_t * par = &(aux->partition); os_partition_t * par = &(aux->partition);
ST_partstat * STps = &(STp->ps[STp->partition]); struct st_partstat * STps = &(STp->ps[STp->partition]);
int blk_cnt, blk_sz, i; int blk_cnt, blk_sz, i;
if (STp->raw) { if (STp->raw) {
...@@ -902,7 +902,7 @@ static int osst_read_frame(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, int timeo ...@@ -902,7 +902,7 @@ static int osst_read_frame(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, int timeo
static int osst_initiate_read(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt) static int osst_initiate_read(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt)
{ {
ST_partstat * STps = &(STp->ps[STp->partition]); struct st_partstat * STps = &(STp->ps[STp->partition]);
Scsi_Request * SRpnt ; Scsi_Request * SRpnt ;
unsigned char cmd[MAX_COMMAND_SIZE]; unsigned char cmd[MAX_COMMAND_SIZE];
int retval = 0; int retval = 0;
...@@ -940,7 +940,7 @@ static int osst_initiate_read(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt) ...@@ -940,7 +940,7 @@ static int osst_initiate_read(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt)
static int osst_get_logical_frame(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, int frame_seq_number, int quiet) static int osst_get_logical_frame(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, int frame_seq_number, int quiet)
{ {
ST_partstat * STps = &(STp->ps[STp->partition]); struct st_partstat * STps = &(STp->ps[STp->partition]);
char * name = tape_name(STp); char * name = tape_name(STp);
int cnt = 0, int cnt = 0,
bad = 0, bad = 0,
...@@ -1066,7 +1066,7 @@ static int osst_get_logical_frame(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, in ...@@ -1066,7 +1066,7 @@ static int osst_get_logical_frame(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, in
static int osst_seek_logical_blk(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, int logical_blk_num) static int osst_seek_logical_blk(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, int logical_blk_num)
{ {
ST_partstat * STps = &(STp->ps[STp->partition]); struct st_partstat * STps = &(STp->ps[STp->partition]);
char * name = tape_name(STp); char * name = tape_name(STp);
int retries = 0; int retries = 0;
int frame_seq_estimate, ppos_estimate, move; int frame_seq_estimate, ppos_estimate, move;
...@@ -1205,7 +1205,7 @@ static int osst_get_sector(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt) ...@@ -1205,7 +1205,7 @@ static int osst_get_sector(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt)
static int osst_seek_sector(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, int sector) static int osst_seek_sector(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, int sector)
{ {
ST_partstat * STps = &(STp->ps[STp->partition]); struct st_partstat * STps = &(STp->ps[STp->partition]);
int frame = sector >> OSST_FRAME_SHIFT, int frame = sector >> OSST_FRAME_SHIFT,
offset = (sector & OSST_SECTOR_MASK) << OSST_SECTOR_SHIFT, offset = (sector & OSST_SECTOR_MASK) << OSST_SECTOR_SHIFT,
r; r;
...@@ -1566,7 +1566,7 @@ static int osst_reposition_and_retry(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, ...@@ -1566,7 +1566,7 @@ static int osst_reposition_and_retry(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt,
static int osst_write_error_recovery(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, int pending) static int osst_write_error_recovery(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, int pending)
{ {
Scsi_Request * SRpnt = * aSRpnt; Scsi_Request * SRpnt = * aSRpnt;
ST_partstat * STps = & STp->ps[STp->partition]; struct st_partstat * STps = & STp->ps[STp->partition];
char * name = tape_name(STp); char * name = tape_name(STp);
int retval = 0; int retval = 0;
int rw_state; int rw_state;
...@@ -2756,7 +2756,7 @@ static int osst_set_frame_position(OS_Scsi_Tape *STp, Scsi_Request ** aSRpnt, in ...@@ -2756,7 +2756,7 @@ static int osst_set_frame_position(OS_Scsi_Tape *STp, Scsi_Request ** aSRpnt, in
{ {
unsigned char scmd[MAX_COMMAND_SIZE]; unsigned char scmd[MAX_COMMAND_SIZE];
Scsi_Request * SRpnt; Scsi_Request * SRpnt;
ST_partstat * STps; struct st_partstat * STps;
int result = 0; int result = 0;
int pp = (ppos == 3000 && !skip)? 0 : ppos; int pp = (ppos == 3000 && !skip)? 0 : ppos;
char * name = tape_name(STp); char * name = tape_name(STp);
...@@ -2812,7 +2812,7 @@ static int osst_set_frame_position(OS_Scsi_Tape *STp, Scsi_Request ** aSRpnt, in ...@@ -2812,7 +2812,7 @@ static int osst_set_frame_position(OS_Scsi_Tape *STp, Scsi_Request ** aSRpnt, in
static int osst_write_trailer(OS_Scsi_Tape *STp, Scsi_Request ** aSRpnt, int leave_at_EOT) static int osst_write_trailer(OS_Scsi_Tape *STp, Scsi_Request ** aSRpnt, int leave_at_EOT)
{ {
ST_partstat * STps = &(STp->ps[STp->partition]); struct st_partstat * STps = &(STp->ps[STp->partition]);
int result = 0; int result = 0;
if (STp->write_type != OS_WRITE_NEW_MARK) { if (STp->write_type != OS_WRITE_NEW_MARK) {
...@@ -2843,7 +2843,7 @@ static int osst_flush_write_buffer(OS_Scsi_Tape *STp, Scsi_Request ** aSRpnt) ...@@ -2843,7 +2843,7 @@ static int osst_flush_write_buffer(OS_Scsi_Tape *STp, Scsi_Request ** aSRpnt)
int result = 0; int result = 0;
unsigned char cmd[MAX_COMMAND_SIZE]; unsigned char cmd[MAX_COMMAND_SIZE];
Scsi_Request * SRpnt = *aSRpnt; Scsi_Request * SRpnt = *aSRpnt;
ST_partstat * STps; struct st_partstat * STps;
char * name = tape_name(STp); char * name = tape_name(STp);
if ((STp->buffer)->writing) { if ((STp->buffer)->writing) {
...@@ -2969,7 +2969,7 @@ static int osst_flush_write_buffer(OS_Scsi_Tape *STp, Scsi_Request ** aSRpnt) ...@@ -2969,7 +2969,7 @@ static int osst_flush_write_buffer(OS_Scsi_Tape *STp, Scsi_Request ** aSRpnt)
seek_next is true. */ seek_next is true. */
static int osst_flush_buffer(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, int seek_next) static int osst_flush_buffer(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, int seek_next)
{ {
ST_partstat * STps; struct st_partstat * STps;
int backspace = 0, result = 0; int backspace = 0, result = 0;
#if DEBUG #if DEBUG
char * name = tape_name(STp); char * name = tape_name(STp);
...@@ -3134,7 +3134,7 @@ static int do_door_lock(OS_Scsi_Tape * STp, int do_lock) ...@@ -3134,7 +3134,7 @@ static int do_door_lock(OS_Scsi_Tape * STp, int do_lock)
static void reset_state(OS_Scsi_Tape *STp) static void reset_state(OS_Scsi_Tape *STp)
{ {
int i; int i;
ST_partstat *STps; struct st_partstat *STps;
STp->pos_unknown = 0; STp->pos_unknown = 0;
for (i = 0; i < ST_NBR_PARTITIONS; i++) { for (i = 0; i < ST_NBR_PARTITIONS; i++) {
...@@ -3160,8 +3160,8 @@ static ssize_t osst_write(struct file * filp, const char __user * buf, size_t co ...@@ -3160,8 +3160,8 @@ static ssize_t osst_write(struct file * filp, const char __user * buf, size_t co
int doing_write = 0; int doing_write = 0;
const char __user * b_point; const char __user * b_point;
Scsi_Request * SRpnt = NULL; Scsi_Request * SRpnt = NULL;
ST_mode * STm; struct st_modedef * STm;
ST_partstat * STps; struct st_partstat * STps;
OS_Scsi_Tape * STp = filp->private_data; OS_Scsi_Tape * STp = filp->private_data;
char * name = tape_name(STp); char * name = tape_name(STp);
...@@ -3480,8 +3480,8 @@ static ssize_t osst_read(struct file * filp, char __user * buf, size_t count, lo ...@@ -3480,8 +3480,8 @@ static ssize_t osst_read(struct file * filp, char __user * buf, size_t count, lo
ssize_t total, retval = 0; ssize_t total, retval = 0;
ssize_t i, transfer; ssize_t i, transfer;
int special; int special;
ST_mode * STm; struct st_modedef * STm;
ST_partstat * STps; struct st_partstat * STps;
Scsi_Request * SRpnt = NULL; Scsi_Request * SRpnt = NULL;
OS_Scsi_Tape * STp = filp->private_data; OS_Scsi_Tape * STp = filp->private_data;
char * name = tape_name(STp); char * name = tape_name(STp);
...@@ -3660,7 +3660,8 @@ static ssize_t osst_read(struct file * filp, char __user * buf, size_t count, lo ...@@ -3660,7 +3660,8 @@ static ssize_t osst_read(struct file * filp, char __user * buf, size_t count, lo
/* Set the driver options */ /* Set the driver options */
static void osst_log_options(OS_Scsi_Tape *STp, ST_mode *STm, char *name) static void osst_log_options(OS_Scsi_Tape *STp, struct st_modedef *STm,
char *name)
{ {
printk(KERN_INFO printk(KERN_INFO
"%s:I: Mode %d options: buffer writes: %d, async writes: %d, read ahead: %d\n", "%s:I: Mode %d options: buffer writes: %d, async writes: %d, read ahead: %d\n",
...@@ -3687,12 +3688,12 @@ static int osst_set_options(OS_Scsi_Tape *STp, long options) ...@@ -3687,12 +3688,12 @@ static int osst_set_options(OS_Scsi_Tape *STp, long options)
{ {
int value; int value;
long code; long code;
ST_mode * STm; struct st_modedef * STm;
char * name = tape_name(STp); char * name = tape_name(STp);
STm = &(STp->modes[STp->current_mode]); STm = &(STp->modes[STp->current_mode]);
if (!STm->defined) { if (!STm->defined) {
memcpy(STm, &(STp->modes[0]), sizeof(ST_mode)); memcpy(STm, &(STp->modes[0]), sizeof(*STm));
modes_defined = TRUE; modes_defined = TRUE;
#if DEBUG #if DEBUG
if (debugging) if (debugging)
...@@ -3847,7 +3848,7 @@ static int osst_int_ioctl(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, unsigned i ...@@ -3847,7 +3848,7 @@ static int osst_int_ioctl(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, unsigned i
int chg_eof = TRUE; int chg_eof = TRUE;
unsigned char cmd[MAX_COMMAND_SIZE]; unsigned char cmd[MAX_COMMAND_SIZE];
Scsi_Request * SRpnt = * aSRpnt; Scsi_Request * SRpnt = * aSRpnt;
ST_partstat * STps; struct st_partstat * STps;
int fileno, blkno, at_sm, frame_seq_numbr, logical_blk_num; int fileno, blkno, at_sm, frame_seq_numbr, logical_blk_num;
int datalen = 0, direction = SCSI_DATA_NONE; int datalen = 0, direction = SCSI_DATA_NONE;
char * name = tape_name(STp); char * name = tape_name(STp);
...@@ -4231,8 +4232,8 @@ static int os_scsi_tape_open(struct inode * inode, struct file * filp) ...@@ -4231,8 +4232,8 @@ static int os_scsi_tape_open(struct inode * inode, struct file * filp)
unsigned char cmd[MAX_COMMAND_SIZE]; unsigned char cmd[MAX_COMMAND_SIZE];
Scsi_Request * SRpnt = NULL; Scsi_Request * SRpnt = NULL;
OS_Scsi_Tape * STp; OS_Scsi_Tape * STp;
ST_mode * STm; struct st_modedef * STm;
ST_partstat * STps; struct st_partstat * STps;
char * name; char * name;
int dev = TAPE_NR(inode); int dev = TAPE_NR(inode);
int mode = TAPE_MODE(inode); int mode = TAPE_MODE(inode);
...@@ -4589,8 +4590,8 @@ static int os_scsi_tape_flush(struct file * filp) ...@@ -4589,8 +4590,8 @@ static int os_scsi_tape_flush(struct file * filp)
{ {
int result = 0, result2; int result = 0, result2;
OS_Scsi_Tape * STp = filp->private_data; OS_Scsi_Tape * STp = filp->private_data;
ST_mode * STm = &(STp->modes[STp->current_mode]); struct st_modedef * STm = &(STp->modes[STp->current_mode]);
ST_partstat * STps = &(STp->ps[STp->partition]); struct st_partstat * STps = &(STp->ps[STp->partition]);
Scsi_Request * SRpnt = NULL; Scsi_Request * SRpnt = NULL;
char * name = tape_name(STp); char * name = tape_name(STp);
...@@ -4704,8 +4705,8 @@ static int osst_ioctl(struct inode * inode,struct file * file, ...@@ -4704,8 +4705,8 @@ static int osst_ioctl(struct inode * inode,struct file * file,
{ {
int i, cmd_nr, cmd_type, retval = 0; int i, cmd_nr, cmd_type, retval = 0;
unsigned int blk; unsigned int blk;
ST_mode * STm; struct st_modedef * STm;
ST_partstat * STps; struct st_partstat * STps;
Scsi_Request * SRpnt = NULL; Scsi_Request * SRpnt = NULL;
OS_Scsi_Tape * STp = file->private_data; OS_Scsi_Tape * STp = file->private_data;
char * name = tape_name(STp); char * name = tape_name(STp);
...@@ -5412,8 +5413,8 @@ static int osst_probe(struct device *dev) ...@@ -5412,8 +5413,8 @@ static int osst_probe(struct device *dev)
{ {
Scsi_Device * SDp = to_scsi_device(dev); Scsi_Device * SDp = to_scsi_device(dev);
OS_Scsi_Tape * tpnt; OS_Scsi_Tape * tpnt;
ST_mode * STm; struct st_modedef * STm;
ST_partstat * STps; struct st_partstat * STps;
OSST_buffer * buffer; OSST_buffer * buffer;
struct gendisk * drive; struct gendisk * drive;
int i, mode, dev_num; int i, mode, dev_num;
......
...@@ -552,14 +552,14 @@ typedef struct { ...@@ -552,14 +552,14 @@ typedef struct {
int long_timeout; /* timeout for commands known to take long time*/ int long_timeout; /* timeout for commands known to take long time*/
/* Mode characteristics */ /* Mode characteristics */
ST_mode modes[ST_NBR_MODES]; struct st_modedef modes[ST_NBR_MODES];
int current_mode; int current_mode;
/* Status variables */ /* Status variables */
int partition; int partition;
int new_partition; int new_partition;
int nbr_partitions; /* zero until partition support enabled */ int nbr_partitions; /* zero until partition support enabled */
ST_partstat ps[ST_NBR_PARTITIONS]; struct st_partstat ps[ST_NBR_PARTITIONS];
unsigned char dirty; unsigned char dirty;
unsigned char ready; unsigned char ready;
unsigned char write_prot; unsigned char write_prot;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment