提交 317bb412 编写于 作者: M Markus Armbruster 提交者: Kevin Wolf

blockdev: Save geometry in DriveInfo

In preparation of purging it from the block layer, which will happen
later in this series.
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 9139046c
...@@ -530,6 +530,10 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) ...@@ -530,6 +530,10 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
dinfo->type = type; dinfo->type = type;
dinfo->bus = bus_id; dinfo->bus = bus_id;
dinfo->unit = unit_id; dinfo->unit = unit_id;
dinfo->cyls = cyls;
dinfo->heads = heads;
dinfo->secs = secs;
dinfo->trans = translation;
dinfo->opts = opts; dinfo->opts = opts;
dinfo->refcount = 1; dinfo->refcount = 1;
if (serial) { if (serial) {
......
...@@ -35,6 +35,7 @@ struct DriveInfo { ...@@ -35,6 +35,7 @@ struct DriveInfo {
int unit; int unit;
int auto_del; /* see blockdev_mark_auto_del() */ int auto_del; /* see blockdev_mark_auto_del() */
int media_cd; int media_cd;
int cyls, heads, secs, trans;
QemuOpts *opts; QemuOpts *opts;
char serial[BLOCK_SERIAL_STRLEN + 1]; char serial[BLOCK_SERIAL_STRLEN + 1];
QTAILQ_ENTRY(DriveInfo) next; QTAILQ_ENTRY(DriveInfo) next;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册