mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
Refactoring: refactor TFR() macro to RETRY_ON_EINTR()
Rename macro name to more transparent one and refactor it to expression. Signed-off-by: Nikita Ivanov <nivanov@cloudlinux.com> Message-Id: <20221023090422.242617-2-nivanov@cloudlinux.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
d88ce91299
commit
8b6aa69365
9 changed files with 24 additions and 16 deletions
|
@ -45,7 +45,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
|
|||
int len = sizeof(struct virtio_net_hdr);
|
||||
unsigned int features;
|
||||
|
||||
TFR(fd = open(PATH_NET_TUN, O_RDWR));
|
||||
fd = RETRY_ON_EINTR(open(PATH_NET_TUN, O_RDWR));
|
||||
if (fd < 0) {
|
||||
error_setg_errno(errp, errno, "could not open %s", PATH_NET_TUN);
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue