summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorDam Sunwoo <dam.sunwoo@arm.com>2012-01-31 07:46:04 -0800
committerDam Sunwoo <dam.sunwoo@arm.com>2012-01-31 07:46:04 -0800
commit0ed3c84c7b05d7d3c9d5f0e3f1c05c20afef93b9 (patch)
tree9663b1af4da7ee4c063fa0047da7cbf7e8a2b9de /src/base
parentaf6aaf258171027af8d3cf0ef86dddff501a3ccb (diff)
downloadgem5-0ed3c84c7b05d7d3c9d5f0e3f1c05c20afef93b9.tar.xz
util: implements "writefile" gem5 op to export file from guest to host filesystem
Usage: m5 writefile <filename> 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.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/output.hh14
1 files changed, 7 insertions, 7 deletions
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