Thu Jan 15 12:35:13 2009 UTC ()
use PRIu64 format to print major and minor dev_t
from Wojciech Galazka on current-users@


(rtr)
diff -r1.55 -r1.56 src/sys/arch/hp700/hp700/machdep.c

cvs diff -r1.55 -r1.56 src/sys/arch/hp700/hp700/Attic/machdep.c (expand / switch to unified diff)

--- src/sys/arch/hp700/hp700/Attic/machdep.c 2008/12/16 22:35:23 1.55
+++ src/sys/arch/hp700/hp700/Attic/machdep.c 2009/01/15 12:35:13 1.56
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: machdep.c,v 1.55 2008/12/16 22:35:23 christos Exp $ */ 1/* $NetBSD: machdep.c,v 1.56 2009/01/15 12:35:13 rtr Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matthew Fredette. 8 * by Matthew Fredette.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -53,27 +53,27 @@ @@ -53,27 +53,27 @@
53 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 53 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
54 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 54 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
55 * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, 55 * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT,
56 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 56 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
57 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 57 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
58 * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 58 * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
59 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 59 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
60 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 60 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
61 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 61 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
62 * THE POSSIBILITY OF SUCH DAMAGE. 62 * THE POSSIBILITY OF SUCH DAMAGE.
63 */ 63 */
64 64
65#include <sys/cdefs.h> 65#include <sys/cdefs.h>
66__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.55 2008/12/16 22:35:23 christos Exp $"); 66__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.56 2009/01/15 12:35:13 rtr Exp $");
67 67
68#include "opt_cputype.h" 68#include "opt_cputype.h"
69#include "opt_ddb.h" 69#include "opt_ddb.h"
70#include "opt_kgdb.h" 70#include "opt_kgdb.h"
71#include "opt_useleds.h" 71#include "opt_useleds.h"
72#include "opt_power_switch.h" 72#include "opt_power_switch.h"
73 73
74#include <sys/param.h> 74#include <sys/param.h>
75#include <sys/systm.h> 75#include <sys/systm.h>
76#include <sys/signalvar.h> 76#include <sys/signalvar.h>
77#include <sys/kernel.h> 77#include <sys/kernel.h>
78#include <sys/proc.h> 78#include <sys/proc.h>
79#include <sys/buf.h> 79#include <sys/buf.h>
@@ -1598,30 +1598,32 @@ dumpsys(void) @@ -1598,30 +1598,32 @@ dumpsys(void)
1598 1598
1599 if (dumpdev == NODEV) 1599 if (dumpdev == NODEV)
1600 return; 1600 return;
1601 bdev = bdevsw_lookup(dumpdev); 1601 bdev = bdevsw_lookup(dumpdev);
1602 if (bdev == NULL) 1602 if (bdev == NULL)
1603 return; 1603 return;
1604 1604
1605 /* Save registers 1605 /* Save registers
1606 savectx(&dumppcb); */ 1606 savectx(&dumppcb); */
1607 1607
1608 if (dumpsize == 0) 1608 if (dumpsize == 0)
1609 cpu_dumpconf(); 1609 cpu_dumpconf();
1610 if (dumplo <= 0) { 1610 if (dumplo <= 0) {
1611 printf("\ndump to dev %x not possible\n", dumpdev); 1611 printf("\ndump to dev %" PRIu64 ",%" PRIu64 " not possible\n",
 1612 major(dumpdev), minor(dumpdev));
1612 return; 1613 return;
1613 } 1614 }
1614 printf("\ndumping to dev %x, offset %ld\n", dumpdev, dumplo); 1615 printf("\ndumping to dev %" PRIu64 ",%" PRIu64 " offset %ld\n",
 1616 major(dumpdev), minor(dumpdev), dumplo);
1615 1617
1616 psize = (*bdev->d_psize)(dumpdev); 1618 psize = (*bdev->d_psize)(dumpdev);
1617 printf("dump "); 1619 printf("dump ");
1618 if (psize == -1) { 1620 if (psize == -1) {
1619 printf("area unavailable\n"); 1621 printf("area unavailable\n");
1620 return; 1622 return;
1621 } 1623 }
1622 1624
1623 if (!(error = cpu_dump())) { 1625 if (!(error = cpu_dump())) {
1624 1626
1625 /* XXX fredette - this is way broken: */ 1627 /* XXX fredette - this is way broken: */
1626 bytes = ctob(physmem); 1628 bytes = ctob(physmem);
1627 maddr = NULL; 1629 maddr = NULL;