proc: Export androidboot.mode=charger if needed

Change-Id: I8ece47ce52681fa7e21d562a0266609675bb8f1a
This commit is contained in:
Ethan Chen
2019-10-12 17:00:56 +02:00
committed by Francescodario Cuzzocrea
parent cf12bce4b3
commit 85bb14d001
+11
View File
@@ -3,8 +3,19 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#ifdef CONFIG_SAMSUNG_LPM_MODE
extern int poweroff_charging;
#endif
static int cmdline_proc_show(struct seq_file *m, void *v)
{
#ifdef CONFIG_SAMSUNG_LPM_MODE
if (poweroff_charging) {
seq_printf(m, "%s %s\n", saved_command_line,
"androidboot.mode=charger");
return 0;
}
#endif
seq_printf(m, "%s\n", saved_command_line);
return 0;
}