Fix resize error log

This commit is contained in:
Rikka
2023-05-27 16:53:16 +08:00
committed by Rikka
parent 9d9f504625
commit 4d15b6153c
4 changed files with 13 additions and 22 deletions
+2 -8
View File
@@ -24,14 +24,8 @@ def umount(mount_point, exists=True):
mount_point))
def resize(img_file, size):
try:
run(["e2fsck", "-y", "-f", img_file])
except subprocess.CalledProcessError:
pass
try:
run(["resize2fs", img_file, size])
except subprocess.CalledProcessError:
pass
run(["sudo", "e2fsck", "-y", "-f", img_file], "^e2fsck \d+\.\d+\.\d (.+)\n$")
run(["sudo", "resize2fs", img_file, size], "^resize2fs \d+\.\d+\.\d (.+)\n$")
def get_image_dir():
# Read waydroid config to get image location