This now conflicts with master (b6d7e9b66f5).
Conflict #1: include/hw/audio/pcspk.h
2336172d9b "audio: set default value for pcspk.iobase property"
2336172d9b audio: set default value for pcspk.iobase property
diff --git a/include/hw/audio/pcspk.h b/include/hw/audio/pcspk.h
index 8b48560267..06cba00b83 100644
--- a/include/hw/audio/pcspk.h
+++ b/include/hw/audio/pcspk.h
@@ -33,11 +33,7 @@
static inline void pcspk_init(ISADevice *isadev, ISABus *bus, ISADevice
*pit)
{
- DeviceState *dev;
-
- dev = DEVICE(isadev);
- qdev_prop_set_uint32(dev, "iobase", 0x61);
- object_property_set_link(OBJECT(dev), OBJECT(pit), "pit", NULL);
+ object_property_set_link(OBJECT(isadev), OBJECT(pit), "pit", NULL);
isa_realize_and_unref(isadev, bus, &error_fatal);
}
9eb2af7743 qom: Put name parameter before value / visitor parameter
diff --git a/include/hw/audio/pcspk.h b/include/hw/audio/pcspk.h
index 7e7f5f49dc..6386491288 100644
--- a/include/hw/audio/pcspk.h
+++ b/include/hw/audio/pcspk.h
@@ -39,7 +39,7 @@ static inline ISADevice *pcspk_init(ISABus *bus,
ISADevice *pit)
isadev = isa_new(TYPE_PC_SPEAKER);
dev = DEVICE(isadev);
qdev_prop_set_uint32(dev, "iobase", 0x61);
- object_property_set_link(OBJECT(dev), OBJECT(pit), "pit", NULL);
+ object_property_set_link(OBJECT(dev), "pit", OBJECT(pit), NULL);
isa_realize_and_unref(isadev, bus, &error_fatal);
return isadev;
Resolution is trivial, just redo 9eb2af7743's swap of the arguments:
static inline void pcspk_init(ISADevice *isadev, ISABus *bus, ISADevice
*pit)
{
object_property_set_link(OBJECT(isadev), "pit", OBJECT(pit), NULL);
isa_realize_and_unref(isadev, bus, &error_fatal);
}
Conflict #2: qemu-img.c
0b6786a9c1 block/amend: refactor qcow2 amend options
diff --git a/qemu-img.c b/qemu-img.c
index 1a0a85089b..7f4938a5ef 100644
--- a/qemu-img.c
+++ b/qemu-img.c
[...]
@@ -4219,7 +4218,22 @@ static int img_amend(int argc, char **argv)
amend_opts = qemu_opts_append(amend_opts, bs->drv->amend_opts);
opts = qemu_opts_create(amend_opts, NULL, 0, &error_abort);
qemu_opts_do_parse(opts, options, NULL, &err);
+
if (err) {
+ /* Try to parse options using the create options */
+ Error *err1 = NULL;
+ amend_opts = qemu_opts_append(amend_opts, bs->drv->create_opts);
+ qemu_opts_del(opts);
+ opts = qemu_opts_create(amend_opts, NULL, 0, &error_abort);
+ qemu_opts_do_parse(opts, options, NULL, &err1);
+
+ if (!err1) {
+ error_append_hint(&err,
+ "This option is only supported for image
creation\n");
+ } else {
+ error_free(err1);
+ }
+
error_report_err(err);
ret = -1;
goto out;
0bc2a50e17 qemu-option: Use returned bool to check for failure
diff --git a/qemu-img.c b/qemu-img.c
index bdb9f6aa46..fc405ee171 100644
--- a/qemu-img.c
+++ b/qemu-img.c
[...]
@@ -4212,8 +4209,7 @@ static int img_amend(int argc, char **argv)
create_opts = qemu_opts_append(create_opts, bs->drv->create_opts);
opts = qemu_opts_create(create_opts, NULL, 0, &error_abort);
- qemu_opts_do_parse(opts, options, NULL, &err);
- if (err) {
+ if (!qemu_opts_do_parse(opts, options, NULL, &err)) {
error_report_err(err);
ret = -1;
goto out;
Simply rerunning latter commit' Coccinelle script on master's version
would be possible, but suboptimal, because the former commit adds an
awkward error ignore a rebase would clean up. Manual resolution:
amend_opts = qemu_opts_append(amend_opts, bs->drv->amend_opts);
opts = qemu_opts_create(amend_opts, NULL, 0, &error_abort);
if (!qemu_opts_do_parse(opts, options, NULL, &err)) {
/* Try to parse options using the create options */
amend_opts = qemu_opts_append(amend_opts, bs->drv->create_opts);
qemu_opts_del(opts);
opts = qemu_opts_create(amend_opts, NULL, 0, &error_abort);
if (qemu_opts_do_parse(opts, options, NULL, NULL)) {
error_append_hint(&err,
"This option is only supported for image
creation\n");
}
error_report_err(err);
ret = -1;
goto out;
}
If you'd prefer a rebased pull request, let me know.
Tests are still running.