diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/runqemu | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 195f432810..918141238c 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
| @@ -240,7 +240,7 @@ class BaseConfig(object): | |||
| 240 | if not re.search('.qemuboot.conf$', '\n'.join(os.listdir(p)), re.M): | 240 | if not re.search('.qemuboot.conf$', '\n'.join(os.listdir(p)), re.M): |
| 241 | logger.info("Can't find required *.qemuboot.conf in %s" % p) | 241 | logger.info("Can't find required *.qemuboot.conf in %s" % p) |
| 242 | return False | 242 | return False |
| 243 | if not re.search('-image-', '\n'.join(os.listdir(p))): | 243 | if not any(map(lambda name: '-image-' in name, os.listdir(p))): |
| 244 | logger.info("Can't find *-image-* in %s" % p) | 244 | logger.info("Can't find *-image-* in %s" % p) |
| 245 | return False | 245 | return False |
| 246 | return True | 246 | return True |
| @@ -289,7 +289,7 @@ class BaseConfig(object): | |||
| 289 | re.search('zImage', p) or re.search('vmlinux', p) or \ | 289 | re.search('zImage', p) or re.search('vmlinux', p) or \ |
| 290 | re.search('fitImage', p) or re.search('uImage', p): | 290 | re.search('fitImage', p) or re.search('uImage', p): |
| 291 | self.kernel = p | 291 | self.kernel = p |
| 292 | elif os.path.exists(p) and (not os.path.isdir(p)) and re.search('-image-', os.path.basename(p)): | 292 | elif os.path.exists(p) and (not os.path.isdir(p)) and '-image-' in os.path.basename(p): |
| 293 | self.rootfs = p | 293 | self.rootfs = p |
| 294 | # Check filename against self.fstypes can hanlde <file>.cpio.gz, | 294 | # Check filename against self.fstypes can hanlde <file>.cpio.gz, |
| 295 | # otherwise, its type would be "gz", which is incorrect. | 295 | # otherwise, its type would be "gz", which is incorrect. |
| @@ -403,7 +403,7 @@ class BaseConfig(object): | |||
| 403 | self.kernel_cmdline_script += ' %s' % arg[len('bootparams='):] | 403 | self.kernel_cmdline_script += ' %s' % arg[len('bootparams='):] |
| 404 | elif os.path.exists(arg) or (re.search(':', arg) and re.search('/', arg)): | 404 | elif os.path.exists(arg) or (re.search(':', arg) and re.search('/', arg)): |
| 405 | self.check_arg_path(os.path.abspath(arg)) | 405 | self.check_arg_path(os.path.abspath(arg)) |
| 406 | elif re.search('-image-', arg): | 406 | elif re.search(r'-image-|-image$', arg): |
| 407 | # Lazy rootfs | 407 | # Lazy rootfs |
| 408 | self.rootfs = arg | 408 | self.rootfs = arg |
| 409 | else: | 409 | else: |
