static int fcopy_handle_handshake(u32 version) { switch (version) { case FCOPY_CURRENT_VERSION: break; default: /* * For now we will fail the registration. * If and when we have multiple versions to * deal with, we will be backward compatible. * We will add this code when needed. */ return -EINVAL; } pr_info("FCP: user-mode registering done. Daemon version: %d\n", version); fcopy_transaction.active = false; if (fcopy_transaction.fcopy_context) hv_fcopy_onchannelcallback(fcopy_transaction.fcopy_context); in_hand_shake = false; return 0; }
static void fcopy_poll_wrapper(void *channel) { /* Transaction is finished, reset the state here to avoid races. */ fcopy_transaction.state = HVUTIL_READY; hv_fcopy_onchannelcallback(channel); }