summaryrefslogtreecommitdiffstats
path: root/legacy_property_service.c
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2014-04-01 20:30:03 +0200
committerGerrit Code Review <gerrit2@gerrit>2014-04-01 20:30:03 +0200
commita7a366e4d4c941c0789249af268bbac1a0d90a4b (patch)
treef708fac1afafa795144b33aec097e79ee9562495 /legacy_property_service.c
parentadd 1600x2560 to TWRP. Thanks to nrage123 and Gunthermic for creating (diff)
parentAdd basic error checking to legacy property init (diff)
downloadandroid_bootable_recovery-a7a366e4d4c941c0789249af268bbac1a0d90a4b.tar
android_bootable_recovery-a7a366e4d4c941c0789249af268bbac1a0d90a4b.tar.gz
android_bootable_recovery-a7a366e4d4c941c0789249af268bbac1a0d90a4b.tar.bz2
android_bootable_recovery-a7a366e4d4c941c0789249af268bbac1a0d90a4b.tar.lz
android_bootable_recovery-a7a366e4d4c941c0789249af268bbac1a0d90a4b.tar.xz
android_bootable_recovery-a7a366e4d4c941c0789249af268bbac1a0d90a4b.tar.zst
android_bootable_recovery-a7a366e4d4c941c0789249af268bbac1a0d90a4b.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;
+}