mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-16 04:29:47 +00:00
Rename Array to Vector
Finally get rid of the C style vector, rename the template class to its proper name
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#include "daemon.h"
|
||||
#include "db.h"
|
||||
|
||||
Array<CharArray> hide_list;
|
||||
Vector<CharArray> hide_list;
|
||||
|
||||
static const char *prop_key[] =
|
||||
{ "ro.boot.vbmeta.device_state", "ro.boot.verifiedbootstate", "ro.boot.flash.locked",
|
||||
@@ -232,8 +232,8 @@ bool init_list() {
|
||||
|
||||
// Migrate old hide list into database
|
||||
if (access(LEGACY_LIST, R_OK) == 0) {
|
||||
Array<CharArray> tmp;
|
||||
file_to_array(LEGACY_LIST, tmp);
|
||||
Vector<CharArray> tmp;
|
||||
file_to_vector(LEGACY_LIST, tmp);
|
||||
for (auto &s : tmp)
|
||||
add_list(db, s);
|
||||
unlink(LEGACY_LIST);
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#include <pthread.h>
|
||||
|
||||
#include "daemon.h"
|
||||
#include "array.h"
|
||||
#include "Vector.h"
|
||||
#include "CharArray.h"
|
||||
|
||||
#define TERM_THREAD SIGUSR1
|
||||
@@ -30,7 +30,7 @@ bool init_list();
|
||||
|
||||
extern int hide_enabled;
|
||||
extern pthread_mutex_t list_lock;
|
||||
extern Array<CharArray> hide_list;
|
||||
extern Vector<CharArray> hide_list;
|
||||
|
||||
enum {
|
||||
LAUNCH_MAGISKHIDE,
|
||||
|
@@ -63,7 +63,7 @@ static void hide_daemon(int pid) {
|
||||
LOGD("hide_daemon: start unmount for pid=[%d]\n", pid);
|
||||
|
||||
char buffer[PATH_MAX];
|
||||
Array<CharArray> mounts;
|
||||
Vector<CharArray> mounts;
|
||||
|
||||
manage_selinux();
|
||||
clean_magisk_props();
|
||||
@@ -72,7 +72,7 @@ static void hide_daemon(int pid) {
|
||||
goto exit;
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "/proc/%d/mounts", pid);
|
||||
file_to_array(buffer, mounts);
|
||||
file_to_vector(buffer, mounts);
|
||||
|
||||
// Unmount dummy skeletons and /sbin links
|
||||
for (auto &s : mounts) {
|
||||
@@ -85,7 +85,7 @@ static void hide_daemon(int pid) {
|
||||
|
||||
// Re-read mount infos
|
||||
snprintf(buffer, sizeof(buffer), "/proc/%d/mounts", pid);
|
||||
file_to_array(buffer, mounts);
|
||||
file_to_vector(buffer, mounts);
|
||||
|
||||
// Unmount everything under /system, /vendor, and loop mounts
|
||||
for (auto &s : mounts) {
|
||||
|
Reference in New Issue
Block a user