Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/utilities/hv_shutdown.c
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | hv_shutdown_cb(struct vmbus_channel *channel, void *context) | ||||
/* XXX check recv_len to make sure that it contains enough data */ | /* XXX check recv_len to make sure that it contains enough data */ | ||||
if ((ret == 0) && recv_len > 0) { | if ((ret == 0) && recv_len > 0) { | ||||
icmsghdrp = (struct hv_vmbus_icmsg_hdr *) | icmsghdrp = (struct hv_vmbus_icmsg_hdr *) | ||||
&buf[sizeof(struct hv_vmbus_pipe_hdr)]; | &buf[sizeof(struct hv_vmbus_pipe_hdr)]; | ||||
if (icmsghdrp->icmsgtype == HV_ICMSGTYPE_NEGOTIATE) { | if (icmsghdrp->icmsgtype == HV_ICMSGTYPE_NEGOTIATE) { | ||||
hv_negotiate_version(icmsghdrp, buf); | int error; | ||||
error = vmbus_ic_negomsg(softc, buf, recv_len); | |||||
if (error) | |||||
return; | |||||
} else { | } else { | ||||
shutdown_msg = | shutdown_msg = | ||||
(struct hv_vmbus_shutdown_msg_data *) | (struct hv_vmbus_shutdown_msg_data *) | ||||
&buf[sizeof(struct hv_vmbus_pipe_hdr) + | &buf[sizeof(struct hv_vmbus_pipe_hdr) + | ||||
sizeof(struct hv_vmbus_icmsg_hdr)]; | sizeof(struct hv_vmbus_icmsg_hdr)]; | ||||
switch (shutdown_msg->flags) { | switch (shutdown_msg->flags) { | ||||
case 0: | case 0: | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |