summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-06-28 20:33:36 +0000
committerbde <bde@FreeBSD.org>1998-06-28 20:33:36 +0000
commit21b894709fabc405f5c1204667b0f3aecbc970d2 (patch)
tree4bf52a7b1f184da676a26219d1b6dccac5504850 /sbin
parentc19967f2fc42950d997012faec049842753a8846 (diff)
downloadFreeBSD-src-21b894709fabc405f5c1204667b0f3aecbc970d2.zip
FreeBSD-src-21b894709fabc405f5c1204667b0f3aecbc970d2.tar.gz
Fixed printf format errors.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/savecore/savecore.c2
-rw-r--r--sbin/scsi/scsi.c9
-rw-r--r--sbin/slattach/slattach.c4
3 files changed, 8 insertions, 7 deletions
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 <ctype.h>
@@ -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 <sys/types.h>
@@ -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);
}
OpenPOWER on IntegriCloud