FreeBSD/sys/dev/hyperv/utilities/hv_kvp.c
/*
 * Send the response back to the host.
 */
Send the response back to the host.
Send the response back to the host .
static void
hv_kvp_respond_host(hv_kvp_sc *sc, int error)
{
	struct hv_vmbus_icmsg_hdr *hv_icmsg_hdrp;
	hv_icmsg_hdrp = (struct hv_vmbus_icmsg_hdr *)
	    &sc->rcv_buf[sizeof(struct hv_vmbus_pipe_hdr)];
	if (error)
		error = HV_KVP_E_FAIL;
	hv_icmsg_hdrp->status = error;
	hv_icmsg_hdrp->icflags = HV_ICMSGHDRFLAG_TRANSACTION | HV_ICMSGHDRFLAG_RESPONSE;
	error = hv_vmbus_channel_send_packet(sc->util_sc.hv_dev->channel,
			sc->rcv_buf,
			sc->host_msg_len, sc->host_msg_id,
			HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, 0);
	if (error)
		hv_kvp_log_info("%s: hv_kvp_respond_host: sendpacket error:%d\n",
			__func__, error);
}
static void hv_kvp_respond_host ( hv_kvp_sc * sc , int error ) { struct hv_vmbus_icmsg_hdr * hv_icmsg_hdrp ; hv_icmsg_hdrp = ( struct hv_vmbus_icmsg_hdr * ) & sc -> rcv_buf [ sizeof ( struct hv_vmbus_pipe_hdr ) ] ; if ( error ) error = HV_KVP_E_FAIL ; hv_icmsg_hdrp -> status = error ; hv_icmsg_hdrp -> icflags = HV_ICMSGHDRFLAG_TRANSACTION | HV_ICMSGHDRFLAG_RESPONSE ; error = hv_vmbus_channel_send_packet ( sc -> util_sc . hv_dev -> channel , sc -> rcv_buf , sc -> host_msg_len , sc -> host_msg_id , HV_VMBUS_PACKET_TYPE_DATA_IN_BAND , 0 ) ; if ( error ) hv_kvp_log_info ( " \n " , __func__ , error ) ; }
Send the response back to the host.
Send the response back to the host .