summaryrefslogtreecommitdiffstats
path: root/sys/scsi
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-07-11 07:46:16 +0000
committerbde <bde@FreeBSD.org>1998-07-11 07:46:16 +0000
commitf0b863f4b5c8604ff238621b7fcd6becea496675 (patch)
tree204ad88277d5159445cec0b7fbc88090454d53eb /sys/scsi
parent065e3edb4989d6adb56bfc42cab8726f680cef5b (diff)
downloadFreeBSD-src-f0b863f4b5c8604ff238621b7fcd6becea496675.zip
FreeBSD-src-f0b863f4b5c8604ff238621b7fcd6becea496675.tar.gz
Fixed printf format errors.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/cd.c29
-rw-r--r--sys/scsi/scsi_base.c43
-rw-r--r--sys/scsi/scsiconf.c20
-rw-r--r--sys/scsi/sd.c42
-rw-r--r--sys/scsi/st.c69
5 files changed, 106 insertions, 97 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index e21ff11..c0254db 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: cd.c,v 1.94 1998/06/17 14:13:13 bde Exp $
+ * $Id: cd.c,v 1.95 1998/07/04 22:30:23 julian Exp $
*/
#include "opt_bounce.h"
@@ -204,9 +204,8 @@ cdattach(struct scsi_link *sc_link)
cd_get_parms(unit, SCSI_NOSLEEP | SCSI_NOMASK | SCSI_SILENT);
}
if (dp->disksize) {
- printf("cd present [%ld x %ld byte records]",
- cd->params.disksize,
- cd->params.blksize);
+ printf("cd present [%lu x %lu byte records]",
+ cd->params.disksize, (u_long)cd->params.blksize);
} else {
printf("can't get the size");
}
@@ -260,8 +259,8 @@ cd_open(dev_t dev, int flags, int fmt, struct proc *p,
return (ENXIO);
SC_DEBUG(sc_link, SDEV_DB1,
- ("cd_open: dev=0x%lx (unit %ld,partition %ld)\n",
- dev, unit, part));
+ ("cd_open: dev=0x%lx (unit %lu,partition %lu)\n",
+ (u_long)dev, (u_long)unit, (u_long)part));
/*
* Check that it is still responding and ok.
* if the media has been changed this will result in a
@@ -330,8 +329,8 @@ cd_open(dev_t dev, int flags, int fmt, struct proc *p,
* Check that the partition CAN exist
*/
if (part >= cd->disklabel.d_npartitions) {
- SC_DEBUG(sc_link, SDEV_DB3, ("partition %ld > %d\n", part
- ,cd->disklabel.d_npartitions));
+ SC_DEBUG(sc_link, SDEV_DB3, ("partition %lu > %u\n",
+ (u_long)part, cd->disklabel.d_npartitions));
errcode = ENXIO;
goto bad;
}
@@ -339,8 +338,8 @@ cd_open(dev_t dev, int flags, int fmt, struct proc *p,
* and that it DOES exist
*/
if (cd->disklabel.d_partitions[part].p_fstype == FS_UNUSED) {
- SC_DEBUG(sc_link, SDEV_DB3,
- ("part %ld type UNUSED\n", part));
+ SC_DEBUG(sc_link, SDEV_DB3, ("part %lu type UNUSED\n",
+ (u_long)part));
errcode = ENXIO;
goto bad;
}
@@ -505,7 +504,7 @@ cdstart(unit, flags)
struct scsi_link *sc_link = SCSI_LINK(&cd_switch, unit);
struct scsi_data *cd = sc_link->sd;
- SC_DEBUG(sc_link, SDEV_DB2, ("cdstart%ld ", unit));
+ SC_DEBUG(sc_link, SDEV_DB2, ("cdstart%lu ", (u_long)unit));
/*
* See if there is a buf to do and we are not already
* doing one
@@ -572,7 +571,7 @@ cdstart(unit, flags)
SCSI_DATA_IN : SCSI_DATA_OUT))
!= SUCCESSFULLY_QUEUED) {
bad:
- printf("cd%ld: oops not queued\n", unit);
+ printf("cd%lu: oops not queued\n", (u_long)unit);
bp->b_error = EIO;
bp->b_flags |= B_ERROR;
biodone(bp);
@@ -604,7 +603,7 @@ cd_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p,
unit = CDUNIT(dev);
part = PARTITION(dev);
cd = sc_link->sd;
- SC_DEBUG(sc_link, SDEV_DB2, ("cdioctl 0x%x ", cmd));
+ SC_DEBUG(sc_link, SDEV_DB2, ("cdioctl 0x%lx ", cmd));
/*
* If the device is not valid.. abandon ship
@@ -1178,8 +1177,8 @@ cd_size(unit, flags)
blksize = 2048; /* some drives lie ! */
if (size < 100)
size = 400000; /* ditto */
- SC_DEBUG(sc_link, SDEV_DB3, ("cd%d: %ld %ld byte blocks\n"
- ,unit, size, blksize));
+ SC_DEBUG(sc_link, SDEV_DB3, ("cd%d: %lu %lu byte blocks\n",
+ unit, (u_long)size, (u_long)blksize));
cd->params.disksize = size;
cd->params.blksize = blksize;
return (size);
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index c04b63f..b2ac709 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -8,7 +8,7 @@
* file.
*
* Written by Julian Elischer (julian@dialix.oz.au)
- * $Id: scsi_base.c,v 1.55 1998/04/16 11:15:23 peter Exp $
+ * $Id: scsi_base.c,v 1.56 1998/04/17 22:37:08 des Exp $
*/
#include "opt_bounce.h"
@@ -770,7 +770,8 @@ static errval
sc_err1(xs)
struct scsi_xfer *xs;
{
- SC_DEBUG(xs->sc_link, SDEV_DB3, ("sc_err1,err = 0x%lx \n", xs->error));
+ SC_DEBUG(xs->sc_link, SDEV_DB3, ("sc_err1,err = 0x%lx \n",
+ (u_long)xs->error));
switch ((int)xs->error) {
case XS_SENSE:
@@ -885,22 +886,24 @@ void scsi_sense_print(xs)
case 0x7: /* DATA PROTECT */
break;
case 0x8: /* BLANK CHECK */
- printf(" req sz: %ld (decimal)",
- info);
+ printf(" req sz: %lu (decimal)", (u_long)info);
break;
default:
if (info) {
if (sense->ext.extended.flags & SSD_ILI) {
- printf(" ILI (length mismatch): %ld", info);
+ printf(
+ " ILI (length mismatch): %ld",
+ (u_long)info);
}
else {
- printf(" info:%#lx", info);
+ printf(" info:%#lx",
+ (u_long)info);
}
}
}
}
else if (info)
- printf(" info?:%#lx", info);
+ printf(" info?:%#lx", (u_long)info);
if (ext->extra_len >= 4) {
if (bcmp(ext->cmd_spec_info, "\0\0\0\0", 4)) {
@@ -1311,18 +1314,18 @@ static void
show_scsi_xs(xs)
struct scsi_xfer *xs;
{
- printf("xs(%p): ", xs);
- printf("flg(0x%lx)", xs->flags);
- printf("sc_link(%p)", xs->sc_link);
+ printf("xs(%p): ", (void *)xs);
+ printf("flg(0x%lx)", (u_long)xs->flags);
+ printf("sc_link(%p)", (void *)xs->sc_link);
printf("retr(0x%x)", xs->retries);
- printf("timo(0x%lx)", xs->timeout);
- printf("cmd(%p)", xs->cmd);
- printf("len(0x%lx)", xs->cmdlen);
- printf("data(%p)", xs->data);
- printf("len(0x%lx)", xs->datalen);
- printf("res(0x%lx)", xs->resid);
- printf("err(0x%lx)", xs->error);
- printf("bp(%p)", xs->bp);
+ printf("timo(0x%lx)", (long)xs->timeout);
+ printf("cmd(%p)", (void *)xs->cmd);
+ printf("len(0x%lx)", (long)xs->cmdlen);
+ printf("data(%p)", (void *)xs->data);
+ printf("len(0x%lx)", (long)xs->datalen);
+ printf("res(0x%lx)", (long)xs->resid);
+ printf("err(0x%lx)", (long)xs->error);
+ printf("bp(%p)", (void *)xs->bp);
show_scsi_cmd(xs);
}
@@ -1341,7 +1344,7 @@ show_scsi_cmd(struct scsi_xfer *xs)
printf(",");
printf("%x", b[i++]);
}
- printf("-[%ld bytes]\n", xs->datalen);
+ printf("-[%ld bytes]\n", (long)xs->datalen);
if (xs->datalen)
show_mem(xs->data, min(64, xs->datalen));
} else {
@@ -1358,7 +1361,7 @@ show_mem(address, num)
printf("------------------------------");
for (y = 0; y < num; y += 1) {
if (!(y % 16))
- printf("\n%03ld: ", y);
+ printf("\n%03ld: ", (long)y);
printf("%02x ", *address++);
}
printf("\n------------------------------\n");
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index b04db26..dcbe962 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -16,7 +16,7 @@
*
* New configuration setup: dufault@hda.com
*
- * $Id: scsiconf.c,v 1.104 1998/02/18 09:40:54 msmith Exp $
+ * $Id: scsiconf.c,v 1.105 1998/03/08 06:52:45 jkh Exp $
*/
#include "opt_scsi.h"
@@ -919,8 +919,8 @@ scsi_alloc_unit(struct scsi_link *sc_link)
{
sd = malloc(dsw->sizeof_scsi_data, M_DEVBUF, M_NOWAIT);
if (!sd) {
- printf("%s%ld: malloc failed for scsi_data\n",
- sc_link->device->name, unit);
+ printf("%s%lu: malloc failed for scsi_data\n",
+ sc_link->device->name, (u_long)unit);
return 0;
}
bzero(sd, dsw->sizeof_scsi_data);
@@ -931,8 +931,8 @@ scsi_alloc_unit(struct scsi_link *sc_link)
sc_link->sd = sd;
if (extend_set(dsw->links, unit, (void *)sc_link) == 0) {
- printf("%s%ld: Can't store link pointer.\n",
- sc_link->device->name, unit);
+ printf("%s%lu: Can't store link pointer.\n",
+ sc_link->device->name, (u_long)unit);
free(sd, M_DEVBUF);
return 0;
}
@@ -1292,14 +1292,12 @@ void scsi_print_info(sc_link)
printf("%s%d: ", sc_link->device->name,
sc_link->dev_unit);
printf("<%s %s %s> ", manu, model, version );
- printf("type %ld %sSCSI %d"
- ,type
- ,remov ? "removable " : "fixed "
- ,inqbuf->version & SID_ANSII
- );
+ printf("type %lu %sSCSI %d",
+ (u_long)type, remov ? "removable " : "fixed ",
+ inqbuf->version & SID_ANSII);
if (qtype[0]) {
sc_print_addr(sc_link);
- printf(" qualifier %ld: %s" ,qualifier ,qtype);
+ printf(" qualifier %lu: %s", (u_long)qualifier, qtype);
}
printf("\n");
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 32bdcaa..697fe4a 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
*
- * $Id: sd.c,v 1.131 1998/06/17 14:13:14 bde Exp $
+ * $Id: sd.c,v 1.132 1998/07/04 22:30:24 julian Exp $
*/
#include "opt_bounce.h"
@@ -289,10 +289,9 @@ sdattach(struct scsi_link *sc_link)
* (could happen on removable media - MOD)
* -- this avoids the division below from falling over
*/
- printf("%ldMB (%ld %d byte sectors)",
- dp->disksize / ((1024L * 1024L) / dp->secsiz),
- dp->disksize,
- dp->secsiz);
+ printf("%luMB (%lu %u byte sectors)",
+ (u_long)(dp->disksize / ((1024L * 1024L) / dp->secsiz)),
+ (u_long)dp->disksize, dp->secsiz);
#ifndef SCSI_REPORT_GEOMETRY
if ( (sc_link->flags & SDEV_BOOTVERBOSE) )
@@ -418,8 +417,8 @@ sd_open(dev_t dev, int mode, int fmt, struct proc *p, struct scsi_link *sc_link)
SC_DEBUG(sc_link, SDEV_DB1, ("sdsopen: (unit %ld)\n", unit));
#else /* !SLICE */
SC_DEBUG(sc_link, SDEV_DB1,
- ("sd_open: dev=0x%lx (unit %ld, partition %d)\n",
- dev, unit, PARTITION(dev)));
+ ("sd_open: dev=0x%lx (unit %lu, partition %d)\n",
+ (u_long)dev, (u_long)unit, PARTITION(dev)));
#endif /* !SLICE */
/*
@@ -495,7 +494,8 @@ sd_open(dev_t dev, int mode, int fmt, struct proc *p, struct scsi_link *sc_link)
#endif /* !SLICE */
SC_DEBUG(sc_link, SDEV_DB3, ("Slice tables initialized "));
- SC_DEBUG(sc_link, SDEV_DB3, ("open %ld %ld\n", sdstrats, sdqueues));
+ SC_DEBUG(sc_link, SDEV_DB3, ("open %lu %lu\n",
+ (u_long)sdstrats, (u_long)sdqueues));
scsi_device_unlock(sc_link);
return 0;
@@ -600,7 +600,9 @@ sd_strategy(struct buf *bp, struct scsi_link *sc_link)
/* make sure that the transfer size is a multiple of the sector size */
if( (bp->b_bcount % secsize) != 0 ) {
bp->b_error = EINVAL;
- printf("sd_strategy: Invalid b_bcount %d at block number: 0x%x\n", bp->b_bcount, bp->b_blkno);
+ printf(
+ "sd_strategy: Invalid b_bcount %ld at block number: 0x%lx\n",
+ bp->b_bcount, (long)bp->b_blkno);
goto bad;
}
@@ -784,7 +786,7 @@ sdstart(u_int32_t unit, u_int32_t flags)
}
} else {
bad:
- printf("sd%ld: oops not queued\n", unit);
+ printf("sd%lu: oops not queued\n", (u_long)unit);
bp->b_error = EIO;
bp->b_flags |= B_ERROR;
biodone(bp);
@@ -814,7 +816,7 @@ sd_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p,
errval error;
struct scsi_data *sd = sc_link->sd;
#endif /* !SLICE */
- SC_DEBUG(sc_link, SDEV_DB1, ("sdioctl (0x%x)", cmd));
+ SC_DEBUG(sc_link, SDEV_DB1, ("sdioctl (0x%lx)", cmd));
#if 0
/* Wait until we have exclusive access to the device. */
@@ -1004,12 +1006,12 @@ sd_get_parms(int unit, int flags)
} else {
SC_DEBUG(sc_link, SDEV_DB3,
- ("%ld cyls, %d heads, %d precomp, %d red_write, %d land_zone\n",
- scsi_3btou(&scsi_sense.pages.rigid_geometry.ncyl_2),
- scsi_sense.pages.rigid_geometry.nheads,
- b2tol(scsi_sense.pages.rigid_geometry.st_cyl_wp),
- b2tol(scsi_sense.pages.rigid_geometry.st_cyl_rwc),
- b2tol(scsi_sense.pages.rigid_geometry.land_zone)));
+ ("%lu cyls, %d heads, %u precomp, %u red_write, %u land_zone\n",
+ (u_long)scsi_3btou(&scsi_sense.pages.rigid_geometry.ncyl_2),
+ scsi_sense.pages.rigid_geometry.nheads,
+ b2tol(scsi_sense.pages.rigid_geometry.st_cyl_wp),
+ b2tol(scsi_sense.pages.rigid_geometry.st_cyl_rwc),
+ b2tol(scsi_sense.pages.rigid_geometry.land_zone)));
/*
* KLUDGE!!(for zone recorded disks)
@@ -1049,8 +1051,8 @@ sd_get_parms(int unit, int flags)
case 2048:
break;
default:
- printf("sd%ld: Can't deal with %d bytes logical blocks\n",
- unit, sd->params.secsiz);
+ printf("sd%lu: Can't deal with %u bytes logical blocks\n",
+ (u_long)unit, sd->params.secsiz);
error = ENXIO;
}
if (error == 0)
@@ -1269,7 +1271,7 @@ sdsdump(void *private, int32_t start, int32_t num)
if (wdog_tickler)
(*wdog_tickler)();
#endif /* HW_WDOG */
- printf("%ld ", num / 2048);
+ printf("%ld ", (u_long)(num / 2048));
}
/* update block count */
num -= blkcnt;
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index 20bf63f..f7558f2 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: st.c,v 1.89 1998/06/17 14:13:14 bde Exp $
+ * $Id: st.c,v 1.90 1998/07/04 22:30:24 julian Exp $
*/
/*
@@ -249,10 +249,10 @@ stattach(struct scsi_link *sc_link)
NULL, 0, 0)) {
printf("drive offline");
} else {
- printf("density code 0x%lx, ", st->media_density);
+ printf("density code 0x%lx, ", (u_long)st->media_density);
if (!scsi_test_unit_ready(sc_link, SCSI_NOSLEEP | SCSI_NOMASK | SCSI_SILENT)) {
if (st->media_blksiz) {
- printf("%ld-byte", st->media_blksiz);
+ printf("%lu-byte", (u_long)st->media_blksiz);
} else {
printf("variable");
}
@@ -580,7 +580,7 @@ st_mount_tape(dev, flags)
}
}
if ( (errno = st_mode_select(unit, 0, NULL, 0)) ) {
- printf("st%ld: Cannot set selected mode", unit);
+ printf("st%lu: Cannot set selected mode", (u_long)unit);
return errno;
}
st->flags &= ~ST_NEW_MOUNT;
@@ -639,7 +639,7 @@ st_decide_mode(unit, first_read)
*/
switch ((int)(st->quirks & (ST_Q_FORCE_FIXED_MODE | ST_Q_FORCE_VAR_MODE))) {
case (ST_Q_FORCE_FIXED_MODE | ST_Q_FORCE_VAR_MODE):
- printf("st%ld: bad quirks\n", unit);
+ printf("st%lu: bad quirks\n", (u_long)unit);
return (EINVAL);
case ST_Q_FORCE_FIXED_MODE: /*specified fixed, but not what size */
st->flags |= ST_FIXEDBLOCKS;
@@ -649,8 +649,8 @@ st_decide_mode(unit, first_read)
st->blksiz = st->media_blksiz;
else
st->blksiz = DEF_FIXED_BSIZE;
- SC_DEBUG(sc_link, SDEV_DB3, ("Quirks force fixed mode(%ld)\n",
- st->blksiz));
+ SC_DEBUG(sc_link, SDEV_DB3, ("Quirks force fixed mode(%lu)\n",
+ (u_long)st->blksiz));
goto done;
case ST_Q_FORCE_VAR_MODE:
st->flags &= ~ST_FIXEDBLOCKS;
@@ -666,7 +666,7 @@ st_decide_mode(unit, first_read)
st->flags |= ST_FIXEDBLOCKS;
st->blksiz = st->blkmin;
SC_DEBUG(sc_link, SDEV_DB3,
- ("blkmin == blkmax of %ld\n", st->blkmin));
+ ("blkmin == blkmax of %lu\n", (u_long)st->blkmin));
goto done;
}
/*
@@ -715,7 +715,7 @@ st_decide_mode(unit, first_read)
}
st->blksiz = st->media_blksiz;
SC_DEBUG(sc_link, SDEV_DB3,
- ("Used media_blksiz of %ld\n", st->media_blksiz));
+ ("Used media_blksiz of %lu\n", (u_long)st->media_blksiz));
goto done;
}
/*
@@ -795,8 +795,8 @@ st_strategy(struct buf *bp, struct scsi_link *sc_link)
*/
if (st->flags & ST_FIXEDBLOCKS) {
if (bp->b_bcount % st->blksiz) {
- printf("st%ld: bad request, must be multiple of %ld\n",
- unit, st->blksiz);
+ printf("st%lu: bad request, must be multiple of %lu\n",
+ (u_long)unit, (u_long)st->blksiz);
bp->b_error = EIO;
goto bad;
}
@@ -807,14 +807,17 @@ st_strategy(struct buf *bp, struct scsi_link *sc_link)
*/
else {
if ((bp->b_bcount < st->blkmin || bp->b_bcount > st->blkmax)) {
- printf("st%ld: bad request, must be between %ld and %ld\n",
- unit, st->blkmin, st->blkmax);
+ printf(
+ "st%lu: bad request, must be between %lu and %lu\n",
+ (u_long)unit, (u_long)st->blkmin,
+ (u_long)st->blkmax);
bp->b_error = EIO;
goto bad;
}
if (len != bp->b_bcount) {
- printf("st%ld: bad request, must be less than %ld bytes\n",
- unit, bp->b_bcount + 1);
+ printf(
+ "st%lu: bad request, must be less than %ld bytes\n",
+ (u_long)unit, bp->b_bcount + 1);
bp->b_error = EIO;
goto bad;
}
@@ -987,7 +990,7 @@ ststart(unit, flags)
flags) == SUCCESSFULLY_QUEUED) {
} else {
badnews:
- printf("st%ld: oops not queued\n", unit);
+ printf("st%lu: oops not queued\n", (u_long)unit);
bp->b_flags |= B_ERROR;
bp->b_error = EIO;
biodone(bp);
@@ -1051,8 +1054,9 @@ struct proc *p, struct scsi_link *sc_link)
case MTIOCTOP:
{
- SC_DEBUG(sc_link, SDEV_DB1, ("[ioctl: op=0x%x count=0x%lx]\n",
- mt->mt_op, mt->mt_count));
+ SC_DEBUG(sc_link, SDEV_DB1,
+ ("[ioctl: op=0x%x count=0x%lx]\n",
+ mt->mt_op, (long)mt->mt_count));
/* compat: in U*x it is a short */
number = mt->mt_count;
@@ -1161,7 +1165,7 @@ try_new_value:
* drive. If not, put it back the way it was.
*/
if ( (errcode = st_mode_select(unit, 0, NULL, 0)) ) { /* put back as it was */
- printf("st%ld: Cannot set selected mode", unit);
+ printf("st%lu: Cannot set selected mode", (u_long)unit);
st->density = hold_density;
st->blksiz = hold_blksiz;
if (st->blksiz) {
@@ -1280,7 +1284,8 @@ st_rd_blk_lim(unit, flags)
st->blkmax = scsi_3btou(&scsi_blkl.max_length_2);
SC_DEBUG(sc_link, SDEV_DB3,
- ("(%ld <= blksiz <= %ld)\n", st->blkmin, st->blkmax));
+ ("(%lu <= blksiz <= %lu)\n",
+ (u_long)st->blkmin, (u_long)st->blkmax));
return 0;
}
@@ -1366,8 +1371,8 @@ st_mode_sense(unit, flags, page, pagelen, pagecode)
st->flags |= ST_READONLY;
}
SC_DEBUG(sc_link, SDEV_DB3,
- ("density code 0x%lx, %ld-byte blocks, write-%s, ",
- st->media_density, st->media_blksiz,
+ ("density code 0x%lx, %lu-byte blocks, write-%s, ",
+ (u_long)st->media_density, (u_long)st->media_blksiz,
st->flags & ST_READONLY ? "protected" : "enabled"));
SC_DEBUG(sc_link, SDEV_DB3, ("%sbuffered\n",
((dat.header.dev_spec & SMH_DSP_BUFF_MODE) ? "" : "un")));
@@ -1469,8 +1474,9 @@ u_int32_t unit,mode;
return retval;
}
if ( noisy_st)
- printf("drive reports value of %d, setting %ld\n",
- page.pages.configuration.data_compress_alg,mode);
+ printf("drive reports value of %d, setting %lu\n",
+ page.pages.configuration.data_compress_alg,
+ (u_long)mode);
page.pg_code &= ST_P_CODE;
page.pg_length = sizeof(page.pages.configuration);
@@ -1484,7 +1490,7 @@ u_int32_t unit,mode;
page.pages.configuration.data_compress_alg = 1;
break;
default:
- printf("st%ld: bad value for compression mode\n",unit);
+ printf("st%lu: bad value for compression mode\n", (u_long)unit);
return EINVAL;
}
if ( (retval = st_mode_select(unit, 0, &page, pagesize)) )
@@ -1822,9 +1828,9 @@ st_interpret_sense(xs)
st->flags |= ST_EIO_PENDING;
if (sense->error_code & SSD_ERRCODE_VALID &&
!silent)
- printf("st%ld: block wrong size"
- ", %ld blocks residual\n", unit
- ,info);
+ printf(
+ "st%lu: block wrong size, %ld blocks residual\n",
+ (u_long)unit, (long)info);
/*XXX*/ /* is this how it works ? */
/* check def of ILI for fixed blk tapes */
@@ -1870,9 +1876,10 @@ st_interpret_sense(xs)
* the record was bigger than the read
*/
if (!silent)
- printf("st%ld: %ld-byte record "
- "too big\n", unit,
- xs->datalen - info);
+ printf(
+ "st%lu: %ld-byte record too big\n",
+ (u_long)unit,
+ (long)(xs->datalen - info));
return (EIO);
}
xs->resid = info;
OpenPOWER on IntegriCloud