From 85bb14d001d17a13974e0227fbe5985a08643618 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Sat, 3 Feb 2018 13:18:16 -0800 Subject: [PATCH] proc: Export androidboot.mode=charger if needed Change-Id: I8ece47ce52681fa7e21d562a0266609675bb8f1a --- fs/proc/cmdline.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fs/proc/cmdline.c b/fs/proc/cmdline.c index 82676e3fcd1..a9c1dd7275a 100644 --- a/fs/proc/cmdline.c +++ b/fs/proc/cmdline.c @@ -3,8 +3,19 @@ #include #include +#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; }