From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58027 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pf9Gw-0007i6-3q for qemu-devel@nongnu.org; Tue, 18 Jan 2011 05:58:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pf9Gu-00061V-SU for qemu-devel@nongnu.org; Tue, 18 Jan 2011 05:58:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pf9Gu-00061H-60 for qemu-devel@nongnu.org; Tue, 18 Jan 2011 05:58:44 -0500 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.13.8/8.13.8) with ESMTP id p0IAwhsj022783 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 18 Jan 2011 05:58:43 -0500 Received: from playa.tlv.redhat.com (dhcp-3-210.tlv.redhat.com [10.35.3.210]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p0IAwfYX027054 for ; Tue, 18 Jan 2011 05:58:42 -0500 From: Alon Levy Date: Tue, 18 Jan 2011 12:58:37 +0200 Message-Id: <1295348320-32099-1-git-send-email-alevy@redhat.com> Subject: [Qemu-devel] [PATCH 0/3] add PROP_TYPE_ENUM and print_options callback List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This patchset allows a new property type called PROP_TYPE_ENUM, I want to use it for the backend property in the ccid patches (will send the patchset that uses it after this), libvirt is the ultimate user. The first patch adds a print_options callback that works with this property type to print the optional values. The second patch allows storing the name/value mapping in the property, using a void ptr for later different uses. The third patch adds the property itself. Alon Levy (3): qdev: add print_options callback qdev: add data pointer to Property qdev-properties: add PROP_TYPE_ENUM hw/qdev-properties.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ hw/qdev.c | 10 +++++++- hw/qdev.h | 17 ++++++++++++++ 3 files changed, 86 insertions(+), 1 deletions(-) -- 1.7.3.4