summaryrefslogtreecommitdiff
path: root/src/dev
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev')
-rw-r--r--src/dev/arm/hdlcd.cc4
-rw-r--r--src/dev/arm/hdlcd.hh3
-rw-r--r--src/dev/arm/pl111.cc7
-rw-r--r--src/dev/arm/pl111.hh3
-rw-r--r--src/dev/net/etherdump.cc2
-rw-r--r--src/dev/terminal.cc14
-rw-r--r--src/dev/terminal.hh3
7 files changed, 18 insertions, 18 deletions
diff --git a/src/dev/arm/hdlcd.cc b/src/dev/arm/hdlcd.cc
index 2c402b00a..b04de21bf 100644
--- a/src/dev/arm/hdlcd.cc
+++ b/src/dev/arm/hdlcd.cc
@@ -544,8 +544,8 @@ HDLcd::pxlFrameDone()
}
assert(pic);
- pic->seekp(0);
- bmp.write(*pic);
+ pic->stream()->seekp(0);
+ bmp.write(*pic->stream());
}
}
diff --git a/src/dev/arm/hdlcd.hh b/src/dev/arm/hdlcd.hh
index 721935457..acce6f191 100644
--- a/src/dev/arm/hdlcd.hh
+++ b/src/dev/arm/hdlcd.hh
@@ -81,6 +81,7 @@
#include "base/bitmap.hh"
#include "base/framebuffer.hh"
+#include "base/output.hh"
#include "dev/arm/amba_device.hh"
#include "dev/pixelpump.hh"
#include "sim/serialize.hh"
@@ -347,7 +348,7 @@ class HDLcd: public AmbaDmaDevice
Bitmap bmp;
/** Picture of what the current frame buffer looks like */
- std::ostream *pic;
+ OutputStream *pic;
/** Cached pixel converter, set when the converter is enabled. */
PixelConverter conv;
diff --git a/src/dev/arm/pl111.cc b/src/dev/arm/pl111.cc
index 179f1bf2d..23ffe58c9 100644
--- a/src/dev/arm/pl111.cc
+++ b/src/dev/arm/pl111.cc
@@ -523,11 +523,12 @@ Pl111::dmaDone()
DPRINTF(PL111, "-- write out frame buffer into bmp\n");
if (!pic)
- pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true);
+ pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()),
+ true);
assert(pic);
- pic->seekp(0);
- bmp.write(*pic);
+ pic->stream()->seekp(0);
+ bmp.write(*pic->stream());
}
// schedule the next read based on when the last frame started
diff --git a/src/dev/arm/pl111.hh b/src/dev/arm/pl111.hh
index a55e8b8c3..aea78709c 100644
--- a/src/dev/arm/pl111.hh
+++ b/src/dev/arm/pl111.hh
@@ -51,6 +51,7 @@
#include "base/bitmap.hh"
#include "base/framebuffer.hh"
+#include "base/output.hh"
#include "dev/arm/amba_device.hh"
#include "params/Pl111.hh"
#include "sim/serialize.hh"
@@ -268,7 +269,7 @@ class Pl111: public AmbaDmaDevice
Bitmap bmp;
/** Picture of what the current frame buffer looks like */
- std::ostream *pic;
+ OutputStream *pic;
/** Frame buffer width - pixels per line */
uint16_t width;
diff --git a/src/dev/net/etherdump.cc b/src/dev/net/etherdump.cc
index c537fbf57..1fe462764 100644
--- a/src/dev/net/etherdump.cc
+++ b/src/dev/net/etherdump.cc
@@ -45,7 +45,7 @@
using std::string;
EtherDump::EtherDump(const Params *p)
- : SimObject(p), stream(simout.create(p->file, true)),
+ : SimObject(p), stream(simout.create(p->file, true)->stream()),
maxlen(p->maxlen)
{
}
diff --git a/src/dev/terminal.cc b/src/dev/terminal.cc
index 6db43ef88..53e593f85 100644
--- a/src/dev/terminal.cc
+++ b/src/dev/terminal.cc
@@ -108,18 +108,14 @@ Terminal::DataEvent::process(int revent)
*/
Terminal::Terminal(const Params *p)
: SimObject(p), termDataAvail(NULL), listenEvent(NULL), dataEvent(NULL),
- number(p->number), data_fd(-1), txbuf(16384), rxbuf(16384), outfile(NULL)
+ number(p->number), data_fd(-1), txbuf(16384), rxbuf(16384),
+ outfile(p->output ? simout.findOrCreate(p->name) : NULL)
#if TRACING_ON == 1
, linebuf(16384)
#endif
{
- if (p->output) {
- outfile = simout.find(p->name);
- if (!outfile)
- outfile = simout.create(p->name);
-
- outfile->setf(ios::unitbuf);
- }
+ if (outfile)
+ outfile->stream()->setf(ios::unitbuf);
if (p->port)
listen(p->port);
@@ -347,7 +343,7 @@ Terminal::out(char c)
write(c);
if (outfile)
- outfile->write(&c, 1);
+ outfile->stream()->write(&c, 1);
DPRINTF(TerminalVerbose, "out: \'%c\' %#02x\n",
isprint(c) ? c : ' ', (int)c);
diff --git a/src/dev/terminal.hh b/src/dev/terminal.hh
index 82246b2c1..41c2a9e26 100644
--- a/src/dev/terminal.hh
+++ b/src/dev/terminal.hh
@@ -46,6 +46,7 @@
#include "params/Terminal.hh"
#include "sim/sim_object.hh"
+class OutputStream;
class TerminalListener;
class Terminal : public SimObject
@@ -111,7 +112,7 @@ class Terminal : public SimObject
protected:
CircleBuf<char> txbuf;
CircleBuf<char> rxbuf;
- std::ostream *outfile;
+ OutputStream *outfile;
#if TRACING_ON == 1
CircleBuf<char> linebuf;
#endif