From 911525dba9ecc21f97b05c0f09bf9319a9de3a7d Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 11 Jul 2012 15:08:37 +0200 Subject: hw/block-common: Factor out fall back to legacy -drive serial=... Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- hw/scsi-disk.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'hw/scsi-disk.c') diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 0a182f987e..39a07d7579 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -1777,13 +1777,7 @@ static int scsi_initfn(SCSIDevice *dev) } } - if (!s->serial) { - /* try to fall back to value set with legacy -drive serial=... */ - dinfo = drive_get_by_blockdev(s->qdev.conf.bs); - if (*dinfo->serial) { - s->serial = g_strdup(dinfo->serial); - } - } + blkconf_serial(&s->qdev.conf, &s->serial); if (!s->version) { s->version = g_strdup(qemu_get_version()); -- cgit v1.2.3