Use prefix search for locating graphics files

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2022-11-25 14:19:59 +01:00
parent db962c4bf2
commit bea8321205

View File

@ -70,18 +70,14 @@ func NewGraphicsMountsDiscoverer(logger *logrus.Logger, root string) (Discover,
jsonMounts := NewMounts(
logger,
lookup.NewFileLocator(logger, root),
lookup.NewFileLocator(logger, root, "/etc", "/usr/share"),
root,
[]string{
// TODO: We should handle this more cleanly
"/etc/glvnd/egl_vendor.d/10_nvidia.json",
"/etc/vulkan/icd.d/nvidia_icd.json",
"/etc/vulkan/implicit_layer.d/nvidia_layers.json",
"/usr/share/glvnd/egl_vendor.d/10_nvidia.json",
"/usr/share/vulkan/icd.d/nvidia_icd.json",
"/usr/share/vulkan/implicit_layer.d/nvidia_layers.json",
"/usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json",
"/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json",
"glvnd/egl_vendor.d/10_nvidia.json",
"vulkan/icd.d/nvidia_icd.json",
"vulkan/implicit_layer.d/nvidia_layers.json",
"egl/egl_external_platform.d/15_nvidia_gbm.json",
"egl/egl_external_platform.d/10_nvidia_wayland.json",
},
)