From 0ed3c84c7b05d7d3c9d5f0e3f1c05c20afef93b9 Mon Sep 17 00:00:00 2001 From: Dam Sunwoo Date: Tue, 31 Jan 2012 07:46:04 -0800 Subject: util: implements "writefile" gem5 op to export file from guest to host filesystem Usage: m5 writefile File will be created in the gem5 output folder with the identical filename. Implementation is largely based on the existing "readfile" functionality. Currently does not support exporting of folders. --- src/base/output.hh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/base') diff --git a/src/base/output.hh b/src/base/output.hh index b86e68856..68d9daf85 100644 --- a/src/base/output.hh +++ b/src/base/output.hh @@ -73,6 +73,13 @@ class OutputDirectory */ std::ostream *checkForStdio(const std::string &name) const; + public: + /** Constructor. */ + OutputDirectory(); + + /** Destructor. */ + ~OutputDirectory(); + /** Opens a file (optionally compressed). * * Will open a file as a compressed stream if filename ends in .gz. @@ -84,13 +91,6 @@ class OutputDirectory std::ostream *openFile(const std::string &filename, std::ios_base::openmode mode = std::ios::trunc); - public: - /** Constructor. */ - OutputDirectory(); - - /** Destructor. */ - ~OutputDirectory(); - /** * Sets name of this directory. * @param dir name of this directory -- cgit v1.2.3