From 21b894709fabc405f5c1204667b0f3aecbc970d2 Mon Sep 17 00:00:00 2001 From: bde Date: Sun, 28 Jun 1998 20:33:36 +0000 Subject: Fixed printf format errors. --- sbin/savecore/savecore.c | 2 +- sbin/scsi/scsi.c | 9 +++++---- sbin/slattach/slattach.c | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'sbin') diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index 2be0674..d90a9a7 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -246,7 +246,7 @@ kmem_setup() Lseek(kmem, (off_t)current_nl[X_DUMPLO].n_value, L_SET); (void)Read(kmem, &dumplo, sizeof(dumplo)); if (verbose) - (void)printf("dumplo = %d (%d * %d)\n", + (void)printf("dumplo = %ld (%ld * %d)\n", dumplo, dumplo/DEV_BSIZE, DEV_BSIZE); Lseek(kmem, (off_t)current_nl[X_DUMPMAG].n_value, L_SET); (void)Read(kmem, &dumpmag, sizeof(dumpmag)); diff --git a/sbin/scsi/scsi.c b/sbin/scsi/scsi.c index 23329f1..9a3ac86 100644 --- a/sbin/scsi/scsi.c +++ b/sbin/scsi/scsi.c @@ -42,7 +42,7 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: scsi.c,v 1.17 1998/01/12 07:57:57 charnier Exp $"; #endif /* not lint */ #include @@ -378,9 +378,10 @@ do_cmd(int fd, char *fmt, int argc, char **argv) err(1, "write"); } else if (amount == 0) - fprintf(stderr, "Warning: wrote only %d bytes out of %d.\n", - scsireq->datalen - count, - scsireq->datalen); + fprintf(stderr, + "Warning: wrote only %lu bytes out of %lu.\n", + (u_long)scsireq->datalen - count, + (u_long)scsireq->datalen); } else diff --git a/sbin/slattach/slattach.c b/sbin/slattach/slattach.c index cdc0c01..9edf888 100644 --- a/sbin/slattach/slattach.c +++ b/sbin/slattach/slattach.c @@ -42,7 +42,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)slattach.c 4.6 (Berkeley) 6/1/90";*/ -static char rcsid[] = "$Id: slattach.c,v 1.30 1998/01/25 09:16:55 jb Exp $"; +static char rcsid[] = "$Id: slattach.c,v 1.31 1998/02/20 07:28:50 jb Exp $"; #endif /* not lint */ #include @@ -268,7 +268,7 @@ void acquire_line() /* create PID file */ if((pidfile = fopen(pidfilename, "w"))) { - fprintf(pidfile, "%ld\n", getpid()); + fprintf(pidfile, "%ld\n", (long)getpid()); fclose(pidfile); } -- cgit v1.1