aboutsummaryrefslogtreecommitdiff
path: root/block/raw-win32.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-06-23 16:37:24 -0600
committerKevin Wolf <kwolf@redhat.com>2016-07-05 16:46:26 +0200
commita5b8dd2ce83208cd7d6eb4562339ecf5aae13574 (patch)
treeeea17f09c6a183d2526f90798c6f6097db506195 /block/raw-win32.c
parentd9e0dfa2462e32cc5c6c49401ad7bff36453f75c (diff)
block: Move request_alignment into BlockLimit
It makes more sense to have ALL block size limit constraints in the same struct. Improve the documentation while at it. Simplify a couple of conditionals, now that we have audited and documented that request_alignment is always non-zero. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/raw-win32.c')
-rw-r--r--block/raw-win32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/raw-win32.c b/block/raw-win32.c
index 88382d9b4d..62edb1a6cc 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -230,14 +230,14 @@ static void raw_probe_alignment(BlockDriverState *bs, Error **errp)
BOOL status;
if (s->type == FTYPE_CD) {
- bs->request_alignment = 2048;
+ bs->bl.request_alignment = 2048;
return;
}
if (s->type == FTYPE_HARDDISK) {
status = DeviceIoControl(s->hfile, IOCTL_DISK_GET_DRIVE_GEOMETRY_EX,
NULL, 0, &dg, sizeof(dg), &count, NULL);
if (status != 0) {
- bs->request_alignment = dg.Geometry.BytesPerSector;
+ bs->bl.request_alignment = dg.Geometry.BytesPerSector;
return;
}
/* try GetDiskFreeSpace too */
@@ -247,7 +247,7 @@ static void raw_probe_alignment(BlockDriverState *bs, Error **errp)
GetDiskFreeSpace(s->drive_path, &sectorsPerCluster,
&dg.Geometry.BytesPerSector,
&freeClusters, &totalClusters);
- bs->request_alignment = dg.Geometry.BytesPerSector;
+ bs->bl.request_alignment = dg.Geometry.BytesPerSector;
}
}