Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_packages_modules_Connectivity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid
platform_packages_modules_Connectivity
Commits
af11354b
Commit
af11354b
authored
1 year ago
by
Maciej Żenczykowski
Committed by
Gerrit Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Use libbase properties for a slight simplification." into main
parents
4dec273a
497e3e05
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
netbpfload/Android.bp
+0
-1
0 additions, 1 deletion
netbpfload/Android.bp
netbpfload/loader.cpp
+2
-8
2 additions, 8 deletions
netbpfload/loader.cpp
with
2 additions
and
9 deletions
netbpfload/Android.bp
+
0
−
1
View file @
af11354b
...
...
@@ -30,7 +30,6 @@ cc_binary {
header_libs: ["bpf_headers"],
shared_libs: [
"libbase",
"libcutils",
"liblog",
],
srcs: [
...
...
This diff is collapsed.
Click to expand it.
netbpfload/loader.cpp
+
2
−
8
View file @
af11354b
...
...
@@ -59,9 +59,9 @@
#include
<android-base/cmsg.h>
#include
<android-base/file.h>
#include
<android-base/properties.h>
#include
<android-base/strings.h>
#include
<android-base/unique_fd.h>
#include
<cutils/properties.h>
#define BPF_FS_PATH "/sys/fs/bpf/"
...
...
@@ -79,17 +79,11 @@ using std::optional;
using
std
::
string
;
using
std
::
vector
;
static
std
::
string
getBuildTypeInternal
()
{
char
value
[
PROPERTY_VALUE_MAX
]
=
{};
(
void
)
property_get
(
"ro.build.type"
,
value
,
"unknown"
);
// ignore length
return
value
;
}
namespace
android
{
namespace
bpf
{
const
std
::
string
&
getBuildType
()
{
static
std
::
string
t
=
getB
uild
T
ype
Internal
(
);
static
std
::
string
t
=
android
::
base
::
GetProperty
(
"ro.b
uild
.t
ype
"
,
"unknown"
);
return
t
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment