mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 21:41:43 +03:00
[linux] Give tap devices a name and bus type
Give tap devices a meaningful name, and avoid segmentation faults when
attempting to retrieve ${net0/bustype} by assigning a new bus type for
tap devices.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -216,6 +216,9 @@ static int tap_probe(struct linux_device *device, struct linux_device_request *r
|
||||
}
|
||||
|
||||
nic->interface = if_setting->value;
|
||||
snprintf ( device->dev.name, sizeof ( device->dev.name ), "%s",
|
||||
nic->interface );
|
||||
device->dev.desc.bus_type = BUS_TYPE_TAP;
|
||||
if_setting->applied = 1;
|
||||
|
||||
/* Apply rest of the settings */
|
||||
|
||||
Reference in New Issue
Block a user