summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/runqemu8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index bd1f8366b6..e1aa5a925c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1159,7 +1159,11 @@ to your build configuration.
1159 logger.debug('Running %s...' % str(cmd)) 1159 logger.debug('Running %s...' % str(cmd))
1160 ip_link = subprocess.check_output(cmd).decode('utf-8') 1160 ip_link = subprocess.check_output(cmd).decode('utf-8')
1161 # Matches line like: 6: tap0: <foo> 1161 # Matches line like: 6: tap0: <foo>
1162 possibles = re.findall('^[0-9]+: +(tap[0-9]+): <.*', ip_link, re.M) 1162 oe_tap_name = 'tap'
1163 if 'OE_TAP_NAME' in os.environ:
1164 oe_tap_name = os.environ['OE_TAP_NAME']
1165 tap_re = '^[0-9]+: +(' + oe_tap_name + '[0-9]+): <.*'
1166 possibles = re.findall(tap_re, ip_link, re.M)
1163 tap = "" 1167 tap = ""
1164 for p in possibles: 1168 for p in possibles:
1165 lockfile = os.path.join(lockdir, p) 1169 lockfile = os.path.join(lockdir, p)
@@ -1198,7 +1202,7 @@ to your build configuration.
1198 logger.error("Failed to setup tap device. Run runqemu-gen-tapdevs to manually create.") 1202 logger.error("Failed to setup tap device. Run runqemu-gen-tapdevs to manually create.")
1199 sys.exit(1) 1203 sys.exit(1)
1200 self.tap = tap 1204 self.tap = tap
1201 tapnum = int(tap[3:]) 1205 tapnum = int(tap[len(oe_tap_name):])
1202 gateway = tapnum * 2 + 1 1206 gateway = tapnum * 2 + 1
1203 client = gateway + 1 1207 client = gateway + 1
1204 if self.fstype == 'nfs': 1208 if self.fstype == 'nfs':