Prefer UDEV to HAL drivers if both a compiled

HAL is deprecated and UDEV is the future. Thus if both
options are compiled, we should prefer use of UDEV over
HAL

* src/node_device/node_device_driver.c: Switch init
  order to try UDEV first, then HAL
This commit is contained in:
Daniel P. Berrange 2010-05-28 11:16:44 +01:00
parent e72cc3c11d
commit 345ff369e5

View File

@ -646,8 +646,8 @@ void registerCommonNodeFuncs(virDeviceMonitorPtr driver)
int nodedevRegister(void) {
#if defined(HAVE_HAL) && defined(HAVE_UDEV)
/* Register only one of these two - they conflict */
if (halNodeRegister() == -1)
return udevNodeRegister();
if (udevNodeRegister() == -1)
return halNodeRegister();
return 0;
#else
# ifdef HAVE_HAL