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
3d9a15df
Commit
3d9a15df
authored
May 26, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary '--' in magiskhide
parent
449c7fda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
magiskhide.cpp
native/jni/magiskhide/magiskhide.cpp
+21
-16
No files found.
native/jni/magiskhide/magiskhide.cpp
View file @
3d9a15df
...
...
@@ -20,16 +20,16 @@ bool hide_enabled = false;
[[
noreturn
]]
static
void
usage
(
char
*
arg0
)
{
fprintf
(
stderr
,
FULL_VER
(
MagiskHide
)
"
\n\n
"
"Usage: %s [
--op
tion [arguments...] ]
\n\n
"
"
Op
tions:
\n
"
"
--
status Return the status of magiskhide
\n
"
"
--
enable Start magiskhide
\n
"
"
--
disable Stop magiskhide
\n
"
"
--
add PKG [PROC] Add a new target to the hide list
\n
"
"
--rm PKG [PROC] Remove
from the hide list
\n
"
"
--ls Lis
t the current hide list
\n
"
"Usage: %s [
ac
tion [arguments...] ]
\n\n
"
"
Ac
tions:
\n
"
"
status Return the status of magiskhide
\n
"
"
enable Start magiskhide
\n
"
"
disable Stop magiskhide
\n
"
"
add PKG [PROC] Add a new target to the hide list
\n
"
"
rm PKG [PROC] Remove target(s)
from the hide list
\n
"
"
ls Prin
t the current hide list
\n
"
#ifdef MAGISK_DEBUG
"
--
test Run process monitor test
\n
"
"
test Run process monitor test
\n
"
#endif
,
arg0
);
exit
(
1
);
...
...
@@ -81,21 +81,26 @@ int magiskhide_main(int argc, char *argv[]) {
if
(
argc
<
2
)
usage
(
argv
[
0
]);
// CLI backwards compatibility
const
char
*
opt
=
argv
[
1
];
if
(
opt
[
0
]
==
'-'
&&
opt
[
1
]
==
'-'
)
opt
+=
2
;
int
req
;
if
(
argv
[
1
]
==
"--
enable"
sv
)
if
(
opt
==
"
enable"
sv
)
req
=
LAUNCH_MAGISKHIDE
;
else
if
(
argv
[
1
]
==
"--
disable"
sv
)
else
if
(
opt
==
"
disable"
sv
)
req
=
STOP_MAGISKHIDE
;
else
if
(
argv
[
1
]
==
"--
add"
sv
)
else
if
(
opt
==
"
add"
sv
)
req
=
ADD_HIDELIST
;
else
if
(
argv
[
1
]
==
"--
rm"
sv
)
else
if
(
opt
==
"
rm"
sv
)
req
=
RM_HIDELIST
;
else
if
(
argv
[
1
]
==
"--
ls"
sv
)
else
if
(
opt
==
"
ls"
sv
)
req
=
LS_HIDELIST
;
else
if
(
argv
[
1
]
==
"--
status"
sv
)
else
if
(
opt
==
"
status"
sv
)
req
=
HIDE_STATUS
;
#ifdef MAGISK_DEBUG
else
if
(
argv
[
1
]
==
"--
test"
sv
)
else
if
(
opt
==
"
test"
sv
)
test_proc_monitor
();
#endif
else
...
...
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