From dc2db5cf9b5f782912569fd2be8be69fa71da33c Mon Sep 17 00:00:00 2001 From: Andrea Mondelli Date: Tue, 17 Sep 2019 14:20:37 -0400 Subject: dev: Terminal output's dump name conflicts The recently Terminal dump options name introduced in patch 1c72e90 conflict with MacOS stdio.h header. From stdio.h: #define stdin __stdinp #define stdout __stdoutp #define stderr __stderrp To remove this conflict, the TerminalDump options are renamed. Change-Id: I1b60fa1031328fc32d6a58bf7889b6e479d95219 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20959 Reviewed-by: Giacomo Travaglini Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/dev/serial/Terminal.py | 2 +- src/dev/serial/terminal.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dev/serial/Terminal.py b/src/dev/serial/Terminal.py index 534010456..e6cc6a9fa 100644 --- a/src/dev/serial/Terminal.py +++ b/src/dev/serial/Terminal.py @@ -44,7 +44,7 @@ from m5.proxy import * from m5.objects.Serial import SerialDevice -class TerminalDump(Enum): vals = ["none", "stdout", "stderr", "file"] +class TerminalDump(Enum): vals = ["none", "stdoutput", "stderror", "file"] class Terminal(SerialDevice): type = 'Terminal' diff --git a/src/dev/serial/terminal.cc b/src/dev/serial/terminal.cc index 002a2ebb7..ce8e214f7 100644 --- a/src/dev/serial/terminal.cc +++ b/src/dev/serial/terminal.cc @@ -151,9 +151,9 @@ Terminal::terminalDump(const TerminalParams* p) switch (p->outfile) { case Enums::TerminalDump::none: return nullptr; - case Enums::TerminalDump::stdout: + case Enums::TerminalDump::stdoutput: return simout.findOrCreate("stdout"); - case Enums::TerminalDump::stderr: + case Enums::TerminalDump::stderror: return simout.findOrCreate("stderr"); case Enums::TerminalDump::file: return simout.findOrCreate(p->name); -- cgit v1.2.3