upstream: some API was renamed and renewed
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Mon, 24 Aug 2015 11:52:09 +0000 (20:52 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Tue, 25 Aug 2015 04:23:10 +0000 (13:23 +0900)
Change-Id: I6ec4c1eb026574b8a2ac96bdb128e84145aa16af
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
12 files changed:
audio/audio.c
hw/9pfs/virtio-9p-maru.c
hw/i386/pc_piix.c
hw/vigs/vigs_device.c
include/sysemu/sysemu.h
net/net.c
net/tap-linux.c
tizen/src/ecs/ecs.h
tizen/src/ecs/ecs_msg_injector.c
tizen/src/emul_state.c
tizen/src/util/device_hotplug.c
vl.c

index 945a2d8..ad8804a 100644 (file)
@@ -1875,7 +1875,7 @@ static void audio_init (void)
         dolog ("Can not allocate voice `%s' size %d\n",
                s->drv->name, s->drv->voice_size_out);
     }
-    if(s->drv->pcm_ops->init_out(hw, &conf.fixed_out.settings)) {
+    if(s->drv->pcm_ops->init_out(hw, &conf.fixed_out.settings, s->drv)) {
         INFO("Host audio out [%s] is malfunction. Change to noaudio driver\n",
                 s->drv->name);
         done = 0;
index 6cd62bb..85cf03e 100644 (file)
@@ -30,6 +30,7 @@
 #include "hw/virtio/virtio.h"
 #include "hw/i386/pc.h"
 #include "qemu/sockets.h"
+#include "qemu/error-report.h"
 #include "virtio-9p.h"
 #include "fsdev/qemu-fsdev.h"
 #include "virtio-9p-xattr.h"
index 201318b..bd84766 100644 (file)
@@ -341,11 +341,11 @@ static void pc_compat_2_2(MachineState *machine)
 }
 
 #ifdef CONFIG_MARU
-void maru_pc_init_pci(MachineState *machine);
+void maru_pc_init(MachineState *machine);
 
-void maru_pc_init_pci(MachineState *machine)
+void maru_pc_init(MachineState *machine)
 {
-    pc_init_pci(machine);
+    pc_init1(machine);
 }
 #endif
 
index 9295b84..be8eabb 100644 (file)
@@ -41,6 +41,7 @@
 #include "hw/pci/pci.h"
 #include "ui/console.h"
 #include "qemu/main-loop.h"
+#include "qemu/error-report.h"
 
 #define PCI_VENDOR_ID_VIGS 0x19B2
 #define PCI_DEVICE_ID_VIGS 0x1011
@@ -419,8 +420,7 @@ static int vigs_device_init(PCIDevice *dev)
         object_unref(&wsiobj->base);
 
         if (err) {
-            qerror_report_err(err);
-            error_free(err);
+            error_report_err(err);
             return -1;
         }
     }
index 69ac4df..5a80152 100644 (file)
@@ -116,11 +116,7 @@ extern int autostart;
 
 typedef enum {
     VGA_NONE, VGA_STD, VGA_CIRRUS, VGA_VMWARE, VGA_XENFB, VGA_QXL,
-<<<<<<< HEAD
-    VGA_TCX, VGA_CG3, VGA_DEVICE,
-=======
     VGA_TCX, VGA_CG3, VGA_DEVICE, VGA_VIRTIO,
->>>>>>> v2.4.0
 } VGAInterfaceType;
 
 extern int vga_interface_type;
index 61b4038..959ceb7 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -1286,7 +1286,8 @@ bool qmp_get_link(const char *name, Error **errp)
                                           MAX_QUEUE_NUM);
 
     if (queues == 0) {
-        error_set(errp, QERR_DEVICE_NOT_FOUND, name);
+        error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
+                    "Device '%s' not found", name);
         return false;
     }
 
index cecfee9..aefa05d 100644 (file)
@@ -37,6 +37,8 @@
 #define PATH_NET_TUN "/dev/net/tun"
 
 #if defined(CONFIG_MARU)
+#include "tizen/src/emul_state.h"
+
 static int launch_openvpn(bool ismake, const char *ifname)
 {
     int pid, status;
index d9d055d..1a87b10 100644 (file)
@@ -126,7 +126,7 @@ struct Monitor {
     uint8_t outbuf[OUT_BUF_SIZE];
     int outbuf_index;
     void *password_opaque;
-    QError *error;
+    Error *error;
     QLIST_HEAD(,mon_fd_t) fds;
     QLIST_ENTRY(Monitor) entry;
 };
index 587a3ed..b024222 100644 (file)
@@ -31,6 +31,7 @@
 #include <stdlib.h>
 
 #include "qemu-common.h"
+#include "qemu/error-report.h"
 #include "fsdev/qemu-fsdev.h"
 
 #include "hw/virtio/maru_virtio_vmodem.h"
index c65903a..8124f01 100644 (file)
@@ -627,8 +627,8 @@ bool is_gpu_accel_enabled(void)
         for (dev = info->value->devices; dev; dev = dev->next) {
             /* TODO: use defines in the pci_regs.h
                      instead of the hard coding */
-            if (dev->value->id.vendor == 0x19B1
-                && dev->value->id.device == 0x1010) {
+            if (dev->value->id->vendor == 0x19B1
+                && dev->value->id->device == 0x1010) {
                 gpu_accel_enabled = true;
             }
         }
@@ -663,7 +663,7 @@ bool is_pci_device_enabled(int device_id)
     for (info = info_list; info; info = info->next) {
         PciDeviceInfoList *dev;
         for (dev = info->value->devices; dev; dev = dev->next) {
-            if (dev->value->id.device == device_id) {
+            if (dev->value->id->device == device_id) {
                 is_enabled = true;
                 break;
             }
index 522ea87..f7161ab 100644 (file)
@@ -66,11 +66,7 @@ static bool do_host_keyboard_attach(void)
     qdict_put(qdict, "driver", qstring_from_str(HOST_KEYBOARD_DRIVER));
     qdict_put(qdict, "id", qstring_from_str(HOST_KEYBOARD_DEFAULT_ID));
 
-    if (do_device_add(default_mon, qdict, NULL)) {
-        QDECREF(qdict);
-        // TODO error reporting
-        return false;
-    }
+    qmp_device_add(qdict, NULL, &error_abort);
 
     QDECREF(qdict);
 
@@ -84,11 +80,7 @@ static bool do_host_keyboard_detach(void)
     QDict *qdict = qdict_new();
     qdict_put(qdict, "id", qstring_from_str(HOST_KEYBOARD_DEFAULT_ID));
 
-    if (qmp_marshal_input_device_del(default_mon, qdict, NULL)) {
-        QDECREF(qdict);
-        // TODO error reporting
-        return false;
-    }
+    qmp_marshal_input_device_del(qdict, NULL, &error_abort);
 
     QDECREF(qdict);
 
@@ -114,7 +106,7 @@ static bool do_sdcard_attach(const char * const file)
     qdict_put(qdict_options, "id", qstring_from_str(sdcard_device_id));
     qdict_put(qdict, "options", qdict_options);
 
-    qmp_marshal_input_blockdev_add(default_mon, qdict, NULL);
+    qmp_marshal_input_blockdev_add(qdict, NULL, &error_abort);
 
     QDECREF(qdict);
 
@@ -124,13 +116,7 @@ static bool do_sdcard_attach(const char * const file)
     /* set sdcard id as sdcard image file name */
     qdict_put(qdict, "id", qstring_from_str(sdcard_drive_id));
 
-    if (do_device_add(default_mon, qdict, NULL)) {
-        QDECREF(qdict);
-        LOG_WARNING("failed to attach sdcard: %s", file);
-        g_free(sdcard_device_id);
-        g_free(sdcard_drive_id);
-        return false;
-    }
+    qmp_device_add(qdict, NULL, &error_abort);
 
     QDECREF(qdict);
     g_free(sdcard_device_id);
@@ -145,12 +131,7 @@ static bool do_sdcard_detach(const char * const file)
     gchar *sdcard_drive_id = g_strdup_printf("drive_id_%s", g_path_get_basename(file));
     qdict_put(qdict, "id", qstring_from_str(sdcard_drive_id));
 
-    if (qmp_marshal_input_device_del(cur_mon, qdict, NULL)) {
-        QDECREF(qdict);
-        g_free(sdcard_drive_id);
-        LOG_WARNING("failed to detach sdcard: %s", file);
-        return false;
-    }
+    qmp_marshal_input_device_del(qdict, NULL, &error_abort);
 
     QDECREF(qdict);
     state->sdcard_attached = false;
@@ -182,9 +163,9 @@ static bool do_hds_attach(const char * const id)
         return false;
     }
 
-    qemu_opt_set(fsdev, "fsdriver", "local");
-    qemu_opt_set(fsdev, "path", host);
-    qemu_opt_set(fsdev, "security_model", "none");
+    qemu_opt_set(fsdev, "fsdriver", "local", &error_abort);
+    qemu_opt_set(fsdev, "path", host, &error_abort);
+    qemu_opt_set(fsdev, "security_model", "none", &error_abort);
 
     ret = qemu_fsdev_add(fsdev);
     if (ret != 0) {
@@ -197,10 +178,7 @@ static bool do_hds_attach(const char * const id)
     qdict_put(qdict, "mount_tag", qstring_from_str(id));
     qdict_put(qdict, "id", qstring_from_str(id));
 
-    if (do_device_add(default_mon, qdict, NULL)) {
-        QDECREF(qdict);
-        return false;
-    }
+    qmp_device_add(qdict, NULL, &error_abort);
 
     set_hds_attached(id, true);
 
@@ -228,10 +206,7 @@ static bool do_hds_detach(const char * const id)
 
     qdict_put(qdict, "id", qstring_from_str(id));
 
-    if (qmp_marshal_input_device_del(cur_mon, qdict, NULL)) {
-        QDECREF(qdict);
-        return false;
-    }
+    qmp_marshal_input_device_del(qdict, NULL, &error_abort);
 
     QDECREF(qdict);
 
diff --git a/vl.c b/vl.c
index 68c7834..6d59b72 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -4089,7 +4089,7 @@ int main(int argc, char **argv, char **envp)
                 break;
             case QEMU_OPTION_enable_hax:
                 olist = qemu_find_opts("machine");
-                qemu_opts_parse(olist, "accel=hax", 0);
+                qemu_opts_parse_noisily(olist, "accel=hax", false);
                 break;
             case QEMU_OPTION_add_fd:
 #ifndef _WIN32
@@ -4232,7 +4232,7 @@ int main(int argc, char **argv, char **envp)
     kernel_cmdline = qemu_opt_get(qemu_get_machine_opts(), "append");
     // Returned variable points different address from input variable.
     kernel_cmdline = prepare_maru(kernel_cmdline);
-    qemu_opt_set(qemu_get_machine_opts(), "append", kernel_cmdline);
+    qemu_opt_set(qemu_get_machine_opts(), "append", kernel_cmdline, &error_abort);
 #endif
 
     /* Open the logfile at this point and set the log mask if necessary.