Skip to content

Commit

Permalink
Revert "block: Remove dead deprecation warning code"
Browse files Browse the repository at this point in the history
This reverts commit 6266e90.

Some deprecated -drive options were still in use by libvirt, only
fixed with libvirt commit b340c6c614 ("qemu: format serial and geometry
on frontend disk device"), which is not yet in any released version
of libvirt.

So let's hold off removing the deprecated options for one more QEMU
release.

Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
cohuck authored and kevmw committed Jul 10, 2018
1 parent ba814c8 commit 19a49c5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions blockdev.c
Expand Up @@ -775,6 +775,8 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType block_default_type)
const char *filename;
Error *local_err = NULL;
int i;
const char *deprecated[] = {
};

/* Change legacy command line options into QMP ones */
static const struct {
Expand Down Expand Up @@ -851,6 +853,16 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType block_default_type)
goto fail;
}

/* Other deprecated options */
if (!qtest_enabled()) {
for (i = 0; i < ARRAY_SIZE(deprecated); i++) {
if (qemu_opt_get(legacy_opts, deprecated[i]) != NULL) {
error_report("'%s' is deprecated, please use the corresponding "
"option of '-device' instead", deprecated[i]);
}
}
}

/* Media type */
value = qemu_opt_get(legacy_opts, "media");
if (value) {
Expand Down

0 comments on commit 19a49c5

Please sign in to comment.