image/image: rename losetup_rootfs_image() to losetup_setup_image()
This commit is contained in:
parent
7d9e48a652
commit
5ae07ab0ea
4 changed files with 9 additions and 9 deletions
|
@ -15,7 +15,7 @@ from flavours.cli import profile_option
|
|||
from wrapper import enforce_wrap
|
||||
|
||||
from .fastboot import fastboot_flash
|
||||
from .image import dd_image, dump_aboot, dump_lk2nd, dump_qhypstub, get_image_path, losetup_destroy, losetup_rootfs_image, partprobe, shrink_fs
|
||||
from .image import dd_image, dump_aboot, dump_lk2nd, dump_qhypstub, get_image_path, losetup_destroy, losetup_setup_image, partprobe, shrink_fs
|
||||
from .cryptsetup import encryption_option
|
||||
|
||||
ABOOT = FLASH_PARTS['ABOOT']
|
||||
|
@ -55,7 +55,7 @@ def prepare_minimal_image(source_path: str, sector_size: int, encrypted: Optiona
|
|||
logging.info(f"Copying image {os.path.basename(source_path)} to {minimal_image_dir} for shrinking")
|
||||
shutil.copyfile(source_path, minimal_image_path)
|
||||
|
||||
loop_device = losetup_rootfs_image(minimal_image_path, sector_size)
|
||||
loop_device = losetup_setup_image(minimal_image_path, sector_size)
|
||||
partprobe(loop_device)
|
||||
shrink_fs(loop_device, minimal_image_path, sector_size, encrypted, encryption_password)
|
||||
losetup_destroy(loop_device)
|
||||
|
@ -145,7 +145,7 @@ def cmd_flash(
|
|||
else:
|
||||
if method and method != FASTBOOT:
|
||||
raise Exception(f'Flashing "{what}" with method "{method}" not supported, try no parameter or "{FASTBOOT}"')
|
||||
loop_device = losetup_rootfs_image(device_image_path, sector_size)
|
||||
loop_device = losetup_setup_image(device_image_path, sector_size)
|
||||
if what == ABOOT:
|
||||
path = dump_aboot(f'{loop_device}p1')
|
||||
fastboot_flash(location or 'boot', path, confirm=confirm)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue