From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCvDX-0006iJ-Tn for qemu-devel@nongnu.org; Fri, 23 Aug 2013 13:32:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCvDS-0006qv-Gi for qemu-devel@nongnu.org; Fri, 23 Aug 2013 13:32:11 -0400 Received: from cantor2.suse.de ([195.135.220.15]:54024 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCvDS-0006q0-73 for qemu-devel@nongnu.org; Fri, 23 Aug 2013 13:32:06 -0400 Message-ID: <52179C90.0@suse.de> Date: Fri, 23 Aug 2013 19:32:00 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <52178546.6080702@redhat.com> In-Reply-To: <52178546.6080702@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [QEMU-1.6 PATCH] vl.c: Output error on invalid machine type provided List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Novotny Cc: qemu-devel@nongnu.org, Anthony Liguori Am 23.08.2013 17:52, schrieb Michal Novotny: > Ping? There are reviews already? Anybody to apply it? There is no submaintainer for vl.c, so it must go through Anthony. Anthony uses the patches tool for such patches and there is an unresolved review comment from Eric, so please respin. Following Eric's remarks it should be [PATCH v6] then (this one should've been [PATCH for-1.6 v5]). Additionally... > On 08/12/2013 06:34 PM, Michal Novotny wrote: >> Output error message using qemu's error_report() function when user "QEMU's" (or shorter: "using error_report() when") >> provides the invalid machine type on the command line. This also saves >> time to find what issue is when you downgrade from one version of qemu "what the issue is", "QEMU" >> to another that doesn't support required machine type yet (the version >> user downgraded to have to have this patch applied too, of course). If you want to have this patch backported to 1.6 and (with error_report() replaced) earlier versions then you need to add a line "Cc: qemu-stable@nongnu.org" to the commit message. >> >> Signed-off-by: Michal Novotny >> --- >> vl.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/vl.c b/vl.c >> index f422a1c..9b4a3f9 100644 >> --- a/vl.c >> +++ b/vl.c >> @@ -2671,6 +2671,11 @@ static QEMUMachine *machine_parse(const char *n= ame) >> if (machine) { >> return machine; >> } >> + >> + if (name && !is_help_option(name)) { >> + error_report("Unsupported machine type"); Not seeing a change log below --- nor remembering it, was name intentionally not incorporated into the error message via '%s'? I'd consider that handy when the person getting the error is not the one typing the command, such as libvirt. Either way this is an improvement, Reviewed-by: Andreas F=E4rber Regards, Andreas >> + } >> + >> printf("Supported machines are:\n"); >> for (m =3D first_machine; m !=3D NULL; m =3D m->next) { >> if (m->alias) { --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg