make generating the module list its own function and fix minor things
This commit is contained in:
parent
8312d8853c
commit
e93d215669
5 changed files with 47 additions and 25 deletions
|
@ -2,6 +2,7 @@ package configs
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/HikariKnight/quickpassthrough/pkg/fileio"
|
||||
)
|
||||
|
@ -10,7 +11,7 @@ func Set_Dracut() {
|
|||
config := GetConfig()
|
||||
|
||||
// Write the dracut config file
|
||||
fileio.AppendContent("add_drivers+=\" vfio_pci vfio vfio_iommu_type1 vfio_virqfd \"\n", fmt.Sprintf("%s/vfio.conf", config.Path.DRACUT))
|
||||
fileio.AppendContent(fmt.Sprintf("add_drivers+=\" %s \"\n", strings.Join(vfio_modules(), " ")), fmt.Sprintf("%s/vfio.conf", config.Path.DRACUT))
|
||||
|
||||
// Add to our kernel arguments file that vfio_pci should load early (dracut does this using kernel arguments)
|
||||
fileio.AppendContent(" rd.driver.pre=vfio_pci", config.Path.CMDLINE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue