Fixed the formatting of some tables (mainly the one produced by ps

in ddb) which I broke by changing %8[l]x to %8p.  Hacked the central
printf routine to not add an "0x" prefix for %p formats if the field
width is nonzero.  The tables are still horribly misformatted on
64-bit machines.

Use %p instead of %8p to print pointers when the field width isn't
important.
This commit is contained in:
Bruce Evans 1998-08-10 14:27:34 +00:00
parent 449cc391d9
commit c41141b002
5 changed files with 15 additions and 14 deletions

View File

@ -47,7 +47,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: if_ie.c,v 1.53 1998/06/07 17:10:32 dfr Exp $
* $Id: if_ie.c,v 1.54 1998/07/13 09:52:59 bde Exp $
*/
/*
@ -2414,8 +2414,8 @@ ie_mc_reset(int unit)
static void
print_rbd(volatile struct ie_recv_buf_desc * rbd)
{
printf("RBD at %8p:\n"
"actual %04x, next %04x, buffer %8p\n"
printf("RBD at %p:\n"
"actual %04x, next %04x, buffer %p\n"
"length %04x, mbz %04x\n",
(void *) rbd,
rbd->ie_rbd_actual, rbd->ie_rbd_next,

View File

@ -47,7 +47,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: if_ie.c,v 1.53 1998/06/07 17:10:32 dfr Exp $
* $Id: if_ie.c,v 1.54 1998/07/13 09:52:59 bde Exp $
*/
/*
@ -2414,8 +2414,8 @@ ie_mc_reset(int unit)
static void
print_rbd(volatile struct ie_recv_buf_desc * rbd)
{
printf("RBD at %8p:\n"
"actual %04x, next %04x, buffer %8p\n"
printf("RBD at %p:\n"
"actual %04x, next %04x, buffer %p\n"
"length %04x, mbz %04x\n",
(void *) rbd,
rbd->ie_rbd_actual, rbd->ie_rbd_next,

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: kern_lkm.c,v 1.51 1998/07/15 06:39:12 bde Exp $
* $Id: kern_lkm.c,v 1.52 1998/07/29 17:38:14 bde Exp $
*/
#include "opt_devfs.h"
@ -238,9 +238,10 @@ lkmcioctl(dev, cmd, data, flag, p)
resrvp->addr = curp->area; /* ret kernel addr */
#ifdef DEBUG
printf("LKM: LMRESERV (actual = %8p)\n", (void *)curp->area);
printf("LKM: LMRESERV (actual = 0x%8p)\n",
(void *)curp->area);
printf("LKM: LMRESERV (adjusted = 0x%08x)\n",
trunc_page(curp->area));
trunc_page(curp->area));
#endif /* DEBUG */
lkm_state = LKMS_RESERVED;
break;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)subr_prf.c 8.3 (Berkeley) 1/21/94
* $Id: subr_prf.c,v 1.47 1998/07/08 10:41:32 bde Exp $
* $Id: subr_prf.c,v 1.48 1998/07/15 02:32:11 bde Exp $
*/
#include <sys/param.h>
@ -497,7 +497,7 @@ reswitch: switch (ch = (u_char)*fmt++) {
case 'p':
ul = (uintptr_t)va_arg(ap, void *);
base = 16;
sharpflag = 1;
sharpflag = (width == 0);
goto nosign;
case 'n':
case 'r':

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: ncr.c,v 1.121 1998/07/12 20:32:52 se Exp $
** $Id: ncr.c,v 1.122 1998/07/14 11:19:32 bde Exp $
**
** Device driver for the NCR 53C810 PCI-SCSI-Controller.
**
@ -1344,7 +1344,7 @@ static void ncr_attach (pcici_t tag, int unit);
static char ident[] =
"\n$Id: ncr.c,v 1.121 1998/07/12 20:32:52 se Exp $\n";
"\n$Id: ncr.c,v 1.122 1998/07/14 11:19:32 bde Exp $\n";
static const u_long ncr_version = NCR_VERSION * 11
+ (u_long) sizeof (struct ncb) * 7
@ -4116,7 +4116,7 @@ static int32_t ncr_start (struct scsi_xfer * xp)
if ((unsigned)xp->datalen > 128*1024*1024) {
PRINT_ADDR(xp);
printf ("trying to transfer %8lx bytes, mem addr = %8p\n",
printf ("trying to transfer %8lx bytes, mem addr = %p\n",
(u_long) xp->datalen, (void *) xp->data);
{
int j;