Fix: avoid silent fatalities

demo: https://tcp.ac/i/JMSUc.gif
This commit is contained in:
kayos@tcp.direct 2024-06-17 00:30:24 -07:00
parent 3337efcb8f
commit 395f5ab6bc
No known key found for this signature in database
GPG key ID: 4B841471B4BEE979
13 changed files with 115 additions and 78 deletions

View file

@ -6,7 +6,7 @@ import (
"path/filepath"
"strings"
"github.com/HikariKnight/ls-iommu/pkg/errorcheck"
"github.com/HikariKnight/quickpassthrough/internal/common"
"github.com/HikariKnight/quickpassthrough/internal/logger"
)
@ -55,12 +55,12 @@ func GenerateVBIOSDumper(vbios_path string) {
// Make the script file
scriptfile, err := os.Create("utils/dump_vbios.sh")
errorcheck.ErrorCheck(err, "Cannot create file \"utils/dump_vbios.sh\"")
common.ErrorCheck(err, "Cannot create file \"utils/dump_vbios.sh\"")
defer scriptfile.Close()
// Make the script executable
scriptfile.Chmod(0775)
errorcheck.ErrorCheck(err, "Could not change permissions of \"utils/dump_vbios.sh\"")
common.ErrorCheck(err, "Could not change permissions of \"utils/dump_vbios.sh\"")
// Write to logger
logger.Printf("Writing utils/dump_vbios.sh\n")