|
|
@ -38,7 +38,6 @@
|
|
|
|
#include <openssl/evp.h>
|
|
|
|
#include <openssl/evp.h>
|
|
|
|
#include <openssl/sha.h>
|
|
|
|
#include <openssl/sha.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <ext4_utils/ext4.h>
|
|
|
|
|
|
|
|
#include <ext4_utils/ext4_utils.h>
|
|
|
|
#include <ext4_utils/ext4_utils.h>
|
|
|
|
#include <linux/kdev_t.h>
|
|
|
|
#include <linux/kdev_t.h>
|
|
|
|
#include <fs_mgr.h>
|
|
|
|
#include <fs_mgr.h>
|
|
|
@ -1913,7 +1912,6 @@ static int cryptfs_enable_wipe(char *crypto_blkdev, off64_t size, int type)
|
|
|
|
int rc = -1;
|
|
|
|
int rc = -1;
|
|
|
|
|
|
|
|
|
|
|
|
if (type == EXT4_FS) {
|
|
|
|
if (type == EXT4_FS) {
|
|
|
|
#ifdef TARGET_USES_MKE2FS
|
|
|
|
|
|
|
|
args[0] = "/system/bin/mke2fs";
|
|
|
|
args[0] = "/system/bin/mke2fs";
|
|
|
|
args[1] = "-M";
|
|
|
|
args[1] = "-M";
|
|
|
|
args[2] = "/data";
|
|
|
|
args[2] = "/data";
|
|
|
@ -1925,16 +1923,6 @@ static int cryptfs_enable_wipe(char *crypto_blkdev, off64_t size, int type)
|
|
|
|
snprintf(size_str, sizeof(size_str), "%" PRId64, size / (4096 / 512));
|
|
|
|
snprintf(size_str, sizeof(size_str), "%" PRId64, size / (4096 / 512));
|
|
|
|
args[8] = size_str;
|
|
|
|
args[8] = size_str;
|
|
|
|
num_args = 9;
|
|
|
|
num_args = 9;
|
|
|
|
#else
|
|
|
|
|
|
|
|
args[0] = "/system/bin/make_ext4fs";
|
|
|
|
|
|
|
|
args[1] = "-a";
|
|
|
|
|
|
|
|
args[2] = "/data";
|
|
|
|
|
|
|
|
args[3] = "-l";
|
|
|
|
|
|
|
|
snprintf(size_str, sizeof(size_str), "%" PRId64, size * 512);
|
|
|
|
|
|
|
|
args[4] = size_str;
|
|
|
|
|
|
|
|
args[5] = crypto_blkdev;
|
|
|
|
|
|
|
|
num_args = 6;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
SLOGI("Making empty filesystem with command %s %s %s %s %s %s\n",
|
|
|
|
SLOGI("Making empty filesystem with command %s %s %s %s %s %s\n",
|
|
|
|
args[0], args[1], args[2], args[3], args[4], args[5]);
|
|
|
|
args[0], args[1], args[2], args[3], args[4], args[5]);
|
|
|
|
} else if (type == F2FS_FS) {
|
|
|
|
} else if (type == F2FS_FS) {
|
|
|
|