summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMarc-André Lureau2022-03-29 13:27:12 +0200
committerMarc-André Lureau2022-05-03 13:17:53 +0200
commitad24b679d215c2f8eaab6125a68e864c2a5d7dde (patch)
tree194050ff45006904a395cf6fd7bae9471376d01d /util
parentUse g_unix_set_fd_nonblocking() (diff)
downloadqemu-ad24b679d215c2f8eaab6125a68e864c2a5d7dde.tar.gz
qemu-ad24b679d215c2f8eaab6125a68e864c2a5d7dde.tar.xz
qemu-ad24b679d215c2f8eaab6125a68e864c2a5d7dde.zip
block: move fcntl_setfl()
It is only used by block/file-posix.c, move it there. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'util')
-rw-r--r--util/oslib-posix.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index b8bf7d4070..289efca3fa 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -897,21 +897,6 @@ size_t qemu_get_host_physmem(void)
return 0;
}
-/* Sets a specific flag */
-int fcntl_setfl(int fd, int flag)
-{
- int flags;
-
- flags = fcntl(fd, F_GETFL);
- if (flags == -1) {
- return -errno;
- }
- if (fcntl(fd, F_SETFL, flags | flag) == -1) {
- return -errno;
- }
- return 0;
-}
-
int qemu_msync(void *addr, size_t length, int fd)
{
size_t align_mask = ~(qemu_real_host_page_size() - 1);