Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/utilities/hv_timesync.c
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | hv_timesync_cb(struct vmbus_channel *channel, void *context) | ||||
if ((ret == 0) && recvlen > 0) { | if ((ret == 0) && recvlen > 0) { | ||||
icmsghdrp = (struct hv_vmbus_icmsg_hdr *) &time_buf[ | icmsghdrp = (struct hv_vmbus_icmsg_hdr *) &time_buf[ | ||||
sizeof(struct hv_vmbus_pipe_hdr)]; | sizeof(struct hv_vmbus_pipe_hdr)]; | ||||
if (icmsghdrp->icmsgtype == HV_ICMSGTYPE_NEGOTIATE) { | if (icmsghdrp->icmsgtype == HV_ICMSGTYPE_NEGOTIATE) { | ||||
int error; | int error; | ||||
error = vmbus_ic_negomsg(&softc->util_sc, time_buf, recvlen); | error = vmbus_ic_negomsg(&softc->util_sc, time_buf, &recvlen); | ||||
if (error) | if (error) | ||||
return; | return; | ||||
} else { | } else { | ||||
timedatap = (struct hv_ictimesync_data *) &time_buf[ | timedatap = (struct hv_ictimesync_data *) &time_buf[ | ||||
sizeof(struct hv_vmbus_pipe_hdr) + | sizeof(struct hv_vmbus_pipe_hdr) + | ||||
sizeof(struct hv_vmbus_icmsg_hdr)]; | sizeof(struct hv_vmbus_icmsg_hdr)]; | ||||
hv_adj_guesttime(softc, timedatap->parenttime, timedatap->flags); | hv_adj_guesttime(softc, timedatap->parenttime, timedatap->flags); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |