mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 21:47:22 +00:00
config_tools: fix the issue that got wrong device name after specifying mac address
If user add the specific mac address (eg: mac=00:16:3E:77:A9:41) in launch script, we will get the device name with the specified mac address. This is unexpected. This patch updates the parser to fix the issue. v1-->v2: Update the parser with regex. Tracked-On: #7197 Signed-off-by: Kunhui-Li <kunhuix.li@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
parent
95a9c05a25
commit
b6538a4299
@ -127,8 +127,10 @@ function add_virtual_device() {
|
||||
|
||||
if [ "${kind}" = "virtio-net" ]; then
|
||||
# Create the tap device
|
||||
tap_conf=${options%,*}
|
||||
create_tap "${tap_conf#tap=}" >> /dev/stderr
|
||||
if [[ ${options} =~ tap=([^,]+) ]]; then
|
||||
tap_conf="${BASH_REMATCH[1]}"
|
||||
create_tap "${tap_conf}" >> /dev/stderr
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n "-s ${slot},${kind}"
|
||||
|
Loading…
Reference in New Issue
Block a user