diff options
-rwxr-xr-x | init/init.c | 6 | ||||
-rw-r--r-- | init/property_service.c | 5 | ||||
-rw-r--r-- | init/property_service.h | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/init/init.c b/init/init.c index 5058b17..af88f30 100755 --- a/init/init.c +++ b/init/init.c @@ -548,8 +548,12 @@ static int wait_for_coldboot_done_action(int nargs, char **args) static int property_init_action(int nargs, char **args) { + bool load_defaults = true; + INFO("property init\n"); - property_init(); + if (!strcmp(bootmode, "charger")) + load_defaults = false; + property_init(load_defaults); return 0; } diff --git a/init/property_service.c b/init/property_service.c index 18231e8..6733437 100644 --- a/init/property_service.c +++ b/init/property_service.c @@ -505,10 +505,11 @@ static void load_persistent_properties() persistent_properties_loaded = 1; } -void property_init(void) +void property_init(bool load_defaults) { init_property_area(); - load_properties_from_file(PROP_PATH_RAMDISK_DEFAULT); + if (load_defaults) + load_properties_from_file(PROP_PATH_RAMDISK_DEFAULT); } int properties_inited(void) diff --git a/init/property_service.h b/init/property_service.h index bc97cc4..37c2788 100644 --- a/init/property_service.h +++ b/init/property_service.h @@ -17,8 +17,10 @@ #ifndef _INIT_PROPERTY_H #define _INIT_PROPERTY_H +#include <stdbool.h> + extern void handle_property_set_fd(void); -extern void property_init(void); +extern void property_init(bool load_defaults); extern void load_persist_props(void); extern void start_property_service(void); void get_property_workspace(int *fd, int *sz); |