From 18cf795f279ca097b6da5a7eb2132a6727943d50 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 1 Jul 1999 19:53:43 +0000 Subject: [PATCH] Fix some int/long printf problems for the Alpha --- sys/vm/vm_kern.c | 6 +++--- sys/vm/vm_map.c | 4 ++-- sys/vm/vm_object.c | 18 ++++++++++-------- sys/vm/vm_page.c | 9 +++++---- sys/vm/vnode_pager.c | 6 +++--- 5 files changed, 23 insertions(+), 20 deletions(-) diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index 531dab21bb46..794c8354c5c1 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_kern.c,v 1.54 1999/03/16 07:39:07 alc Exp $ + * $Id: vm_kern.c,v 1.55 1999/06/08 17:03:28 dt Exp $ */ /* @@ -330,8 +330,8 @@ kmem_malloc(map, size, flags) return (0); } if ((flags & M_NOWAIT) == 0) - panic("kmem_malloc(%d): kmem_map too small: %d total allocated", - size, map->size); + panic("kmem_malloc(%ld): kmem_map too small: %ld total allocated", + (long)size, (long)map->size); return (0); } offset = addr - VM_MIN_KERNEL_ADDRESS; diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index c96c0d7b3188..fa4f3116700f 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -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.169 1999/06/17 05:49:00 alc Exp $ + * $Id: vm_map.c,v 1.170 1999/06/17 21:29:38 alc Exp $ */ /* @@ -2876,7 +2876,7 @@ vm_freeze_copyopts(object, froma, toa) if (m_in->valid == 0) { rv = vm_pager_get_pages(object, &m_in, 1, 0); if (rv != VM_PAGER_OK) { - printf("vm_freeze_copyopts: cannot read page from file: %x\n", m_in->pindex); + printf("vm_freeze_copyopts: cannot read page from file: %lx\n", (long)m_in->pindex); continue; } vm_page_deactivate(m_in); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index ceffb966ab10..9166b06f804b 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.c,v 1.156 1999/05/30 01:12:19 alc Exp $ + * $Id: vm_object.c,v 1.157 1999/06/20 21:47:00 alc Exp $ */ /* @@ -1617,8 +1617,8 @@ DB_SHOW_COMMAND(vmochk, vm_object_check) if (object->handle == NULL && (object->type == OBJT_DEFAULT || object->type == OBJT_SWAP)) { if (object->ref_count == 0) { - db_printf("vmochk: internal obj has zero ref count: %d\n", - object->size); + db_printf("vmochk: internal obj has zero ref count: %ld\n", + (long)object->size); } if (!vm_object_in_map(object)) { db_printf( @@ -1732,8 +1732,8 @@ DB_SHOW_COMMAND(vmopag, vm_object_print_pages) m = vm_page_lookup(object, idx); if (m == NULL) { if (rcount) { - db_printf(" index(%d)run(%d)pa(0x%x)\n", - fidx, rcount, pa); + db_printf(" index(%ld)run(%d)pa(0x%lx)\n", + (long)fidx, rcount, (long)pa); if ( nl > 18) { c = cngetc(); if (c != ' ') @@ -1761,8 +1761,9 @@ DB_SHOW_COMMAND(vmopag, vm_object_print_pages) ++rcount; continue; } - db_printf(" index(%d)run(%d)pa(0x%x)", fidx, rcount, pa); - db_printf("pd(%d)\n", padiff); + db_printf(" index(%ld)run(%d)pa(0x%lx)", + (long)fidx, rcount, (long)pa); + db_printf("pd(%ld)\n", (long)padiff); if ( nl > 18) { c = cngetc(); if (c != ' ') @@ -1776,7 +1777,8 @@ DB_SHOW_COMMAND(vmopag, vm_object_print_pages) rcount = 1; } if (rcount) { - db_printf(" index(%d)run(%d)pa(0x%x)\n", fidx, rcount, pa); + db_printf(" index(%ld)run(%d)pa(0x%lx)\n", + (long)fidx, rcount, (long)pa); if ( nl > 18) { c = cngetc(); if (c != ' ') diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 67acefa0b961..0a50fae2228d 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91 - * $Id: vm_page.c,v 1.132 1999/06/20 21:47:02 alc Exp $ + * $Id: vm_page.c,v 1.133 1999/06/22 07:18:17 alc Exp $ */ /* @@ -1123,8 +1123,8 @@ vm_page_free_toq(vm_page_t m) if (m->wire_count != 0) { #if !defined(MAX_PERF) if (m->wire_count > 1) { - panic("vm_page_free: invalid wire count (%d), pindex: 0x%x", - m->wire_count, m->pindex); + panic("vm_page_free: invalid wire count (%d), pindex: 0x%lx", + m->wire_count, (long)m->pindex); } #endif printf("vm_page_free: freeing wired page\n"); @@ -1332,7 +1332,8 @@ vm_page_cache(m) vm_page_protect(m, VM_PROT_NONE); #if !defined(MAX_PERF) if (m->dirty != 0) { - panic("vm_page_cache: caching a dirty page, pindex: %d", m->pindex); + panic("vm_page_cache: caching a dirty page, pindex: %ld", + (long)m->pindex); } #endif s = splvm(); diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 1115ba93fcd0..2504bd8f65f2 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -38,7 +38,7 @@ * SUCH DAMAGE. * * from: @(#)vnode_pager.c 7.5 (Berkeley) 4/20/91 - * $Id: vnode_pager.c,v 1.110 1999/05/15 23:42:39 dt Exp $ + * $Id: vnode_pager.c,v 1.111 1999/06/26 02:46:50 mckusick Exp $ */ /* @@ -902,8 +902,8 @@ vnode_pager_generic_putpages(vp, m, bytecount, flags, rtvals) rtvals[i] = VM_PAGER_AGAIN; if ((int) m[0]->pindex < 0) { - printf("vnode_pager_putpages: attempt to write meta-data!!! -- 0x%x(%x)\n", - m[0]->pindex, m[0]->dirty); + printf("vnode_pager_putpages: attempt to write meta-data!!! -- 0x%lx(%x)\n", + (long)m[0]->pindex, m[0]->dirty); rtvals[0] = VM_PAGER_BAD; return VM_PAGER_BAD; }