Revert "block: Remove deprecated -drive option serial"

This reverts commit b008326744.

Hold off removing this for one more QEMU release (current libvirt
release still uses it.)

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Cornelia Huck 2018-07-06 15:06:18 +02:00 committed by Kevin Wolf
parent 19a49c5637
commit 44e8b4689c
14 changed files with 48 additions and 8 deletions

View file

@ -15,6 +15,19 @@
#include "qapi/qapi-types-block.h"
#include "qemu/error-report.h"
void blkconf_serial(BlockConf *conf, char **serial)
{
DriveInfo *dinfo;
if (!*serial) {
/* try to fall back to value set with legacy -drive serial=... */
dinfo = blk_legacy_dinfo(conf->blk);
if (dinfo) {
*serial = g_strdup(dinfo->serial);
}
}
}
void blkconf_blocksizes(BlockConf *conf)
{
BlockBackend *blk = conf->blk;