filelist/modules: print search dir before searching dir

This will allow printing status for deviceinfo modules earlier in the
function, in a way that makes more sense.
This commit is contained in:
Clayton Craft
2023-03-12 20:23:53 -07:00
parent f7f42bc2d4
commit 1ac85b12fe

View File

@@ -30,8 +30,6 @@ func New(modulesList []string, modulesListPath string) *Modules {
}
func (m *Modules) List() (*filelist.FileList, error) {
log.Printf("- Searching for kernel modules from %s", m.modulesListPath)
kernVer, err := osutil.GetKernelVersion()
if err != nil {
return nil, err
@@ -66,6 +64,7 @@ func (m *Modules) List() (*filelist.FileList, error) {
}
// slurp up modules from lists in modulesListPath
log.Printf("- Searching for kernel modules from %s", m.modulesListPath)
fileInfo, err := os.ReadDir(m.modulesListPath)
if err != nil {
log.Println("-- Unable to find dir, skipping...")