dev: Terminal output's dump name conflicts
authorAndrea Mondelli <Andrea.Mondelli@ucf.edu>
Tue, 17 Sep 2019 18:20:37 +0000 (14:20 -0400)
committerAndrea Mondelli <Andrea.Mondelli@ucf.edu>
Thu, 19 Sep 2019 21:46:32 +0000 (21:46 +0000)
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 <giacomo.travaglini@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/dev/serial/Terminal.py
src/dev/serial/terminal.cc

index 534010456555f583eff5712a0cf87238c9840cfc..e6cc6a9fa8dbc84fa69af5953eee4b55a1f33db5 100644 (file)
@@ -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'
index 002a2ebb78aa2698da272a4a0f5497f48518771d..ce8e214f7eb351f255654e2102e23165771124ab 100644 (file)
@@ -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);