vmnet helper -- don't assume vmnet_start_interface succeeded.

This commit is contained in:
Kelvin Sherlock 2023-12-02 16:24:04 -05:00
parent 6ce2fbc2d8
commit ee1da060a3

View File

@ -264,8 +264,13 @@ void vm_startup(void) {
} }
dispatch_semaphore_signal(sem); dispatch_semaphore_signal(sem);
}); });
if (!interface) {
errx(1, "vmnet_start_interface failed");
}
dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER); dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
if (interface_status == VMNET_SUCCESS) { if (interface_status == VMNET_SUCCESS) {
buffer_size = (interface_packet_size * 2 + 1023) & ~1023; buffer_size = (interface_packet_size * 2 + 1023) & ~1023;
buffer = (uint8_t *)malloc(buffer_size); buffer = (uint8_t *)malloc(buffer_size);