summaryrefslogtreecommitdiffstats
path: root/legacy_property_service.c
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2014-03-27 20:38:48 +0100
committerMatt Mower <mowerm@gmail.com>2014-03-27 22:12:40 +0100
commitcdd3b339fcf4ef2620a7d02b2a5694277acc8f81 (patch)
treed306aa1bbbb773665b36e212a8f54e731f0d5a01 /legacy_property_service.c
parentRe-arrange handling of settings storage partition (diff)
downloadandroid_bootable_recovery-cdd3b339fcf4ef2620a7d02b2a5694277acc8f81.tar
android_bootable_recovery-cdd3b339fcf4ef2620a7d02b2a5694277acc8f81.tar.gz
android_bootable_recovery-cdd3b339fcf4ef2620a7d02b2a5694277acc8f81.tar.bz2
android_bootable_recovery-cdd3b339fcf4ef2620a7d02b2a5694277acc8f81.tar.lz
android_bootable_recovery-cdd3b339fcf4ef2620a7d02b2a5694277acc8f81.tar.xz
android_bootable_recovery-cdd3b339fcf4ef2620a7d02b2a5694277acc8f81.tar.zst
android_bootable_recovery-cdd3b339fcf4ef2620a7d02b2a5694277acc8f81.zip
Diffstat (limited to 'legacy_property_service.c')
-rw-r--r--legacy_property_service.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/legacy_property_service.c b/legacy_property_service.c
index 0dc95ad48..12865c417 100644
--- a/legacy_property_service.c
+++ b/legacy_property_service.c
@@ -33,13 +33,11 @@
#include <sys/atomics.h>
#include "legacy_property_service.h"
-
static int persistent_properties_loaded = 0;
static int property_area_inited = 0;
static int property_set_fd = -1;
-
typedef struct {
void *data;
size_t size;
@@ -203,9 +201,13 @@ static void copy_property_to_legacy(const char *key, const char *value, void *co
legacy_property_set(key, value);
}
-void legacy_properties_init()
+int legacy_properties_init()
{
- init_property_area();
- property_list(copy_property_to_legacy, 0);
-}
+ if(init_property_area() != 0)
+ return -1;
+ if(property_list(copy_property_to_legacy, 0) != 0)
+ return -1;
+
+ return 0;
+}