Received: from eggs.gnu.org ([2001:4830:134:3::10]:36064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckns3-0007cF-JC for qemu-devel@nongnu.org; Mon, 06 Mar 2017 03:19:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckns0-0002Ui-DN for qemu-devel@nongnu.org; Mon, 06 Mar 2017 03:19:55 -0500 From: Markus Armbruster References: <20170302122429.7737-1-berrange@redhat.com> Date: Mon, 06 Mar 2017 09:19:49 +0100 In-Reply-To: <20170302122429.7737-1-berrange@redhat.com> (Daniel P. Berrange's message of "Thu, 2 Mar 2017 12:24:29 +0000") Message-ID: <87zigy3jh6.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] qmp: allow setting properties to empty string in qmp-shell List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org "Daniel P. Berrange" writes: > The qmp-shell property parser currently rejects attempts to > set string properties to the empty string eg > > (QEMU) migrate-set-parameters tls-hostname= > Error while parsing command line: Expected a key=value pair, got 'tls-hostname=' > command format: [arg-name1=arg1] ... [arg-nameN=argN] > > This is caused by checking the wrong condition after splitting > the parameter on '='. The "partition" method will return "" for > the separator field, if the seperator was not present, so that > is the correct thing to check for malformed syntax. > > Signed-off-by: Daniel P. Berrange I'll take this through my tree, unless qemu-trivial beats me to the punch. Thanks!