Merge pull request #10660 from BbolroC/fix-leading-zero-issue-for-vfio-ap

vfio-ap: Assign default string "0" for empty APID and APQI
This commit is contained in:
Hyounggyu Choi
2024-12-13 17:40:29 +01:00
committed by GitHub

View File

@@ -156,7 +156,9 @@ create_mediated_device() {
_APID=${APQN//.*}
_APQI=${APQN#*.}
APID=$(echo ${_APID} | sed 's/^0*//')
APID=${APID:-0}
APQI=$(echo ${_APQI} | sed 's/^0*//')
APQI=${APQI:-0}
# Release the device from the host
pushd ${sys_bus_base}