From 1ac85b12fe901e7f3f8585b8bb20b26dded41a03 Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Sun, 12 Mar 2023 20:23:53 -0700 Subject: [PATCH] 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. --- internal/filelist/modules/modules.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/filelist/modules/modules.go b/internal/filelist/modules/modules.go index 0276f2a..ab4f93d 100644 --- a/internal/filelist/modules/modules.go +++ b/internal/filelist/modules/modules.go @@ -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...")