mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
block: detect DKIOCGETBLOCKCOUNT/SIZE before use
iOS hosts do not have these defined so we fallback to the default behaviour. Co-authored-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
267cd53f5f
commit
09e20abdda
1 changed files with 1 additions and 1 deletions
|
@ -2341,7 +2341,7 @@ again:
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
#if defined(DKIOCGETBLOCKCOUNT) && defined(DKIOCGETBLOCKSIZE)
|
||||
if (size == 0) {
|
||||
uint64_t sectors = 0;
|
||||
uint32_t sector_size = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue