int hv_vss_init(struct hv_util_service *srv) { if (vmbus_proto_version < VERSION_WIN8_1) { pr_warn("Integration service 'Backup (volume snapshot)'" " not supported on this host version.\n"); return -ENOTSUPP; } recv_buffer = srv->recv_buffer; vss_transaction.recv_channel = srv->channel; /* * When this driver loads, the user level daemon that * processes the host requests may not yet be running. * Defer processing channel callbacks until the daemon * has registered. */ vss_transaction.state = HVUTIL_DEVICE_INIT; hvt = hvutil_transport_init(vss_devname, CN_VSS_IDX, CN_VSS_VAL, vss_on_msg, vss_on_reset); if (!hvt) return -EFAULT; return 0; }
int hv_fcopy_init(struct hv_util_service *srv) { recv_buffer = srv->recv_buffer; /* * When this driver loads, the user level daemon that * processes the host requests may not yet be running. * Defer processing channel callbacks until the daemon * has registered. */ fcopy_transaction.state = HVUTIL_DEVICE_INIT; hvt = hvutil_transport_init(fcopy_devname, 0, 0, fcopy_on_msg, fcopy_on_reset); if (!hvt) return -EFAULT; return 0; }