diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2018-02-22 07:00:28 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2018-02-22 07:00:28 +0000 |
commit | 252086533f8af0736c2a4987cd70a44366837ec1 (patch) | |
tree | 1f9245e247673fdb6ebea13b9aa559e1f869d78c /lib/sg_pt_osf1.c | |
parent | 39ea1b548f21c006c311ace897b221b100bfa88d (diff) | |
download | sg3_utils-252086533f8af0736c2a4987cd70a44366837ec1.tar.gz |
sg_lib: add sg_if_can2stdout(); use uint8_t instead of unsigned char; Windows pass-through work
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@754 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'lib/sg_pt_osf1.c')
-rw-r--r-- | lib/sg_pt_osf1.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/sg_pt_osf1.c b/lib/sg_pt_osf1.c index c2e46912..a140a407 100644 --- a/lib/sg_pt_osf1.c +++ b/lib/sg_pt_osf1.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005-2017 Douglas Gilbert. + * Copyright (c) 2005-2018 Douglas Gilbert. * All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the BSD_LICENSE file. @@ -44,11 +44,11 @@ static int camfd; static int camopened = 0; struct sg_pt_osf1_scsi { - unsigned char * cdb; + uint8_t * cdb; int cdb_len; - unsigned char * sense; + uint8_t * sense; int sense_len; - unsigned char * dxferp; + uint8_t * dxferp; int dxfer_len; int dxfer_dir; int scsi_status; @@ -225,19 +225,19 @@ clear_scsi_pt_obj(struct sg_pt_base * vp) } void -set_scsi_pt_cdb(struct sg_pt_base * vp, const unsigned char * cdb, +set_scsi_pt_cdb(struct sg_pt_base * vp, const uint8_t * cdb, int cdb_len) { struct sg_pt_osf1_scsi * ptp = &vp->impl; if (ptp->cdb) ++ptp->in_err; - ptp->cdb = (unsigned char *)cdb; + ptp->cdb = (uint8_t *)cdb; ptp->cdb_len = cdb_len; } void -set_scsi_pt_sense(struct sg_pt_base * vp, unsigned char * sense, +set_scsi_pt_sense(struct sg_pt_base * vp, uint8_t * sense, int max_sense_len) { struct sg_pt_osf1_scsi * ptp = &vp->impl; @@ -251,7 +251,7 @@ set_scsi_pt_sense(struct sg_pt_base * vp, unsigned char * sense, /* from device */ void -set_scsi_pt_data_in(struct sg_pt_base * vp, unsigned char * dxferp, +set_scsi_pt_data_in(struct sg_pt_base * vp, uint8_t * dxferp, int dxfer_len) { struct sg_pt_osf1_scsi * ptp = &vp->impl; @@ -267,7 +267,7 @@ set_scsi_pt_data_in(struct sg_pt_base * vp, unsigned char * dxferp, /* to device */ void -set_scsi_pt_data_out(struct sg_pt_base * vp, const unsigned char * dxferp, +set_scsi_pt_data_out(struct sg_pt_base * vp, const uint8_t * dxferp, int dxfer_len) { struct sg_pt_osf1_scsi * ptp = &vp->impl; @@ -275,7 +275,7 @@ set_scsi_pt_data_out(struct sg_pt_base * vp, const unsigned char * dxferp, if (ptp->dxferp) ++ptp->in_err; if (dxfer_len > 0) { - ptp->dxferp = (unsigned char *)dxferp; + ptp->dxferp = (uint8_t *)dxferp; ptp->dxfer_len = dxfer_len; ptp->dxfer_dir = CAM_DIR_OUT; } @@ -355,7 +355,7 @@ do_scsi_pt(struct sg_pt_base * vp, int device_fd, int time_secs, int verbose) int len, retval; CCB_SCSIIO ccb; UAGT_CAM_CCB uagt; - unsigned char sensep[ADDL_SENSE_LENGTH]; + uint8_t sensep[ADDL_SENSE_LENGTH]; ptp->os_err = 0; |