Merge "Remove dead code."
This commit is contained in:
committed by
Android (Google) Code Review
commit
4ec799d4c6
@@ -733,17 +733,6 @@ public class ZygoteInit {
|
||||
static native long capgetPermitted(int pid)
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Sets the permitted and effective capability sets of this process.
|
||||
*
|
||||
* @param permittedCapabilities permitted set
|
||||
* @param effectiveCapabilities effective set
|
||||
* @throws IOException on error
|
||||
*/
|
||||
static native void setCapabilities(
|
||||
long permittedCapabilities,
|
||||
long effectiveCapabilities) throws IOException;
|
||||
|
||||
/**
|
||||
* Invokes select() on the provider array of file descriptors (selecting
|
||||
* for readability only). Array elements of null are ignored.
|
||||
|
||||
@@ -163,32 +163,6 @@ static void com_android_internal_os_ZygoteInit_setCloseOnExec (JNIEnv *env,
|
||||
}
|
||||
}
|
||||
|
||||
static void com_android_internal_os_ZygoteInit_setCapabilities (JNIEnv *env,
|
||||
jobject clazz, jlong permitted, jlong effective)
|
||||
{
|
||||
struct __user_cap_header_struct capheader;
|
||||
struct __user_cap_data_struct capdata;
|
||||
int err;
|
||||
|
||||
memset (&capheader, 0, sizeof(capheader));
|
||||
memset (&capdata, 0, sizeof(capdata));
|
||||
|
||||
capheader.version = _LINUX_CAPABILITY_VERSION;
|
||||
capheader.pid = 0;
|
||||
|
||||
// As of this writing, capdata is __u32, but that's expected
|
||||
// to change...
|
||||
capdata.effective = effective;
|
||||
capdata.permitted = permitted;
|
||||
|
||||
err = capset (&capheader, &capdata);
|
||||
|
||||
if (err < 0) {
|
||||
jniThrowIOException(env, errno);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static jlong com_android_internal_os_ZygoteInit_capgetPermitted (JNIEnv *env,
|
||||
jobject clazz, jint pid)
|
||||
{
|
||||
@@ -304,8 +278,6 @@ static JNINativeMethod gMethods[] = {
|
||||
(void *) com_android_internal_os_ZygoteInit_reopenStdio},
|
||||
{ "setCloseOnExec", "(Ljava/io/FileDescriptor;Z)V",
|
||||
(void *) com_android_internal_os_ZygoteInit_setCloseOnExec},
|
||||
{ "setCapabilities", "(JJ)V",
|
||||
(void *) com_android_internal_os_ZygoteInit_setCapabilities },
|
||||
{ "capgetPermitted", "(I)J",
|
||||
(void *) com_android_internal_os_ZygoteInit_capgetPermitted },
|
||||
{ "selectReadable", "([Ljava/io/FileDescriptor;)I",
|
||||
|
||||
Reference in New Issue
Block a user