mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-01 08:07:39 +00:00
Disable kmsg rate limiting
This commit is contained in:
parent
800b7f4370
commit
486b2c82a7
@ -100,12 +100,17 @@ void load_kernel_info(cmdline *cmd) {
|
|||||||
xmkdir("/sys", 0755);
|
xmkdir("/sys", 0755);
|
||||||
xmount("sysfs", "/sys", "sysfs", 0, nullptr);
|
xmount("sysfs", "/sys", "sysfs", 0, nullptr);
|
||||||
|
|
||||||
|
// Disable kmsg rate limiting
|
||||||
|
if (FILE *rate = fopen("/proc/sys/kernel/printk_devkmsg", "w"); rate) {
|
||||||
|
fprintf(rate, "on\n");
|
||||||
|
fclose(rate);
|
||||||
|
}
|
||||||
|
|
||||||
bool enter_recovery = false;
|
bool enter_recovery = false;
|
||||||
bool kirin = false;
|
bool kirin = false;
|
||||||
bool recovery_mode = false;
|
bool recovery_mode = false;
|
||||||
|
|
||||||
parse_cmdline([&](auto key, auto value) -> void {
|
parse_cmdline([&](auto key, auto value) -> void {
|
||||||
LOGD("cmdline: [%s]=[%s]\n", key.data(), value);
|
|
||||||
if (key == "androidboot.slot_suffix") {
|
if (key == "androidboot.slot_suffix") {
|
||||||
strcpy(cmd->slot, value);
|
strcpy(cmd->slot, value);
|
||||||
} else if (key == "androidboot.slot") {
|
} else if (key == "androidboot.slot") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user