From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMbeW-0000kD-8K for qemu-devel@nongnu.org; Fri, 22 Jan 2016 08:21:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMbeV-0002R8-E9 for qemu-devel@nongnu.org; Fri, 22 Jan 2016 08:21:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMbeV-0002R3-8d for qemu-devel@nongnu.org; Fri, 22 Jan 2016 08:21:23 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id E6738C0AC92B for ; Fri, 22 Jan 2016 13:21:22 +0000 (UTC) From: Igor Mammedov Date: Fri, 22 Jan 2016 14:21:00 +0100 Message-Id: <1453468862-118912-8-git-send-email-imammedo@redhat.com> In-Reply-To: <1453468862-118912-1-git-send-email-imammedo@redhat.com> References: <1453468862-118912-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH v18 7/9] add MachineClass->default_props for setting default device properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: ehabkost@redhat.com, mst@redhat.com, ghammer@redhat.com, lersek@redhat.com, lcapitulino@redhat.com, pbonzini@redhat.com Signed-off-by: Igor Mammedov --- include/hw/boards.h | 1 + vl.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/hw/boards.h b/include/hw/boards.h index 0f30959..d495611 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -90,6 +90,7 @@ struct MachineClass { const char *default_machine_opts; const char *default_boot_order; const char *default_display; + GlobalProperty *default_props; GlobalProperty *compat_props; const char *hw_version; ram_addr_t default_ram_size; diff --git a/vl.c b/vl.c index f043009..3c5a936 100644 --- a/vl.c +++ b/vl.c @@ -4491,6 +4491,10 @@ int main(int argc, char **argv, char **envp) exit (i == 1 ? 1 : 0); } + if (machine_class->default_props) { + qdev_prop_register_global_list(machine_class->default_props); + } + if (machine_class->compat_props) { qdev_prop_register_global_list(machine_class->compat_props); } -- 1.8.3.1