NetBpfLoad: on aosp/main bump version from U QPR3 to V
aosp/main is currently still sdk 34/U, and netbpfload runs as root (like on U QPR3 and V) which makes us treat it as U QPR3. This change will make us treat it as 35/V. This will also potentially result in us already seeing sdk 36 in places (goog/main?), but this won't currently hurt (because we don't distinguish anything >=35). And indeed it likely won't ever hurt us, as too high a version on dev branches (goog/main?) is unlikely to be a practical problem. Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I318df93e5b3a06af2ee2c6ab1cb40d8a8dffa212
This commit is contained in:
parent
15f9731efc
commit
7b95d99077
1 changed files with 6 additions and 3 deletions
|
|
@ -255,7 +255,9 @@ static bool isTV() {
|
|||
|
||||
static int doLoad(char** argv, char * const envp[]) {
|
||||
const bool runningAsRoot = !getuid(); // true iff U QPR3 or V+
|
||||
const int device_api_level = android_get_device_api_level();
|
||||
const bool unreleased = (base::GetProperty("ro.build.version.codename", "") != "REL");
|
||||
|
||||
const int device_api_level = android_get_device_api_level() + (int)unreleased;
|
||||
const bool isAtLeastT = (device_api_level >= __ANDROID_API_T__);
|
||||
const bool isAtLeastU = (device_api_level >= __ANDROID_API_U__);
|
||||
const bool isAtLeastV = (device_api_level >= __ANDROID_API_V__);
|
||||
|
|
@ -272,8 +274,9 @@ static int doLoad(char** argv, char * const envp[]) {
|
|||
if (runningAsRoot) ++bpfloader_ver; // [45] BPFLOADER_MAINLINE_U_QPR3_VERSION
|
||||
if (isAtLeastV) ++bpfloader_ver; // [46] 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(),
|
||||
ALOGI("NetBpfLoad v0.%u (%s) api:%d/%d kver:%07x (%s) uid:%d rc:%d%d",
|
||||
bpfloader_ver, argv[0], android_get_device_api_level(), device_api_level,
|
||||
kernelVersion(), describeArch(), getuid(),
|
||||
has_platform_bpfloader_rc, has_platform_netbpfload_rc);
|
||||
|
||||
if (!has_platform_bpfloader_rc && !has_platform_netbpfload_rc) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue