aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-06-17 15:31:27 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-06-17 15:31:27 +0100
commitda838dfc40cb7e12e2ae7b33236e426e029fed15 (patch)
tree3216850d43b871b05bf0dc2674f503250f93fe77
parentd121fcdf4520ed59c817d7f2846128a89772d497 (diff)
parenta663fbd9e2f65fae81018d81f231ad79510cf9fb (diff)
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-pull-request' into staging
Machine queue, 2016-06-17 # gpg: Signature made Fri 17 Jun 2016 14:45:48 BST # gpg: using RSA key 0x2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/machine-pull-request: vnc: Wrap vnc initialization code with CONFIG_VNC qdev: Use GList for global properties Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/core/qdev-properties.c15
-rw-r--r--include/hw/qdev-core.h1
-rw-r--r--vl.c2
3 files changed, 10 insertions, 8 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 737d29c632..e3b2184a60 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -1020,12 +1020,11 @@ void qdev_prop_set_ptr(DeviceState *dev, const char *name, void *value)
*ptr = value;
}
-static QTAILQ_HEAD(, GlobalProperty) global_props =
- QTAILQ_HEAD_INITIALIZER(global_props);
+static GList *global_props;
void qdev_prop_register_global(GlobalProperty *prop)
{
- QTAILQ_INSERT_TAIL(&global_props, prop, next);
+ global_props = g_list_append(global_props, prop);
}
void qdev_prop_register_global_list(GlobalProperty *props)
@@ -1039,10 +1038,11 @@ void qdev_prop_register_global_list(GlobalProperty *props)
int qdev_prop_check_globals(void)
{
- GlobalProperty *prop;
+ GList *l;
int ret = 0;
- QTAILQ_FOREACH(prop, &global_props, next) {
+ for (l = global_props; l; l = l->next) {
+ GlobalProperty *prop = l->data;
ObjectClass *oc;
DeviceClass *dc;
if (prop->used) {
@@ -1073,9 +1073,10 @@ int qdev_prop_check_globals(void)
static void qdev_prop_set_globals_for_type(DeviceState *dev,
const char *typename)
{
- GlobalProperty *prop;
+ GList *l;
- QTAILQ_FOREACH(prop, &global_props, next) {
+ for (l = global_props; l; l = l->next) {
+ GlobalProperty *prop = l->data;
Error *err = NULL;
if (strcmp(typename, prop->driver) != 0) {
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 1ce02b20da..24aa0a7949 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -266,7 +266,6 @@ typedef struct GlobalProperty {
const char *value;
bool user_provided;
bool used;
- QTAILQ_ENTRY(GlobalProperty) next;
} GlobalProperty;
/*** Board API. This should go away once we have a machine config file. ***/
diff --git a/vl.c b/vl.c
index 0736d8430d..2f63eb448f 100644
--- a/vl.c
+++ b/vl.c
@@ -4564,8 +4564,10 @@ int main(int argc, char **argv, char **envp)
os_setup_signal_handling();
/* init remote displays */
+#ifdef CONFIG_VNC
qemu_opts_foreach(qemu_find_opts("vnc"),
vnc_init_func, NULL, NULL);
+#endif
if (show_vnc_port) {
char *ret = vnc_display_local_addr("default");
printf("VNC server running on '%s'\n", ret);