Received: from eggs.gnu.org ([2001:4830:134:3::10]:38869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLVzn-0001zM-5n for qemu-devel@nongnu.org; Tue, 19 Jan 2016 08:06:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLVzm-0005UX-98 for qemu-devel@nongnu.org; Tue, 19 Jan 2016 08:06:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLVzm-0005UT-3o for qemu-devel@nongnu.org; Tue, 19 Jan 2016 08:06:50 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id D0CB18F262 for ; Tue, 19 Jan 2016 13:06:49 +0000 (UTC) From: Igor Mammedov Date: Tue, 19 Jan 2016 14:06:27 +0100 Message-Id: <1453208789-42479-8-git-send-email-imammedo@redhat.com> In-Reply-To: <1453208789-42479-1-git-send-email-imammedo@redhat.com> References: <1453208789-42479-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH v17 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, lcapitulino@redhat.com, pbonzini@redhat.com, lersek@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 b7a083e..0db74b1 100644 --- a/vl.c +++ b/vl.c @@ -4492,6 +4492,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