Add logger debug output

This commit is contained in:
HikariKnight 2023-04-10 14:26:50 +02:00
parent 27a52cda1f
commit 639d056abe
7 changed files with 71 additions and 18 deletions

View file

@ -5,6 +5,7 @@ import (
"os"
"strings"
"github.com/HikariKnight/quickpassthrough/internal/logger"
"github.com/HikariKnight/quickpassthrough/pkg/fileio"
)
@ -19,6 +20,9 @@ func Set_Dracut() {
os.Remove(dracutConf)
}
// Write to logger
logger.Printf("Writing to %s:\nadd_drivers+=\" %s \"", dracutConf, strings.Join(vfio_modules(), " "))
// Write the dracut config file
fileio.AppendContent(fmt.Sprintf("add_drivers+=\" %s \"\n", strings.Join(vfio_modules(), " ")), dracutConf)