mirror of
https://github.com/topjohnwu/Magisk
synced 2024-11-14 22:28:37 +01:00
Add missing flags and move debug logging logic to libutils
This commit is contained in:
parent
8ec3086cdd
commit
2efc423cf8
@ -18,7 +18,6 @@
|
||||
#include "utils.h"
|
||||
#include "daemon.h"
|
||||
#include "selinux.h"
|
||||
#include "flags.h"
|
||||
|
||||
int setup_done = 0;
|
||||
int seperate_vendor = 0;
|
||||
@ -103,9 +102,6 @@ static void *request_handler(void *args) {
|
||||
|
||||
static void main_daemon() {
|
||||
android_logging();
|
||||
#ifndef MAGISK_DEBUG
|
||||
log_cb.d = nop_log;
|
||||
#endif
|
||||
setsid();
|
||||
setcon("u:r:"SEPOL_PROC_DOMAIN":s0");
|
||||
int fd = xopen("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "magiskboot.h"
|
||||
#include "logging.h"
|
||||
#include "utils.h"
|
||||
#include "flags.h"
|
||||
|
||||
/********************
|
||||
Patch Boot Image
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "magiskhide.h"
|
||||
#include "daemon.h"
|
||||
#include "resetprop.h"
|
||||
#include "flags.h"
|
||||
|
||||
struct vector *hide_list = NULL;
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "vector.h"
|
||||
#include "magiskpolicy.h"
|
||||
#include "magisk.h"
|
||||
#include "flags.h"
|
||||
|
||||
static int syntax_err = 0;
|
||||
static char err_msg[ARG_MAX];
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "_resetprop.h"
|
||||
#include "vector.h"
|
||||
#include "utils.h"
|
||||
#include "flags.h"
|
||||
|
||||
int prop_verbose = 0;
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <android/log.h>
|
||||
|
||||
#include "logging.h"
|
||||
#include "flags.h"
|
||||
|
||||
int nop_log(const char *fmt, va_list ap) {
|
||||
return 0;
|
||||
@ -45,7 +46,11 @@ static int log_e(const char *fmt, va_list ap) {
|
||||
}
|
||||
|
||||
void android_logging() {
|
||||
#ifdef MAGISK_DEBUG
|
||||
log_cb.d = log_d;
|
||||
#else
|
||||
log_cb.d = nop_log;
|
||||
#endif
|
||||
log_cb.i = log_i;
|
||||
log_cb.w = log_w;
|
||||
log_cb.e = log_e;
|
||||
|
Loading…
Reference in New Issue
Block a user