summaryrefslogtreecommitdiff
path: root/init/builtins.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-07-22 18:05:02 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-22 18:05:02 +0000
commit2694ad9ad9cdba42d6c912bc836a6ba650303486 (patch)
treef0997389a2d48e7a4ccf2c863448e0d9869cf959 /init/builtins.cpp
parent5e0231adbaa9d6efe4dc15198897bb84e1b5b219 (diff)
parent7f12fa275604504ed874c08d6b7f906e8e522c73 (diff)
am 7f12fa27: am f5b46079: Merge "init: use init\'s property expansion code for mount_all"
* commit '7f12fa275604504ed874c08d6b7f906e8e522c73': init: use init's property expansion code for mount_all
Diffstat (limited to 'init/builtins.cpp')
-rw-r--r--init/builtins.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp
index 2fdab9d4f..5fe67a642 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -468,11 +468,17 @@ int do_mount_all(int nargs, char **args)
int child_ret = -1;
int status;
struct fstab *fstab;
+ char fstabfile[PROP_VALUE_MAX];
if (nargs != 2) {
return -1;
}
+ if (expand_props(fstabfile, args[1], sizeof(fstabfile)) == -1) {
+ ERROR("mount_all: cannot expand '%s' \n", args[1]);
+ return -EINVAL;
+ }
+
/*
* Call fs_mgr_mount_all() to mount all filesystems. We fork(2) and
* do the call in the child to provide protection to the main init
@@ -496,7 +502,7 @@ 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 */
- fstab = fs_mgr_read_fstab(args[1]);
+ fstab = fs_mgr_read_fstab(fstabfile);
child_ret = fs_mgr_mount_all(fstab);
fs_mgr_free_fstab(fstab);
if (child_ret == -1) {