diff options
-rw-r--r-- | puncture_fs/Android.bp | 2 | ||||
-rw-r--r-- | puncture_fs/puncture_fs.cpp (renamed from puncture_fs/puncture_fs.c) | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/puncture_fs/Android.bp b/puncture_fs/Android.bp index 194f78f6..5c163372 100644 --- a/puncture_fs/Android.bp +++ b/puncture_fs/Android.bp @@ -15,7 +15,7 @@ cc_binary { name: "puncture_fs", - srcs: ["puncture_fs.c"], + srcs: ["puncture_fs.cpp"], cflags: [ "-Wall", "-Werror", diff --git a/puncture_fs/puncture_fs.c b/puncture_fs/puncture_fs.cpp index dbb4efce..9c01e3b0 100644 --- a/puncture_fs/puncture_fs.c +++ b/puncture_fs/puncture_fs.cpp @@ -143,7 +143,7 @@ static bool puncture_fs (const char * const path, const u64 total_size, u64 starting_max = 0; u64 ending_max = increments; char stay_dir[FILENAME_MAX], delete_dir[FILENAME_MAX]; - char *rm_bin_argv[] = { "/system/bin/rm", "-rf", ""}; + const char* rm_bin_argv[] = { "/system/bin/rm", "-rf", ""}; u64 file_id = 1; char *base_file_data; u64 i = 0; @@ -190,8 +190,8 @@ static bool puncture_fs (const char * const path, const u64 total_size, fprintf(stderr, "\rSTAGE 2/2: 0%% Complete"); free(base_file_data); rm_bin_argv[2] = delete_dir; - if (android_fork_execvp_ext(ARRAY_SIZE(rm_bin_argv), rm_bin_argv, - NULL, 1, LOG_KLOG, 0, NULL, NULL, 0) < 0) { + if (logwrap_fork_execvp(ARRAY_SIZE(rm_bin_argv), rm_bin_argv, nullptr, + false, LOG_KLOG, false, nullptr) < 0) { fprintf(stderr, "\nFailed to delete %s\n", rm_bin_argv[2]); return false; } |