From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMYC1-0001ue-Bt for qemu-devel@nongnu.org; Sun, 09 Mar 2014 03:30:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMYBv-0006An-R5 for qemu-devel@nongnu.org; Sun, 09 Mar 2014 03:30:41 -0400 Received: from mail-ee0-x234.google.com ([2a00:1450:4013:c00::234]:43206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMYBv-00069r-JT for qemu-devel@nongnu.org; Sun, 09 Mar 2014 03:30:35 -0400 Received: by mail-ee0-f52.google.com with SMTP id e49so2470887eek.25 for ; Sat, 08 Mar 2014 23:30:33 -0800 (PST) Sender: Paolo Bonzini Message-ID: <531C1894.8020804@redhat.com> Date: Sun, 09 Mar 2014 08:30:28 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1394304438-14848-1-git-send-email-l@dorileo.org> <1394304438-14848-3-git-send-email-l@dorileo.org> In-Reply-To: <1394304438-14848-3-git-send-email-l@dorileo.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 2/2] qemu-img: migrate to use qemu-arg List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leandro Dorileo , qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Maydell , Fam Zheng , Stefan Weil , Michael Tokarev , Stefan Hajnoczi , Laszlo Ersek , Peter Lieven Il 08/03/2014 19:47, Leandro Dorileo ha scritto: > Remove the arg parsing implementations using getopt and use qemu-arg. > Also remove the qemu-img-cmds.hx since it's now generated on building time, > adapted the build system to generate the .hx file using the qemu-img itself > using the qemu-arg internal command generate-hx. > > Signed-off-by: Leandro Dorileo This makes it much harder to cross-compile QEMU. Also, I wonder how hard it would be to apply the same approach to the main QEMU binary which already uses QemuOpts for its more complex arguments; for sure you risk that accumulating multiple layers of abstractions makes the code even harder to read than it is now. Paolo