diff options
author | Fam Zheng <famz@redhat.com> | 2017-08-11 19:44:46 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-08-11 14:12:44 +0200 |
commit | ca749954b09b89e22cd69c4949fb7e689b057963 (patch) | |
tree | 48118b0486719b09f272cda9d720e4d0ab96bf2a /include/qemu/osdep.h | |
parent | d0d5d0e31a874d592741a088c2c5071bae164dbf (diff) | |
download | qemu-ca749954b09b89e22cd69c4949fb7e689b057963.zip qemu-ca749954b09b89e22cd69c4949fb7e689b057963.tar.gz qemu-ca749954b09b89e22cd69c4949fb7e689b057963.tar.bz2 |
osdep: Add runtime OFD lock detection
Build time check of OFD lock is not sufficient and can cause image open
errors when the runtime environment doesn't support it.
Add a helper function to probe it at runtime, additionally. Also provide
a qemu_has_ofd_lock() for callers to check the status.
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/qemu/osdep.h')
-rw-r--r-- | include/qemu/osdep.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 3b74f6f..6855b94 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -357,6 +357,7 @@ int qemu_dup(int fd); int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); int qemu_unlock_fd(int fd, int64_t start, int64_t len); int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive); +bool qemu_has_ofd_lock(void); #if defined(__HAIKU__) && defined(__i386__) #define FMT_pid "%ld" |