mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-16 21:53:04 +00:00
Seperate logging to another header
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <selinux/selinux.h>
|
||||
|
||||
#include "magisk.h"
|
||||
#include "logging.h"
|
||||
#include "utils.h"
|
||||
|
||||
int quit_signals[] = { SIGALRM, SIGABRT, SIGHUP, SIGPIPE, SIGQUIT, SIGTERM, SIGINT, 0 };
|
||||
@@ -167,21 +167,6 @@ void ps_filter_proc_name(const char *pattern, void (*func)(int)) {
|
||||
ps(proc_name_filter);
|
||||
}
|
||||
|
||||
int create_links(const char *bin, const char *path) {
|
||||
char self[PATH_MAX], linkpath[PATH_MAX];
|
||||
if (bin == NULL) {
|
||||
xreadlink("/proc/self/exe", self, sizeof(self));
|
||||
bin = self;
|
||||
}
|
||||
int ret = 0;
|
||||
for (int i = 0; applet[i]; ++i) {
|
||||
snprintf(linkpath, sizeof(linkpath), "%s/%s", path, applet[i]);
|
||||
unlink(linkpath);
|
||||
ret |= symlink(bin, linkpath);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define DEV_BLOCK "/dev/block"
|
||||
|
||||
void unlock_blocks() {
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#include <sys/mman.h>
|
||||
#include <sys/sendfile.h>
|
||||
|
||||
#include "magisk.h"
|
||||
#include "logging.h"
|
||||
#include "utils.h"
|
||||
|
||||
FILE *xfopen(const char *pathname, const char *mode) {
|
||||
|
Reference in New Issue
Block a user