search for: registenodedevevent

Displaying 1 result from an estimated 1 matches for "registenodedevevent".

2017 Jul 04
0
node device lifecycle callback can't resive event
...ibvirt: // node device lifecycle callback function void nodeDeviceEventLifecycleCallback(virConnectPtr conn, virNodeDevicePtr dev, int event, int detail, void * opaque) { printf("event = %d, detail= %d\n", event, detail); } // registe node device lifecycle event int registeNodeDevEvent() { int ret = virEventRegisterDefaultImpl(); if (ret) { return -1;} ret = virConnectNodeDeviceEventRegisterAny(vmh_conn, NULL, VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE, VIR_NODE_DEVICE_EVENT_CALLBACK(nodeDeviceEventLifecycleCallback), NULL, NULL); if (-1 == ret) { return ret...