proc: Export androidboot.mode=charger if needed

Change-Id: I8ece47ce52681fa7e21d562a0266609675bb8f1a
This commit is contained in:
Ethan Chen 2018-02-03 13:18:16 -08:00 committed by Francescodario Cuzzocrea
parent 79e73c696e
commit 08b69778da
1 changed files with 11 additions and 0 deletions

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;
}