src/devices/bin/driver_manager/coordinator.cc
// DriverAddedInit is called from driver enumeration during
// startup and before the devcoordinator starts running.  Enumerated
// drivers are added directly to the all-drivers or fallback list.
//
// TODO: fancier priorities
DriverAddedInit is called from driver enumeration during
startup and before the devcoordinator starts running.  Enumerated
drivers are added directly to the all-drivers or fallback list.

fancier priorities
DriverAddedInit is called from driver enumeration during startup and before the devcoordinator starts running . Enumerated drivers are added directly to the all - drivers or fallback list . fancier priorities
void Coordinator::DriverAddedInit(Driver* drv, const char* version) {
  auto driver = ValidateDriver(std::unique_ptr<Driver>(drv));
  if (!driver) {
    return;
  }
  if (driver->libname.data() == GetFragmentDriverPath()) {
    fragment_driver_ = driver.get();
    driver->never_autoselect = true;
  }
  if (version[0] == '*') {
    fallback_drivers_.push_front(std::move(driver));
  } else if (version[0] == '!') {
    drivers_.push_front(std::move(driver));
  } else {
    drivers_.push_back(std::move(driver));
  }
}
void Coordinator :: DriverAddedInit ( Driver * drv , const char * version ) { auto driver = ValidateDriver ( std :: unique_ptr < Driver > ( drv ) ) ; if ( ! driver ) { return ; } if ( driver -> libname . data ( ) == GetFragmentDriverPath ( ) ) { fragment_driver_ = driver . get ( ) ; driver -> never_autoselect = true ; } if ( version [ 0 ] == ' ' ) { fallback_drivers_ . push_front ( std :: move ( driver ) ) ; } else if ( version [ 0 ] == ' ' ) { drivers_ . push_front ( std :: move ( driver ) ) ; } else { drivers_ . push_back ( std :: move ( driver ) ) ; } }
DriverAddedInit is called from driver enumeration during
startup and before the devcoordinator starts running.
DriverAddedInit is called from driver enumeration during startup and before the devcoordinator starts running .
// Record the special fragment driver when we see it // fallback driver, load only if all else fails // debugging / development hack // prioritize drivers with version "!..." over others