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
9e1aea33
Commit
9e1aea33
authored
Jun 30, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve xmkdir
parent
8767a888
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
bootstages.c
jni/daemon/bootstages.c
+7
-7
daemon.c
jni/daemon/daemon.c
+1
-1
xwrap.c
jni/utils/xwrap.c
+1
-1
No files found.
jni/daemon/bootstages.c
View file @
9e1aea33
...
@@ -74,8 +74,8 @@ static int merge_img(const char *source, const char *target) {
...
@@ -74,8 +74,8 @@ static int merge_img(const char *source, const char *target) {
if
(
n_total
!=
t_total
)
if
(
n_total
!=
t_total
)
resize_img
(
target
,
n_total
);
resize_img
(
target
,
n_total
);
mkdir
(
SOURCE_TMP
,
0755
);
x
mkdir
(
SOURCE_TMP
,
0755
);
mkdir
(
TARGET_TMP
,
0755
);
x
mkdir
(
TARGET_TMP
,
0755
);
char
*
s_loop
,
*
t_loop
;
char
*
s_loop
,
*
t_loop
;
s_loop
=
mount_image
(
source
,
SOURCE_TMP
);
s_loop
=
mount_image
(
source
,
SOURCE_TMP
);
if
(
s_loop
==
NULL
)
return
1
;
if
(
s_loop
==
NULL
)
return
1
;
...
@@ -332,7 +332,7 @@ static void clone_skeleton(struct node_entry *node) {
...
@@ -332,7 +332,7 @@ static void clone_skeleton(struct node_entry *node) {
// Create the dummy file/directory
// Create the dummy file/directory
if
(
IS_DIR
(
child
))
if
(
IS_DIR
(
child
))
mkdir
(
buf
,
0755
);
x
mkdir
(
buf
,
0755
);
else
if
(
IS_REG
(
child
))
else
if
(
IS_REG
(
child
))
close
(
open_new
(
buf
));
close
(
open_new
(
buf
));
// Links will be handled later
// Links will be handled later
...
@@ -540,10 +540,10 @@ void post_fs_data(int client) {
...
@@ -540,10 +540,10 @@ void post_fs_data(int client) {
goto
unblock
;
goto
unblock
;
if
(
new_img
)
{
if
(
new_img
)
{
mkdir
(
COREDIR
,
0755
);
x
mkdir
(
COREDIR
,
0755
);
mkdir
(
COREDIR
"/post-fs-data.d"
,
0755
);
x
mkdir
(
COREDIR
"/post-fs-data.d"
,
0755
);
mkdir
(
COREDIR
"/service.d"
,
0755
);
x
mkdir
(
COREDIR
"/service.d"
,
0755
);
mkdir
(
COREDIR
"/props"
,
0755
);
x
mkdir
(
COREDIR
"/props"
,
0755
);
}
}
// Run common scripts
// Run common scripts
...
...
jni/daemon/daemon.c
View file @
9e1aea33
...
@@ -171,7 +171,7 @@ void start_daemon(int client) {
...
@@ -171,7 +171,7 @@ void start_daemon(int client) {
xmount
(
NULL
,
"/"
,
NULL
,
MS_REMOUNT
,
NULL
);
xmount
(
NULL
,
"/"
,
NULL
,
MS_REMOUNT
,
NULL
);
create_links
(
NULL
,
"/sbin"
);
create_links
(
NULL
,
"/sbin"
);
xchmod
(
"/sbin"
,
0755
);
xchmod
(
"/sbin"
,
0755
);
mkdir
(
"/magisk"
,
0755
);
x
mkdir
(
"/magisk"
,
0755
);
xchmod
(
"/magisk"
,
0755
);
xchmod
(
"/magisk"
,
0755
);
xmount
(
NULL
,
"/"
,
NULL
,
MS_REMOUNT
|
MS_RDONLY
,
NULL
);
xmount
(
NULL
,
"/"
,
NULL
,
MS_REMOUNT
|
MS_RDONLY
,
NULL
);
...
...
jni/utils/xwrap.c
View file @
9e1aea33
...
@@ -307,7 +307,7 @@ int xrename(const char *oldpath, const char *newpath) {
...
@@ -307,7 +307,7 @@ int xrename(const char *oldpath, const char *newpath) {
int
xmkdir
(
const
char
*
pathname
,
mode_t
mode
)
{
int
xmkdir
(
const
char
*
pathname
,
mode_t
mode
)
{
int
ret
=
mkdir
(
pathname
,
mode
);
int
ret
=
mkdir
(
pathname
,
mode
);
if
(
ret
==
-
1
)
{
if
(
ret
==
-
1
&&
errno
!=
EEXIST
)
{
PLOGE
(
"mkdir %s %u"
,
pathname
,
mode
);
PLOGE
(
"mkdir %s %u"
,
pathname
,
mode
);
}
}
return
ret
;
return
ret
;
...
...
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