From c735bfe5da25f4530fa47a6a1e5622708e9dd228 Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Wed, 29 Aug 2018 12:31:01 -0700 Subject: [PATCH] Fix bug in fs_mgr with calling vdc Parameter count was hard coded to 3, make dynamic Test: Metadata encrypted device boots Change-Id: I25bb5adb7f27fc392564bfa6ed3ed2efeb5c5a40 --- fs_mgr/fs_mgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs_mgr/fs_mgr.cpp b/fs_mgr/fs_mgr.cpp index a4e6f4b03..e3c2c2b83 100644 --- a/fs_mgr/fs_mgr.cpp +++ b/fs_mgr/fs_mgr.cpp @@ -791,7 +791,8 @@ static bool call_vdc(const std::vector& args) { argv.emplace_back(arg.c_str()); } LOG(INFO) << "Calling: " << android::base::Join(argv, ' '); - int ret = android_fork_execvp(4, const_cast(argv.data()), nullptr, false, true); + int ret = + android_fork_execvp(argv.size(), const_cast(argv.data()), nullptr, false, true); if (ret != 0) { LOG(ERROR) << "vdc returned error code: " << ret; return false;