projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
267cd53
)
block: detect DKIOCGETBLOCKCOUNT/SIZE before use
author
Joelle van Dyne
<j@getutm.app>
Mon, 15 Mar 2021 18:03:40 +0000
(11:03 -0700)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Fri, 25 Jun 2021 08:54:13 +0000
(10:54 +0200)
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>
block/file-posix.c
patch
|
blob
|
history
diff --git
a/block/file-posix.c
b/block/file-posix.c
index f16d987c070a28e8d6cffc49dc9c5e2fad3fe3ec..74b8216077e0ee0303cfabab60ceb52f80f71e62 100644
(file)
--- a/
block/file-posix.c
+++ b/
block/file-posix.c
@@
-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;