... if the backend is offline.
It's possible for the enumeration thread to spot a device that is in the
process of being removed. In this case the 'online' node in the backend
XenStore area will be 0 and devices in this state should remain Closed.
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
break;
case XenbusStateClosed:
- FrontendSetXenbusState(Frontend,
- XenbusStateInitialising);
+ if (FrontendIsBackendOnline(Frontend))
+ FrontendSetXenbusState(Frontend,
+ XenbusStateInitialising);
+ else
+ FrontendSetOffline(Frontend);
+
break;
case XenbusStateConnected: