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

@ -7,6 +7,7 @@ import (
"strings"
"github.com/HikariKnight/ls-iommu/pkg/errorcheck"
"github.com/HikariKnight/quickpassthrough/internal/logger"
)
func GenerateVBIOSDumper(vbios_path string) {
@ -50,6 +51,7 @@ func GenerateVBIOSDumper(vbios_path string) {
vbios_path,
)
// Make the script file
scriptfile, err := os.Create("utils/dump_vbios.sh")
errorcheck.ErrorCheck(err, "Cannot create file \"utils/dump_vbios.sh\"")
defer scriptfile.Close()
@ -58,6 +60,9 @@ func GenerateVBIOSDumper(vbios_path string) {
scriptfile.Chmod(0775)
errorcheck.ErrorCheck(err, "Could not change permissions of \"utils/dump_vbios.sh\"")
// Write to logger
logger.Printf("Writing utils/dump_vbios.sh")
// Write the script
scriptfile.WriteString(vbios_script)
}