summaryrefslogtreecommitdiff
path: root/src/dev/serial/terminal.cc
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2018-02-20 11:52:25 -0600
committerAndreas Sandberg <andreas.sandberg@arm.com>2018-05-09 09:25:32 +0000
commitb7bf68e287da0bda044e9b5e8366169fad86c27a (patch)
treec023b5abc49cd407c2ea22e08656b29b86cec93a /src/dev/serial/terminal.cc
parentc1a2905aa22a7f46a50cb9b86a265923d6af341b (diff)
downloadgem5-b7bf68e287da0bda044e9b5e8366169fad86c27a.tar.xz
base, dev: Fix port message for vnc and terminal
When running gem5, the simulator outputs the following message to describe the ports used by the VNC server and ther terminal: Listening for system connection on port 5900 Listening for system connection on port 3456 The code used to extract the basename ('terminal' or 'vncserver') and print that instead of system. However, this doesn't seem to work any more. Change the code to output the full object name instead. Change-Id: Ib27f66a5f8ba64c7a875b4e2f26a2e2ff48db8f3 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com> Reviewed-on: https://gem5-review.googlesource.com/10026 Reviewed-by: Gabe Black <gabeblack@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/dev/serial/terminal.cc')
-rw-r--r--src/dev/serial/terminal.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/dev/serial/terminal.cc b/src/dev/serial/terminal.cc
index 5e8e52e95..bc8c14c53 100644
--- a/src/dev/serial/terminal.cc
+++ b/src/dev/serial/terminal.cc
@@ -153,11 +153,8 @@ Terminal::listen(int port)
port++;
}
- int p1, p2;
- p2 = name().rfind('.') - 1;
- p1 = name().rfind('.', p2);
- ccprintf(cerr, "Listening for %s connection on port %d\n",
- name().substr(p1+1,p2-p1), port);
+ ccprintf(cerr, "%s: Listening for connections on port %d\n",
+ name(), port);
listenEvent = new ListenEvent(this, listener.getfd(), POLLIN);
pollQueue.schedule(listenEvent);