[no-relnote] Remove unneeded indirection

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2025-06-03 23:37:43 +02:00
parent 0d0b56816e
commit 0c905d0de2
No known key found for this signature in database

View File

@ -59,19 +59,14 @@ func newWSLDriverDiscoverer(logger logger.Interface, driverRoot string, hookCrea
} }
logger.Infof("Using WSL driver store paths: %v", driverStorePaths) logger.Infof("Using WSL driver store paths: %v", driverStorePaths)
return newWSLDriverStoreDiscoverer(logger, driverRoot, hookCreator, ldconfigPath, driverStorePaths) driverStorePaths = append(driverStorePaths, "/usr/lib/wsl/lib")
}
// newWSLDriverStoreDiscoverer returns a Discoverer for WSL2 drivers in the driver store associated with a dxcore adapter.
func newWSLDriverStoreDiscoverer(logger logger.Interface, driverRoot string, hookCreator discover.HookCreator, ldconfigPath string, searchPaths []string) (discover.Discover, error) {
searchPaths = append(searchPaths, "/usr/lib/wsl/lib")
libraries := discover.NewMounts( libraries := discover.NewMounts(
logger, logger,
lookup.NewFileLocator( lookup.NewFileLocator(
lookup.WithLogger(logger), lookup.WithLogger(logger),
lookup.WithSearchPaths( lookup.WithSearchPaths(
searchPaths..., driverStorePaths...,
), ),
lookup.WithCount(1), lookup.WithCount(1),
), ),