diff options
author | Markus Armbruster <armbru@redhat.com> | 2012-07-11 15:08:37 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-07-17 16:48:32 +0200 |
commit | 911525dba9ecc21f97b05c0f09bf9319a9de3a7d (patch) | |
tree | 5d82736bd710e29d590d841bd2636d4247085eff /hw/scsi-disk.c | |
parent | 31e404f4ffb6adadea0b35de08e0a6b640e81a02 (diff) |
hw/block-common: Factor out fall back to legacy -drive serial=...
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r-- | hw/scsi-disk.c | 8 |
1 files changed, 1 insertions, 7 deletions
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()); |