mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
dbadee4ff4
commit
0f2956f915
3 changed files with 40 additions and 30 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue