Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2519531 authored by Ken Sumrall's avatar Ken Sumrall Committed by Android Git Automerger
Browse files

am bdf7b815: am 5db0897c: Merge "Load the persistent properties after...

am bdf7b815: am 5db0897c: Merge "Load the persistent properties after decrypting the /data partition" into honeycomb-mr1

* commit 'bdf7b815':
  Load the persistent properties after decrypting the /data partition
parents bb889dde bdf7b815
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -286,7 +286,6 @@ int do_mount(int nargs, char **args)
    unsigned flags = 0;
    int n, i;
    int wait = 0;
    char *prop;

    for (n = 4; n < nargs; n++) {
        for (i = 0; mount_flags[i].name; i++) {
@@ -416,6 +415,8 @@ exit_success:
     * unencrypted, and also trigger the action for a nonencrypted system.
     */
    if (!strcmp(target, DATA_MNT_POINT)) {
        const char *prop;

        prop = property_get("ro.crypto.state");
        if (! prop) {
            prop = "notset";
@@ -631,6 +632,14 @@ int do_loglevel(int nargs, char **args) {
    return -1;
}

int do_load_persist_props(int nargs, char **args) {
    if (nargs == 1) {
        load_persist_props();
        return 0;
    }
    return -1;
}

int do_wait(int nargs, char **args)
{
    if (nargs == 2) {
+1 −0
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ int lookup_keyword(const char *s)
        break;
    case 'l':
        if (!strcmp(s, "oglevel")) return K_loglevel;
        if (!strcmp(s, "oad_persist_props")) return K_load_persist_props;
        break;
    case 'm':
        if (!strcmp(s, "kdir")) return K_mkdir;
+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ int do_copy(int nargs, char **args);
int do_chown(int nargs, char **args);
int do_chmod(int nargs, char **args);
int do_loglevel(int nargs, char **args);
int do_load_persist_props(int nargs, char **args);
int do_wait(int nargs, char **args);
#define __MAKE_KEYWORD_ENUM__
#define KEYWORD(symbol, flags, nargs, func) K_##symbol,
@@ -81,6 +82,7 @@ enum {
    KEYWORD(chown,       COMMAND, 2, do_chown)
    KEYWORD(chmod,       COMMAND, 2, do_chmod)
    KEYWORD(loglevel,    COMMAND, 1, do_loglevel)
    KEYWORD(load_persist_props,    COMMAND, 0, do_load_persist_props)
    KEYWORD(ioprio,      OPTION,  0, 0)
#ifdef __MAKE_KEYWORD_ENUM__
    KEYWORD_COUNT,
+12 −0
Original line number Diff line number Diff line
@@ -515,6 +515,18 @@ int properties_inited(void)
    return property_area_inited;
}

/* When booting an encrypted system, /data is not mounted when the
 * property service is started, so any properties stored there are
 * not loaded.  Vold triggers init to load these properties once it
 * has mounted /data.
 */
void load_persist_props(void)
{
    load_properties_from_file(PROP_PATH_LOCAL_OVERRIDE);
    /* Read persistent properties after all default values have been loaded. */
    load_persistent_properties();
}

void start_property_service(void)
{
    int fd;
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@

extern void handle_property_set_fd(void);
extern void property_init(void);
extern void load_persist_props(void);
extern void start_property_service(void);
void get_property_workspace(int *fd, int *sz);
extern const char* property_get(const char *name);
Loading