change to use fileio and also finish writing the module manipulation for initramfstools

This commit is contained in:
HikariKnight 2023-04-09 04:21:22 +02:00
parent 36b8e44182
commit 3ac5958015
2 changed files with 39 additions and 26 deletions

View file

@ -7,6 +7,7 @@ import (
"regexp"
"github.com/HikariKnight/ls-iommu/pkg/errorcheck"
"github.com/HikariKnight/quickpassthrough/pkg/fileio"
"github.com/klauspost/cpuid/v2"
)
@ -110,7 +111,7 @@ func InitConfigs() {
// If we now have a config that exists
if _, err := os.Stat(conffile); !errors.Is(err, os.ErrNotExist) {
header := readHeader(4, sysfile)
writeContent(header, conffile)
fileio.AppendContent(header, conffile)
addModules(conffile)
}