扩展文件系统到分区的完整大小,保留分区数据

This commit is contained in:
zzh 2026-01-19 10:21:05 +08:00
parent 7ba7792b87
commit 1f7dd45b55
2 changed files with 6 additions and 6 deletions

View File

@ -60,7 +60,7 @@ int rk_check_and_resizefs(const char *filename) {
int result;
const char *const e2fsck_argv[] = { "/sbin/e2fsck", "-fy", filename, NULL };
const char *const resizefs_argv[] = { "/sbin/resize2fs", filename, NULL };
const char *const resizefs_argv[] = { "/sbin/resize2fs", "-f", filename, NULL };
result = run(e2fsck_argv[0], (char **) e2fsck_argv);
if(result) {

View File

@ -1071,13 +1071,13 @@ main(int argc, char **argv) {
if (status != INSTALL_SUCCESS) ui_print("Data wipe failed.\n");
} else if (wipe_all) {
if (device_wipe_data()) status = INSTALL_ERROR;
if (erase_volume("/userdata")) status = INSTALL_ERROR;
if (resize_volume("/userdata")) status = INSTALL_ERROR;
if (status != INSTALL_SUCCESS) {
ui_print("Data wipe failed.\n");
printf("userdata wipe failed.\n");
ui_print("Userdata resize failed.\n");
printf("userdata resize failed.\n");
} else {
ui_print("Data wipe done.\n");
printf("userdata wipe done.\n");
ui_print("Userdata resize done.\n");
printf("userdata resize done.\n");
}
if (access("/dev/block/by-name/oem", F_OK) == 0) {