From f267dc4a8729179ed99ec591af2ba434cb644755 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Tue, 19 Oct 2004 20:00:20 -0400 Subject: Clean up/standardize handling of various output files. No more non-intuitive behavior shifts depending on whether outputDirectory is set (at the expense of backwards compatibility). outputDirectory is now always valid, defaults to ".". dev/etherdump.cc: Use makeOutputStream() to create output file. New behavior: actually complain if dump file can't be opened, instead of quietly ignoring the problem. dev/etherdump.hh: dev/simconsole.cc: dev/simconsole.hh: Use makeOutputStream() to create output file. sim/builder.cc: sim/builder.hh: sim/main.cc: builderStream() is now *configStream. sim/serialize.cc: outputDirectory is now always valid, no need to check. sim/universe.cc: Clean up/standardize handling of various output files. No more non-intuitive behavior shifts depending on whether outputDirectory is set (at the expense of backwards compatibility). outputDirectory is now always valid, defaults to ".". New function makeOutputStream() does "the right thing" to associate a stream with a filename. --HG-- extra : convert_revision : a03c58c547221b3906e0d6f55e4a569843f2d646 --- sim/serialize.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sim/serialize.cc') diff --git a/sim/serialize.cc b/sim/serialize.cc index 91548f653..2a5e3d398 100644 --- a/sim/serialize.cc +++ b/sim/serialize.cc @@ -335,10 +335,7 @@ SerializeParamContext::checkParams() if (serialize_dir.isValid()) { checkpointDirBase = serialize_dir; } else { - if (outputDirectory.empty()) - checkpointDirBase = "m5.%012d"; - else - checkpointDirBase = outputDirectory + "cpt.%012d"; + checkpointDirBase = outputDirectory + "cpt.%012d"; } // guarantee that directory ends with a '/' -- cgit v1.2.3