From 56daea793aa5a078c7985eeae0d1740e301819dc Mon Sep 17 00:00:00 2001 From: Scott Beamer Date: Thu, 17 Sep 2015 23:17:19 -0700 Subject: [PATCH] allow float_fix to take stdin (for piping) --- csrc/float_fix.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/csrc/float_fix.cc b/csrc/float_fix.cc index a488d5c2..e6d2ee22 100644 --- a/csrc/float_fix.cc +++ b/csrc/float_fix.cc @@ -90,6 +90,8 @@ uint64_t UnrecodeFloatFromDouble(uint64_t raw_input) { // - log line is a fld instruction // - unrecoding the writeback data as a single float makes them match void DiffAndFix(std::string rocket_filename, std::string lspike_filename) { + if (rocket_filename == "-") + rocket_filename = "/dev/stdin"; std::ifstream rocket_log(rocket_filename); if (!rocket_log.is_open()) { std::cout << "Couldn't open file " << rocket_filename << std::endl;