diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/builtins.c | 5 | ||||
-rw-r--r-- | init/init_parser.c | 7 | ||||
-rwxr-xr-x | init/property_service.c | 6 |
3 files changed, 12 insertions, 6 deletions
diff --git a/init/builtins.c b/init/builtins.c index dc7900e..0f9f131 100644 --- a/init/builtins.c +++ b/init/builtins.c @@ -464,6 +464,7 @@ int do_mount_all(int nargs, char **args) int child_ret = -1; int status; const char *prop; + struct fstab *fstab; if (nargs != 2) { return -1; @@ -487,7 +488,9 @@ int do_mount_all(int nargs, char **args) } else if (pid == 0) { /* child, call fs_mgr_mount_all() */ klog_set_level(6); /* So we can see what fs_mgr_mount_all() does */ - child_ret = fs_mgr_mount_all(args[1]); + fstab = fs_mgr_read_fstab(args[1]); + child_ret = fs_mgr_mount_all(fstab); + fs_mgr_free_fstab(fstab); if (child_ret == -1) { ERROR("fs_mgr_mount_all returned an error\n"); } diff --git a/init/init_parser.c b/init/init_parser.c index beb9188..686640e 100644 --- a/init/init_parser.c +++ b/init/init_parser.c @@ -571,6 +571,7 @@ void queue_builtin_action(int (*func)(int nargs, char **args), char *name) act = calloc(1, sizeof(*act)); act->name = name; list_init(&act->commands); + list_init(&act->qlist); cmd = calloc(1, sizeof(*cmd)); cmd->func = func; @@ -583,7 +584,9 @@ void queue_builtin_action(int (*func)(int nargs, char **args), char *name) void action_add_queue_tail(struct action *act) { - list_add_tail(&action_queue, &act->qlist); + if (list_empty(&act->qlist)) { + list_add_tail(&action_queue, &act->qlist); + } } struct action *action_remove_queue_head(void) @@ -594,6 +597,7 @@ struct action *action_remove_queue_head(void) struct listnode *node = list_head(&action_queue); struct action *act = node_to_item(node, struct action, qlist); list_remove(node); + list_init(node); return act; } } @@ -825,6 +829,7 @@ static void *parse_action(struct parse_state *state, int nargs, char **args) act = calloc(1, sizeof(*act)); act->name = args[1]; list_init(&act->commands); + list_init(&act->qlist); list_add_tail(&action_list, &act->alist); /* XXX add to hash */ return act; diff --git a/init/property_service.c b/init/property_service.c index 61dd86f..5780001 100755 --- a/init/property_service.c +++ b/init/property_service.c @@ -123,7 +123,7 @@ static int init_workspace(workspace *w, size_t size) /* dev is a tmpfs that we can use to carve a shared workspace * out of, so let's do that... */ - fd = open("/dev/__properties__", O_RDWR | O_CREAT | O_NOFOLLOW, 0600); + fd = open(PROP_FILENAME, O_RDWR | O_CREAT | O_NOFOLLOW, 0644); if (fd < 0) return -1; @@ -136,12 +136,10 @@ static int init_workspace(workspace *w, size_t size) close(fd); - fd = open("/dev/__properties__", O_RDONLY | O_NOFOLLOW); + fd = open(PROP_FILENAME, O_RDONLY | O_NOFOLLOW); if (fd < 0) return -1; - unlink("/dev/__properties__"); - w->data = data; w->size = size; w->fd = fd; |