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
6dc9ccad
Commit
6dc9ccad
authored
Oct 26, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use const char*
parent
6add0270
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
init.c
native/jni/init.c
+2
-2
file.c
native/jni/utils/file.c
+1
-1
utils.h
native/jni/utils/include/utils.h
+1
-1
No files found.
native/jni/init.c
View file @
6dc9ccad
...
@@ -370,7 +370,7 @@ int main(int argc, char *argv[]) {
...
@@ -370,7 +370,7 @@ int main(int argc, char *argv[]) {
if
(
cmd
.
skip_initramfs
)
{
if
(
cmd
.
skip_initramfs
)
{
// Clear rootfs
// Clear rootfs
excl_list
=
(
char
*
[])
{
"overlay"
,
".backup"
,
"proc"
,
"sys"
,
"init.bak"
,
NULL
};
excl_list
=
(
c
onst
c
har
*
[])
{
"overlay"
,
".backup"
,
"proc"
,
"sys"
,
"init.bak"
,
NULL
};
frm_rf
(
root
);
frm_rf
(
root
);
}
else
{
}
else
{
// Revert original init binary
// Revert original init binary
...
@@ -399,7 +399,7 @@ int main(int argc, char *argv[]) {
...
@@ -399,7 +399,7 @@ int main(int argc, char *argv[]) {
int
system_root
=
open
(
"/system_root"
,
O_RDONLY
|
O_CLOEXEC
);
int
system_root
=
open
(
"/system_root"
,
O_RDONLY
|
O_CLOEXEC
);
// Clone rootfs except /system
// Clone rootfs except /system
excl_list
=
(
char
*
[])
{
"system"
,
NULL
};
excl_list
=
(
c
onst
c
har
*
[])
{
"system"
,
NULL
};
clone_dir
(
system_root
,
root
);
clone_dir
(
system_root
,
root
);
close
(
system_root
);
close
(
system_root
);
...
...
native/jni/utils/file.c
View file @
6dc9ccad
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
#include "utils.h"
#include "utils.h"
#include "selinux.h"
#include "selinux.h"
char
**
excl_list
=
NULL
;
c
onst
c
har
**
excl_list
=
NULL
;
static
int
is_excl
(
const
char
*
name
)
{
static
int
is_excl
(
const
char
*
name
)
{
if
(
excl_list
)
if
(
excl_list
)
...
...
native/jni/utils/include/utils.h
View file @
6dc9ccad
...
@@ -109,7 +109,7 @@ int __fsetxattr(int fd, const char *name, const void *value, size_t size, int fl
...
@@ -109,7 +109,7 @@ int __fsetxattr(int fd, const char *name, const void *value, size_t size, int fl
#define align(p, a) (((p) + (a) - 1) / (a) * (a))
#define align(p, a) (((p) + (a) - 1) / (a) * (a))
#define align_off(p, a) (align(p, a) - (p))
#define align_off(p, a) (align(p, a) - (p))
extern
char
**
excl_list
;
extern
c
onst
c
har
**
excl_list
;
struct
file_attr
{
struct
file_attr
{
struct
stat
st
;
struct
stat
st
;
...
...
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