From 0d2181d9acebe90c21891ceb56b9e9916ffd16c1 Mon Sep 17 00:00:00 2001 From: "Simon J. Gerraty" Date: Tue, 17 May 2016 00:08:43 +0000 Subject: [PATCH] Allow -f - to read from stdin. --- usr.bin/kdump/kdump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index abda217852d8..62e5f17914b5 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -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();