Fix printf() formats.
This commit is contained in:
parent
3cc52443b5
commit
c9e746a335
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_lkm.c,v 1.28 1996/02/09 18:59:38 christos Exp $ */
|
||||
/* $NetBSD: kern_lkm.c,v 1.29 1996/03/16 23:17:04 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christopher G. Demetriou
|
||||
|
@ -240,8 +240,8 @@ lkmioctl(dev, cmd, data, flag, p)
|
|||
resrvp->addr = curp->area; /* ret kernel addr */
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("LKM: LMRESERV (actual = 0x%08x)\n", curp->area);
|
||||
printf("LKM: LMRESERV (adjusted = 0x%08x)\n",
|
||||
printf("LKM: LMRESERV (actual = 0x%08lx)\n", curp->area);
|
||||
printf("LKM: LMRESERV (adjusted = 0x%08lx)\n",
|
||||
trunc_page(curp->area));
|
||||
#endif /* DEBUG */
|
||||
lkm_state = LKMS_RESERVED;
|
||||
|
@ -273,7 +273,7 @@ lkmioctl(dev, cmd, data, flag, p)
|
|||
if ((curp->offset + i) < curp->size) {
|
||||
lkm_state = LKMS_LOADING;
|
||||
#ifdef DEBUG
|
||||
printf("LKM: LMLOADBUF (loading @ %d of %d, i = %d)\n",
|
||||
printf("LKM: LMLOADBUF (loading @ %ld of %ld, i = %d)\n",
|
||||
curp->offset, curp->size, i);
|
||||
#endif /* DEBUG */
|
||||
} else {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_malloc.c,v 1.14 1996/02/20 23:56:16 cgd Exp $ */
|
||||
/* $NetBSD: kern_malloc.c,v 1.15 1996/03/16 23:17:06 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987, 1991, 1993
|
||||
|
@ -199,7 +199,7 @@ malloc(size, type, flags)
|
|||
memname[freep->type] : "???";
|
||||
if (kbp->kb_next &&
|
||||
!kernacc(kbp->kb_next, sizeof(struct freelist), 0)) {
|
||||
printf("%s %d of object %p size %d %s %s (invalid addr %p)\n",
|
||||
printf("%s %d of object %p size %ld %s %s (invalid addr %p)\n",
|
||||
"Data modified on freelist: word",
|
||||
(int32_t *)&kbp->kb_next - (int32_t *)kbp, va, size,
|
||||
"previous type", savedtype, kbp->kb_next);
|
||||
|
@ -223,7 +223,7 @@ malloc(size, type, flags)
|
|||
for (lp = (int32_t *)va; lp < end; lp++) {
|
||||
if (*lp == WEIRD_ADDR)
|
||||
continue;
|
||||
printf("%s %d of object %p size %d %s %s (0x%x != 0x%x)\n",
|
||||
printf("%s %d of object %p size %ld %s %s (0x%x != 0x%x)\n",
|
||||
"Data modified on freelist: word", lp - (int32_t *)va,
|
||||
va, size, "previous type", savedtype, *lp, WEIRD_ADDR);
|
||||
break;
|
||||
|
@ -289,7 +289,7 @@ free(addr, type)
|
|||
else
|
||||
alloc = addrmask[kup->ku_indx];
|
||||
if (((u_long)addr & alloc) != 0)
|
||||
panic("free: unaligned addr 0x%x, size %d, type %s, mask %d\n",
|
||||
panic("free: unaligned addr %p, size %ld, type %s, mask %ld\n",
|
||||
addr, size, memname[type], alloc);
|
||||
#endif /* DIAGNOSTIC */
|
||||
if (size > MAXALLOCSAVE) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subr_disk.c,v 1.16 1996/02/09 18:59:56 christos Exp $ */
|
||||
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Jason R. Thorpe. All rights reserved.
|
||||
|
@ -215,7 +215,8 @@ diskerr(bp, dname, what, pri, blkdone, lp)
|
|||
int sn;
|
||||
|
||||
if (pri != LOG_PRINTF) {
|
||||
log(pri, "");
|
||||
static const char fmt[] = "";
|
||||
log(pri, fmt);
|
||||
pr = addlog;
|
||||
} else
|
||||
pr = printf;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subr_prf.c,v 1.22 1996/03/14 19:01:11 christos Exp $ */
|
||||
/* $NetBSD: subr_prf.c,v 1.23 1996/03/16 23:17:10 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1986, 1988, 1991, 1993
|
||||
|
@ -54,6 +54,7 @@
|
|||
#include <sys/tprintf.h>
|
||||
#include <sys/syslog.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/cpu.h>
|
||||
|
||||
#include <dev/cons.h>
|
||||
|
||||
|
@ -95,10 +96,6 @@ const char *panicstr;
|
|||
* and then reboots. If we are called twice, then we avoid trying to sync
|
||||
* the disks as this often leads to recursive panics.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
volatile void boot(int flags); /* boot() does not return */
|
||||
volatile /* panic() does not return */
|
||||
#endif
|
||||
void
|
||||
#ifdef __STDC__
|
||||
panic(const char *fmt, ...)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subr_rmap.c,v 1.10 1996/02/04 02:16:49 christos Exp $ */
|
||||
/* $NetBSD: subr_rmap.c,v 1.11 1996/03/16 23:17:11 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1992, 1994 Wolfgang Solfrank.
|
||||
|
@ -207,12 +207,12 @@ rmfree(mp, size, addr)
|
|||
*/
|
||||
if (fp->m_size > size) {
|
||||
/* range to free is smaller, so drop that */
|
||||
printf("rmfree: map '%s' loses space (%d)\n",
|
||||
printf("rmfree: map '%s' loses space (%ld)\n",
|
||||
mp->m_name, size);
|
||||
return;
|
||||
} else {
|
||||
/* drop the smallest slot in the list */
|
||||
printf("rmfree: map '%s' loses space (%d)\n",
|
||||
printf("rmfree: map '%s' loses space (%ld)\n",
|
||||
mp->m_name, fp->m_size);
|
||||
ovbcopy(fp + 1, fp,
|
||||
(char *)(mp->m_limit - 1) - (char *)fp);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sysv_shm.c,v 1.36 1996/02/09 19:00:29 christos Exp $ */
|
||||
/* $NetBSD: sysv_shm.c,v 1.37 1996/03/16 23:17:13 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Adam Glass and Charles Hannum. All rights reserved.
|
||||
|
@ -352,7 +352,7 @@ shmget_existing(p, uap, mode, segnum, retval)
|
|||
return error;
|
||||
if (SCARG(uap, size) && SCARG(uap, size) > shmseg->shm_segsz)
|
||||
return EINVAL;
|
||||
if (SCARG(uap, shmflg) & (IPC_CREAT | IPC_EXCL) ==
|
||||
if ((SCARG(uap, shmflg) & (IPC_CREAT | IPC_EXCL)) ==
|
||||
(IPC_CREAT | IPC_EXCL))
|
||||
return EEXIST;
|
||||
*retval = IXSEQ_TO_IPCID(segnum, shmseg->shm_perm);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tty.c,v 1.66 1996/02/09 19:00:38 christos Exp $ */
|
||||
/* $NetBSD: tty.c,v 1.67 1996/03/16 23:17:15 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1990, 1991, 1993
|
||||
|
@ -1878,7 +1878,7 @@ ttyinfo(tp)
|
|||
utime.tv_sec += 1;
|
||||
utime.tv_usec -= 1000000;
|
||||
}
|
||||
ttyprintf(tp, "%d.%02du ", utime.tv_sec,
|
||||
ttyprintf(tp, "%ld.%02ldu ", utime.tv_sec,
|
||||
utime.tv_usec / 10000);
|
||||
|
||||
/* Round up and print system time. */
|
||||
|
@ -1887,7 +1887,7 @@ ttyinfo(tp)
|
|||
stime.tv_sec += 1;
|
||||
stime.tv_usec -= 1000000;
|
||||
}
|
||||
ttyprintf(tp, "%d.%02ds ", stime.tv_sec,
|
||||
ttyprintf(tp, "%ld.%02lds ", stime.tv_sec,
|
||||
stime.tv_usec / 10000);
|
||||
|
||||
#define pgtok(a) (((a) * NBPG) / 1024)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vfs_cluster.c,v 1.10 1996/02/09 19:00:56 christos Exp $ */
|
||||
/* $NetBSD: vfs_cluster.c,v 1.11 1996/03/16 23:17:18 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -296,7 +296,7 @@ cluster_rbuild(vp, filesize, bp, lbn, blkno, size, run, flags)
|
|||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (size != vp->v_mount->mnt_stat.f_iosize)
|
||||
panic("cluster_rbuild: size %d != filesize %d\n",
|
||||
panic("cluster_rbuild: size %ld != filesize %ld\n",
|
||||
size, vp->v_mount->mnt_stat.f_iosize);
|
||||
#endif
|
||||
if (size * (lbn + run + 1) > filesize)
|
||||
|
@ -623,7 +623,7 @@ cluster_wbuild(vp, last_bp, size, start_lbn, len, lbn)
|
|||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (size != vp->v_mount->mnt_stat.f_iosize)
|
||||
panic("cluster_wbuild: size %d != filesize %d\n",
|
||||
panic("cluster_wbuild: size %ld != filesize %ld\n",
|
||||
size, vp->v_mount->mnt_stat.f_iosize);
|
||||
#endif
|
||||
redo:
|
||||
|
@ -706,7 +706,7 @@ redo:
|
|||
|
||||
/* Move memory from children to parent */
|
||||
if (tbp->b_blkno != (bp->b_blkno + btodb(bp->b_bufsize))) {
|
||||
printf("Clustered Block: %d addr %x bufsize: %d\n",
|
||||
printf("Clustered Block: %d addr %x bufsize: %ld\n",
|
||||
bp->b_lblkno, bp->b_blkno, bp->b_bufsize);
|
||||
printf("Child Block: %d addr: %x\n", tbp->b_lblkno,
|
||||
tbp->b_blkno);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vfs_subr.c,v 1.51 1996/02/09 19:01:01 christos Exp $ */
|
||||
/* $NetBSD: vfs_subr.c,v 1.52 1996/03/16 23:17:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -1187,7 +1187,7 @@ vprint(label, vp)
|
|||
|
||||
if (label != NULL)
|
||||
printf("%s: ", label);
|
||||
printf("type %s, usecount %d, writecount %d, refcount %d,",
|
||||
printf("type %s, usecount %d, writecount %d, refcount %ld,",
|
||||
typename[vp->v_type], vp->v_usecount, vp->v_writecount,
|
||||
vp->v_holdcnt);
|
||||
buf[0] = '\0';
|
||||
|
|
Loading…
Reference in New Issue