aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-02-01 14:27:51 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2018-02-07 14:09:25 +0100
commit0f2956f9159e4aecc9f4de6b8412a1d1ac5a2da0 (patch)
tree5cb46f39c19420270af764f8ce0af9c0b02b55ae /include
parentdbadee4ff4a02d4b4cc138dd63b769b1d9391896 (diff)
memfd: add error argument, instead of perror()
This will allow callers to silence error report when the call is allowed to failed. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180201132757.23063-2-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/memfd.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/qemu/memfd.h b/include/qemu/memfd.h
index 41c24d807c..b9d09873b5 100644
--- a/include/qemu/memfd.h
+++ b/include/qemu/memfd.h
@@ -16,9 +16,10 @@
#define F_SEAL_WRITE 0x0008 /* prevent writes */
#endif
-int qemu_memfd_create(const char *name, size_t size, unsigned int seals);
+int qemu_memfd_create(const char *name, size_t size, unsigned int seals,
+ Error **errp);
void *qemu_memfd_alloc(const char *name, size_t size, unsigned int seals,
- int *fd);
+ int *fd, Error **errp);
void qemu_memfd_free(void *ptr, size_t size, int fd);
bool qemu_memfd_check(void);