NetBpfLoad: log bpfloader_ver
since this is dynamic, it seems like a useful thing to log Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I073e76ab54b4f2182c9b5c2b128425a5294ed50a
This commit is contained in:
parent
48e476bdfa
commit
6295614bc8
1 changed files with 8 additions and 8 deletions
|
|
@ -265,8 +265,14 @@ static int doLoad(char** argv, char * const envp[]) {
|
|||
// first in U QPR2 beta~2
|
||||
const bool has_platform_netbpfload_rc = exists("/system/etc/init/netbpfload.rc");
|
||||
|
||||
ALOGI("NetBpfLoad (%s) api:%d kver:%07x (%s) uid:%d rc:%d%d",
|
||||
argv[0], device_api_level, kernelVersion(), describeArch(), getuid(),
|
||||
// Version of Network BpfLoader depends on the Android OS version
|
||||
unsigned int bpfloader_ver = 42u; // [42] BPFLOADER_MAINLINE_VERSION
|
||||
if (isAtLeastT) ++bpfloader_ver; // [43] BPFLOADER_MAINLINE_T_VERSION
|
||||
if (isAtLeastU) ++bpfloader_ver; // [44] BPFLOADER_MAINLINE_U_VERSION
|
||||
if (isAtLeastV) ++bpfloader_ver; // [45] BPFLOADER_MAINLINE_V_VERSION
|
||||
|
||||
ALOGI("NetBpfLoad v0.%u (%s) api:%d kver:%07x (%s) uid:%d rc:%d%d",
|
||||
bpfloader_ver, argv[0], device_api_level, kernelVersion(), describeArch(), getuid(),
|
||||
has_platform_bpfloader_rc, has_platform_netbpfload_rc);
|
||||
|
||||
if (!has_platform_bpfloader_rc && !has_platform_netbpfload_rc) {
|
||||
|
|
@ -427,12 +433,6 @@ static int doLoad(char** argv, char * const envp[]) {
|
|||
// Thus we need to manually create the /sys/fs/bpf/loader subdirectory.
|
||||
if (createSysFsBpfSubDir("loader")) return 1;
|
||||
|
||||
// Version of Network BpfLoader depends on the Android OS version
|
||||
unsigned int bpfloader_ver = 42u; // [42] BPFLOADER_MAINLINE_VERSION
|
||||
if (isAtLeastT) ++bpfloader_ver; // [43] BPFLOADER_MAINLINE_T_VERSION
|
||||
if (isAtLeastU) ++bpfloader_ver; // [44] BPFLOADER_MAINLINE_U_VERSION
|
||||
if (isAtLeastV) ++bpfloader_ver; // [45] BPFLOADER_MAINLINE_V_VERSION
|
||||
|
||||
// Load all ELF objects, create programs and maps, and pin them
|
||||
for (const auto& location : locations) {
|
||||
if (loadAllElfObjects(bpfloader_ver, location) != 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue