mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-03 05:57:42 +00:00
Make version reporting consistent
This commit is contained in:
parent
48d417f9af
commit
ba7cb47383
@ -124,7 +124,7 @@ static void main_daemon() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGI(SHOW_VER(Magisk) " daemon started\n");
|
LOGI(NAME_WITH_VER(Magisk) " daemon started\n");
|
||||||
|
|
||||||
// Get server stat
|
// Get server stat
|
||||||
stat("/proc/self/exe", &self_st);
|
stat("/proc/self/exe", &self_st);
|
||||||
|
@ -15,7 +15,7 @@ using namespace std::literals;
|
|||||||
|
|
||||||
[[noreturn]] static void usage() {
|
[[noreturn]] static void usage() {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
FULL_VER(Magisk) R"EOF( multi-call binary
|
NAME_WITH_VER(Magisk) R"EOF( multi-call binary
|
||||||
|
|
||||||
Usage: magisk [applet [arguments]...]
|
Usage: magisk [applet [arguments]...]
|
||||||
or: magisk [options]...
|
or: magisk [options]...
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
#define MAGISK_VERSION str(__MVSTR)
|
#define MAGISK_VERSION str(__MVSTR)
|
||||||
#define MAGISK_VER_CODE __MCODE
|
#define MAGISK_VER_CODE __MCODE
|
||||||
|
#define MAGISK_FULL_VER MAGISK_VERSION "(" str(MAGISK_VER_CODE) ")"
|
||||||
|
|
||||||
#define SHOW_VER(name) str(name) " v" MAGISK_VERSION "(" str(MAGISK_VER_CODE) ")"
|
#define NAME_WITH_VER(name) str(name) " " MAGISK_FULL_VER
|
||||||
#define FULL_VER(name) SHOW_VER(name) " (by topjohnwu)"
|
|
||||||
|
|
||||||
#ifdef __MDBG
|
#ifdef __MDBG
|
||||||
#define MAGISK_DEBUG
|
#define MAGISK_DEBUG
|
||||||
|
@ -16,7 +16,7 @@ using namespace std;
|
|||||||
|
|
||||||
static void usage(char *arg0) {
|
static void usage(char *arg0) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
FULL_VER(MagiskBoot) R"EOF( - Boot Image Modification Tool
|
NAME_WITH_VER(MagiskBoot) R"EOF( - Boot Image Modification Tool
|
||||||
|
|
||||||
Usage: %s <action> [args...]
|
Usage: %s <action> [args...]
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ bool hide_enabled = false;
|
|||||||
|
|
||||||
[[noreturn]] static void usage(char *arg0) {
|
[[noreturn]] static void usage(char *arg0) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
FULL_VER(MagiskHide) "\n\n"
|
NAME_WITH_VER(MagiskHide) "\n\n"
|
||||||
"Usage: %s [action [arguments...] ]\n\n"
|
"Usage: %s [action [arguments...] ]\n\n"
|
||||||
"Actions:\n"
|
"Actions:\n"
|
||||||
" status Return the status of magiskhide\n"
|
" status Return the status of magiskhide\n"
|
||||||
|
@ -12,7 +12,7 @@ using namespace std::literals;
|
|||||||
|
|
||||||
[[noreturn]] static void usage(char *arg0) {
|
[[noreturn]] static void usage(char *arg0) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
FULL_VER(MagiskPolicy) R"EOF(
|
NAME_WITH_VER(MagiskPolicy) R"EOF(
|
||||||
|
|
||||||
Usage: %s [--options...] [policy statements...]
|
Usage: %s [--options...] [policy statements...]
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ illegal:
|
|||||||
|
|
||||||
[[noreturn]] static void usage(char* arg0) {
|
[[noreturn]] static void usage(char* arg0) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
FULL_VER(resetprop) " - System Props Modification Tool\n\n"
|
NAME_WITH_VER(resetprop) " - System Props Modification Tool\n\n"
|
||||||
"Usage: %s [flags] [options...]\n"
|
"Usage: %s [flags] [options...]\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
|
@ -34,7 +34,7 @@ static void usage(int status) {
|
|||||||
FILE *stream = (status == EXIT_SUCCESS) ? stdout : stderr;
|
FILE *stream = (status == EXIT_SUCCESS) ? stdout : stderr;
|
||||||
|
|
||||||
fprintf(stream,
|
fprintf(stream,
|
||||||
FULL_VER(MagiskSU) "\n\n"
|
NAME_WITH_VER(MagiskSU) "\n\n"
|
||||||
"Usage: su [options] [-] [user [argument...]]\n\n"
|
"Usage: su [options] [-] [user [argument...]]\n\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -c, --command COMMAND pass COMMAND to the invoked shell\n"
|
" -c, --command COMMAND pass COMMAND to the invoked shell\n"
|
||||||
|
@ -74,8 +74,11 @@ main() {
|
|||||||
|
|
||||||
$BOOTMODE || recovery_actions
|
$BOOTMODE || recovery_actions
|
||||||
|
|
||||||
PRETTY_VER=$MAGISK_VER
|
if echo $MAGISK_VER | grep -q '\.'; then
|
||||||
echo $PRETTY_VER | grep -q '\.' && PRETTY_VER=v$PRETTY_VER
|
PRETTY_VER=$MAGISK_VER
|
||||||
|
else
|
||||||
|
PRETTY_VER="$MAGISK_VER($MAGISK_VER_CODE)"
|
||||||
|
fi
|
||||||
print_title "Magisk $PRETTY_VER addon.d"
|
print_title "Magisk $PRETTY_VER addon.d"
|
||||||
|
|
||||||
mount_partitions
|
mount_partitions
|
||||||
|
@ -34,8 +34,11 @@ setup_flashable
|
|||||||
# Detection
|
# Detection
|
||||||
############
|
############
|
||||||
|
|
||||||
PRETTY_VER=$MAGISK_VER
|
if echo $MAGISK_VER | grep -q '\.'; then
|
||||||
echo $PRETTY_VER | grep -q '\.' && PRETTY_VER=v$PRETTY_VER
|
PRETTY_VER=$MAGISK_VER
|
||||||
|
else
|
||||||
|
PRETTY_VER="$MAGISK_VER($MAGISK_VER_CODE)"
|
||||||
|
fi
|
||||||
print_title "Magisk $PRETTY_VER Installer"
|
print_title "Magisk $PRETTY_VER Installer"
|
||||||
|
|
||||||
is_mounted /data || mount /data || is_mounted /cache || mount /cache
|
is_mounted /data || mount /data || is_mounted /cache || mount /cache
|
||||||
|
Loading…
x
Reference in New Issue
Block a user