mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
run: actually rename ./run --busybox-init to --eval-after
Had just changed the CLI parameter but nothing else! Had half worked because Python argparse is insane and accepts substrings like --eval-a. Fix #43
This commit is contained in:
11
run
11
run
@@ -25,7 +25,7 @@ defaults = {
|
||||
'initrd': False,
|
||||
'kernel_cli': None,
|
||||
'kernel_cli_after_dash': None,
|
||||
'eval_busybox': None,
|
||||
'eval_after': None,
|
||||
'kgdb': False,
|
||||
'kdb': False,
|
||||
'kvm': False,
|
||||
@@ -60,8 +60,8 @@ def main(args, extra_args=None):
|
||||
debug_vm = []
|
||||
if args.wait_gdb:
|
||||
extra_qemu_args.extend(['-S', common.Newline])
|
||||
if args.eval_busybox is not None:
|
||||
kernel_cli_after_dash += ' lkmc_eval_base64="{}"'.format(common.base64_encode(args.eval_busybox))
|
||||
if args.eval_after is not None:
|
||||
kernel_cli_after_dash += ' lkmc_eval_base64="{}"'.format(common.base64_encode(args.eval_after))
|
||||
if args.kernel_cli_after_dash is not None:
|
||||
kernel_cli_after_dash += ' {}'.format(args.kernel_cli_after_dash)
|
||||
if args.vnc:
|
||||
@@ -451,9 +451,10 @@ Example: `./run -a arm -e 'init=/poweroff.out'`
|
||||
'''
|
||||
)
|
||||
parser.add_argument(
|
||||
'-F', '--eval-after-init',
|
||||
'-F', '--eval-after',
|
||||
help='''\
|
||||
Pass a base64 encoded command line parameter that gets evalled by the Busybox init.
|
||||
Pass a base64 encoded command line parameter that gets evalled at the end of
|
||||
the normal init.
|
||||
See: https://github.com/cirosantilli/linux-kernel-module-cheat#init-busybox
|
||||
'''
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user