Received: from [140.186.70.92] (port=52300 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSPUP-00033l-PZ for qemu-devel@nongnu.org; Sat, 26 Jun 2010 03:07:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OSPUO-0005m3-GY for qemu-devel@nongnu.org; Sat, 26 Jun 2010 03:07:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54898) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OSPUO-0005lu-6X for qemu-devel@nongnu.org; Sat, 26 Jun 2010 03:07:44 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5Q77hXe011987 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 26 Jun 2010 03:07:43 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 06/19] Convert drive options to use enumeration data type References: <1275921752-29420-1-git-send-email-berrange@redhat.com> <1275921752-29420-7-git-send-email-berrange@redhat.com> Date: Sat, 26 Jun 2010 09:07:41 +0200 In-Reply-To: <1275921752-29420-7-git-send-email-berrange@redhat.com> (Daniel P. Berrange's message of "Mon, 7 Jun 2010 15:42:19 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org "Daniel P. Berrange" writes: > This converts the drive options if, trans, media, cache, aio, > rerror and werror to use the QEMU_OPT_ENUM datatype. This > standardizes the string parsing and error reporting > > $ qemu -drive file=foo,werror=stop3 > qemu: -drive file=foo,if=mtd,werror=stop3: Parameter 'werror' expects report, ignore, enospc, stop > > $ qemu -readconfig bar.cfg > qemu:bar.cfg:6: Parameter 'werror' expects report, ignore, enospc, stop > read config bar.cfg: Invalid argument > > * block.c: Implementations for all enumerations > * block.h, sysemu.h: Declare enumerations > * qemu-config.c: Convert if, trans, media, cache, aio, > rerror and werror to use the QEMU_OPT_ENUM > * vl.c: Remove handcrafted string -> int conversions in drive_init > > Signed-off-by: Daniel P. Berrange Conflicts mightily with my work, but I love it anyway :)