aboutsummaryrefslogtreecommitdiff
path: root/hw/hd-geometry.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2012-07-10 11:12:41 +0200
committerKevin Wolf <kwolf@redhat.com>2012-07-17 16:48:30 +0200
commit1f24d7b47e1f18b5e7f0f050f915a42e9aa645db (patch)
tree31468afd9a369f7e0f6d6ef9e5b33fcd8a9f68bc /hw/hd-geometry.c
parent8a4bc5aafa7286e03bbced8abdb43aa6abdf95ea (diff)
hd-geometry: Switch to uint32_t to match BlockConf
Best to use the same type, to avoid unwanted truncation or sign extension. BlockConf can't use plain int for cyls, heads and secs, because integer properties require an exact width. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/hd-geometry.c')
-rw-r--r--hw/hd-geometry.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/hd-geometry.c b/hw/hd-geometry.c
index 4d746b7155..7626cbbe9c 100644
--- a/hw/hd-geometry.c
+++ b/hw/hd-geometry.c
@@ -98,7 +98,7 @@ static int guess_disk_lchs(BlockDriverState *bs,
}
static void guess_chs_for_size(BlockDriverState *bs,
- int *pcyls, int *pheads, int *psecs)
+ uint32_t *pcyls, uint32_t *pheads, uint32_t *psecs)
{
uint64_t nb_sectors;
int cylinders;
@@ -117,7 +117,7 @@ static void guess_chs_for_size(BlockDriverState *bs,
}
void hd_geometry_guess(BlockDriverState *bs,
- int *pcyls, int *pheads, int *psecs,
+ uint32_t *pcyls, uint32_t *pheads, uint32_t *psecs,
int *ptrans)
{
int cylinders, heads, secs, translation;