[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 1/8] slirp: Give error message if hostfwd_add/remov
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 1/8] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack |
Date: |
Fri, 18 Jul 2014 18:09:06 +0400 |
From: Peter Maydell <address@hidden>
If the user specified a (vlan ID, slirp stack name) tuple in a monitor
hostfwd_add/remove command and we can't find it, give the user an
error message rather than silently doing nothing.
This brings this error case in slirp_lookup() into line with the
other two.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Michael Tokarev <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
net/slirp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/slirp.c b/net/slirp.c
index 8fddc03..647039e 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -282,6 +282,7 @@ static SlirpState *slirp_lookup(Monitor *mon, const char
*vlan,
NetClientState *nc;
nc = net_hub_find_client_by_name(strtol(vlan, NULL, 0), stack);
if (!nc) {
+ monitor_printf(mon, "unrecognized (vlan-id, stackname) pair\n");
return NULL;
}
if (strcmp(nc->model, "user")) {
--
1.7.10.4
- [Qemu-trivial] [PULL for-2.1 0/8] Trivial patches for 2014-07-18, Michael Tokarev, 2014/07/18
- [Qemu-trivial] [PULL 7/8] migration: Add missing 'static' attribute, Michael Tokarev, 2014/07/18
- [Qemu-trivial] [PULL 2/8] Fix new typos in comments (found by codespell), Michael Tokarev, 2014/07/18
- [Qemu-trivial] [PULL 5/8] hw/usb: Add missing 'static' attribute, Michael Tokarev, 2014/07/18
- [Qemu-trivial] [PULL 4/8] doc: slirp supports ICMP echo if enabled in Linux, Michael Tokarev, 2014/07/18
- [Qemu-trivial] [PULL 6/8] qga: Add missing 'static' attribute, Michael Tokarev, 2014/07/18
- [Qemu-trivial] [PULL 1/8] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack,
Michael Tokarev <=
- [Qemu-trivial] [PULL 8/8] tests: Add missing 'static' attributes (fix warnings from smatch), Michael Tokarev, 2014/07/18
- [Qemu-trivial] [PULL 3/8] qemu-img: Remove redundancy "ret = -1", Michael Tokarev, 2014/07/18
- Re: [Qemu-trivial] [Qemu-devel] [PULL for-2.1 0/8] Trivial patches for 2014-07-18, Peter Maydell, 2014/07/21