OSDN Git Service

Merge "Make emulated storage mounting consistent to Zygote." into cm-10.2
authorKoushik Dutta <koushd@gmail.com>
Thu, 10 Oct 2013 09:25:12 +0000 (09:25 +0000)
committerGerrit Code Review <gerrit@cyanogenmod.org>
Thu, 10 Oct 2013 09:25:12 +0000 (09:25 +0000)
Android.mk
Superuser/jni/su/su.c

index 7887812..b2ffa82 100644 (file)
@@ -28,6 +28,10 @@ ifdef SUPERUSER_PACKAGE_PREFIX
   LOCAL_CFLAGS += -DREQUESTOR_PREFIX=\"$(SUPERUSER_PACKAGE_PREFIX)\"
 endif
 
+ifdef SUPERUSER_EMBEDDED
+  LOCAL_CFLAGS += -DSUPERUSER_EMBEDDED
+endif
+
 LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
 include $(BUILD_EXECUTABLE)
 
index 6cbe724..5451898 100644 (file)
@@ -559,6 +559,9 @@ static __attribute__ ((noreturn)) void allow(struct su_context *ctx) {
  * Find the properties ourselves.
  */
 int access_disabled(const struct su_initiator *from) {
+#ifndef SUPERUSER_EMBEDDED
+    return 0;
+#else
     char *data;
     char build_type[PROPERTY_VALUE_MAX];
     char debuggable[PROPERTY_VALUE_MAX], enabled[PROPERTY_VALUE_MAX];
@@ -608,6 +611,7 @@ int access_disabled(const struct su_initiator *from) {
 
     }
     return 0;
+#endif
 }
 
 static int is_api_18() {