Received: from eggs.gnu.org ([2001:4830:134:3::10]:47076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X80cx-0004Zh-7A for qemu-devel@nongnu.org; Fri, 18 Jul 2014 01:22:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X80cs-0006UD-P5 for qemu-devel@nongnu.org; Fri, 18 Jul 2014 01:22:39 -0400 Message-ID: <53C8AF0D.2060508@msgid.tls.msk.ru> Date: Fri, 18 Jul 2014 09:22:21 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1402933631-3276-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , QEMU Developers Cc: QEMU Trivial , Jan Kiszka , Patch Tracking 08.07.2014 15:39, Peter Maydell wrote: > On 26 June 2014 13:35, Peter Maydell wrote: >> On 16 June 2014 16:47, Peter Maydell wrote: >>> 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 >>> --- >>> 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")) { Reviewed-by: Michael Tokarev Peter, I returned from vacation yesterday, so I weren't able to process -trivial queue before, and due to the time constraints we have before 2.1, I'm not sure it is a good idea to make a pull request for the -trivial tree. I'll pick this one up but it might be better to apply this directly. Thanks, /mjt