From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Cc: Aurelien Jarno <aurelien@aurel32.net>
Subject: [Qemu-devel] [PATCH v3 03/17] vl.c: convert *vga_enabled functions to QOM
Date: Tue, 11 Sep 2012 21:10:28 +0200 [thread overview]
Message-ID: <1347390642-17434-4-git-send-email-aurelien@aurel32.net> (raw)
In-Reply-To: <1347390642-17434-1-git-send-email-aurelien@aurel32.net>
And get rid of qdev_exists().
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
hw/qdev.c | 5 -----
hw/qdev.h | 1 -
vl.c | 7 ++++---
3 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/hw/qdev.c b/hw/qdev.c
index b5a52ac..0eb30a2 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -52,11 +52,6 @@ const char *qdev_fw_name(DeviceState *dev)
return object_get_typename(OBJECT(dev));
}
-bool qdev_exists(const char *name)
-{
- return !!object_class_by_name(name);
-}
-
static void qdev_property_add_legacy(DeviceState *dev, Property *prop,
Error **errp);
diff --git a/hw/qdev.h b/hw/qdev.h
index d699194..c6ac636 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -153,7 +153,6 @@ typedef struct GlobalProperty {
DeviceState *qdev_create(BusState *bus, const char *name);
DeviceState *qdev_try_create(BusState *bus, const char *name);
-bool qdev_exists(const char *name);
int qdev_device_help(QemuOpts *opts);
DeviceState *qdev_device_add(QemuOpts *opts);
int qdev_init(DeviceState *dev) QEMU_WARN_UNUSED_RESULT;
diff --git a/vl.c b/vl.c
index 7c577fa..f7eed7a 100644
--- a/vl.c
+++ b/vl.c
@@ -1690,17 +1690,18 @@ static const QEMUOption qemu_options[] = {
static bool vga_available(void)
{
- return qdev_exists("VGA") || qdev_exists("isa-vga");
+ return object_class_by_name("VGA") || object_class_by_name("isa-vga");
}
static bool cirrus_vga_available(void)
{
- return qdev_exists("cirrus-vga") || qdev_exists("isa-cirrus-vga");
+ return object_class_by_name("cirrus-vga")
+ || object_class_by_name("isa-cirrus-vga");
}
static bool vmware_vga_available(void)
{
- return qdev_exists("vmware-svga");
+ return object_class_by_name("vmware-svga");
}
static void select_vgahw (const char *p)
--
1.7.10.4
next prev parent reply other threads:[~2012-09-11 20:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 19:10 [Qemu-devel] [PATCH v3 00/17] Rework ISA/PCI video card initialization Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 01/17] vga: rename pci_vga_init() into pci_std_vga_init() Aurelien Jarno
2012-09-12 16:54 ` Richard Henderson
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 02/17] vga: rename isa_vga_init() to isa_std_vga_init() Aurelien Jarno
2012-09-11 19:10 ` Aurelien Jarno [this message]
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 04/17] vl.c: check for qxl availability Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 05/17] vl.c: default to std if cirrus is not available Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 06/17] pci: add a pci_vga_init() function Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 07/17] isa: add a isa_vga_init() function Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 08/17] mips/malta: use the new pci_vga_init() function Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 09/17] alpha: " Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 10/17] ppc/newworld: " Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 11/17] ppc/oldworld: " Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 12/17] ppc/prep: " Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 13/17] ppc/pSeries: " Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 14/17] sun/sun4u: " Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 15/17] pc: use the new pci_vga_init() and isa_vga_init() functions Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 16/17] mips/r4k: use the new is_vga_init() function Aurelien Jarno
2012-09-11 19:10 ` [Qemu-devel] [PATCH v3 17/17] vga: cleanup after isa_vga_init() and pci_vga_init() conversion Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1347390642-17434-4-git-send-email-aurelien@aurel32.net \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).