From: Steve Reinhardt Date: Wed, 18 Apr 2018 20:41:32 +0000 (-0400) Subject: sim-se: create Proc out files in out dir X-Git-Tag: v19.0.0.0~922 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5ad8040a4b3215ec582015fee38c5312033c600a;p=gem5.git 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 Maintainer: Brandon Potter Tested-by: kokoro --- diff --git a/src/sim/fd_array.cc b/src/sim/fd_array.cc index 0600e9ffe..3b0c5879a 100644 --- a/src/sim/fd_array.cc +++ b/src/sim/fd_array.cc @@ -43,6 +43,7 @@ #include #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