Merge "Changing how debuggerd filters log messages to different locations."
diff --git a/adb/usb_vendors.c b/adb/usb_vendors.c
index c7e0ad5..705f02b 100755
--- a/adb/usb_vendors.c
+++ b/adb/usb_vendors.c
@@ -74,6 +74,8 @@
#define VENDOR_ID_GIGABYTE 0x0414
// Gigaset's USB Vendor ID
#define VENDOR_ID_GIGASET 0x1E85
+// GIONEE's USB Vendor ID
+#define VENDOR_ID_GIONEE 0x271D
// Google's USB Vendor ID
#define VENDOR_ID_GOOGLE 0x18d1
// Haier's USB Vendor ID
@@ -210,6 +212,7 @@
VENDOR_ID_GARMIN_ASUS,
VENDOR_ID_GIGABYTE,
VENDOR_ID_GIGASET,
+ VENDOR_ID_GIONEE,
VENDOR_ID_GOOGLE,
VENDOR_ID_HAIER,
VENDOR_ID_HARRIS,
diff --git a/include/android/log.h b/include/android/log.h
index ad36bd2..1c171b7 100644
--- a/include/android/log.h
+++ b/include/android/log.h
@@ -98,11 +98,15 @@
*/
int __android_log_print(int prio, const char *tag, const char *fmt, ...)
#if defined(__GNUC__)
+#ifdef __USE_MINGW_ANSI_STDIO
#if __USE_MINGW_ANSI_STDIO
__attribute__ ((format(gnu_printf, 3, 4)))
#else
__attribute__ ((format(printf, 3, 4)))
#endif
+#else
+ __attribute__ ((format(printf, 3, 4)))
+#endif
#endif
;
@@ -121,11 +125,15 @@
const char *fmt, ...)
#if defined(__GNUC__)
__attribute__ ((noreturn))
+#ifdef __USE_MINGW_ANSI_STDIO
#if __USE_MINGW_ANSI_STDIO
__attribute__ ((format(gnu_printf, 3, 4)))
#else
__attribute__ ((format(printf, 3, 4)))
#endif
+#else
+ __attribute__ ((format(printf, 3, 4)))
+#endif
#endif
;
diff --git a/libcutils/iosched_policy.c b/libcutils/iosched_policy.c
index 67e101d..a6da9ca 100644
--- a/libcutils/iosched_policy.c
+++ b/libcutils/iosched_policy.c
@@ -21,31 +21,19 @@
#include <string.h>
#include <unistd.h>
-#ifdef HAVE_SCHED_H
-
#include <cutils/iosched_policy.h>
#ifdef HAVE_ANDROID_OS
-/* #include <linux/ioprio.h> */
-extern int ioprio_set(int which, int who, int ioprio);
-extern int ioprio_get(int which, int who);
+#include <linux/ioprio.h>
+#include <sys/syscall.h>
#define __android_unused
#else
#define __android_unused __attribute__((__unused__))
#endif
-enum {
- WHO_PROCESS = 1,
- WHO_PGRP,
- WHO_USER,
-};
-
-#define CLASS_SHIFT 13
-#define IOPRIO_NORM 4
-
int android_set_ioprio(int pid __android_unused, IoSchedClass clazz __android_unused, int ioprio __android_unused) {
#ifdef HAVE_ANDROID_OS
- if (ioprio_set(WHO_PROCESS, pid, ioprio | (clazz << CLASS_SHIFT))) {
+ if (syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, pid, ioprio | (clazz << IOPRIO_CLASS_SHIFT))) {
return -1;
}
#endif
@@ -56,11 +44,11 @@
#ifdef HAVE_ANDROID_OS
int rc;
- if ((rc = ioprio_get(WHO_PROCESS, pid)) < 0) {
+ if ((rc = syscall(SYS_ioprio_get, IOPRIO_WHO_PROCESS, pid)) < 0) {
return -1;
}
- *clazz = (rc >> CLASS_SHIFT);
+ *clazz = (rc >> IOPRIO_CLASS_SHIFT);
*ioprio = (rc & 0xff);
#else
*clazz = IoSchedClass_NONE;
@@ -68,5 +56,3 @@
#endif
return 0;
}
-
-#endif /* HAVE_SCHED_H */
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 9aa52db..484bd10 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -257,6 +257,7 @@
# create dalvik-cache, so as to enforce our permissions
mkdir /data/dalvik-cache 0771 system system
+ mkdir /data/dalvik-cache/profiles 0711 system system
# create resource-cache and double-check the perms
mkdir /data/resource-cache 0771 system system