svn commit: r299995 - head/usr.bin/kdump

Simon J. Gerraty sjg at FreeBSD.org
Tue May 17 00:08:44 UTC 2016


Author: sjg
Date: Tue May 17 00:08:43 2016
New Revision: 299995
URL: https://svnweb.freebsd.org/changeset/base/299995

Log:
  Allow -f - to read from stdin.

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

Modified: head/usr.bin/kdump/kdump.c
==============================================================================
--- head/usr.bin/kdump/kdump.c	Tue May 17 00:00:01 2016	(r299994)
+++ head/usr.bin/kdump/kdump.c	Tue May 17 00:08:43 2016	(r299995)
@@ -298,8 +298,9 @@ main(int argc, char *argv[])
 	m = malloc(size = 1025);
 	if (m == NULL)
 		errx(1, "%s", strerror(ENOMEM));
-	if (!freopen(tracefile, "r", stdin))
-		err(1, "%s", tracefile);
+	if (strcmp(tracefile, "-"))
+		if (!freopen(tracefile, "r", stdin))
+			err(1, "%s", tracefile);
 
 	strerror_init();
 	localtime_init();


More information about the svn-src-head mailing list