Skip to contentSkip to conversation

runqemu tap device fix

PATCH Applied Scott Garman 2 participants 3 messages Sep 21, 2012 – Sep 24, 2012

lore
Share & tools
lore
#0 lore raw

cover runqemu tap device fix

Hello,

n Fedora systems (and likely others), ifconfig returns interface names that end with a colon. Make sure we strip the colon off the tap device name before using it.

This fixes [YOCTO #3028]

I don't have a Fedora system handy, so I asked Tom Zanussi to test this patch, and he confirms it works for him.

Scott

The following changes since commit 5e03d1e83d0536a2fc69a88d3e5407108836203f:

gcc: Use 4.7.2 release tarball (2012-09-21 14:55:26 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib sgarman/runqemu-tap-fix-oe
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=sgarman/runqemu-tap-fix-oe

Scott Garman (1):
runqemu: work with tap device names that end with a colon

 scripts/runqemu-gen-tapdevs |    2 +-
 scripts/runqemu-internal    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 runqemu: work with tap device names that end with a colon

On Fedora systems (and likely others), ifconfig returns interface names that end with a colon. Make sure we strip the colon off the tap device name before using it.

This fixes [YOCTO #3028]

---
 scripts/runqemu-gen-tapdevs |    2 +-
 scripts/runqemu-internal    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
scripts/runqemu-gen-tapdevs +1 -1
index 2c1ff0e..f5be30a 100755
@@ -70,7 +70,7 @@ if [ ! -x "$IFCONFIG" ]; then
 fi
 
 # Ensure we start with a clean slate
-for tap in `$IFCONFIG | grep ^tap | awk '{ print \$1 }'`; do
+for tap in `$IFCONFIG | grep ^tap | awk '{ print \$1 }' | sed s/://`; do
 	echo "Note: Destroying pre-existing tap interface $tap..."
 	$TUNCTL -d $tap
 done
scripts/runqemu-internal +1 -1
index 6e20dd7..6b8bb65 100755
@@ -154,7 +154,7 @@ if [ ! -x "$IFCONFIG" ]; then
        exit 1
 fi
 
-POSSIBLE=`$IFCONFIG -a | grep '^tap' | awk '{print $1}'`
+POSSIBLE=`$IFCONFIG -a | grep '^tap' | awk '{print $1}' | sed s/://`
 TAP=""
 LOCKFILE=""
 for tap in $POSSIBLE; do
Signature · 1 line
1.7.9.5
#2 lore raw

Re: [PATCH 1/1] runqemu: work with tap device names that end with a colon

Quoted 11 lines · Scott Garman

On Fedora systems (and likely others), ifconfig returns interface names that end with a colon. Make sure we strip the colon off the tap device name before using it.

This fixes [YOCTO #3028]

---
 scripts/runqemu-gen-tapdevs |    2 +-
 scripts/runqemu-internal    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Merged to master, thanks.

Richard