execute platform bpfloader after netbpfload is done

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I447880763bbc506f08b578f862f09be91ab3d14d
This commit is contained in:
Maciej Żenczykowski 2023-10-20 14:40:16 -07:00
parent 3f25b4ba8a
commit 58c182291d

View file

@ -168,7 +168,7 @@ int writeProcSysFile(const char *filename, const char *value) {
return 0;
}
int main(int argc, char** argv) {
int main(int argc, char** argv, char * const envp[]) {
(void)argc;
android::base::InitLogging(argv, &android::base::KernelLogger);
@ -257,5 +257,12 @@ int main(int argc, char** argv) {
return 1;
}
return 0;
ALOGI("done, transferring control to platform bpfloader.");
const char * args[] = { "/system/bin/bpfloader", NULL, };
if (execve(args[0], (char**)args, envp)) {
ALOGE("FATAL: execve('/system/bin/bpfloader'): %d[%s]", errno, strerror(errno));
}
return 1;
}