mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-30 13:35:27 +00:00
Make sure all logging ends with newline
This commit is contained in:
parent
a848f10bba
commit
797ba4fbf4
@ -61,7 +61,7 @@ static void mount_mirrors() {
|
|||||||
char buf1[4096];
|
char buf1[4096];
|
||||||
char buf2[4096];
|
char buf2[4096];
|
||||||
|
|
||||||
LOGI("* Mounting mirrors");
|
LOGI("* Mounting mirrors\n");
|
||||||
|
|
||||||
parse_mnt("/proc/mounts", [&](mntent *me) {
|
parse_mnt("/proc/mounts", [&](mntent *me) {
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
@ -359,7 +359,7 @@ bool validate_manager(string &pkg, int userid, struct stat *st) {
|
|||||||
// Check the official package name
|
// Check the official package name
|
||||||
sprintf(app_path, "%s/%d/" JAVA_PACKAGE_NAME, APP_DATA_DIR, userid);
|
sprintf(app_path, "%s/%d/" JAVA_PACKAGE_NAME, APP_DATA_DIR, userid);
|
||||||
if (stat(app_path, st)) {
|
if (stat(app_path, st)) {
|
||||||
LOGE("su: cannot find manager");
|
LOGE("su: cannot find manager\n");
|
||||||
memset(st, 0, sizeof(*st));
|
memset(st, 0, sizeof(*st));
|
||||||
pkg.clear();
|
pkg.clear();
|
||||||
return false;
|
return false;
|
||||||
|
@ -82,7 +82,7 @@ int recv_fd(int sockfd) {
|
|||||||
cmsg->cmsg_level != SOL_SOCKET ||
|
cmsg->cmsg_level != SOL_SOCKET ||
|
||||||
cmsg->cmsg_type != SCM_RIGHTS) {
|
cmsg->cmsg_type != SCM_RIGHTS) {
|
||||||
error:
|
error:
|
||||||
LOGE("unable to read fd");
|
LOGE("unable to read fd\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ void su_daemon_handler(int client, struct ucred *credential) {
|
|||||||
|
|
||||||
// Fail fast
|
// Fail fast
|
||||||
if (ctx.info->access.policy == DENY) {
|
if (ctx.info->access.policy == DENY) {
|
||||||
LOGW("su: request rejected (%u)", ctx.info->uid);
|
LOGW("su: request rejected (%u)\n", ctx.info->uid);
|
||||||
ctx.info.reset();
|
ctx.info.reset();
|
||||||
write_int(client, DENY);
|
write_int(client, DENY);
|
||||||
close(client);
|
close(client);
|
||||||
@ -244,7 +244,7 @@ void su_daemon_handler(int client, struct ucred *credential) {
|
|||||||
|
|
||||||
// If caller is not root, ensure the owner of pts_slave is the caller
|
// If caller is not root, ensure the owner of pts_slave is the caller
|
||||||
if(st.st_uid != ctx.info->uid && ctx.info->uid != 0)
|
if(st.st_uid != ctx.info->uid && ctx.info->uid != 0)
|
||||||
LOGE("su: Wrong permission of pts_slave");
|
LOGE("su: Wrong permission of pts_slave\n");
|
||||||
|
|
||||||
// Opening the TTY has to occur after the
|
// Opening the TTY has to occur after the
|
||||||
// fork() and setsid() so that it becomes
|
// fork() and setsid() so that it becomes
|
||||||
|
@ -29,17 +29,17 @@ sFILE make_stream_fp(stream_ptr &&strm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int stream::read(void *buf, size_t len) {
|
int stream::read(void *buf, size_t len) {
|
||||||
LOGE("This stream does not support read");
|
LOGE("This stream does not support read\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int stream::write(const void *buf, size_t len) {
|
int stream::write(const void *buf, size_t len) {
|
||||||
LOGE("This stream does not support write");
|
LOGE("This stream does not support write\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
off_t stream::seek(off_t off, int whence) {
|
off_t stream::seek(off_t off, int whence) {
|
||||||
LOGE("This stream does not support seek");
|
LOGE("This stream does not support seek\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user