xen: call qemu_set_cloexec instead of fcntl
commit01cd90b641e1aed40cf13a577e6a737af94d55e7
authorStefano Stabellini <sstabellini@kernel.org>
Tue, 9 May 2017 19:04:53 +0000 (9 12:04 -0700)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 16 May 2017 18:51:25 +0000 (16 11:51 -0700)
treea7990f0fee16df75f5866067a127fc545cc48965
parentc0c24b95542bc1a4dc3fc6ea71475ae04fa69189
xen: call qemu_set_cloexec instead of fcntl

Use the common utility function, which contains checks on return values
and first calls F_GETFD as recommended by POSIX.1-2001, instead of
manually calling fcntl.

CID: 1374831

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
CC: anthony.perard@citrix.com
CC: groug@kaod.org
CC: aneesh.kumar@linux.vnet.ibm.com
CC: Eric Blake <eblake@redhat.com>
hw/9pfs/xen-9p-backend.c
hw/xen/xen_backend.c