Merge "Disable vendor id filtering for OS X."
diff --git a/adb/get_my_path_darwin.c b/adb/get_my_path_darwin.c
index 65dd226..ff1396c 100644
--- a/adb/get_my_path_darwin.c
+++ b/adb/get_my_path_darwin.c
@@ -24,7 +24,7 @@
CFStringRef executablePathString = CFURLCopyFileSystemPath(executableURL, kCFURLPOSIXPathStyle);
CFRelease(executableURL);
- CFStringGetCString(executablePathString, s, maxLen, kCFStringEncodingASCII);
+ CFStringGetFileSystemRepresentation(executablePathString, s, maxLen);
CFRelease(executablePathString);
}
diff --git a/adb/usb_vendors.c b/adb/usb_vendors.c
index 1b73521..c483850 100755
--- a/adb/usb_vendors.c
+++ b/adb/usb_vendors.c
@@ -186,6 +186,8 @@
#define VENDOR_ID_TOSHIBA 0x0930
// TrekStor's USB Vendor ID
#define VENDOR_ID_TREKSTOR 0x1E68
+// Ubiquiti Networks's USB Vendor ID
+#define VENDOR_ID_UBNT 0x1f9b
// Unowhy's USB Vendor ID
#define VENDOR_ID_UNOWHY 0x2A49
// Vizio's USB Vendor ID
@@ -280,6 +282,7 @@
VENDOR_ID_TI,
VENDOR_ID_TOSHIBA,
VENDOR_ID_TREKSTOR,
+ VENDOR_ID_UBNT,
VENDOR_ID_UNOWHY,
VENDOR_ID_VIZIO,
VENDOR_ID_WACOM,
diff --git a/fastboot/util_osx.c b/fastboot/util_osx.c
index a8f5c31..e718562 100644
--- a/fastboot/util_osx.c
+++ b/fastboot/util_osx.c
@@ -36,7 +36,7 @@
CFStringRef executablePathString = CFURLCopyFileSystemPath(executableURL, kCFURLPOSIXPathStyle);
CFRelease(executableURL);
- CFStringGetCString(executablePathString, s, PATH_MAX-1, kCFStringEncodingASCII);
+ CFStringGetFileSystemRepresentation(executablePathString, s, PATH_MAX-1);
CFRelease(executablePathString);
char *x;
diff --git a/libprocessgroup/processgroup.cpp b/libprocessgroup/processgroup.cpp
index 49f5903..4b09f24 100644
--- a/libprocessgroup/processgroup.cpp
+++ b/libprocessgroup/processgroup.cpp
@@ -20,6 +20,7 @@
#include <assert.h>
#include <dirent.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@@ -100,7 +101,7 @@
ctx->buf_len += ret;
ctx->buf[ctx->buf_len] = 0;
- SLOGV("Read %d to buffer: %s", ret, ctx->buf);
+ SLOGV("Read %zd to buffer: %s", ret, ctx->buf);
assert(ctx->buf_len <= sizeof(ctx->buf));
@@ -251,7 +252,7 @@
{
int processes;
int sleep_us = 100;
- long startTime = android::uptimeMillis();
+ int64_t startTime = android::uptimeMillis();
while ((processes = killProcessGroupOnce(uid, initialPid, signal)) > 0) {
SLOGV("killed %d processes for processgroup %d\n", processes, initialPid);
@@ -265,7 +266,7 @@
}
}
- SLOGV("Killed process group uid %d pid %d in %ldms, %d procs remain", uid, initialPid,
+ SLOGV("Killed process group uid %d pid %d in %" PRId64 "ms, %d procs remain", uid, initialPid,
android::uptimeMillis()-startTime, processes);
if (processes == 0) {
@@ -279,12 +280,12 @@
{
int ret;
- ret = mkdir(path, 0750);
+ ret = mkdir(path, mode);
if (ret < 0 && errno != EEXIST) {
return -errno;
}
- ret = chown(path, AID_SYSTEM, AID_SYSTEM);
+ ret = chown(path, uid, gid);
if (ret < 0) {
ret = -errno;
rmdir(path);