]> Git Repo - qemu.git/blame - hw/block-common.c
blockdev: Don't limit DriveInfo serial to 20 characters
[qemu.git] / hw / block-common.c
CommitLineData
911525db
MA
1/*
2 * Common code for block device models
3 *
4 * Copyright (C) 2012 Red Hat, Inc.
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or
7 * later. See the COPYING file in the top-level directory.
8 */
9
10#include "blockdev.h"
11#include "hw/block-common.h"
12
13void blkconf_serial(BlockConf *conf, char **serial)
14{
15 DriveInfo *dinfo;
16
17 if (!*serial) {
18 /* try to fall back to value set with legacy -drive serial=... */
19 dinfo = drive_get_by_blockdev(conf->bs);
577d0a38 20 if (dinfo->serial) {
911525db
MA
21 *serial = g_strdup(dinfo->serial);
22 }
23 }
24}
This page took 0.025209 seconds and 4 git commands to generate.