mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-27 12:57:38 +00:00
Wrapper is no longer needed
This commit is contained in:
parent
b13a35057a
commit
836bfbdd02
@ -10,8 +10,9 @@
|
|||||||
|
|
||||||
using namespace std::literals;
|
using namespace std::literals;
|
||||||
|
|
||||||
static int (*applet_main[]) (int, char *[]) =
|
using main_fun = int (*)(int, char *[]);
|
||||||
{ su_client_main, resetprop_main, magiskhide_main, nullptr };
|
|
||||||
|
static main_fun applet_main[] = { su_client_main, resetprop_main, magiskhide_main, nullptr };
|
||||||
|
|
||||||
[[noreturn]] static void call_applet(int argc, char **argv) {
|
[[noreturn]] static void call_applet(int argc, char **argv) {
|
||||||
// Applets
|
// Applets
|
||||||
@ -30,14 +31,6 @@ int main(int argc, char *argv[]) {
|
|||||||
cmdline_logging();
|
cmdline_logging();
|
||||||
init_argv0(argc, argv);
|
init_argv0(argc, argv);
|
||||||
|
|
||||||
if (basename(argv[0]) == "magisk.bin"sv) {
|
|
||||||
if (argc == 1)
|
|
||||||
return 1;
|
|
||||||
// Running through wrapper
|
|
||||||
--argc;
|
|
||||||
++argv;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (basename(argv[0]) == "magisk"sv) {
|
if (basename(argv[0]) == "magisk"sv) {
|
||||||
if (argc > 1 && argv[1][0] != '-') {
|
if (argc > 1 && argv[1][0] != '-') {
|
||||||
// Calling applet via magisk [applet] args
|
// Calling applet via magisk [applet] args
|
||||||
|
Loading…
x
Reference in New Issue
Block a user