From df20819328d6fa3cb9d4a259a58cebbee35cdd09 Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Mon, 11 Mar 2019 16:58:49 +0300 Subject: memfd: set up correct errno if not supported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qemu_memfd_create() prints the value of 'errno' which is not set in this case. Signed-off-by: Ilya Maximets Reviewed-by: Marc-André Lureau Message-Id: <20190311135850.6537-4-i.maximets@samsung.com> Signed-off-by: Eduardo Habkost --- util/memfd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'util') diff --git a/util/memfd.c b/util/memfd.c index d74ce4d..393d23d 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 } -- cgit v1.1