mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
bhyve: don't fail on busy tap devices
We use virBhyveTapGetRealDeviceName() to map network interface name to a real device path, trying to open possible devices and getting names by ioctl. Make it skip devices that fail to open with EBUSY because they're most likely already used by other VMs.
This commit is contained in:
@@ -69,6 +69,10 @@ virBhyveTapGetRealDeviceName(char *name)
|
||||
goto cleanup;
|
||||
}
|
||||
if ((fd = open(devpath, O_RDWR)) < 0) {
|
||||
if (errno == EBUSY) {
|
||||
VIR_FREE(devpath);
|
||||
continue;
|
||||
}
|
||||
virReportSystemError(errno, _("Unable to open '%s'"), devpath);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user