mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
8a4bc5aafa
commit
1f24d7b47e
6 changed files with 7 additions and 7 deletions
|
@ -968,7 +968,7 @@ static int mode_sense_page(SCSIDiskState *s, int page, uint8_t **p_outbuf,
|
|||
};
|
||||
|
||||
BlockDriverState *bdrv = s->qdev.conf.bs;
|
||||
int cylinders, heads, secs;
|
||||
uint32_t cylinders, heads, secs;
|
||||
uint8_t *p = *p_outbuf;
|
||||
|
||||
if ((mode_sense_valid[page] & (1 << s->qdev.type)) == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue