]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 20 Feb 2014 12:04:02 +0000 (12:04 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 20 Feb 2014 12:10:23 +0000 (12:10 +0000)
* remotes/qmp-unstable/queue/qmp:
  monitor: Add object_add class argument completion.
  monitor: Add object_del id argument completion.
  monitor: Add device_add device argument completion.
  monitor: Add device_del id argument completion.
  qmp: expose list of supported character device backends
  Use error_is_set() only when necessary
  QMP: allow JSON dict arguments in qmp-shell
  hmp: migrate command (without -d) now blocks correctly

Conflicts:
blockdev.c

[PMM: resolved trivial conflict in blockdev.c]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
1  2 
block.c
block/iscsi.c
blockdev.c
vl.c

diff --cc block.c
Simple merge
diff --cc block/iscsi.c
Simple merge
diff --cc blockdev.c
index dfb5ec7529e57ca1a6b15a574aae0535a4d3d74f,be05a581a06f2eb8bd9a928db8687cb6cd4b99e3..1c64bdae18557b8850d6f54e6611e6553e69399e
@@@ -436,8 -437,13 +436,8 @@@ static DriveInfo *blockdev_init(const c
  
      on_write_error = BLOCKDEV_ON_ERROR_ENOSPC;
      if ((buf = qemu_opt_get(opts, "werror")) != NULL) {
 -        if (type != IF_IDE && type != IF_SCSI && type != IF_VIRTIO && type != IF_NONE) {
 -            error_setg(errp, "werror is not supported by this bus type");
 -            goto early_err;
 -        }
 -
          on_write_error = parse_block_error_action(buf, 0, &error);
-         if (error_is_set(&error)) {
+         if (error) {
              error_propagate(errp, error);
              goto early_err;
          }
  
      on_read_error = BLOCKDEV_ON_ERROR_REPORT;
      if ((buf = qemu_opt_get(opts, "rerror")) != NULL) {
 -        if (type != IF_IDE && type != IF_VIRTIO && type != IF_SCSI && type != IF_NONE) {
 -            error_report("rerror is not supported by this bus type");
 -            goto early_err;
 -        }
 -
          on_read_error = parse_block_error_action(buf, 1, &error);
-         if (error_is_set(&error)) {
+         if (error) {
              error_propagate(errp, error);
              goto early_err;
          }
@@@ -875,31 -872,10 +875,31 @@@ DriveInfo *drive_init(QemuOpts *all_opt
  
      filename = qemu_opt_get(legacy_opts, "file");
  
 +    /* Check werror/rerror compatibility with if=... */
 +    werror = qemu_opt_get(legacy_opts, "werror");
 +    if (werror != NULL) {
 +        if (type != IF_IDE && type != IF_SCSI && type != IF_VIRTIO &&
 +            type != IF_NONE) {
 +            error_report("werror is not supported by this bus type");
 +            goto fail;
 +        }
 +        qdict_put(bs_opts, "werror", qstring_from_str(werror));
 +    }
 +
 +    rerror = qemu_opt_get(legacy_opts, "rerror");
 +    if (rerror != NULL) {
 +        if (type != IF_IDE && type != IF_VIRTIO && type != IF_SCSI &&
 +            type != IF_NONE) {
 +            error_report("rerror is not supported by this bus type");
 +            goto fail;
 +        }
 +        qdict_put(bs_opts, "rerror", qstring_from_str(rerror));
 +    }
 +
      /* Actual block device init: Functionality shared with blockdev-add */
 -    dinfo = blockdev_init(filename, bs_opts, type, &local_err);
 +    dinfo = blockdev_init(filename, bs_opts, &local_err);
      if (dinfo == NULL) {
-         if (error_is_set(&local_err)) {
+         if (local_err) {
              qerror_report_err(local_err);
              error_free(local_err);
          }
@@@ -2299,8 -2276,8 +2299,8 @@@ void qmp_blockdev_add(BlockdevOptions *
  
      qdict_flatten(qdict);
  
 -    blockdev_init(NULL, qdict, IF_NONE, &local_err);
 +    blockdev_init(NULL, qdict, &local_err);
-     if (error_is_set(&local_err)) {
+     if (local_err) {
          error_propagate(errp, local_err);
          goto fail;
      }
diff --cc vl.c
Simple merge