Seperate logging to another header

This commit is contained in:
topjohnwu
2017-09-14 21:54:56 +08:00
parent 7394ff9346
commit 1816ca6b02
9 changed files with 72 additions and 60 deletions

View File

@@ -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() {

View File

@@ -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) {