Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2013 21:21:46 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r251072 - head/usr.bin/kdump
Message-ID:  <201305282121.r4SLLkT4050770@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Tue May 28 21:21:46 2013
New Revision: 251072
URL: http://svnweb.freebsd.org/changeset/base/251072

Log:
  MFp4 @229085:
  
  Rearrange the code so we don't call ioctl(TIOCGWINSZ) if the -s option is given,
  as the result won't be used then.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/usr.bin/kdump/kdump.c

Modified: head/usr.bin/kdump/kdump.c
==============================================================================
--- head/usr.bin/kdump/kdump.c	Tue May 28 21:05:06 2013	(r251071)
+++ head/usr.bin/kdump/kdump.c	Tue May 28 21:21:46 2013	(r251072)
@@ -1205,6 +1205,11 @@ ktrgenio(struct ktr_genio *ktr, int len)
 	static int screenwidth = 0;
 	int i, binary;
 
+	printf("fd %d %s %d byte%s\n", ktr->ktr_fd,
+		ktr->ktr_rw == UIO_READ ? "read" : "wrote", datalen,
+		datalen == 1 ? "" : "s");
+	if (suppressdata)
+		return;
 	if (screenwidth == 0) {
 		struct winsize ws;
 
@@ -1214,11 +1219,6 @@ ktrgenio(struct ktr_genio *ktr, int len)
 		else
 			screenwidth = 80;
 	}
-	printf("fd %d %s %d byte%s\n", ktr->ktr_fd,
-		ktr->ktr_rw == UIO_READ ? "read" : "wrote", datalen,
-		datalen == 1 ? "" : "s");
-	if (suppressdata)
-		return;
 	if (maxdata && datalen > maxdata)
 		datalen = maxdata;
 



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