While we can be passed an image size to use, we always called qemu-img
with 20M as the size. Fix this by using the size parameter.
Signed-off-by: Tom Rini <trini@konsulko.com>
try:
check_call(f'mkdir -p {mnt}', shell=True)
- check_call(f'qemu-img create {fname} 20M', shell=True)
+ check_call(f'qemu-img create {fname} {img_size}M', shell=True)
check_call(f'printf "{spec}" | sfdisk {fname}', shell=True)
except CalledProcessError:
call(f'rm -f {fname}', shell=True)