summary refs log tree commit diff stats
path: root/blockdev.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2012-07-11 15:08:38 +0200
committerKevin Wolf <kwolf@redhat.com>2012-07-17 16:48:32 +0200
commit577d0a38070d1d6c4c7fab5c2054380770b1ec6b (patch)
tree7769c027534444446c62113c40f2392b8e79e111 /blockdev.h
parent911525dba9ecc21f97b05c0f09bf9319a9de3a7d (diff)
downloadfocaccia-qemu-577d0a38070d1d6c4c7fab5c2054380770b1ec6b.tar.gz
focaccia-qemu-577d0a38070d1d6c4c7fab5c2054380770b1ec6b.zip
blockdev: Don't limit DriveInfo serial to 20 characters
All current users (IDE, SCSI and virtio-blk) happen to share this 20
characters limit.  Still, it should be left to device models.  They
already enforce their limits.  They have to, as the DriveInfo limit
only affects legacy -drive serial=..., not the qdev properties.

usb-storage, which doesn't limit serial number length, also uses
DriveInfo for -usbdevice.  But that doesn't provide access to
DriveInfo serial.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.h')
-rw-r--r--blockdev.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/blockdev.h b/blockdev.h
index 9c29948128..5f27b643be 100644
--- a/blockdev.h
+++ b/blockdev.h
@@ -17,8 +17,6 @@
 void blockdev_mark_auto_del(BlockDriverState *bs);
 void blockdev_auto_del(BlockDriverState *bs);
 
-#define BLOCK_SERIAL_STRLEN 20
-
 typedef enum {
     IF_DEFAULT = -1,            /* for use with drive_add() only */
     IF_NONE,
@@ -37,7 +35,7 @@ struct DriveInfo {
     int media_cd;
     int cyls, heads, secs, trans;
     QemuOpts *opts;
-    char serial[BLOCK_SERIAL_STRLEN + 1];
+    const char *serial;
     QTAILQ_ENTRY(DriveInfo) next;
     int refcount;
 };