refactor and start adding actual functionality

This commit is contained in:
HikariKnight 2023-11-02 16:45:50 +01:00
parent 9efa0ee226
commit 82fec3ab58
11 changed files with 158 additions and 33 deletions

View file

@ -63,7 +63,7 @@ func GenerateVBIOSDumper(vbios_path string) {
errorcheck.ErrorCheck(err, "Could not change permissions of \"utils/dump_vbios.sh\"")
// Write to logger
logger.Printf("Writing utils/dump_vbios.sh")
logger.Printf("Writing utils/dump_vbios.sh\n")
// Write the script
scriptfile.WriteString(vbios_script)

View file

@ -17,7 +17,7 @@ func DisableVFIOVideo(i int) {
config := GetConfig()
// Write to logger
logger.Printf("Adding vfio_pci.disable_vga=%v to %s", i, config.Path.CMDLINE)
logger.Printf("Adding vfio_pci.disable_vga=%v to %s\n", i, config.Path.CMDLINE)
// Get the current kernel arguments we have generated
kernel_args := fileio.ReadFile(config.Path.CMDLINE)

View file

@ -28,6 +28,8 @@ type Config struct {
Bootloader string
Cpuvendor string
Path *Path
Gpu_Group string
Gpu_IDs []string
}
// Gets the path to all the config files
@ -52,6 +54,8 @@ func GetConfig() *Config {
Bootloader: "unknown",
Cpuvendor: cpuid.CPU.VendorString,
Path: GetConfigPaths(),
Gpu_Group: "",
Gpu_IDs: []string{},
}
// Detect the bootloader we are using