Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 3 commits
  • 1 file changed
  • 0 comments
  • 2 contributors
May 29, 2012
Ricardo Cerqueira rmcc Fix Samsung chargermode logic
Samsung devices with BOARD_CHARGING_MODE_BOOTING_LPM get their config
out of lpm.rc. Everybody else still needs the hardware-specific init.rc
files to read charger mode config out of.

Change-Id: Ibbe0446d2b18b018258b7b2951a88014709006ac
4360318
Ricardo Cerqueira rmcc init: Fix charger mode for qcom devices
The filesystem exclusion logic before the Samsung lpm stuff was
merged was completely broken and always returned true. (i.e.,
fs hooks always ran)

--------
if (strcmp(bootmode, "charger") != 0 || strcmp(battchg_pause, "true") != 0)
--------
These 2 conditions are never false simultaneously (they're alternative
charger mode flags), so the filesystem mount hooks always happened.

The LPM support patch fixed that logic, but broke other devices in
the process, since some implementations use stuff from /system (or even
link with bionic) for charger mode.

This patch makes the exclusion logic apply _only_ to Samsung LPM
devices or those supported by the original AOSP code
(androidboot.mode=charger), and lets every other device run the
fs hooks

Change-Id: I26006fe65761ad86fa6f4cfa5681d9b008844e64
e00a9ad
chrisdearman chrisdearman Fix typo in queue_property_triggers ident
Signed-off-by: Chris Dearman <chris@mips.com>
Change-Id: I5f18ccb0912b9bb89c9f5104f9505c610c109af8
50c1ffc

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 init/init.c
6 init/init.c
@@ -781,7 +781,7 @@ int main(int argc, char **argv)
781 781 if (charging_mode_booting() || strcmp(bootmode, "charger") == 0 || strcmp(battchg_pause, BOARD_CHARGING_CMDLINE_VALUE) == 0)
782 782 charging_mode = 1;
783 783
784   - if (!charging_mode) {
  784 + if (!charging_mode_booting()) {
785 785 snprintf(tmp, sizeof(tmp), "/init.%s.rc", hardware);
786 786 init_parse_config_file(tmp);
787 787
@@ -810,7 +810,7 @@ int main(int argc, char **argv)
810 810 action_for_each_trigger("init", action_add_queue_tail);
811 811
812 812 /* skip mounting filesystems in charger mode */
813   - if (!charging_mode) {
  813 + if (!charging_mode_booting() && strcmp(bootmode, "charger") != 0) {
814 814 action_for_each_trigger("early-fs", action_add_queue_tail);
815 815 if (emmc_boot) {
816 816 action_for_each_trigger("emmc-fs", action_add_queue_tail);
@@ -833,7 +833,7 @@ int main(int argc, char **argv)
833 833 }
834 834
835 835 /* run all property triggers based on current state of the properties */
836   - queue_builtin_action(queue_property_triggers_action, "queue_propety_triggers");
  836 + queue_builtin_action(queue_property_triggers_action, "queue_property_triggers");
837 837
838 838
839 839 #if BOOTCHART

No commit comments for this range

Something went wrong with that request. Please try again.