From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMlaH-0006GR-O8 for qemu-devel@nongnu.org; Sun, 09 Mar 2014 17:48:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMlaB-00068Z-Pl for qemu-devel@nongnu.org; Sun, 09 Mar 2014 17:48:37 -0400 Received: from mail-oa0-f45.google.com ([209.85.219.45]:45081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMlaB-00066i-M5 for qemu-devel@nongnu.org; Sun, 09 Mar 2014 17:48:31 -0400 Received: by mail-oa0-f45.google.com with SMTP id o6so6217134oag.4 for ; Sun, 09 Mar 2014 14:48:30 -0700 (PDT) Date: Sun, 9 Mar 2014 21:47:39 +0000 From: Leandro Dorileo Message-ID: <20140309214739.GA13590@dorilex> References: <1394304438-14848-1-git-send-email-l@dorileo.org> <531C9791.10207@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <531C9791.10207@suse.de> Subject: Re: [Qemu-devel] [PATCH RFC 0/2] qemu-arg: general purpose argument parser List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: Kevin Wolf , Peter Maydell , Fam Zheng , Stefan Weil , Michael Tokarev , qemu-devel@nongnu.org, Stefan Hajnoczi , Paolo Bonzini , Laszlo Ersek , Peter Lieven Hi Andreas, On Sun, Mar 09, 2014 at 05:32:17PM +0100, Andreas Färber wrote: > Am 08.03.2014 19:47, schrieb Leandro Dorileo: > > The following patchset introduces a general purpose argument parser and migrates > > qemu-img to make use of it. qemu-img is just the first user of it, if we see a > > good feedback here I move forward and migrate all the other possible users. > > Why? :) You forgot to describe what's wrong with the current > infrastructure, how your approach is different and what the benefit is. > Indead, I failed miserably on that (describing the problem intended to be solved). The general sense is to unify the argument parsing strategies with some benefits like help generation. If you see, every qemu binary has its own strategy - where some (most?) use getopt and the QEMU main binary uses QemuOpt, they lack a runtine help message generation, the sync between the help message and expected/implemented arguments are done manually. But I'm not sure if we really want/need it, that's the why I sent an early RFC. For me it was just few weekend hours putting all together. :) I see a good benefit on that - having a simple, clean, consistent and common API throughout the source code. But again, do we want it? is it worth it? Regards... -- Leandro Dorileo