diff mbox series

runqemu: fix special characters bug

Message ID 20250801064828.2904332-1-libo.chen.cn@windriver.com
State New
Headers show
Series runqemu: fix special characters bug | expand

Commit Message

Chen, Libo (CN) Aug. 1, 2025, 6:48 a.m. UTC
From: Libo Chen <libo.chen.cn@windriver.com>

Fix the following bug for runqemu with a file path which contains
vmlinux characters.

runqemu - ERROR - wic doesn't need kernel

Signed-off-by: Libo Chen <libo.chen.cn@windriver.com>
---
 scripts/runqemu | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Alexander Kanavin Aug. 1, 2025, 12:32 p.m. UTC | #1
On Fri, 1 Aug 2025 at 08:48, Chen, Libo (CN) via
lists.openembedded.org
<libo.chen.cn=windriver.com@lists.openembedded.org> wrote:

> Fix the following bug for runqemu with a file path which contains
> vmlinux characters.

What are vmlinux characters? Can you show an example, so it's easier
to understand exactly what issue the patch is fixing.

Alex
diff mbox series

Patch

diff --git a/scripts/runqemu b/scripts/runqemu
index 3d77046972..137a4f0feb 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -368,12 +368,13 @@  class BaseConfig(object):
         - Check whether it is an NFS dir
         - Check whether it is an OVMF flash file
         """
+        n = os.path.basename(p)
         if p.endswith('.qemuboot.conf'):
             self.qemuboot = p
             self.qbconfload = True
-        elif re.search('\\.bin$', p) or re.search('bzImage', p) or \
-             re.search('zImage', p) or re.search('vmlinux', p) or \
-             re.search('fitImage', p) or re.search('uImage', p):
+        elif re.search('\\.bin$', n) or re.search('bzImage', n) or \
+             re.search('zImage', n) or re.search('vmlinux', n) or \
+             re.search('fitImage', n) or re.search('uImage', n):
             self.kernel =  p
         elif os.path.isfile(p) and ('-image-' in os.path.basename(p) or '.rootfs.' in os.path.basename(p)):
             self.rootfs = p