From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUbp9-0006gL-A6 for qemu-devel@nongnu.org; Fri, 11 Oct 2013 08:28:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUbp3-0004vB-BJ for qemu-devel@nongnu.org; Fri, 11 Oct 2013 08:28:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUbp3-0004v6-2h for qemu-devel@nongnu.org; Fri, 11 Oct 2013 08:28:01 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9BCS0kQ018272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 11 Oct 2013 08:28:00 -0400 Message-ID: <5257EECE.6060809@redhat.com> Date: Fri, 11 Oct 2013 14:27:58 +0200 From: Max Reitz MIME-Version: 1.0 References: <1381480281-14607-1-git-send-email-famz@redhat.com> <1381480281-14607-3-git-send-email-famz@redhat.com> <5257E67C.5080008@redhat.com> <20131011120733.GB17449@T430s.nay.redhat.com> In-Reply-To: <20131011120733.GB17449@T430s.nay.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/2] vmdk: implment bdrv_get_specific_info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: famz@redhat.com, Eric Blake Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On 2013-10-11 14:07, Fam Zheng wrote: > On Fri, 10/11 05:52, Eric Blake wrote: >> On 10/11/2013 02:31 AM, Fam Zheng wrote: >>> Implement .bdrv_get_specific_info to return the extent information. >>> >>> Signed-off-by: Fam Zheng >>> --- >>> + >>> + *spec_info->vmdk = (ImageInfoSpecificVmdk) { >>> + .create_type = g_strdup(s->create_type), >>> + .cid = s->cid, >>> + }; >>> + >>> >>> ## >>> +# @ImageInfoSpecificVmdk: >>> +# >>> +# @create_type: The create type of VMDK image >> Is it worth making this an enum type rather than an open-coded string? >> But that's not a show-stopper to me. > For now I think a string is good enough, it's only used to display with > qemu-img info, string type saves converting in opening code, as well as > repeating type names in multiple places. Actually, it can be queried through QMP (query-block) as well. But I personally don't oppose using a string here. Max