From: Michael Tokarev <mjt@tls.msk.ru>
To: Peter Maydell <peter.maydell@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
Jan Kiszka <jan.kiszka@siemens.com>,
Patch Tracking <patches@linaro.org>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack
Date: Fri, 18 Jul 2014 09:22:21 +0400 [thread overview]
Message-ID: <53C8AF0D.2060508@msgid.tls.msk.ru> (raw)
In-Reply-To: <CAFEAcA-1r0DkyT8+VuSSTRrkKX5GGQb32VzZ42KqS_-TW+0GYw@mail.gmail.com>
08.07.2014 15:39, Peter Maydell wrote:
> On 26 June 2014 13:35, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 16 June 2014 16:47, Peter Maydell <peter.maydell@linaro.org> 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 <peter.maydell@linaro.org>
>>> ---
>>> 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 <mjt@tls.msk.ru>
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
WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: Peter Maydell <peter.maydell@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
Jan Kiszka <jan.kiszka@siemens.com>,
Patch Tracking <patches@linaro.org>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack
Date: Fri, 18 Jul 2014 09:22:21 +0400 [thread overview]
Message-ID: <53C8AF0D.2060508@msgid.tls.msk.ru> (raw)
In-Reply-To: <CAFEAcA-1r0DkyT8+VuSSTRrkKX5GGQb32VzZ42KqS_-TW+0GYw@mail.gmail.com>
08.07.2014 15:39, Peter Maydell wrote:
> On 26 June 2014 13:35, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 16 June 2014 16:47, Peter Maydell <peter.maydell@linaro.org> 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 <peter.maydell@linaro.org>
>>> ---
>>> 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 <mjt@tls.msk.ru>
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
next prev parent reply other threads:[~2014-07-18 5:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 15:47 [Qemu-devel] [PATCH] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack Peter Maydell
2014-06-26 12:35 ` [Qemu-trivial] " Peter Maydell
2014-06-26 12:35 ` Peter Maydell
2014-07-08 11:39 ` [Qemu-trivial] " Peter Maydell
2014-07-08 11:39 ` Peter Maydell
2014-07-18 5:22 ` Michael Tokarev [this message]
2014-07-18 5:22 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-07-18 7:13 ` [Qemu-trivial] [Qemu-devel] " Peter Maydell
2014-07-18 7:13 ` [Qemu-devel] [Qemu-trivial] " Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53C8AF0D.2060508@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=jan.kiszka@siemens.com \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.