mirror of
https://github.com/mborgerson/xemu.git
synced 2025-12-01 16:10:01 +00:00
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>
This commit is contained in:
@ -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"
|
||||
|
||||
Reference in New Issue
Block a user