Page MenuHomeFreeBSD

D59847.diff
No OneTemporary

D59847.diff

diff --git a/usr.sbin/bhyve/pci_virtio_console.c b/usr.sbin/bhyve/pci_virtio_console.c
--- a/usr.sbin/bhyve/pci_virtio_console.c
+++ b/usr.sbin/bhyve/pci_virtio_console.c
@@ -515,13 +515,26 @@
break;
case VTCON_PORT_READY:
+ if (ctrl->id >= VTCON_MAXPORTS) {
+ WPRINTF(("VTCON_PORT_READY event for unknown port %d",
+ ctrl->id));
+ return;
+ }
tmp = &sc->vsc_ports[ctrl->id];
- if (ctrl->id >= VTCON_MAXPORTS || !tmp->vsp_enabled) {
+ if (!tmp->vsp_enabled) {
WPRINTF(("VTCON_PORT_READY event for unknown port %d",
ctrl->id));
return;
}
+ if (ctrl->value == 1) {
+ resp.id = ctrl->id;
+ resp.event = VTCON_PORT_NAME;
+ resp.value = 1;
+ pci_vtcon_control_send(sc, &resp, tmp->vsp_name,
+ strlen(tmp->vsp_name));
+ }
+
if (tmp->vsp_console) {
resp.event = VTCON_CONSOLE_PORT;
resp.id = ctrl->id;
@@ -541,10 +554,6 @@
event.event = VTCON_DEVICE_ADD;
event.value = 1;
pci_vtcon_control_send(port->vsp_sc, &event, NULL, 0);
-
- event.event = VTCON_PORT_NAME;
- pci_vtcon_control_send(port->vsp_sc, &event, port->vsp_name,
- strlen(port->vsp_name));
}
static void

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 2, 7:40 PM (14 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39476004
Default Alt Text
D59847.diff (1 KB)

Event Timeline