From nobody Mon Feb 9 16:51:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584125698; cv=none; d=zohomail.com; s=zohoarc; b=jDEuHDFwnNcucfImyrF2NmS1+q+A/TDUfESDAsZ/UHBQDS5DXfwOgIYt9nMmxpPilXnpDsXKGURGE4P/kJ67bWoXQ1jsPESj6sfqFAGRqEGtUX8UVP/w1TNYKdu9tHJ+pFF52AyJbaSsDX7Ar/zyryFLoZXgUxP+d1teuu9cQfE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584125698; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=L+odCepFdf+oKmvTAs3N2qnqRhrI1h6ro08GqtUbZKA=; b=M4LIh53zIvUsNRod4Bk9tIt5R+lG3Gg4wRfGChe88bvJQLtJ37mc1tyaYgdISuu7D/u0/5mY3eqITFOxOfR7aabNUOpmgSmnmaq7TXFjGCxOgEiyrfwEOMKUldxZJPleVWXdH8SxiC3Pxu2EBMHgJJFnvazGbWpQOO4rTmsKtUw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584125698770195.5234131792979; Fri, 13 Mar 2020 11:54:58 -0700 (PDT) Received: from localhost ([::1]:35596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCpST-0005NV-LO for importer@patchew.org; Fri, 13 Mar 2020 14:54:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35479) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCpKP-000107-7B for qemu-devel@nongnu.org; Fri, 13 Mar 2020 14:46:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCpKO-0006VP-5C for qemu-devel@nongnu.org; Fri, 13 Mar 2020 14:46:37 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:38535 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCpKN-0006UB-UZ for qemu-devel@nongnu.org; Fri, 13 Mar 2020 14:46:36 -0400 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-43-h-E9eXkCMxa8wf0nJXRL-g-1; Fri, 13 Mar 2020 14:46:33 -0400 Received: by mail-wr1-f72.google.com with SMTP id v6so4681004wrg.22 for ; Fri, 13 Mar 2020 11:46:33 -0700 (PDT) Received: from x1w.redhat.com (47.red-88-21-205.staticip.rima-tde.net. [88.21.205.47]) by smtp.gmail.com with ESMTPSA id u8sm34255802wrn.69.2020.03.13.11.46.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2020 11:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584125195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L+odCepFdf+oKmvTAs3N2qnqRhrI1h6ro08GqtUbZKA=; b=GhEqAWO0/bLmyJTyTvTzkRUegLbWXATcjLuITsxcg6FFuJioiIGE7dZ5l6NqeAYhFw7Nlj xBElYDZrcM4lGDpdZbLecNOePpTfzyiLvpML4gs1n1XC1p5dnS3vAbMpfCXptbW2+9saRE ZCscq5a3tbWFZxPGa2RYcXwtayEwDhw= X-MC-Unique: h-E9eXkCMxa8wf0nJXRL-g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xA3+617D9wmcRIrFdm8JishVoWNzKu8Wd1In0oWHLRo=; b=pe1lVg49AqYsDQF0OYHlPkx/naE6OKNC/5AuMrO/2ZhXKYxyiOSQzILNs6S0ftY3J9 E6WuBFiIKUXUtg2Rf2tG7dq2/fjrH3gSBJUHiajOwxZaZ83J+i0dDaBwyZJDKPGeb1Gu /utJpYBmQqqeOThBXTxFqO1IBN5n8sNgfAn02jJKWzkE693+Q1zmAmpqg856eHq3vCKi u0gS8373QT4MpcKCSSds6hDXJ0eEFfgXYL6cJd00EqGDZxOLULyPOCmvyjUhwFz1stV0 JmR+NydArj+b/ZV598CR19w5bm+IA1dvmLJC8zl5Qx/vf8GLaqZvVXM/3G43fY+MZoj+ CmlA== X-Gm-Message-State: ANhLgQ3yXJL48++6ljvEWWZ4rabqJphfT6XlWAaNrKIFAj51MI1DPCby ZqJ+U8dtpwN2t9Rgbyz/frBB99wAgLpXDhfQcBvEuEVJjZN0vvUEnHIA5ZhYB15s6cOmmC6phnX KBOp/Qn6K9/+tEqU= X-Received: by 2002:adf:e3cc:: with SMTP id k12mr15163718wrm.266.1584125192673; Fri, 13 Mar 2020 11:46:32 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv7Z0lzfYlF1vs1Lz7g7NclFsuaD+xFkjgyU5AXEQD3hHaG5QK7fUjcVcTEvxd0G3p+sZw/Zg== X-Received: by 2002:adf:e3cc:: with SMTP id k12mr15163698wrm.266.1584125192517; Fri, 13 Mar 2020 11:46:32 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 5/9] hw/core/qdev-properties: Export qdev_prop_enum Date: Fri, 13 Mar 2020 19:46:03 +0100 Message-Id: <20200313184607.11792-6-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200313184607.11792-1-philmd@redhat.com> References: <20200313184607.11792-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , Markus Armbruster , Laurent Vivier , Michael Roth , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/hw/qdev-properties.h | 1 + hw/core/qdev-properties.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index f161604fb6..134753d595 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -8,6 +8,7 @@ extern const PropertyInfo qdev_prop_bit; extern const PropertyInfo qdev_prop_bit64; extern const PropertyInfo qdev_prop_bool; +extern const PropertyInfo qdev_prop_enum; extern const PropertyInfo qdev_prop_uint8; extern const PropertyInfo qdev_prop_uint16; extern const PropertyInfo qdev_prop_uint32; diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 9c383ffa44..5912c394d4 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -84,6 +84,13 @@ void qdev_propinfo_set_default_value_enum(ObjectProperty= *op, qapi_enum_lookup(prop->info->enum_table, prop->defval.i)); } =20 +const PropertyInfo qdev_prop_enum =3D { + .name =3D "enum", + .get =3D qdev_propinfo_get_enum, + .set =3D qdev_propinfo_set_enum, + .set_default_value =3D qdev_propinfo_set_default_value_enum, +}; + /* Bit */ =20 static uint32_t qdev_get_prop_mask(Property *prop) --=20 2.21.1