Fixed printf format errors.

This commit is contained in:
Bruce Evans 1998-07-11 07:46:16 +00:00
parent a838d83d8f
commit ac1e407b32
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37555
49 changed files with 369 additions and 305 deletions

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: busdma_machdep.c,v 1.5 1998/04/17 22:36:26 des Exp $
* $Id: busdma_machdep.c,v 1.6 1998/05/06 01:45:55 gibbs Exp $
*/
#include <sys/param.h>
@ -458,7 +458,7 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
} while (buflen > 0);
if (buflen != 0) {
printf("bus_dmamap_load: Too many segs! buf_len = 0x%x\n",
printf("bus_dmamap_load: Too many segs! buf_len = 0x%lx\n",
buflen);
error = EFBIG;
}

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
* $Id: identcpu.c,v 1.49 1998/06/30 19:41:21 phk Exp $
* $Id: identcpu.c,v 1.50 1998/07/11 05:59:34 bde Exp $
*/
#include "opt_cpu.h"
@ -470,15 +470,15 @@ printcpuinfo(void)
if(*cpu_vendor)
printf(" Origin = \"%s\"",cpu_vendor);
if(cpu_id)
printf(" Id = 0x%lx",cpu_id);
printf(" Id = 0x%x", cpu_id);
if (strcmp(cpu_vendor, "GenuineIntel") == 0 ||
strcmp(cpu_vendor, "AuthenticAMD") == 0 ||
((strcmp(cpu_vendor, "CyrixInstead") == 0) &&
((cpu_id & 0xf00) > 5))) {
printf(" Stepping=%ld", cpu_id & 0xf);
printf(" Stepping=%u", cpu_id & 0xf);
if (strcmp(cpu_vendor, "CyrixInstead") == 0)
printf(" DIR=0x%04lx", cyrix_did);
printf(" DIR=0x%04x", cyrix_did);
if (cpu_high > 0) {
/*
* Here we should probably set up flags indicating
@ -525,9 +525,9 @@ printcpuinfo(void)
);
}
} else if (strcmp(cpu_vendor, "CyrixInstead") == 0) {
printf(" DIR=0x%04lx", cyrix_did);
printf(" Stepping=%ld", (cyrix_did & 0xf000) >> 12);
printf(" Revision=%ld", (cyrix_did & 0x0f00) >> 8);
printf(" DIR=0x%04x", cyrix_did);
printf(" Stepping=%u", (cyrix_did & 0xf000) >> 12);
printf(" Revision=%u", (cyrix_did & 0x0f00) >> 8);
#ifndef CYRIX_CACHE_REALLY_WORKS
if (cpu == CPU_M1 && (cyrix_did & 0xff00) < 0x1700)
printf("\n CPU cache: write-through mode");

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.301 1998/06/21 17:46:53 bde Exp $
* $Id: machdep.c,v 1.302 1998/06/30 21:25:58 phk Exp $
*/
#include "apm.h"
@ -265,8 +265,9 @@ cpu_startup(dummy)
for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
int size1 = phys_avail[indx + 1] - phys_avail[indx];
printf("0x%08lx - 0x%08lx, %d bytes (%d pages)\n", phys_avail[indx],
phys_avail[indx + 1] - 1, size1, size1 / PAGE_SIZE);
printf("0x%08x - 0x%08x, %d bytes (%d pages)\n",
phys_avail[indx], phys_avail[indx + 1] - 1, size1,
size1 / PAGE_SIZE);
}
}
@ -1327,7 +1328,7 @@ init386(first)
vm_offset_t pa;
printf(
"BIOS basemem (%ldK) != RTC basemem (%dK), setting to BIOS value\n",
"BIOS basemem (%uK) != RTC basemem (%uK), setting to BIOS value\n",
bootinfo.bi_basemem, biosbasemem);
biosbasemem = bootinfo.bi_basemem;
@ -1360,7 +1361,7 @@ init386(first)
}
}
if (bootinfo.bi_extmem != biosextmem)
printf("BIOS extmem (%ldK) != RTC extmem (%dK)\n",
printf("BIOS extmem (%uK) != RTC extmem (%uK)\n",
bootinfo.bi_extmem, biosextmem);
}

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
* $Id: pmap.c,v 1.201 1998/05/19 08:58:48 phk Exp $
* $Id: pmap.c,v 1.202 1998/05/21 07:47:34 dyson Exp $
*/
/*
@ -535,7 +535,10 @@ pmap_setdevram(unsigned long long basea, vm_offset_t sizea)
PPro_vmtrr[free].mask = mask;
wrmsr(PPRO_VMTRRphysBase0 + free * 2, base);
wrmsr(PPRO_VMTRRphysMask0 + free * 2, mask);
printf("pmap: added WC mapping at page: 0x%x %x, size: %d mask: 0x%x %x\n", base, sizea, mask);
printf(
"pmap: added WC mapping at page: 0x%x %x, size: %u mask: 0x%x %x\n",
(u_int)(base >> 32), (u_int)base, sizea,
(u_int)(mask >> 32), (u_int)mask);
}
}
@ -1777,7 +1780,9 @@ pmap_remove_pte(pmap, ptq, va)
if (oldpte & PG_M) {
#if defined(PMAP_DIAGNOSTIC)
if (pmap_nw_modified((pt_entry_t) oldpte)) {
printf("pmap_remove: modified page not writable: va: 0x%lx, pte: 0x%lx\n", va, (int) oldpte);
printf(
"pmap_remove: modified page not writable: va: 0x%x, pte: 0x%x\n",
va, oldpte);
}
#endif
if (pmap_track_modified(va))
@ -1977,7 +1982,9 @@ pmap_remove_all(pa)
if (tpte & PG_M) {
#if defined(PMAP_DIAGNOSTIC)
if (pmap_nw_modified((pt_entry_t) tpte)) {
printf("pmap_remove_all: modified page not writable: va: 0x%lx, pte: 0x%lx\n", pv->pv_va, tpte);
printf(
"pmap_remove_all: modified page not writable: va: 0x%x, pte: 0x%x\n",
pv->pv_va, tpte);
}
#endif
if (pmap_track_modified(pv->pv_va))
@ -2195,7 +2202,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_prot_t prot,
#if defined(PMAP_DIAGNOSTIC)
if (pmap_nw_modified((pt_entry_t) origpte)) {
printf("pmap_enter: modified page not writable: va: 0x%lx, pte: 0x%lx\n", va, origpte);
printf(
"pmap_enter: modified page not writable: va: 0x%x, pte: 0x%x\n",
va, origpte);
}
#endif
@ -3057,7 +3066,7 @@ pmap_testbit(pa, bit)
#if defined(PMAP_DIAGNOSTIC)
if (!pv->pv_pmap) {
printf("Null pmap (tb) at va: 0x%lx\n", pv->pv_va);
printf("Null pmap (tb) at va: 0x%x\n", pv->pv_va);
continue;
}
#endif
@ -3111,7 +3120,7 @@ pmap_changebit(pa, bit, setem)
#if defined(PMAP_DIAGNOSTIC)
if (!pv->pv_pmap) {
printf("Null pmap (cb) at va: 0x%lx\n", pv->pv_va);
printf("Null pmap (cb) at va: 0x%x\n", pv->pv_va);
continue;
}
#endif
@ -3512,11 +3521,10 @@ pmap_pvdump(pa)
pv;
pv = TAILQ_NEXT(pv, pv_list)) {
#ifdef used_to_be
printf(" -> pmap %x, va %x, flags %x",
pv->pv_pmap, pv->pv_va, pv->pv_flags);
printf(" -> pmap %p, va %x, flags %x",
(void *)pv->pv_pmap, pv->pv_va, pv->pv_flags);
#endif
printf(" -> pmap %x, va %x",
pv->pv_pmap, pv->pv_va);
printf(" -> pmap %p, va %x", (void *)pv->pv_pmap, pv->pv_va);
pads(pv->pv_pmap);
}
printf(" ");

View File

@ -38,7 +38,7 @@
* from: Utah Hdr: vn.c 1.13 94/04/02
*
* from: @(#)vn.c 8.6 (Berkeley) 4/1/94
* $Id: vn.c,v 1.63 1998/07/04 20:45:29 julian Exp $
* $Id: vn.c,v 1.64 1998/07/04 22:30:14 julian Exp $
*/
/*
@ -200,7 +200,7 @@ vnopen(dev_t dev, int flags, int mode, struct proc *p)
if (unit >= NVN) {
if (vn_options & VN_FOLLOW)
printf("vnopen(0x%lx, 0x%x, 0x%x, %p)\n",
dev, flags, mode, p);
(u_long)dev, flags, mode, (void *)p);
return(ENOENT);
}
@ -214,7 +214,8 @@ vnopen(dev_t dev, int flags, int mode, struct proc *p)
}
IFOPT(vn, VN_FOLLOW)
printf("vnopen(0x%lx, 0x%x, 0x%x, %p)\n", dev, flags, mode, p);
printf("vnopen(0x%lx, 0x%x, 0x%x, %p)\n",
(u_long)dev, flags, mode, (void *)p);
IFOPT(vn, VN_LABELS) {
if (vn->sc_flags & VNF_INITED) {
@ -392,9 +393,10 @@ vnstrategy(struct buf *bp)
IFOPT(vn,VN_IO)
printf(
/* XXX no %qx in kernel. Synthesize it. */
"vnstrategy: vp %p/%p bn 0x%lx%08lx/0x%lx sz 0x%x\n",
vn->sc_vp, vp, (long)(byten >> 32),
(u_long)byten, nbn, sz);
"vnstrategy: vp %p/%p bn 0x%lx%08lx/0x%lx sz 0x%lx\n",
(void *)vn->sc_vp, (void *)vp,
(u_long)(byten >> 32), (u_long)byten,
(u_long)nbn, sz);
nbp->b_flags = flags;
nbp->b_bcount = sz;
@ -565,9 +567,10 @@ nvsIOreq(void *private ,struct buf *bp)
IFOPT(vn,VN_IO)
printf(
/* XXX no %qx in kernel. Synthesize it. */
"vnstrategy: vp %p/%p bn 0x%lx%08lx/0x%lx sz 0x%x\n",
vn->sc_vp, vp, (long)(byten >> 32),
(u_long)byten, nbn, sz);
"vnstrategy: vp %p/%p bn 0x%lx%08lx/0x%lx sz 0x%lx\n",
(void *)vn->sc_vp, (void *)vp,
(u_long)(byten >> 32), (u_long)byten,
(u_long)nbn, sz);
nbp->b_flags = flags;
nbp->b_bcount = sz;
@ -639,10 +642,10 @@ vnioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
sh_p tp;
#endif
IFOPT(vn,VN_FOLLOW)
printf("vnioctl(0x%lx, 0x%x, %p, 0x%x, %p): unit %d\n",
dev, cmd, data, flag, p, vnunit(dev));
printf("vnioctl(0x%lx, 0x%lx, %p, 0x%x, %p): unit %d\n",
(u_long)dev, cmd, (void *)data, flag, (void *)p,
vnunit(dev));
switch (cmd) {
case VNIOCATTACH:

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_vnops.c,v 1.73 1998/06/10 13:46:46 dt Exp $ */
/* $Id: msdosfs_vnops.c,v 1.74 1998/07/04 20:45:36 julian Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $ */
/*-
@ -1864,7 +1864,7 @@ msdosfs_print(ap)
struct denode *dep = VTODE(ap->a_vp);
printf(
"tag VT_MSDOSFS, startcluster %d, dircluster %ld, diroffset %ld ",
"tag VT_MSDOSFS, startcluster %lu, dircluster %lu, diroffset %lu ",
dep->de_StartCluster, dep->de_dirclust, dep->de_diroffset);
printf(" dev %d, %d", major(dep->de_dev), minor(dep->de_dev));
lockmgr_printinfo(&dep->de_lock);

View File

@ -37,7 +37,7 @@
* @(#)procfs_status.c 8.4 (Berkeley) 6/15/94
*
* From:
* $Id: procfs_status.c,v 1.9 1997/03/24 11:24:42 bde Exp $
* $Id: procfs_status.c,v 1.10 1997/08/02 14:32:17 bde Exp $
*/
#include <sys/param.h>
@ -124,16 +124,16 @@ procfs_dostatus(curp, p, pfs, uio)
cr = p->p_ucred;
ps += sprintf(ps, " %ld %ld %ld",
cr->cr_uid, /* euid */
p->p_cred->p_ruid, /* ruid */
p->p_cred->p_rgid); /* rgid */
ps += sprintf(ps, " %lu %lu %lu",
(u_long)cr->cr_uid,
(u_long)p->p_cred->p_ruid,
(u_long)p->p_cred->p_rgid);
/* egid (p->p_cred->p_svgid) is equal to cr_ngroups[0]
see also getegid(2) in /sys/kern/kern_prot.c */
for (i = 0; i < cr->cr_ngroups; i++)
ps += sprintf(ps, ",%ld", cr->cr_groups[i]);
ps += sprintf(ps, ",%lu", (u_long)cr->cr_groups[i]);
ps += sprintf(ps, "\n");
xlen = ps - psbuf;

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95
*
* $Id: procfs_vnops.c,v 1.59 1998/06/14 12:53:39 bde Exp $
* $Id: procfs_vnops.c,v 1.60 1998/06/25 16:54:41 dt Exp $
*/
/*
@ -380,8 +380,8 @@ procfs_print(ap)
{
struct pfsnode *pfs = VTOPFS(ap->a_vp);
printf("tag VT_PROCFS, type %s, pid %d, mode %x, flags %x\n",
pfs->pfs_type, pfs->pfs_pid, pfs->pfs_mode, pfs->pfs_flags);
printf("tag VT_PROCFS, type %d, pid %ld, mode %x, flags %lx\n",
pfs->pfs_type, (long)pfs->pfs_pid, pfs->pfs_mode, pfs->pfs_flags);
return (0);
}

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95
* $Id: spec_vnops.c,v 1.64 1998/07/04 20:45:33 julian Exp $
* $Id: spec_vnops.c,v 1.65 1998/07/04 22:30:23 julian Exp $
*/
#include <sys/param.h>
@ -874,11 +874,15 @@ spec_getpages(ap)
if (!gotreqpage) {
m = ap->a_m[ap->a_reqpage];
#ifndef MAX_PERF
printf("spec_getpages: I/O read failure: (error code=%d)\n", error);
printf(" size: %d, resid: %d, a_count: %d, valid: 0x%x\n",
size, bp->b_resid, ap->a_count, m->valid);
printf(" nread: %d, reqpage: %d, pindex: %d, pcount: %d\n",
nread, ap->a_reqpage, m->pindex, pcount);
printf(
"spec_getpages: I/O read failure: (error code=%d)\n",
error);
printf(
" size: %d, resid: %ld, a_count: %d, valid: 0x%x\n",
size, bp->b_resid, ap->a_count, m->valid);
printf(
" nread: %d, reqpage: %d, pindex: %lu, pcount: %d\n",
nread, ap->a_reqpage, (u_long)m->pindex, pcount);
#endif
/*
* Free the buffer header back to the swap buffer pool.

View File

@ -62,8 +62,9 @@ ext2_print_dinode( di )
printf( /* "Inode: %5d" */
" Type: %10s Mode: 0x%o Flags: 0x%x Version: %d\n",
"n/a", di->di_mode, di->di_flags, di->di_gen);
printf( "User: %5d Group: %5d Size: %d\n",
di->di_uid, di->di_gid, di->di_size);
printf( "User: %5lu Group: %5lu Size: %lu\n",
(unsigned long)di->di_uid, (unsigned long)di->di_gid,
(unsigned long)di->di_size);
printf( "Links: %3d Blockcount: %d\n",
di->di_nlink, di->di_blocks);
printf( "ctime: 0x%x", di->di_ctime);

View File

@ -227,7 +227,8 @@ void ext2_free_inode (struct inode * inode)
bh = sb->s_inode_bitmap[bitmap_nr];
if (!clear_bit (bit, bh->b_data))
printf ( "ext2_free_inode:"
"bit already cleared for inode %lu", inode->i_number);
"bit already cleared for inode %lu",
(unsigned long)inode->i_number);
else {
gdp = get_group_desc (ITOV(inode)->v_mount, block_group, &bh2);
gdp->bg_free_inodes_count++;

View File

@ -704,7 +704,7 @@ ext2_dirbadentry(dp, de, entryoffsetinblock)
if (error_msg != NULL) {
printf("bad directory entry: %s\n", error_msg);
printf("offset=%lu, inode=%lu, rec_len=%d, name_len=%d\n",
printf("offset=%d, inode=%lu, rec_len=%u, name_len=%u\n",
entryoffsetinblock, (unsigned long)de->inode,
de->rec_len, de->name_len);
}

View File

@ -62,8 +62,9 @@ ext2_print_dinode( di )
printf( /* "Inode: %5d" */
" Type: %10s Mode: 0x%o Flags: 0x%x Version: %d\n",
"n/a", di->di_mode, di->di_flags, di->di_gen);
printf( "User: %5d Group: %5d Size: %d\n",
di->di_uid, di->di_gid, di->di_size);
printf( "User: %5lu Group: %5lu Size: %lu\n",
(unsigned long)di->di_uid, (unsigned long)di->di_gid,
(unsigned long)di->di_size);
printf( "Links: %3d Blockcount: %d\n",
di->di_nlink, di->di_blocks);
printf( "ctime: 0x%x", di->di_ctime);

View File

@ -227,7 +227,8 @@ void ext2_free_inode (struct inode * inode)
bh = sb->s_inode_bitmap[bitmap_nr];
if (!clear_bit (bit, bh->b_data))
printf ( "ext2_free_inode:"
"bit already cleared for inode %lu", inode->i_number);
"bit already cleared for inode %lu",
(unsigned long)inode->i_number);
else {
gdp = get_group_desc (ITOV(inode)->v_mount, block_group, &bh2);
gdp->bg_free_inodes_count++;

View File

@ -704,7 +704,7 @@ ext2_dirbadentry(dp, de, entryoffsetinblock)
if (error_msg != NULL) {
printf("bad directory entry: %s\n", error_msg);
printf("offset=%lu, inode=%lu, rec_len=%d, name_len=%d\n",
printf("offset=%d, inode=%lu, rec_len=%u, name_len=%u\n",
entryoffsetinblock, (unsigned long)de->inode,
de->rec_len, de->name_len);
}

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: busdma_machdep.c,v 1.5 1998/04/17 22:36:26 des Exp $
* $Id: busdma_machdep.c,v 1.6 1998/05/06 01:45:55 gibbs Exp $
*/
#include <sys/param.h>
@ -458,7 +458,7 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
} while (buflen > 0);
if (buflen != 0) {
printf("bus_dmamap_load: Too many segs! buf_len = 0x%x\n",
printf("bus_dmamap_load: Too many segs! buf_len = 0x%lx\n",
buflen);
error = EFBIG;
}

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
* $Id: identcpu.c,v 1.49 1998/06/30 19:41:21 phk Exp $
* $Id: identcpu.c,v 1.50 1998/07/11 05:59:34 bde Exp $
*/
#include "opt_cpu.h"
@ -470,15 +470,15 @@ printcpuinfo(void)
if(*cpu_vendor)
printf(" Origin = \"%s\"",cpu_vendor);
if(cpu_id)
printf(" Id = 0x%lx",cpu_id);
printf(" Id = 0x%x", cpu_id);
if (strcmp(cpu_vendor, "GenuineIntel") == 0 ||
strcmp(cpu_vendor, "AuthenticAMD") == 0 ||
((strcmp(cpu_vendor, "CyrixInstead") == 0) &&
((cpu_id & 0xf00) > 5))) {
printf(" Stepping=%ld", cpu_id & 0xf);
printf(" Stepping=%u", cpu_id & 0xf);
if (strcmp(cpu_vendor, "CyrixInstead") == 0)
printf(" DIR=0x%04lx", cyrix_did);
printf(" DIR=0x%04x", cyrix_did);
if (cpu_high > 0) {
/*
* Here we should probably set up flags indicating
@ -525,9 +525,9 @@ printcpuinfo(void)
);
}
} else if (strcmp(cpu_vendor, "CyrixInstead") == 0) {
printf(" DIR=0x%04lx", cyrix_did);
printf(" Stepping=%ld", (cyrix_did & 0xf000) >> 12);
printf(" Revision=%ld", (cyrix_did & 0x0f00) >> 8);
printf(" DIR=0x%04x", cyrix_did);
printf(" Stepping=%u", (cyrix_did & 0xf000) >> 12);
printf(" Revision=%u", (cyrix_did & 0x0f00) >> 8);
#ifndef CYRIX_CACHE_REALLY_WORKS
if (cpu == CPU_M1 && (cyrix_did & 0xff00) < 0x1700)
printf("\n CPU cache: write-through mode");

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.301 1998/06/21 17:46:53 bde Exp $
* $Id: machdep.c,v 1.302 1998/06/30 21:25:58 phk Exp $
*/
#include "apm.h"
@ -265,8 +265,9 @@ cpu_startup(dummy)
for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
int size1 = phys_avail[indx + 1] - phys_avail[indx];
printf("0x%08lx - 0x%08lx, %d bytes (%d pages)\n", phys_avail[indx],
phys_avail[indx + 1] - 1, size1, size1 / PAGE_SIZE);
printf("0x%08x - 0x%08x, %d bytes (%d pages)\n",
phys_avail[indx], phys_avail[indx + 1] - 1, size1,
size1 / PAGE_SIZE);
}
}
@ -1327,7 +1328,7 @@ init386(first)
vm_offset_t pa;
printf(
"BIOS basemem (%ldK) != RTC basemem (%dK), setting to BIOS value\n",
"BIOS basemem (%uK) != RTC basemem (%uK), setting to BIOS value\n",
bootinfo.bi_basemem, biosbasemem);
biosbasemem = bootinfo.bi_basemem;
@ -1360,7 +1361,7 @@ init386(first)
}
}
if (bootinfo.bi_extmem != biosextmem)
printf("BIOS extmem (%ldK) != RTC extmem (%dK)\n",
printf("BIOS extmem (%uK) != RTC extmem (%uK)\n",
bootinfo.bi_extmem, biosextmem);
}

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
* $Id: pmap.c,v 1.201 1998/05/19 08:58:48 phk Exp $
* $Id: pmap.c,v 1.202 1998/05/21 07:47:34 dyson Exp $
*/
/*
@ -535,7 +535,10 @@ pmap_setdevram(unsigned long long basea, vm_offset_t sizea)
PPro_vmtrr[free].mask = mask;
wrmsr(PPRO_VMTRRphysBase0 + free * 2, base);
wrmsr(PPRO_VMTRRphysMask0 + free * 2, mask);
printf("pmap: added WC mapping at page: 0x%x %x, size: %d mask: 0x%x %x\n", base, sizea, mask);
printf(
"pmap: added WC mapping at page: 0x%x %x, size: %u mask: 0x%x %x\n",
(u_int)(base >> 32), (u_int)base, sizea,
(u_int)(mask >> 32), (u_int)mask);
}
}
@ -1777,7 +1780,9 @@ pmap_remove_pte(pmap, ptq, va)
if (oldpte & PG_M) {
#if defined(PMAP_DIAGNOSTIC)
if (pmap_nw_modified((pt_entry_t) oldpte)) {
printf("pmap_remove: modified page not writable: va: 0x%lx, pte: 0x%lx\n", va, (int) oldpte);
printf(
"pmap_remove: modified page not writable: va: 0x%x, pte: 0x%x\n",
va, oldpte);
}
#endif
if (pmap_track_modified(va))
@ -1977,7 +1982,9 @@ pmap_remove_all(pa)
if (tpte & PG_M) {
#if defined(PMAP_DIAGNOSTIC)
if (pmap_nw_modified((pt_entry_t) tpte)) {
printf("pmap_remove_all: modified page not writable: va: 0x%lx, pte: 0x%lx\n", pv->pv_va, tpte);
printf(
"pmap_remove_all: modified page not writable: va: 0x%x, pte: 0x%x\n",
pv->pv_va, tpte);
}
#endif
if (pmap_track_modified(pv->pv_va))
@ -2195,7 +2202,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_prot_t prot,
#if defined(PMAP_DIAGNOSTIC)
if (pmap_nw_modified((pt_entry_t) origpte)) {
printf("pmap_enter: modified page not writable: va: 0x%lx, pte: 0x%lx\n", va, origpte);
printf(
"pmap_enter: modified page not writable: va: 0x%x, pte: 0x%x\n",
va, origpte);
}
#endif
@ -3057,7 +3066,7 @@ pmap_testbit(pa, bit)
#if defined(PMAP_DIAGNOSTIC)
if (!pv->pv_pmap) {
printf("Null pmap (tb) at va: 0x%lx\n", pv->pv_va);
printf("Null pmap (tb) at va: 0x%x\n", pv->pv_va);
continue;
}
#endif
@ -3111,7 +3120,7 @@ pmap_changebit(pa, bit, setem)
#if defined(PMAP_DIAGNOSTIC)
if (!pv->pv_pmap) {
printf("Null pmap (cb) at va: 0x%lx\n", pv->pv_va);
printf("Null pmap (cb) at va: 0x%x\n", pv->pv_va);
continue;
}
#endif
@ -3512,11 +3521,10 @@ pmap_pvdump(pa)
pv;
pv = TAILQ_NEXT(pv, pv_list)) {
#ifdef used_to_be
printf(" -> pmap %x, va %x, flags %x",
pv->pv_pmap, pv->pv_va, pv->pv_flags);
printf(" -> pmap %p, va %x, flags %x",
(void *)pv->pv_pmap, pv->pv_va, pv->pv_flags);
#endif
printf(" -> pmap %x, va %x",
pv->pv_pmap, pv->pv_va);
printf(" -> pmap %p, va %x", (void *)pv->pv_pmap, pv->pv_va);
pads(pv->pv_pmap);
}
printf(" ");

View File

@ -35,7 +35,7 @@
*
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
* $Id: diskslice_machdep.c,v 1.26 1997/09/27 15:34:34 joerg Exp $
* $Id: diskslice_machdep.c,v 1.27 1997/12/02 21:06:20 phk Exp $
*/
#include <stddef.h>
@ -137,8 +137,8 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset )
error = (ssector == ssector1 && esector == esector1) ? 0 : EINVAL;
if (bootverbose)
printf("%s: type 0x%x, start %lu, end = %lu, size %lu %s\n",
sname, dp->dp_typ, ssector1, esector1, dp->dp_size,
error ? "" : ": OK");
sname, dp->dp_typ, ssector1, esector1,
(u_long)dp->dp_size, error ? "" : ": OK");
if (ssector != ssector1 && bootverbose)
printf("%s: C/H/S start %d/%d/%d (%lu) != start %lu: invalid\n",
sname, chs_scyl, dp->dp_shd, chs_ssect,

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
* $Id: wd.c,v 1.169 1998/06/07 19:40:41 dfr Exp $
* $Id: wd.c,v 1.170 1998/07/04 22:30:18 julian Exp $
*/
/* TODO:
@ -525,7 +525,7 @@ wdattach(struct isa_device *dvp)
*/
printf("wdc%d: unit %d (wd%d): <%.*s>",
dvp->id_unit, unit, lunit,
sizeof du->dk_params.wdp_model,
(int)sizeof(du->dk_params.wdp_model),
du->dk_params.wdp_model);
if (du->dk_flags & DKFL_LBA)
printf(", LBA");
@ -2364,8 +2364,8 @@ wddump(void *private, int32_t start, int32_t num)
blkcnt = 1;
blknext = blknum + blkcnt;
#if 1 || defined(WDDEBUG)
printf("bad block %lu -> %lu\n",
blknum, blknew);
printf("bad block %ld -> %ld\n",
(long)blknum, (long)blknew);
#endif
break;
}

View File

@ -39,7 +39,7 @@ static volatile int print_tci = 1;
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $Id: kern_clock.c,v 1.75 1998/07/04 19:12:21 phk Exp $
* $Id: kern_clock.c,v 1.76 1998/07/04 19:29:15 phk Exp $
*/
#include <sys/param.h>
@ -692,7 +692,7 @@ init_timecounter(struct timecounter *tc)
tc->tc_cost >>= 8;
if (print_tci && strcmp(tc->tc_name, "dummy"))
printf("Timecounter \"%s\" frequency %lu Hz cost %u ns\n",
tc->tc_name, tc->tc_frequency, tc->tc_cost);
tc->tc_name, (u_long)tc->tc_frequency, tc->tc_cost);
/* XXX: For now always start using the counter. */
tc->tc_offset_count = tc->tc_get_timecount(tc);

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: kern_module.c,v 1.5 1997/11/06 19:29:11 phk Exp $
* $Id: kern_module.c,v 1.6 1997/11/07 08:52:56 phk Exp $
*/
#include <sys/param.h>
@ -81,9 +81,10 @@ module_register_init(void *arg)
moduledata_t* data = (moduledata_t*) arg;
int error;
#define fptrint_t unsigned /* XXX */
if (error = module_register(data->name, data->evhand, data->priv))
printf("module_register_init: module_register(%s, %x, %x) returned %d",
data->name, data->evhand, data->priv, error);
printf("module_register_init: module_register(%s, %lx, %p) returned %d",
data->name, (u_long)(fptrint_t)data->evhand, data->priv, error);
}
int

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_proc.c 8.7 (Berkeley) 2/14/95
* $Id: kern_proc.c,v 1.35 1998/02/09 06:09:23 eivind Exp $
* $Id: kern_proc.c,v 1.36 1998/02/20 13:52:14 bde Exp $
*/
#include <sys/param.h>
@ -375,14 +375,17 @@ DB_SHOW_COMMAND(pgrpdump, pgrpdump)
if (pgrp = pgrphashtbl[i].lh_first) {
printf("\tindx %d\n", i);
for (; pgrp != 0; pgrp = pgrp->pg_hash.le_next) {
printf("\tpgrp %x, pgid %d, sess %x, sesscnt %d, mem %x\n",
pgrp, pgrp->pg_id, pgrp->pg_session,
printf(
"\tpgrp %p, pgid %ld, sess %p, sesscnt %d, mem %p\n",
(void *)pgrp, (long)pgrp->pg_id,
(void *)pgrp->pg_session,
pgrp->pg_session->s_count,
pgrp->pg_members.lh_first);
(void *)pgrp->pg_members.lh_first);
for (p = pgrp->pg_members.lh_first; p != 0;
p = p->p_pglist.le_next) {
printf("\t\tpid %d addr %x pgrp %x\n",
p->p_pid, p, p->p_pgrp);
printf("\t\tpid %ld addr %p pgrp %p\n",
(long)p->p_pid, (void *)p,
(void *)p->p_pgrp);
}
}
}

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
* $Id: kern_shutdown.c,v 1.32 1998/05/17 22:12:13 tegge Exp $
* $Id: kern_shutdown.c,v 1.33 1998/06/07 17:11:35 dfr Exp $
*/
#include "opt_ddb.h"
@ -235,7 +235,11 @@ boot(howto)
for (bp = &buf[nbuf]; --bp >= buf; ) {
if ((bp->b_flags & (B_BUSY | B_INVAL)) == B_BUSY) {
nbusy++;
printf("%d: dev:%08x, flags:%08x, blkno:%d, lblkno:%d\n", nbusy, bp->b_dev, bp->b_flags, bp->b_blkno, bp->b_lblkno);
printf(
"%d: dev:%08lx, flags:%08lx, blkno:%ld, lblkno:%ld\n",
nbusy, (u_long)bp->b_dev,
bp->b_flags, (long)bp->b_blkno,
(long)bp->b_lblkno);
}
}
DELAY(5000000); /* 5 seconds */
@ -357,7 +361,7 @@ dumpsys(void)
if (!(bdevsw[major(dumpdev)]->d_dump))
return;
dumpsize = Maxmem;
printf("\ndumping to dev %lx, offset %ld\n", dumpdev, dumplo);
printf("\ndumping to dev %lx, offset %ld\n", (u_long)dumpdev, dumplo);
printf("dump ");
switch ((*bdevsw[major(dumpdev)]->d_dump)(dumpdev)) {

View File

@ -39,7 +39,7 @@ static volatile int print_tci = 1;
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $Id: kern_clock.c,v 1.75 1998/07/04 19:12:21 phk Exp $
* $Id: kern_clock.c,v 1.76 1998/07/04 19:29:15 phk Exp $
*/
#include <sys/param.h>
@ -692,7 +692,7 @@ init_timecounter(struct timecounter *tc)
tc->tc_cost >>= 8;
if (print_tci && strcmp(tc->tc_name, "dummy"))
printf("Timecounter \"%s\" frequency %lu Hz cost %u ns\n",
tc->tc_name, tc->tc_frequency, tc->tc_cost);
tc->tc_name, (u_long)tc->tc_frequency, tc->tc_cost);
/* XXX: For now always start using the counter. */
tc->tc_offset_count = tc->tc_get_timecount(tc);

View File

@ -35,7 +35,7 @@
*
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
* $Id: diskslice_machdep.c,v 1.26 1997/09/27 15:34:34 joerg Exp $
* $Id: diskslice_machdep.c,v 1.27 1997/12/02 21:06:20 phk Exp $
*/
#include <stddef.h>
@ -137,8 +137,8 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset )
error = (ssector == ssector1 && esector == esector1) ? 0 : EINVAL;
if (bootverbose)
printf("%s: type 0x%x, start %lu, end = %lu, size %lu %s\n",
sname, dp->dp_typ, ssector1, esector1, dp->dp_size,
error ? "" : ": OK");
sname, dp->dp_typ, ssector1, esector1,
(u_long)dp->dp_size, error ? "" : ": OK");
if (ssector != ssector1 && bootverbose)
printf("%s: C/H/S start %d/%d/%d (%lu) != start %lu: invalid\n",
sname, chs_scyl, dp->dp_shd, chs_ssect,

View File

@ -46,7 +46,7 @@
* from: wd.c,v 1.55 1994/10/22 01:57:12 phk Exp $
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
* $Id: subr_diskslice.c,v 1.46 1998/06/06 03:06:55 bde Exp $
* $Id: subr_diskslice.c,v 1.47 1998/07/04 22:30:22 julian Exp $
*/
#include "opt_devfs.h"
@ -146,8 +146,8 @@ if (labelsect != 0) Debugger("labelsect != 0 in dscheck()");
newblkno = transbad144(sp->ds_bad, blkno);
if (newblkno != blkno)
printf("should map bad block %lu -> %lu\n",
blkno, newblkno);
printf("should map bad block %ld -> %ld\n",
(long)blkno, (long)newblkno);
}
}
@ -958,7 +958,8 @@ partition_info(sname, part, pp)
struct partition *pp;
{
printf("%s%c: start %lu, end %lu, size %lu\n", sname, 'a' + part,
pp->p_offset, pp->p_offset + pp->p_size - 1, pp->p_size);
(u_long)pp->p_offset, (u_long)(pp->p_offset + pp->p_size - 1),
(u_long)pp->p_size);
}
static void

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
* $Id: vfs_subr.c,v 1.156 1998/06/10 22:02:14 julian Exp $
* $Id: vfs_subr.c,v 1.157 1998/06/21 18:02:43 bde Exp $
*/
/*
@ -1901,10 +1901,10 @@ vprint(label, vp)
char buf[64];
if (label != NULL)
printf("%s: %x: ", label, vp);
printf("%s: %p: ", label, (void *)vp);
else
printf("%x: ", vp);
printf("type %s, usecount %d, writecount %d, refcount %ld,",
printf("%p: ", (void *)vp);
printf("type %s, usecount %d, writecount %d, refcount %d,",
typename[vp->v_type], vp->v_usecount, vp->v_writecount,
vp->v_holdcnt);
buf[0] = '\0';

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
* $Id: vfs_subr.c,v 1.156 1998/06/10 22:02:14 julian Exp $
* $Id: vfs_subr.c,v 1.157 1998/06/21 18:02:43 bde Exp $
*/
/*
@ -1901,10 +1901,10 @@ vprint(label, vp)
char buf[64];
if (label != NULL)
printf("%s: %x: ", label, vp);
printf("%s: %p: ", label, (void *)vp);
else
printf("%x: ", vp);
printf("type %s, usecount %d, writecount %d, refcount %ld,",
printf("%p: ", (void *)vp);
printf("type %s, usecount %d, writecount %d, refcount %d,",
typename[vp->v_type], vp->v_usecount, vp->v_writecount,
vp->v_holdcnt);
buf[0] = '\0';

View File

@ -37,7 +37,7 @@
* @(#)procfs_status.c 8.4 (Berkeley) 6/15/94
*
* From:
* $Id: procfs_status.c,v 1.9 1997/03/24 11:24:42 bde Exp $
* $Id: procfs_status.c,v 1.10 1997/08/02 14:32:17 bde Exp $
*/
#include <sys/param.h>
@ -124,16 +124,16 @@ procfs_dostatus(curp, p, pfs, uio)
cr = p->p_ucred;
ps += sprintf(ps, " %ld %ld %ld",
cr->cr_uid, /* euid */
p->p_cred->p_ruid, /* ruid */
p->p_cred->p_rgid); /* rgid */
ps += sprintf(ps, " %lu %lu %lu",
(u_long)cr->cr_uid,
(u_long)p->p_cred->p_ruid,
(u_long)p->p_cred->p_rgid);
/* egid (p->p_cred->p_svgid) is equal to cr_ngroups[0]
see also getegid(2) in /sys/kern/kern_prot.c */
for (i = 0; i < cr->cr_ngroups; i++)
ps += sprintf(ps, ",%ld", cr->cr_groups[i]);
ps += sprintf(ps, ",%lu", (u_long)cr->cr_groups[i]);
ps += sprintf(ps, "\n");
xlen = ps - psbuf;

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95
*
* $Id: procfs_vnops.c,v 1.59 1998/06/14 12:53:39 bde Exp $
* $Id: procfs_vnops.c,v 1.60 1998/06/25 16:54:41 dt Exp $
*/
/*
@ -380,8 +380,8 @@ procfs_print(ap)
{
struct pfsnode *pfs = VTOPFS(ap->a_vp);
printf("tag VT_PROCFS, type %s, pid %d, mode %x, flags %x\n",
pfs->pfs_type, pfs->pfs_pid, pfs->pfs_mode, pfs->pfs_flags);
printf("tag VT_PROCFS, type %d, pid %ld, mode %x, flags %lx\n",
pfs->pfs_type, (long)pfs->pfs_pid, pfs->pfs_mode, pfs->pfs_flags);
return (0);
}

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95
* $Id: spec_vnops.c,v 1.64 1998/07/04 20:45:33 julian Exp $
* $Id: spec_vnops.c,v 1.65 1998/07/04 22:30:23 julian Exp $
*/
#include <sys/param.h>
@ -874,11 +874,15 @@ spec_getpages(ap)
if (!gotreqpage) {
m = ap->a_m[ap->a_reqpage];
#ifndef MAX_PERF
printf("spec_getpages: I/O read failure: (error code=%d)\n", error);
printf(" size: %d, resid: %d, a_count: %d, valid: 0x%x\n",
size, bp->b_resid, ap->a_count, m->valid);
printf(" nread: %d, reqpage: %d, pindex: %d, pcount: %d\n",
nread, ap->a_reqpage, m->pindex, pcount);
printf(
"spec_getpages: I/O read failure: (error code=%d)\n",
error);
printf(
" size: %d, resid: %ld, a_count: %d, valid: 0x%x\n",
size, bp->b_resid, ap->a_count, m->valid);
printf(
" nread: %d, reqpage: %d, pindex: %lu, pcount: %d\n",
nread, ap->a_reqpage, (u_long)m->pindex, pcount);
#endif
/*
* Free the buffer header back to the swap buffer pool.

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_vnops.c,v 1.73 1998/06/10 13:46:46 dt Exp $ */
/* $Id: msdosfs_vnops.c,v 1.74 1998/07/04 20:45:36 julian Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $ */
/*-
@ -1864,7 +1864,7 @@ msdosfs_print(ap)
struct denode *dep = VTODE(ap->a_vp);
printf(
"tag VT_MSDOSFS, startcluster %d, dircluster %ld, diroffset %ld ",
"tag VT_MSDOSFS, startcluster %lu, dircluster %lu, diroffset %lu ",
dep->de_StartCluster, dep->de_dirclust, dep->de_diroffset);
printf(" dev %d, %d", major(dep->de_dev), minor(dep->de_dev));
lockmgr_printinfo(&dep->de_lock);

View File

@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ide_pci.c,v 1.11 1998/06/17 12:14:55 bde Exp $
* $Id: ide_pci.c,v 1.12 1998/06/17 14:58:03 bde Exp $
*/
#include "pci.h"
@ -330,18 +330,18 @@ via_571_status(struct ide_pci_cookie *cookie)
printf("via_571_status: %s drive %d data setup=%d active=%d recovery=%d\n",
unitno < 2 ? "primary" : "secondary",
unitno & 1,
((word40[3] >> ((3 - unitno) * 2)) & 3) + 1,
((word40[2] >> (((3 - unitno) * 8) + 4)) & 0x0f) + 1,
((word40[2] >> ((3 - unitno) * 8)) & 0x0f) + 1);
((u_int)(word40[3] >> ((3 - unitno) * 2)) & 3) + 1,
((u_int)(word40[2] >> (((3 - unitno) * 8) + 4)) & 0x0f) + 1,
((u_int)(word40[2] >> ((3 - unitno) * 8)) & 0x0f) + 1);
if (ctlr == 0)
printf("via_571_status: primary ctrl active=%d recovery=%d\n",
((word40[3] >> 28) & 0x0f) + 1,
((word40[2] >> 24) & 0x0f) + 1);
((u_int)(word40[3] >> 28) & 0x0f) + 1,
((u_int)(word40[2] >> 24) & 0x0f) + 1);
else
printf("via_571_status: secondary ctrl active=%d recovery=%d\n",
((word40[3] >> 20) & 0x0f) + 1,
((word40[2] >> 16) & 0x0f) + 1);
((u_int)(word40[3] >> 20) & 0x0f) + 1,
((u_int)(word40[2] >> 16) & 0x0f) + 1);
/* UltraDMA dump */
{
@ -505,9 +505,12 @@ promise_status(struct ide_pci_cookie *cookie)
lat_and_interrupt = pci_conf_read(tag, 0x3c);
printf("promise_status: port0: 0x%lx, port0_alt: 0x%lx, port1: 0x%lx, port1_alt: 0x%lx\n",
port0_command, port0_altstatus, port1_command, port1_altstatus);
printf("promise_status: dma control blk address: 0x%lx, int: %d, irq: %d\n",
dma_block, (lat_and_interrupt >> 8) & 0xff, lat_and_interrupt & 0xff);
(u_long)port0_command, (u_long)port0_altstatus, (u_long)port1_command,
(u_long)port1_altstatus);
printf(
"promise_status: dma control blk address: 0x%lx, int: %d, irq: %d\n",
(u_long)dma_block, (u_int)(lat_and_interrupt >> 8) & 0xff,
(u_int)lat_and_interrupt & 0xff);
for(i=0;i<4;i+=2) {
drivetiming = pci_conf_read(tag, 0x60 + i * 4);
@ -1241,7 +1244,7 @@ ide_pci_dmaverify(void *xcp, char *vaddr, u_long count, int dir)
#ifdef DIAGNOSTIC
if (badfu) {
printf("ide_pci: dmaverify odd vaddr or length, ");
printf("vaddr = %08x length = %08x\n", (int)vaddr, count);
printf("vaddr = %p length = %08lx\n", (void *)vaddr, count);
}
#endif
return (!badfu);
@ -1274,7 +1277,7 @@ ide_pci_dmasetup(void *xcp, char *vaddr, u_long vcount, int dir)
if (count == 0) {
printf("ide_pci: dmasetup 0-length transfer, ");
printf("vaddr = %08x length = %08x\n", (int)vaddr, count);
printf("vaddr = %p length = %08lx\n", (void *)vaddr, count);
return 1;
}

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: ncr.c,v 1.117 1998/04/17 22:37:04 des Exp $
** $Id: ncr.c,v 1.118 1998/06/07 17:12:40 dfr Exp $
**
** Device driver for the NCR 53C810 PCI-SCSI-Controller.
**
@ -1342,7 +1342,7 @@ static void ncr_attach (pcici_t tag, int unit);
static char ident[] =
"\n$Id: ncr.c,v 1.117 1998/04/17 22:37:04 des Exp $\n";
"\n$Id: ncr.c,v 1.118 1998/06/07 17:12:40 dfr Exp $\n";
static const u_long ncr_version = NCR_VERSION * 11
+ (u_long) sizeof (struct ncb) * 7
@ -4114,8 +4114,8 @@ static int32_t ncr_start (struct scsi_xfer * xp)
if ((unsigned)xp->datalen > 128*1024*1024) {
PRINT_ADDR(xp);
printf ("trying to transfer %8x bytes, mem addr = %8x\n",
xp->datalen, xp->data);
printf ("trying to transfer %8lx bytes, mem addr = %8p\n",
(u_long) xp->datalen, (void *) xp->data);
{
int j;
PRINT_ADDR(xp);
@ -6052,8 +6052,9 @@ static void ncr_int_ma (ncb_p np, u_char dstat)
return;
}
if (cp != np->header.cp) {
printf ("%s: SCSI phase error fixup: CCB address mismatch (0x%08lx != 0x%08lx) np->ccb = 0x%08lx\n",
ncr_name (np), (u_long) cp, (u_long) np->header.cp, np->ccb);
printf ("%s: SCSI phase error fixup: CCB address mismatch (%p != %p) np->ccb = %p\n",
ncr_name (np), (void *) cp, (void *) np->header.cp,
(void *) np->ccb);
/* return;*/
}
@ -7470,7 +7471,7 @@ ncrgetfreq (ncb_p np, int gen)
OUTB (nc_scntl3, 0);
if (bootverbose >= 2)
printf ("\tDelay (GEN=%d): %lu msec\n", gen, ms);
printf ("\tDelay (GEN=%d): %d msec\n", gen, ms);
/*
* adjust for prescaler, and convert into KHz
*/
@ -7498,7 +7499,7 @@ static void ncr_getclock (ncb_p np, u_char multiplier)
f2 = ncrgetfreq (np, 11);
if (bootverbose >= 2)
printf ("\tNCR clock is %luKHz, %luKHz\n", f1, f2);
printf ("\tNCR clock is %uKHz, %uKHz\n", f1, f2);
if (f1 > f2) f1 = f2; /* trust lower result */
if (f1 > 45000) {
scntl3 = 5; /* >45Mhz: assume 80MHz */

View File

@ -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);

View File

@ -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");

View File

@ -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");

View File

@ -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;

View File

@ -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 @@ struct proc *p, struct scsi_link *sc_link)
* 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;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_alloc.c 8.18 (Berkeley) 5/26/95
* $Id: ffs_alloc.c,v 1.48 1998/03/08 09:58:42 julian Exp $
* $Id: ffs_alloc.c,v 1.49 1998/03/30 09:55:50 phk Exp $
*/
#include "opt_quota.h"
@ -116,7 +116,7 @@ ffs_alloc(ip, lbn, bpref, size, cred, bnp)
#ifdef DIAGNOSTIC
if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0) {
printf("dev = 0x%lx, bsize = %ld, size = %d, fs = %s\n",
(u_long)ip->i_dev, fs->fs_bsize, size, fs->fs_fsmnt);
(u_long)ip->i_dev, (long)fs->fs_bsize, size, fs->fs_fsmnt);
panic("ffs_alloc: bad size");
}
if (cred == NOCRED)
@ -186,9 +186,8 @@ ffs_realloccg(ip, lbprev, bpref, osize, nsize, cred, bpp)
if ((u_int)osize > fs->fs_bsize || fragoff(fs, osize) != 0 ||
(u_int)nsize > fs->fs_bsize || fragoff(fs, nsize) != 0) {
printf(
"dev = 0x%lx, bsize = %ld, osize = %d, "
"nsize = %d, fs = %s\n",
(u_long)ip->i_dev, fs->fs_bsize, osize,
"dev = 0x%lx, bsize = %ld, osize = %d, nsize = %d, fs = %s\n",
(u_long)ip->i_dev, (long)fs->fs_bsize, osize,
nsize, fs->fs_fsmnt);
panic("ffs_realloccg: bad size");
}
@ -200,7 +199,8 @@ ffs_realloccg(ip, lbprev, bpref, osize, nsize, cred, bpp)
goto nospace;
if ((bprev = ip->i_db[lbprev]) == 0) {
printf("dev = 0x%lx, bsize = %ld, bprev = %ld, fs = %s\n",
(u_long) ip->i_dev, fs->fs_bsize, bprev, fs->fs_fsmnt);
(u_long)ip->i_dev, (long)fs->fs_bsize, (long)bprev,
fs->fs_fsmnt);
panic("ffs_realloccg: bad bprev");
}
/*
@ -285,7 +285,7 @@ ffs_realloccg(ip, lbprev, bpref, osize, nsize, cred, bpp)
break;
default:
printf("dev = 0x%lx, optim = %ld, fs = %s\n",
(u_long)ip->i_dev, fs->fs_optim, fs->fs_fsmnt);
(u_long)ip->i_dev, (long)fs->fs_optim, fs->fs_fsmnt);
panic("ffs_realloccg: bad optim");
/* NOTREACHED */
}
@ -605,13 +605,13 @@ ffs_valloc(pvp, mode, cred, vpp)
}
ip = VTOI(*vpp);
if (ip->i_mode) {
printf("mode = 0%o, inum = %ld, fs = %s\n",
ip->i_mode, ip->i_number, fs->fs_fsmnt);
printf("mode = 0%o, inum = %lu, fs = %s\n",
ip->i_mode, (u_long)ip->i_number, fs->fs_fsmnt);
panic("ffs_valloc: dup alloc");
}
if (ip->i_blocks) { /* XXX */
printf("free inode %s/%ld had %ld blocks\n",
fs->fs_fsmnt, ino, ip->i_blocks);
printf("free inode %s/%lu had %ld blocks\n",
fs->fs_fsmnt, (u_long)ino, (long)ip->i_blocks);
ip->i_blocks = 0;
}
ip->i_flags = 0;
@ -1245,7 +1245,7 @@ ffs_nodealloccg(ip, cg, ipref, mode)
loc = skpc(0xff, len, &cg_inosused(cgp)[0]);
if (loc == 0) {
printf("cg = %d, irotor = %ld, fs = %s\n",
cg, cgp->cg_irotor, fs->fs_fsmnt);
cg, (long)cgp->cg_irotor, fs->fs_fsmnt);
panic("ffs_nodealloccg: map corrupted");
/* NOTREACHED */
}
@ -1307,7 +1307,8 @@ ffs_blkfree(ip, bno, size)
}
cg = dtog(fs, bno);
if ((u_int)bno >= fs->fs_size) {
printf("bad block %ld, ino %ld\n", bno, ip->i_number);
printf("bad block %ld, ino %lu\n",
(long)bno, (u_long)ip->i_number);
ffs_fserr(fs, ip->i_uid, "bad block");
return;
}
@ -1328,7 +1329,7 @@ ffs_blkfree(ip, bno, size)
blkno = fragstoblks(fs, bno);
if (!ffs_isfreeblock(fs, cg_blksfree(cgp), blkno)) {
printf("dev = 0x%lx, block = %ld, fs = %s\n",
(u_long) ip->i_dev, bno, fs->fs_fsmnt);
(u_long)ip->i_dev, (long)bno, fs->fs_fsmnt);
panic("ffs_blkfree: freeing free block");
}
ffs_setblock(fs, cg_blksfree(cgp), blkno);
@ -1353,7 +1354,8 @@ ffs_blkfree(ip, bno, size)
for (i = 0; i < frags; i++) {
if (isset(cg_blksfree(cgp), bno + i)) {
printf("dev = 0x%lx, block = %ld, fs = %s\n",
(u_long) ip->i_dev, bno + i, fs->fs_fsmnt);
(u_long)ip->i_dev, (long)(bno + i),
fs->fs_fsmnt);
panic("ffs_blkfree: freeing free frag");
}
setbit(cg_blksfree(cgp), bno + i);
@ -1405,8 +1407,8 @@ ffs_checkblk(ip, bno, size)
fs = ip->i_fs;
if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0) {
printf("bsize = %d, size = %d, fs = %s\n",
fs->fs_bsize, size, fs->fs_fsmnt);
printf("bsize = %ld, size = %ld, fs = %s\n",
(long)fs->fs_bsize, size, fs->fs_fsmnt);
panic("ffs_checkblk: bad size");
}
if ((u_int)bno >= fs->fs_size)
@ -1486,8 +1488,8 @@ ffs_vfree( pvp, ino, mode)
cgp->cg_time = time_second;
ino %= fs->fs_ipg;
if (isclr(cg_inosused(cgp), ino)) {
printf("dev = 0x%lx, ino = %ld, fs = %s\n",
(u_long)pip->i_dev, ino, fs->fs_fsmnt);
printf("dev = 0x%lx, ino = %lu, fs = %s\n",
(u_long)pip->i_dev, (u_long)ino, fs->fs_fsmnt);
if (fs->fs_ronly == 0)
panic("ffs_vfree: freeing free inode");
}

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mfs_vnops.c 8.11 (Berkeley) 5/22/95
* $Id: mfs_vnops.c,v 1.35 1998/02/16 23:55:53 msmith Exp $
* $Id: mfs_vnops.c,v 1.36 1998/07/04 20:45:39 julian Exp $
*/
#include <sys/param.h>
@ -295,8 +295,8 @@ mfs_print(ap)
{
register struct mfsnode *mfsp = VTOMFS(ap->a_vp);
printf("tag VT_MFS, pid %ld, base %p, size %ld\n", mfsp->mfs_pid,
mfsp->mfs_baseoff, mfsp->mfs_size);
printf("tag VT_MFS, pid %ld, base %p, size %ld\n",
(long)mfsp->mfs_pid, (void *)mfsp->mfs_baseoff, mfsp->mfs_size);
return (0);
}

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_lookup.c 8.15 (Berkeley) 6/16/95
* $Id: ufs_lookup.c,v 1.23 1998/03/30 09:56:23 phk Exp $
* $Id: ufs_lookup.c,v 1.24 1998/04/15 12:27:31 bde Exp $
*/
#include <sys/param.h>
@ -560,8 +560,8 @@ ufs_dirbad(ip, offset, how)
struct mount *mp;
mp = ITOV(ip)->v_mount;
(void)printf("%s: bad dir ino %ld at offset %ld: %s\n",
mp->mnt_stat.f_mntonname, ip->i_number, offset, how);
(void)printf("%s: bad dir ino %lu at offset %ld: %s\n",
mp->mnt_stat.f_mntonname, (u_long)ip->i_number, (long)offset, how);
if ((mp->mnt_stat.f_flags & MNT_RDONLY) == 0)
panic("ufs_dirbad: bad dir");
}

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95
* $Id: ufs_vnops.c,v 1.94 1998/07/04 20:45:40 julian Exp $
* $Id: ufs_vnops.c,v 1.95 1998/07/10 00:10:20 julian Exp $
*/
#include "opt_quota.h"
@ -1783,8 +1783,9 @@ ufs_print(ap)
register struct vnode *vp = ap->a_vp;
register struct inode *ip = VTOI(vp);
printf("tag VT_UFS, ino %ld, on dev %x (%d, %d)", ip->i_number,
ip->i_dev, major(ip->i_dev), minor(ip->i_dev));
printf("tag VT_UFS, ino %lu, on dev %#lx (%d, %d)",
(u_long)ip->i_number, (u_long)ip->i_dev, major(ip->i_dev),
minor(ip->i_dev));
if (vp->v_type == VFIFO)
fifo_printinfo(vp);
lockmgr_printinfo(&ip->i_lock);

View File

@ -39,7 +39,7 @@
* from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
*
* @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
* $Id: swap_pager.c,v 1.95 1998/05/04 03:01:42 dyson Exp $
* $Id: swap_pager.c,v 1.96 1998/07/04 20:45:41 julian Exp $
*/
/*
@ -1070,14 +1070,17 @@ swap_pager_getpages(object, m, count, reqpage)
s = splvm();
while ((bp->b_flags & B_DONE) == 0) {
if (tsleep(bp, PVM, "swread", hz*20)) {
printf("swap_pager: indefinite wait buffer: device: %#x, blkno: %d, size: %d\n",
bp->b_dev, bp->b_blkno, bp->b_bcount);
printf(
"swap_pager: indefinite wait buffer: device: %#lx, blkno: %ld, size: %ld\n",
(u_long)bp->b_dev, (long)bp->b_blkno,
(long)bp->b_bcount);
}
}
if (bp->b_flags & B_ERROR) {
printf("swap_pager: I/O error - pagein failed; blkno %d, size %d, error %d\n",
bp->b_blkno, bp->b_bcount, bp->b_error);
printf(
"swap_pager: I/O error - pagein failed; blkno %ld, size %ld, error %d\n",
(long)bp->b_blkno, (long)bp->b_bcount, bp->b_error);
rv = VM_PAGER_ERROR;
} else {
rv = VM_PAGER_OK;
@ -1486,8 +1489,9 @@ swap_pager_putpages(object, m, count, sync, rtvals)
}
if (bp->b_flags & B_ERROR) {
printf("swap_pager: I/O error - pageout failed; blkno %d, size %d, error %d\n",
bp->b_blkno, bp->b_bcount, bp->b_error);
printf(
"swap_pager: I/O error - pageout failed; blkno %ld, size %ld, error %d\n",
(long)bp->b_blkno, (long)bp->b_bcount, bp->b_error);
rv = VM_PAGER_ERROR;
} else {
rv = VM_PAGER_OK;

View File

@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_map.c,v 1.128 1998/06/07 17:13:10 dfr Exp $
* $Id: vm_map.c,v 1.129 1998/06/21 14:53:43 bde Exp $
*/
/*
@ -2929,8 +2929,9 @@ DB_SHOW_COMMAND(procvm, procvm)
p = curproc;
}
printf("p = 0x%x, vmspace = 0x%x, map = 0x%x, pmap = 0x%x\n",
p, p->p_vmspace, &p->p_vmspace->vm_map, &p->p_vmspace->vm_pmap);
db_printf("p = %p, vmspace = %p, map = %p, pmap = %p\n",
(void *)p, (void *)p->p_vmspace, (void *)&p->p_vmspace->vm_map,
(void *)&p->p_vmspace->vm_pmap);
vm_map_print ((long) &p->p_vmspace->vm_map, 1, 0, NULL);
}

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91
* $Id: vm_page.c,v 1.101 1998/06/07 17:13:13 dfr Exp $
* $Id: vm_page.c,v 1.102 1998/06/21 18:02:48 bde Exp $
*/
/*
@ -1072,9 +1072,10 @@ vm_page_freechk_and_unqueue(m)
#if !defined(MAX_PERF)
if (m->busy || ((m->queue - m->pc) == PQ_FREE) ||
(m->hold_count != 0)) {
printf("vm_page_free: pindex(%ld), busy(%d), PG_BUSY(%d), hold(%d)\n",
m->pindex, m->busy,
(m->flags & PG_BUSY) ? 1 : 0, m->hold_count);
printf(
"vm_page_free: pindex(%lu), busy(%d), PG_BUSY(%d), hold(%d)\n",
(u_long)m->pindex, m->busy, (m->flags & PG_BUSY) ? 1 : 0,
m->hold_count);
if ((m->queue - m->pc) == PQ_FREE)
panic("vm_page_free: freeing free page");
else

View File

@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)vnode_pager.c 7.5 (Berkeley) 4/20/91
* $Id: vnode_pager.c,v 1.91 1998/03/16 01:56:03 dyson Exp $
* $Id: vnode_pager.c,v 1.92 1998/07/04 20:45:42 julian Exp $
*/
/*
@ -903,8 +903,8 @@ vnode_pager_generic_putpages(vp, m, bytecount, flags, rtvals)
printf("vnode_pager_putpages: I/O error %d\n", error);
}
if (auio.uio_resid) {
printf("vnode_pager_putpages: residual I/O %d at %ld\n",
auio.uio_resid, m[0]->pindex);
printf("vnode_pager_putpages: residual I/O %d at %lu\n",
auio.uio_resid, (u_long)m[0]->pindex);
}
for (i = 0; i < ncount; i++) {
rtvals[i] = VM_PAGER_OK;