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();
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"