make sure pci_ids are quoted in the arrays written to the config
This commit is contained in:
parent
cfde379c5b
commit
560aa3062c
2 changed files with 4 additions and 4 deletions
|
@ -33,7 +33,7 @@ To return to the previous page just press ENTER without typing in anything.
|
|||
local GPU_DEVID=$($SCRIPTDIR/utils/ls-iommu | grep -i "group $1" | perl -pe "s/.+\[([0-9a-f]{4}:[0-9a-f]{4})\].+/\1/" | perl -pe "s/\n/,/" | perl -pe "s/,$/\n/")
|
||||
|
||||
# Get the PCI ids
|
||||
local PCI_ID=$($SCRIPTDIR/utils/ls-iommu | grep -i "group $1" | cut -d " " -f 4 | perl -pe "s/\n/ /" | perl -pe "s/\s$//")
|
||||
local PCI_ID=$($SCRIPTDIR/utils/ls-iommu | grep -i "group $1" | cut -d " " -f 4 | perl -pe "s/([0-9a-f]{2}:[0-9a-f]{2}.[0-9a-f]{1})\n/\"\1\" /" | perl -pe "s/\s$//")
|
||||
|
||||
# Write the GPU_PCI_IDs to the config that quickemu might make use of in the future
|
||||
printf "GPU_PCI_ID=($PCI_ID)
|
||||
|
|
|
@ -25,7 +25,7 @@ To return to the previous page just press ENTER.
|
|||
case "${YESNO}" in
|
||||
[Yy]*)
|
||||
# Get the PCI ids
|
||||
local PCI_ID=$($SCRIPTDIR/utils/ls-iommu | grep -i "group $1" | cut -d " " -f 4 | perl -pe "s/\n/ /" | perl -pe "s/\s$//")
|
||||
local PCI_ID=$($SCRIPTDIR/utils/ls-iommu | grep -i "group $1" | cut -d " " -f 4 | perl -pe "s/([0-9a-f]{2}:[0-9a-f]{2}.[0-9a-f]{1})\n/\"\1\" /" | perl -pe "s/\s$//")
|
||||
|
||||
# Replace the blank USB_CTL_ID with the PCI_ID for the usb controller the user wants to pass through
|
||||
perl -pi -e "s/USB_CTL_ID=\(\)/USB_CTL_ID=\($PCI_ID\)/" "$SCRIPTDIR/$QUICKEMU/qemu-vfio_vars.conf"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue