Skip to content

Commit

Permalink
driverdog: fix module load bug
Browse files Browse the repository at this point in the history
The expected behavior for link-modules and load-modules is to load all
the modules from all the driver configuration files unless a specific
modules set is specified. In the case that a modules set is specified,
then driverdog should only link or load modules from the specified
target configuration. The link logic worked this way but the load logic
would always run the else clause, therefore always loading all modules
even if only one was specified.

Signed-off-by: Matthew Yeazel <[email protected]>
  • Loading branch information
yeazelm committed Sep 3, 2024
1 parent a31fa58 commit 5cc194e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sources/driverdog/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,11 @@ fn load_modules_sets(
.get(&target)
.context(error::MissingModuleSetSnafu { target })?;
load_modules(driver_config)?
}
// Load all the modules sets if no target module was given
for driver_config in modules_sets.values() {
load_modules(driver_config)?;
} else {
// Load all the modules sets if no target module was given
for driver_config in modules_sets.values() {
load_modules(driver_config)?;
}
}

Ok(())
Expand Down

0 comments on commit 5cc194e

Please sign in to comment.