mirror of https://gitee.com/openkylin/qemu.git
memfd: set up correct errno if not supported
qemu_memfd_create() prints the value of 'errno' which is not set in this case. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190311135850.6537-4-i.maximets@samsung.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
92db922f66
commit
df20819328
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue