diff mbox

[1/4] monitor: print hub port name during info network

Message ID 1422860798-17495-1-git-send-email-jasowang@redhat.com
State New
Headers show

Commit Message

Jason Wang Feb. 2, 2015, 7:06 a.m. UTC
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 net/hub.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Stefan Hajnoczi Feb. 6, 2015, 2:06 p.m. UTC | #1
On Mon, Feb 02, 2015 at 03:06:35PM +0800, Jason Wang wrote:
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
>  net/hub.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Thanks, applied to my net tree:
https://github.com/stefanha/qemu/commits/net

Stefan
diff mbox

Patch

diff --git a/net/hub.c b/net/hub.c
index 7e0f2d6..ef09d5f 100644
--- a/net/hub.c
+++ b/net/hub.c
@@ -245,9 +245,12 @@  void net_hub_info(Monitor *mon)
     QLIST_FOREACH(hub, &hubs, next) {
         monitor_printf(mon, "hub %d\n", hub->id);
         QLIST_FOREACH(port, &hub->ports, next) {
+            monitor_printf(mon, " \\ %s", port->nc.name);
             if (port->nc.peer) {
-                monitor_printf(mon, " \\ ");
+                monitor_printf(mon, ": ");
                 print_net_client(mon, port->nc.peer);
+            } else {
+                monitor_printf(mon, "\n");
             }
         }
     }