summaryrefslogtreecommitdiffstats
path: root/legacy_property_service.c
diff options
context:
space:
mode:
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;
+}