Make tmpfs path static strings

This commit is contained in:
topjohnwu
2023-10-29 00:47:28 -07:00
parent 67cc36268e
commit 19a4e11645
5 changed files with 21 additions and 27 deletions

View File

@@ -129,9 +129,9 @@ int magisk_main(int argc, char *argv[]) {
write_int(fd, do_reboot);
return read_int(fd);
} else if (argv[1] == "--path"sv) {
string path = find_magisk_tmp();
if (!path.empty()) {
printf("%s\n", path.data());
const char *path = get_magisk_tmp();
if (path[0] != '\0') {
printf("%s\n", path);
return 0;
}
return 1;