init: do expand_props before calling the builtins.
Also switch expand_props to std::string.
Bug: 22654233
Change-Id: I62910d4f74e2b1a5bd2b14aea440767a2a8462b7
diff --git a/init/init_parser.h b/init/init_parser.h
index 90f880f..fa7e67f 100644
--- a/init/init_parser.h
+++ b/init/init_parser.h
@@ -17,6 +17,8 @@
#ifndef _INIT_INIT_PARSER_H_
#define _INIT_INIT_PARSER_H_
+#include <string>
+
#define INIT_PARSER_MAXARGS 64
struct action;
@@ -32,7 +34,7 @@
void queue_builtin_action(int (*func)(int nargs, char **args), const char *name);
bool init_parse_config_file(const char* path);
-int expand_props(char *dst, const char *src, int len);
+int expand_props(const char *src, std::string *dst);
service* make_exec_oneshot_service(int argc, char** argv);