mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 13:45:45 -05:00
image.shrink_fs(): no need to run truncate elevated, we own the image file
This commit is contained in:
parent
6cfd8ae1c2
commit
7f9f326861
1 changed files with 1 additions and 1 deletions
2
image.py
2
image.py
|
@ -113,7 +113,7 @@ def shrink_fs(loop_device: str, file: str, sector_size: int):
|
|||
|
||||
logging.debug(f'({end_sector} + 1) sectors * {sector_size} bytes/sector = {end_size} bytes')
|
||||
logging.info(f'Truncating {file} to {end_size} bytes')
|
||||
result = run_root_cmd(['truncate', '-s', str(end_size), file])
|
||||
result = subprocess.run(['truncate', '-s', str(end_size), file])
|
||||
if result.returncode != 0:
|
||||
raise Exception(f'Failed to truncate {file}')
|
||||
partprobe(loop_device)
|
||||
|
|
Loading…
Add table
Reference in a new issue