sim-se: create Proc out files in out dir

Redirected output files from Process objects were being
created in the current directory instead of in the
output directory.

Change-Id: Ieb6ab5556fbcc811f4f24910da247d4dcdbc71bd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12122
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Steve Reinhardt
2018-04-18 16:41:32 -04:00
committed by Brandon Potter
parent ae891622fa
commit 5ad8040a4b

View File

@@ -43,6 +43,7 @@
#include <string>
#include "base/logging.hh"
#include "base/output.hh"
#include "params/Process.hh"
#include "sim/fd_entry.hh"
@@ -311,7 +312,8 @@ FDArray::openInputFile(std::string const& filename) const
int
FDArray::openOutputFile(std::string const& filename) const
{
return openFile(filename, O_WRONLY | O_CREAT | O_TRUNC, 0664);
return openFile(simout.resolve(filename),
O_WRONLY | O_CREAT | O_TRUNC, 0664);
}
std::shared_ptr<FDEntry>