Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/157065
Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index 988fee3..4d80296 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -463,7 +463,7 @@
}
}
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;
}
@@ -472,7 +472,7 @@
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 */
}
@@ -595,7 +595,7 @@
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] = '/';
@@ -616,7 +616,7 @@
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;
}
@@ -631,7 +631,7 @@
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;
}
@@ -640,7 +640,7 @@
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;
}
@@ -655,12 +655,12 @@
}
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;
}
@@ -716,7 +716,7 @@
} 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;
}
@@ -742,7 +742,7 @@
// 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.
@@ -758,7 +758,7 @@
} 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;
@@ -767,14 +767,14 @@
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) {
@@ -785,7 +785,7 @@
}
} 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) {
@@ -802,7 +802,7 @@
}
} 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);
}
}
@@ -815,7 +815,7 @@
} 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) {
@@ -825,7 +825,7 @@
}
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) {
diff --git a/cmds/installd/utils.c b/cmds/installd/utils.c
index a53a93c..940626e 100644
--- a/cmds/installd/utils.c
+++ b/cmds/installd/utils.c
@@ -83,7 +83,7 @@
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;
}
}
@@ -326,7 +326,7 @@
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;
}