add cmdline to config and fix fileio append

This commit is contained in:
HikariKnight 2023-04-09 16:21:27 +02:00
parent f5116648e6
commit 388ba638bd
3 changed files with 24 additions and 3 deletions

View file

@ -2,6 +2,8 @@ package configs
import (
"github.com/HikariKnight/quickpassthrough/pkg/command"
"github.com/HikariKnight/quickpassthrough/pkg/fileio"
"github.com/klauspost/cpuid/v2"
)
func getBootloader(config *Config) {
@ -26,3 +28,15 @@ func getBootloader(config *Config) {
config.bootloader = "kernelstub"
}
}
func set_Cmdline() {
// Get the system info
cpuinfo := cpuid.CPU
// Get the configs
config := GetConfig()
// Write test file
fileio.AppendContent(cpuinfo.VendorString, config.path.CMDLINE)
fileio.AppendContent(cpuinfo.VendorString, config.path.CMDLINE)
}