Loading cmds/installd/commands.c +17 −17 Original line number Diff line number Diff line Loading @@ -463,7 +463,7 @@ static int wait_dexopt(pid_t pid, const char* apk_path) } } if (got_pid != pid) { LOGW("waitpid failed: wanted %d, got %d: %s\n", ALOGW("waitpid failed: wanted %d, got %d: %s\n", (int) pid, (int) got_pid, strerror(errno)); return 1; } Loading @@ -472,7 +472,7 @@ static int wait_dexopt(pid_t pid, const char* apk_path) ALOGV("DexInv: --- END '%s' (success) ---\n", apk_path); return 0; } else { LOGW("DexInv: --- END '%s' --- status=0x%04x, process failed\n", ALOGW("DexInv: --- END '%s' --- status=0x%04x, process failed\n", apk_path, status); return status; /* always nonzero */ } Loading Loading @@ -595,7 +595,7 @@ void mkinnerdirs(char* path, int basepos, mode_t mode, int uid, int gid, if (mkdir(path, mode) == 0) { chown(path, uid, gid); } else { LOGW("Unable to make directory %s: %s\n", path, strerror(errno)); ALOGW("Unable to make directory %s: %s\n", path, strerror(errno)); } } path[basepos] = '/'; Loading @@ -616,7 +616,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos, int dstend = strlen(dstpath); if (lstat(srcpath, statbuf) < 0) { LOGW("Unable to stat %s: %s\n", srcpath, strerror(errno)); ALOGW("Unable to stat %s: %s\n", srcpath, strerror(errno)); return 1; } Loading @@ -631,7 +631,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos, return 1; } } else { LOGW("Unable to rename %s to %s: %s\n", ALOGW("Unable to rename %s to %s: %s\n", srcpath, dstpath, strerror(errno)); return 1; } Loading @@ -640,7 +640,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos, d = opendir(srcpath); if (d == NULL) { LOGW("Unable to opendir %s: %s\n", srcpath, strerror(errno)); ALOGW("Unable to opendir %s: %s\n", srcpath, strerror(errno)); return 1; } Loading @@ -655,12 +655,12 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos, } if ((srcend+strlen(name)) >= (PKG_PATH_MAX-2)) { LOGW("Source path too long; skipping: %s/%s\n", srcpath, name); ALOGW("Source path too long; skipping: %s/%s\n", srcpath, name); continue; } if ((dstend+strlen(name)) >= (PKG_PATH_MAX-2)) { LOGW("Destination path too long; skipping: %s/%s\n", dstpath, name); ALOGW("Destination path too long; skipping: %s/%s\n", dstpath, name); continue; } Loading Loading @@ -716,7 +716,7 @@ int movefiles() } else { subfd = openat(dfd, name, O_RDONLY); if (subfd < 0) { LOGW("Unable to open update commands at %s%s\n", ALOGW("Unable to open update commands at %s%s\n", UPDATE_COMMANDS_DIR_PREFIX, name); continue; } Loading @@ -742,7 +742,7 @@ int movefiles() // skip comments and empty lines. } else if (hasspace) { if (dstpkg[0] == 0) { LOGW("Path before package line in %s%s: %s\n", ALOGW("Path before package line in %s%s: %s\n", UPDATE_COMMANDS_DIR_PREFIX, name, buf+bufp); } else if (srcpkg[0] == 0) { // Skip -- source package no longer exists. Loading @@ -758,7 +758,7 @@ int movefiles() } else { char* div = strchr(buf+bufp, ':'); if (div == NULL) { LOGW("Bad package spec in %s%s; no ':' sep: %s\n", ALOGW("Bad package spec in %s%s; no ':' sep: %s\n", UPDATE_COMMANDS_DIR_PREFIX, name, buf+bufp); } else { *div = 0; Loading @@ -767,14 +767,14 @@ int movefiles() strcpy(dstpkg, buf+bufp); } else { srcpkg[0] = dstpkg[0] = 0; LOGW("Package name too long in %s%s: %s\n", ALOGW("Package name too long in %s%s: %s\n", UPDATE_COMMANDS_DIR_PREFIX, name, buf+bufp); } if (strlen(div) < PKG_NAME_MAX) { strcpy(srcpkg, div); } else { srcpkg[0] = dstpkg[0] = 0; LOGW("Package name too long in %s%s: %s\n", ALOGW("Package name too long in %s%s: %s\n", UPDATE_COMMANDS_DIR_PREFIX, name, div); } if (srcpkg[0] != 0) { Loading @@ -785,7 +785,7 @@ int movefiles() } } else { srcpkg[0] = 0; LOGW("Can't create path %s in %s%s\n", ALOGW("Can't create path %s in %s%s\n", div, UPDATE_COMMANDS_DIR_PREFIX, name); } if (srcpkg[0] != 0) { Loading @@ -802,7 +802,7 @@ int movefiles() } } else { srcpkg[0] = 0; LOGW("Can't create path %s in %s%s\n", ALOGW("Can't create path %s in %s%s\n", div, UPDATE_COMMANDS_DIR_PREFIX, name); } } Loading @@ -815,7 +815,7 @@ int movefiles() } else { if (bufp == 0) { if (bufp < bufe) { LOGW("Line too long in %s%s, skipping: %s\n", ALOGW("Line too long in %s%s, skipping: %s\n", UPDATE_COMMANDS_DIR_PREFIX, name, buf); } } else if (bufp < bufe) { Loading @@ -825,7 +825,7 @@ int movefiles() } readlen = read(subfd, buf+bufe, PKG_PATH_MAX-bufe); if (readlen < 0) { LOGW("Failure reading update commands in %s%s: %s\n", ALOGW("Failure reading update commands in %s%s: %s\n", UPDATE_COMMANDS_DIR_PREFIX, name, strerror(errno)); break; } else if (readlen == 0) { Loading cmds/installd/utils.c +2 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ int create_pkg_path(char path[PKG_PATH_MAX], if (persona != 0) { int ret = snprintf(dst, dst_size, "%d/", persona); if (ret < 0 || (size_t) ret != uid_len + 1) { LOGW("Error appending UID to APK path"); ALOGW("Error appending UID to APK path"); return -1; } } Loading Loading @@ -326,7 +326,7 @@ int get_path_from_env(dir_rec_t* rec, const char* var) { const char* path = getenv(var); int ret = get_path_from_string(rec, path); if (ret < 0) { LOGW("Problem finding value for environment variable %s\n", var); ALOGW("Problem finding value for environment variable %s\n", var); } return ret; } Loading cmds/keystore/keystore.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -785,7 +785,7 @@ int main(int argc, char* argv[]) { socklen_t size = sizeof(cred); int credResult = getsockopt(sock, SOL_SOCKET, SO_PEERCRED, &cred, &size); if (credResult != 0) { LOGW("getsockopt: %s", strerror(errno)); ALOGW("getsockopt: %s", strerror(errno)); } else { int8_t request; if (recv_code(sock, &request)) { Loading cmds/system_server/system_main.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ int main(int argc, const char* const argv[]) blockSignals(); // You can trust me, honestly! LOGW("*** Current priority: %d\n", getpriority(PRIO_PROCESS, 0)); ALOGW("*** Current priority: %d\n", getpriority(PRIO_PROCESS, 0)); setpriority(PRIO_PROCESS, 0, -1); system_init(); Loading core/jni/AndroidRuntime.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -397,7 +397,7 @@ static void blockSigpipe() sigemptyset(&mask); sigaddset(&mask, SIGPIPE); if (sigprocmask(SIG_BLOCK, &mask, NULL) != 0) LOGW("WARNING: SIGPIPE not blocked\n"); ALOGW("WARNING: SIGPIPE not blocked\n"); } /* Loading Loading @@ -890,9 +890,9 @@ void AndroidRuntime::start(const char* className, const char* options) ALOGD("Shutting down VM\n"); if (mJavaVM->DetachCurrentThread() != JNI_OK) LOGW("Warning: unable to detach main thread\n"); ALOGW("Warning: unable to detach main thread\n"); if (mJavaVM->DestroyJavaVM() != 0) LOGW("Warning: VM did not shut down cleanly\n"); ALOGW("Warning: VM did not shut down cleanly\n"); } void AndroidRuntime::onExit(int code) Loading Loading
cmds/installd/commands.c +17 −17 Original line number Diff line number Diff line Loading @@ -463,7 +463,7 @@ static int wait_dexopt(pid_t pid, const char* apk_path) } } if (got_pid != pid) { LOGW("waitpid failed: wanted %d, got %d: %s\n", ALOGW("waitpid failed: wanted %d, got %d: %s\n", (int) pid, (int) got_pid, strerror(errno)); return 1; } Loading @@ -472,7 +472,7 @@ static int wait_dexopt(pid_t pid, const char* apk_path) ALOGV("DexInv: --- END '%s' (success) ---\n", apk_path); return 0; } else { LOGW("DexInv: --- END '%s' --- status=0x%04x, process failed\n", ALOGW("DexInv: --- END '%s' --- status=0x%04x, process failed\n", apk_path, status); return status; /* always nonzero */ } Loading Loading @@ -595,7 +595,7 @@ void mkinnerdirs(char* path, int basepos, mode_t mode, int uid, int gid, if (mkdir(path, mode) == 0) { chown(path, uid, gid); } else { LOGW("Unable to make directory %s: %s\n", path, strerror(errno)); ALOGW("Unable to make directory %s: %s\n", path, strerror(errno)); } } path[basepos] = '/'; Loading @@ -616,7 +616,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos, int dstend = strlen(dstpath); if (lstat(srcpath, statbuf) < 0) { LOGW("Unable to stat %s: %s\n", srcpath, strerror(errno)); ALOGW("Unable to stat %s: %s\n", srcpath, strerror(errno)); return 1; } Loading @@ -631,7 +631,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos, return 1; } } else { LOGW("Unable to rename %s to %s: %s\n", ALOGW("Unable to rename %s to %s: %s\n", srcpath, dstpath, strerror(errno)); return 1; } Loading @@ -640,7 +640,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos, d = opendir(srcpath); if (d == NULL) { LOGW("Unable to opendir %s: %s\n", srcpath, strerror(errno)); ALOGW("Unable to opendir %s: %s\n", srcpath, strerror(errno)); return 1; } Loading @@ -655,12 +655,12 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos, } if ((srcend+strlen(name)) >= (PKG_PATH_MAX-2)) { LOGW("Source path too long; skipping: %s/%s\n", srcpath, name); ALOGW("Source path too long; skipping: %s/%s\n", srcpath, name); continue; } if ((dstend+strlen(name)) >= (PKG_PATH_MAX-2)) { LOGW("Destination path too long; skipping: %s/%s\n", dstpath, name); ALOGW("Destination path too long; skipping: %s/%s\n", dstpath, name); continue; } Loading Loading @@ -716,7 +716,7 @@ int movefiles() } else { subfd = openat(dfd, name, O_RDONLY); if (subfd < 0) { LOGW("Unable to open update commands at %s%s\n", ALOGW("Unable to open update commands at %s%s\n", UPDATE_COMMANDS_DIR_PREFIX, name); continue; } Loading @@ -742,7 +742,7 @@ int movefiles() // skip comments and empty lines. } else if (hasspace) { if (dstpkg[0] == 0) { LOGW("Path before package line in %s%s: %s\n", ALOGW("Path before package line in %s%s: %s\n", UPDATE_COMMANDS_DIR_PREFIX, name, buf+bufp); } else if (srcpkg[0] == 0) { // Skip -- source package no longer exists. Loading @@ -758,7 +758,7 @@ int movefiles() } else { char* div = strchr(buf+bufp, ':'); if (div == NULL) { LOGW("Bad package spec in %s%s; no ':' sep: %s\n", ALOGW("Bad package spec in %s%s; no ':' sep: %s\n", UPDATE_COMMANDS_DIR_PREFIX, name, buf+bufp); } else { *div = 0; Loading @@ -767,14 +767,14 @@ int movefiles() strcpy(dstpkg, buf+bufp); } else { srcpkg[0] = dstpkg[0] = 0; LOGW("Package name too long in %s%s: %s\n", ALOGW("Package name too long in %s%s: %s\n", UPDATE_COMMANDS_DIR_PREFIX, name, buf+bufp); } if (strlen(div) < PKG_NAME_MAX) { strcpy(srcpkg, div); } else { srcpkg[0] = dstpkg[0] = 0; LOGW("Package name too long in %s%s: %s\n", ALOGW("Package name too long in %s%s: %s\n", UPDATE_COMMANDS_DIR_PREFIX, name, div); } if (srcpkg[0] != 0) { Loading @@ -785,7 +785,7 @@ int movefiles() } } else { srcpkg[0] = 0; LOGW("Can't create path %s in %s%s\n", ALOGW("Can't create path %s in %s%s\n", div, UPDATE_COMMANDS_DIR_PREFIX, name); } if (srcpkg[0] != 0) { Loading @@ -802,7 +802,7 @@ int movefiles() } } else { srcpkg[0] = 0; LOGW("Can't create path %s in %s%s\n", ALOGW("Can't create path %s in %s%s\n", div, UPDATE_COMMANDS_DIR_PREFIX, name); } } Loading @@ -815,7 +815,7 @@ int movefiles() } else { if (bufp == 0) { if (bufp < bufe) { LOGW("Line too long in %s%s, skipping: %s\n", ALOGW("Line too long in %s%s, skipping: %s\n", UPDATE_COMMANDS_DIR_PREFIX, name, buf); } } else if (bufp < bufe) { Loading @@ -825,7 +825,7 @@ int movefiles() } readlen = read(subfd, buf+bufe, PKG_PATH_MAX-bufe); if (readlen < 0) { LOGW("Failure reading update commands in %s%s: %s\n", ALOGW("Failure reading update commands in %s%s: %s\n", UPDATE_COMMANDS_DIR_PREFIX, name, strerror(errno)); break; } else if (readlen == 0) { Loading
cmds/installd/utils.c +2 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ int create_pkg_path(char path[PKG_PATH_MAX], if (persona != 0) { int ret = snprintf(dst, dst_size, "%d/", persona); if (ret < 0 || (size_t) ret != uid_len + 1) { LOGW("Error appending UID to APK path"); ALOGW("Error appending UID to APK path"); return -1; } } Loading Loading @@ -326,7 +326,7 @@ int get_path_from_env(dir_rec_t* rec, const char* var) { const char* path = getenv(var); int ret = get_path_from_string(rec, path); if (ret < 0) { LOGW("Problem finding value for environment variable %s\n", var); ALOGW("Problem finding value for environment variable %s\n", var); } return ret; } Loading
cmds/keystore/keystore.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -785,7 +785,7 @@ int main(int argc, char* argv[]) { socklen_t size = sizeof(cred); int credResult = getsockopt(sock, SOL_SOCKET, SO_PEERCRED, &cred, &size); if (credResult != 0) { LOGW("getsockopt: %s", strerror(errno)); ALOGW("getsockopt: %s", strerror(errno)); } else { int8_t request; if (recv_code(sock, &request)) { Loading
cmds/system_server/system_main.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ int main(int argc, const char* const argv[]) blockSignals(); // You can trust me, honestly! LOGW("*** Current priority: %d\n", getpriority(PRIO_PROCESS, 0)); ALOGW("*** Current priority: %d\n", getpriority(PRIO_PROCESS, 0)); setpriority(PRIO_PROCESS, 0, -1); system_init(); Loading
core/jni/AndroidRuntime.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -397,7 +397,7 @@ static void blockSigpipe() sigemptyset(&mask); sigaddset(&mask, SIGPIPE); if (sigprocmask(SIG_BLOCK, &mask, NULL) != 0) LOGW("WARNING: SIGPIPE not blocked\n"); ALOGW("WARNING: SIGPIPE not blocked\n"); } /* Loading Loading @@ -890,9 +890,9 @@ void AndroidRuntime::start(const char* className, const char* options) ALOGD("Shutting down VM\n"); if (mJavaVM->DetachCurrentThread() != JNI_OK) LOGW("Warning: unable to detach main thread\n"); ALOGW("Warning: unable to detach main thread\n"); if (mJavaVM->DestroyJavaVM() != 0) LOGW("Warning: VM did not shut down cleanly\n"); ALOGW("Warning: VM did not shut down cleanly\n"); } void AndroidRuntime::onExit(int code) Loading