From b7bf68e287da0bda044e9b5e8366169fad86c27a Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Tue, 20 Feb 2018 11:52:25 -0600 Subject: 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 Reviewed-by: Anouk Van Laer Reviewed-on: https://gem5-review.googlesource.com/10026 Reviewed-by: Gabe Black Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power --- src/base/vnc/vncserver.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/base') diff --git a/src/base/vnc/vncserver.cc b/src/base/vnc/vncserver.cc index 97515ac16..a37f1dd5e 100644 --- a/src/base/vnc/vncserver.cc +++ b/src/base/vnc/vncserver.cc @@ -174,11 +174,8 @@ VncServer::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); -- cgit v1.2.3