aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorCornelia Huck <cohuck@redhat.com>2018-07-06 15:06:17 +0200
committerKevin Wolf <kwolf@redhat.com>2018-07-10 14:36:11 +0200
commit19a49c5637a3d7c2c61ba9d1149a4f6ee419988a (patch)
tree2873487b70697d16c553060d936b5d71b3c585e1 /blockdev.c
parentba814c82bbf0daf053c52dcdf0eb97b1f6ab0970 (diff)
Revert "block: Remove dead deprecation warning code"
This reverts commit 6266e900b8083945cb766b45c124fb3c42932cb3. 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>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c
index 72f5347df5..37eb40670b 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -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 {
@@ -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) {