BpfUtils jni: jobject clazz -> jclass clazz
Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I3fd51ad129873782b74c7c47b50e16f1f1f0fa6e
This commit is contained in:
@@ -32,7 +32,7 @@ using base::unique_fd;
|
|||||||
|
|
||||||
// If attach fails throw error and return false.
|
// If attach fails throw error and return false.
|
||||||
static jboolean com_android_net_module_util_BpfUtil_attachProgramToCgroup(JNIEnv *env,
|
static jboolean com_android_net_module_util_BpfUtil_attachProgramToCgroup(JNIEnv *env,
|
||||||
jobject clazz, jint type, jstring bpfProgPath, jstring cgroupPath, jint flags) {
|
jclass clazz, jint type, jstring bpfProgPath, jstring cgroupPath, jint flags) {
|
||||||
|
|
||||||
ScopedUtfChars dirPath(env, cgroupPath);
|
ScopedUtfChars dirPath(env, cgroupPath);
|
||||||
unique_fd cg_fd(open(dirPath.c_str(), O_DIRECTORY | O_RDONLY | O_CLOEXEC));
|
unique_fd cg_fd(open(dirPath.c_str(), O_DIRECTORY | O_RDONLY | O_CLOEXEC));
|
||||||
@@ -62,7 +62,7 @@ static jboolean com_android_net_module_util_BpfUtil_attachProgramToCgroup(JNIEnv
|
|||||||
|
|
||||||
// If detach fails throw error and return false.
|
// If detach fails throw error and return false.
|
||||||
static jboolean com_android_net_module_util_BpfUtil_detachProgramFromCgroup(JNIEnv *env,
|
static jboolean com_android_net_module_util_BpfUtil_detachProgramFromCgroup(JNIEnv *env,
|
||||||
jobject clazz, jint type, jstring cgroupPath) {
|
jclass clazz, jint type, jstring cgroupPath) {
|
||||||
|
|
||||||
ScopedUtfChars dirPath(env, cgroupPath);
|
ScopedUtfChars dirPath(env, cgroupPath);
|
||||||
unique_fd cg_fd(open(dirPath.c_str(), O_DIRECTORY | O_RDONLY | O_CLOEXEC));
|
unique_fd cg_fd(open(dirPath.c_str(), O_DIRECTORY | O_RDONLY | O_CLOEXEC));
|
||||||
@@ -83,7 +83,7 @@ static jboolean com_android_net_module_util_BpfUtil_detachProgramFromCgroup(JNIE
|
|||||||
|
|
||||||
// If detach single program fails throw error and return false.
|
// If detach single program fails throw error and return false.
|
||||||
static jboolean com_android_net_module_util_BpfUtil_detachSingleProgramFromCgroup(JNIEnv *env,
|
static jboolean com_android_net_module_util_BpfUtil_detachSingleProgramFromCgroup(JNIEnv *env,
|
||||||
jobject clazz, jint type, jstring bpfProgPath, jstring cgroupPath) {
|
jclass clazz, jint type, jstring bpfProgPath, jstring cgroupPath) {
|
||||||
|
|
||||||
ScopedUtfChars dirPath(env, cgroupPath);
|
ScopedUtfChars dirPath(env, cgroupPath);
|
||||||
unique_fd cg_fd(open(dirPath.c_str(), O_DIRECTORY | O_RDONLY | O_CLOEXEC));
|
unique_fd cg_fd(open(dirPath.c_str(), O_DIRECTORY | O_RDONLY | O_CLOEXEC));
|
||||||
|
|||||||
Reference in New Issue
Block a user