Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
cb7148a2
Commit
cb7148a2
authored
Jun 01, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to debug logging in modules
parent
2f824f59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
module.cpp
native/jni/core/module.cpp
+6
-6
No files found.
native/jni/core/module.cpp
View file @
cb7148a2
...
...
@@ -10,7 +10,7 @@
using
namespace
std
;
#define VLOG
I(tag, from, to) LOGI
("%-8s: %s <- %s\n", tag, to, from)
#define VLOG
D(tag, from, to) LOGD
("%-8s: %s <- %s\n", tag, to, from)
#define TYPE_MIRROR (1 << 0)
/* mount from mirror */
#define TYPE_INTER (1 << 1)
/* intermediate node */
...
...
@@ -35,7 +35,7 @@ template<class T> static bool isa(node_entry *node);
static
int
bind_mount
(
const
char
*
from
,
const
char
*
to
)
{
int
ret
=
xmount
(
from
,
to
,
nullptr
,
MS_BIND
,
nullptr
);
if
(
ret
==
0
)
VLOG
I
(
"bind_mnt"
,
from
,
to
);
VLOG
D
(
"bind_mnt"
,
from
,
to
);
return
ret
;
}
...
...
@@ -452,7 +452,7 @@ bool dir_node::collect_files(const char *module, int dfd) {
void
node_entry
::
create_and_mount
(
const
string
&
src
)
{
const
string
&
dest
=
node_path
();
if
(
is_lnk
())
{
VLOG
I
(
"cp_link"
,
src
.
data
(),
dest
.
data
());
VLOG
D
(
"cp_link"
,
src
.
data
(),
dest
.
data
());
cp_afc
(
src
.
data
(),
dest
.
data
());
}
else
{
if
(
is_dir
())
...
...
@@ -486,7 +486,7 @@ void skel_node::mount() {
if
(
!
isa
<
skel_node
>
(
parent
()))
{
// We don't need another layer of tmpfs if parent is skel
xmount
(
"tmpfs"
,
dest
.
data
(),
"tmpfs"
,
0
,
nullptr
);
VLOG
I
(
"mnt_tmp"
,
"tmpfs"
,
dest
.
data
());
VLOG
D
(
"mnt_tmp"
,
"tmpfs"
,
dest
.
data
());
}
setattr
(
dest
.
data
(),
&
a
);
dir_node
::
mount
();
...
...
@@ -505,13 +505,13 @@ public:
if
(
name
()
==
"magisk"
)
{
for
(
int
i
=
0
;
applet_names
[
i
];
++
i
)
{
string
dest
=
dir_name
+
"/"
+
applet_names
[
i
];
VLOG
I
(
"create"
,
"./magisk"
,
dest
.
data
());
VLOG
D
(
"create"
,
"./magisk"
,
dest
.
data
());
xsymlink
(
"./magisk"
,
dest
.
data
());
}
}
else
{
for
(
int
i
=
0
;
init_applet
[
i
];
++
i
)
{
string
dest
=
dir_name
+
"/"
+
init_applet
[
i
];
VLOG
I
(
"create"
,
"./magiskinit"
,
dest
.
data
());
VLOG
D
(
"create"
,
"./magiskinit"
,
dest
.
data
());
xsymlink
(
"./magiskinit"
,
dest
.
data
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment