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;