Merge change 20039

* changes:
  adb: add "adb reboot" command.
diff --git a/fastboot/fastboot.c b/fastboot/fastboot.c
index 850e10b..c81222a 100644
--- a/fastboot/fastboot.c
+++ b/fastboot/fastboot.c
@@ -147,9 +147,11 @@
 int match_fastboot(usb_ifc_info *info)
 {
     if(!(vendor_id && (info->dev_vendor == vendor_id)) &&
-       (info->dev_vendor != 0x18d1) &&
+       (info->dev_vendor != 0x18d1) &&  // Google
        (info->dev_vendor != 0x0451) &&
-       (info->dev_vendor != 0x0bb4)) return -1;
+       (info->dev_vendor != 0x22b8) &&  // Motorola
+       (info->dev_vendor != 0x0bb4))    // HTC
+            return -1;
     if(info->ifc_class != 0xff) return -1;
     if(info->ifc_subclass != 0x42) return -1;
     if(info->ifc_protocol != 0x03) return -1;
diff --git a/include/arch/darwin-x86/AndroidConfig.h b/include/arch/darwin-x86/AndroidConfig.h
index 49f04e5..c4de357 100644
--- a/include/arch/darwin-x86/AndroidConfig.h
+++ b/include/arch/darwin-x86/AndroidConfig.h
@@ -15,9 +15,7 @@
  */
 
 /*
- * Android config -- "Darwin".  Used for PPC Mac OS X.
- *
- * TODO: split this into "x86" and "ppc" versions
+ * Android config -- "Darwin".  Used for X86 Mac OS X.
  */
 #ifndef _ANDROID_CONFIG_H
 #define _ANDROID_CONFIG_H
@@ -257,4 +255,14 @@
  */
 #define HAVE_WRITEV 1
 
+/*
+ * Define if <stdint.h> exists.
+ */
+#define HAVE_STDINT_H 1
+
+/*
+ * Define if <stdbool.h> exists.
+ */
+#define HAVE_STDBOOL_H 1
+
 #endif /*_ANDROID_CONFIG_H*/
diff --git a/include/arch/freebsd-x86/AndroidConfig.h b/include/arch/freebsd-x86/AndroidConfig.h
index cc118f4..7ddbd27 100644
--- a/include/arch/freebsd-x86/AndroidConfig.h
+++ b/include/arch/freebsd-x86/AndroidConfig.h
@@ -314,4 +314,14 @@
 #define CLOCK_PROCESS_CPUTIME_ID CLOCK_PROF
 #endif
 
+/*
+ * Define if <stdint.h> exists.
+ */
+/* #define HAVE_STDINT_H */
+
+/*
+ * Define if <stdbool.h> exists.
+ */
+/* #define HAVE_STDBOOL_H */
+
 #endif /*_ANDROID_CONFIG_H*/
diff --git a/include/arch/linux-arm/AndroidConfig.h b/include/arch/linux-arm/AndroidConfig.h
index f322127..4371083 100644
--- a/include/arch/linux-arm/AndroidConfig.h
+++ b/include/arch/linux-arm/AndroidConfig.h
@@ -302,4 +302,14 @@
  */
 #define HAVE_WRITEV 1
 
+/*
+ * Define if <stdint.h> exists.
+ */
+#define HAVE_STDINT_H 1
+
+/*
+ * Define if <stdbool.h> exists.
+ */
+#define HAVE_STDBOOL_H 1
+
 #endif /* _ANDROID_CONFIG_H */
diff --git a/include/arch/linux-x86/AndroidConfig.h b/include/arch/linux-x86/AndroidConfig.h
index 6de75f8..323e067 100644
--- a/include/arch/linux-x86/AndroidConfig.h
+++ b/include/arch/linux-x86/AndroidConfig.h
@@ -283,4 +283,14 @@
  */
 #define HAVE_WRITEV 1
 
+/*
+ * Define if <stdint.h> exists.
+ */
+#define HAVE_STDINT_H 1
+
+/*
+ * Define if <stdbool.h> exists.
+ */
+#define HAVE_STDBOOL_H 1
+
 #endif /*_ANDROID_CONFIG_H*/
diff --git a/include/arch/target_linux-x86/AndroidConfig.h b/include/arch/target_linux-x86/AndroidConfig.h
index 4aa44f8..6ba7108 100644
--- a/include/arch/target_linux-x86/AndroidConfig.h
+++ b/include/arch/target_linux-x86/AndroidConfig.h
@@ -293,4 +293,14 @@
  */
 #define HAVE_UNWIND_CONTEXT_STRUCT
 
+/*
+ * Define if <stdint.h> exists.
+ */
+#define HAVE_STDINT_H 1
+
+/*
+ * Define if <stdbool.h> exists.
+ */
+#define HAVE_STDBOOL_H 1
+
 #endif /* _ANDROID_CONFIG_H */
diff --git a/include/arch/windows/AndroidConfig.h b/include/arch/windows/AndroidConfig.h
index c3c6ff1..18e435c 100644
--- a/include/arch/windows/AndroidConfig.h
+++ b/include/arch/windows/AndroidConfig.h
@@ -287,4 +287,14 @@
  */
 /* #define HAVE_WRITEV */
 
+/*
+ * Define if <stdint.h> exists.
+ */
+/* #define HAVE_STDINT_H */
+
+/*
+ * Define if <stdbool.h> exists.
+ */
+/* #define HAVE_STDBOOL_H */
+
 #endif /*_ANDROID_CONFIG_H*/
diff --git a/init/devices.c b/init/devices.c
index 11b9e61..13ebae7 100644
--- a/init/devices.c
+++ b/init/devices.c
@@ -99,8 +99,8 @@
     { "/dev/msm_hw3dc",     0666,   AID_ROOT,       AID_ROOT,       0 },
 
         /* these should not be world writable */
-    { "/dev/diag",          0660,   AID_ROOT,       AID_ROOT,        0 },
-    { "/dev/diag_arm9",     0660,   AID_ROOT,       AID_ROOT,        0 },
+    { "/dev/diag",          0660,   AID_RADIO,      AID_RADIO,        0 },
+    { "/dev/diag_arm9",     0660,   AID_RADIO,      AID_RADIO,        0 },
     { "/dev/android_adb",   0660,   AID_ADB,        AID_ADB,        0 },
     { "/dev/android_adb_enable",   0660,   AID_ADB,        AID_ADB,        0 },
     { "/dev/ttyMSM0",       0600,   AID_BLUETOOTH,  AID_BLUETOOTH,  0 },