From: Ilya Maximets <i.maxim...@samsung.com>

qemu_memfd_create() prints the value of 'errno' which is not
set in this case.

Signed-off-by: Ilya Maximets <i.maxim...@samsung.com>
Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com>
Message-Id: <20190311135850.6537-4-i.maxim...@samsung.com>
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
 util/memfd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/util/memfd.c b/util/memfd.c
index d74ce4d793..393d23da96 100644
--- a/util/memfd.c
+++ b/util/memfd.c
@@ -40,6 +40,7 @@ static int memfd_create(const char *name, unsigned int flags)
 #ifdef __NR_memfd_create
     return syscall(__NR_memfd_create, name, flags);
 #else
+    errno = ENOSYS;
     return -1;
 #endif
 }
-- 
2.18.0.rc1.1.g3f1ff2140


Reply via email to