Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Apr 1997 22:33:57 +0200 (CEST)
From:      Philippe Charnier <charnier@xp11.frmug.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/3376: incorrect output from kdump
Message-ID:  <199704222033.WAA07143@xp11.frmug.org>
Resent-Message-ID: <199704231730.KAA11548@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         3376
>Category:       bin
>Synopsis:       incorrect output from kdump
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 23 10:30:02 PDT 1997
>Last-Modified:
>Originator:     Philippe Charnier
>Organization:
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

	

>Description:

When running kdump, I found:
       "i"
  4848 ksh      RET   read 1
  4848 ksh      CALL  read(0,0x3498c,0x1)
  4848 ksh      GIO   fd 0 read 1 bytes
       "t"
  4848 ksh      RET   read 1
  4848 ksh      CALL  read(0,0x3498c,0x1)
  4848 ksh      GIO   fd 0 read 1 bytes            <-- should be '1 byte'
       "                                           <-- \n should be printed
       "
  4848 ksh      RET   read 1

>How-To-Repeat:

$ ktrace /usr/local/bin/ksh 
$ exit
$ 

>Fix:
	

Index: kdump.c
===================================================================
RCS file: /home2h/FreeBSD.cvsroot/src/usr.bin/kdump/kdump.c,v
retrieving revision 1.9
diff -u -r1.9 kdump.c
--- kdump.c	1997/03/29 04:30:10	1.9
+++ kdump.c	1997/04/22 20:21:27
@@ -368,14 +368,15 @@
 		else
 			screenwidth = 80;
 	}
-	printf("fd %d %s %d bytes\n", ktr->ktr_fd,
-		ktr->ktr_rw == UIO_READ ? "read" : "wrote", datalen);
+	printf("fd %d %s %d byte%s\n", ktr->ktr_fd,
+		ktr->ktr_rw == UIO_READ ? "read" : "wrote", datalen,
+		datalen == 1 ? "" : "s");
 	if (maxdata && datalen > maxdata)
 		datalen = maxdata;
 	(void)printf("       \"");
 	col = 8;
 	for (;datalen > 0; datalen--, dp++) {
-		(void) vis(visbuf, *dp, VIS_CSTYLE, *(dp+1));
+		(void) vis(visbuf, *dp, VIS_CSTYLE|VIS_NL, *(dp+1));
 		cp = visbuf;
 		/*
 		 * Keep track of printables and
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704222033.WAA07143>