From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VT5AH-0004oe-NC for qemu-devel@nongnu.org; Mon, 07 Oct 2013 03:23:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VT5AB-0003ii-Nj for qemu-devel@nongnu.org; Mon, 07 Oct 2013 03:23:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VT5AB-0003iZ-FL for qemu-devel@nongnu.org; Mon, 07 Oct 2013 03:23:31 -0400 Message-ID: <5252616A.2080704@redhat.com> Date: Mon, 07 Oct 2013 09:23:22 +0200 From: Max Reitz MIME-Version: 1.0 References: <1380717564-11098-1-git-send-email-benoit@irqsave.net> <1380717564-11098-12-git-send-email-benoit@irqsave.net> <524EDB51.40605@redhat.com> <524EDF6D.80906@redhat.com> In-Reply-To: <524EDF6D.80906@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V9 11/11] quorum: Add quorum_open() and quorum_close(). List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , stefanha@redhat.com, qemu-devel@nongnu.org On 2013-10-04 17:31, Eric Blake wrote: > On 10/04/2013 09:14 AM, Max Reitz wrote: >> On 2013-10-02 14:39, Beno=C3=AEt Canet wrote: >>> Example of command line: >>> -drive if=3Dvirtio,file.driver=3Dquorum,\ >>> file.children.0.file.filename=3D1.qcow2,\ >>> file.children.1.file.filename=3D2.qcow2,\ >>> file.children.2.file.filename=3D3.qcow2,\ >>> file.vote_threshold=3D3 >>> >> Third, wouldn't it be better to use children[i] instead of children.i >> for addressing them on the command line? I guess, a QMP interface woul= d >> represent them as an array, so using the standard array index notation >> seems better to me. > No, we already discussed this. file.child[0].file.filename=3D1.qcow2 > requires shell quoting to avoid unintentional shell globbing; > file.child.0.file.filename=3D1.qcow2 is just as legible and can still b= e > reconstructed into an array under the hood, and has the benefit of not > needing quoting to protect against shell globbing. Oh, sorry.I thought escaping wouldn't hurt too much; but well, on second=20 thought, for an interface that's purely designed for the command line=20 it's probably best to avoid the need for it as much as possible. Max