Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a51f0e70 authored by Steve Block's avatar Steve Block Committed by Jean-Baptiste Queru
Browse files

Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)

Change-Id: I8fbdfa7a7581f481968dbb65aa40f7042936d7cb
parent 933e8561
Loading
Loading
Loading
Loading
+17 −17
Original line number Original line Diff line number Diff line
@@ -463,7 +463,7 @@ static int wait_dexopt(pid_t pid, const char* apk_path)
        }
        }
    }
    }
    if (got_pid != pid) {
    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));
            (int) pid, (int) got_pid, strerror(errno));
        return 1;
        return 1;
    }
    }
@@ -472,7 +472,7 @@ static int wait_dexopt(pid_t pid, const char* apk_path)
        ALOGV("DexInv: --- END '%s' (success) ---\n", apk_path);
        ALOGV("DexInv: --- END '%s' (success) ---\n", apk_path);
        return 0;
        return 0;
    } else {
    } else {
        LOGW("DexInv: --- END '%s' --- status=0x%04x, process failed\n",
        ALOGW("DexInv: --- END '%s' --- status=0x%04x, process failed\n",
            apk_path, status);
            apk_path, status);
        return status;      /* always nonzero */
        return status;      /* always nonzero */
    }
    }
@@ -595,7 +595,7 @@ void mkinnerdirs(char* path, int basepos, mode_t mode, int uid, int gid,
                if (mkdir(path, mode) == 0) {
                if (mkdir(path, mode) == 0) {
                    chown(path, uid, gid);
                    chown(path, uid, gid);
                } else {
                } 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] = '/';
            path[basepos] = '/';
@@ -616,7 +616,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos,
    int dstend = strlen(dstpath);
    int dstend = strlen(dstpath);
    
    
    if (lstat(srcpath, statbuf) < 0) {
    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;
        return 1;
    }
    }
    
    
@@ -631,7 +631,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos,
                return 1;
                return 1;
            }
            }
        } else {
        } else {
            LOGW("Unable to rename %s to %s: %s\n",
            ALOGW("Unable to rename %s to %s: %s\n",
                srcpath, dstpath, strerror(errno));
                srcpath, dstpath, strerror(errno));
            return 1;
            return 1;
        }
        }
@@ -640,7 +640,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos,


    d = opendir(srcpath);
    d = opendir(srcpath);
    if (d == NULL) {
    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;
        return 1;
    }
    }


@@ -655,12 +655,12 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos,
        }
        }
        
        
        if ((srcend+strlen(name)) >= (PKG_PATH_MAX-2)) {
        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;
            continue;
        }
        }
        
        
        if ((dstend+strlen(name)) >= (PKG_PATH_MAX-2)) {
        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;
            continue;
        }
        }
        
        
@@ -716,7 +716,7 @@ int movefiles()
        } else {
        } else {
            subfd = openat(dfd, name, O_RDONLY);
            subfd = openat(dfd, name, O_RDONLY);
            if (subfd < 0) {
            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);
                        UPDATE_COMMANDS_DIR_PREFIX, name);
                continue;
                continue;
            }
            }
@@ -742,7 +742,7 @@ int movefiles()
                        // skip comments and empty lines.
                        // skip comments and empty lines.
                    } else if (hasspace) {
                    } else if (hasspace) {
                        if (dstpkg[0] == 0) {
                        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);
                                    UPDATE_COMMANDS_DIR_PREFIX, name, buf+bufp);
                        } else if (srcpkg[0] == 0) {
                        } else if (srcpkg[0] == 0) {
                            // Skip -- source package no longer exists.
                            // Skip -- source package no longer exists.
@@ -758,7 +758,7 @@ int movefiles()
                    } else {
                    } else {
                        char* div = strchr(buf+bufp, ':');
                        char* div = strchr(buf+bufp, ':');
                        if (div == NULL) {
                        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);
                                    UPDATE_COMMANDS_DIR_PREFIX, name, buf+bufp);
                        } else {
                        } else {
                            *div = 0;
                            *div = 0;
@@ -767,14 +767,14 @@ int movefiles()
                                strcpy(dstpkg, buf+bufp);
                                strcpy(dstpkg, buf+bufp);
                            } else {
                            } else {
                                srcpkg[0] = dstpkg[0] = 0;
                                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);
                                        UPDATE_COMMANDS_DIR_PREFIX, name, buf+bufp);
                            }
                            }
                            if (strlen(div) < PKG_NAME_MAX) {
                            if (strlen(div) < PKG_NAME_MAX) {
                                strcpy(srcpkg, div);
                                strcpy(srcpkg, div);
                            } else {
                            } else {
                                srcpkg[0] = dstpkg[0] = 0;
                                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);
                                        UPDATE_COMMANDS_DIR_PREFIX, name, div);
                            }
                            }
                            if (srcpkg[0] != 0) {
                            if (srcpkg[0] != 0) {
@@ -785,7 +785,7 @@ int movefiles()
                                    }
                                    }
                                } else {
                                } else {
                                    srcpkg[0] = 0;
                                    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);
                                            div, UPDATE_COMMANDS_DIR_PREFIX, name);
                                }
                                }
                                if (srcpkg[0] != 0) {
                                if (srcpkg[0] != 0) {
@@ -802,7 +802,7 @@ int movefiles()
                                        }
                                        }
                                    } else {
                                    } else {
                                        srcpkg[0] = 0;
                                        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);
                                                div, UPDATE_COMMANDS_DIR_PREFIX, name);
                                    }
                                    }
                                }
                                }
@@ -815,7 +815,7 @@ int movefiles()
                } else {
                } else {
                    if (bufp == 0) {
                    if (bufp == 0) {
                        if (bufp < bufe) {
                        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);
                                    UPDATE_COMMANDS_DIR_PREFIX, name, buf);
                        }
                        }
                    } else if (bufp < bufe) {
                    } else if (bufp < bufe) {
@@ -825,7 +825,7 @@ int movefiles()
                    }
                    }
                    readlen = read(subfd, buf+bufe, PKG_PATH_MAX-bufe);
                    readlen = read(subfd, buf+bufe, PKG_PATH_MAX-bufe);
                    if (readlen < 0) {
                    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));
                                UPDATE_COMMANDS_DIR_PREFIX, name, strerror(errno));
                        break;
                        break;
                    } else if (readlen == 0) {
                    } else if (readlen == 0) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -83,7 +83,7 @@ int create_pkg_path(char path[PKG_PATH_MAX],
    if (persona != 0) {
    if (persona != 0) {
        int ret = snprintf(dst, dst_size, "%d/", persona);
        int ret = snprintf(dst, dst_size, "%d/", persona);
        if (ret < 0 || (size_t) ret != uid_len + 1) {
        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;
            return -1;
        }
        }
    }
    }
@@ -326,7 +326,7 @@ int get_path_from_env(dir_rec_t* rec, const char* var) {
    const char* path = getenv(var);
    const char* path = getenv(var);
    int ret = get_path_from_string(rec, path);
    int ret = get_path_from_string(rec, path);
    if (ret < 0) {
    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;
    return ret;
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -785,7 +785,7 @@ int main(int argc, char* argv[]) {
        socklen_t size = sizeof(cred);
        socklen_t size = sizeof(cred);
        int credResult = getsockopt(sock, SOL_SOCKET, SO_PEERCRED, &cred, &size);
        int credResult = getsockopt(sock, SOL_SOCKET, SO_PEERCRED, &cred, &size);
        if (credResult != 0) {
        if (credResult != 0) {
            LOGW("getsockopt: %s", strerror(errno));
            ALOGW("getsockopt: %s", strerror(errno));
        } else {
        } else {
            int8_t request;
            int8_t request;
            if (recv_code(sock, &request)) {
            if (recv_code(sock, &request)) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -49,7 +49,7 @@ int main(int argc, const char* const argv[])
    blockSignals();
    blockSignals();
    
    
    // You can trust me, honestly!
    // 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);
    setpriority(PRIO_PROCESS, 0, -1);


    system_init();    
    system_init();    
+3 −3
Original line number Original line Diff line number Diff line
@@ -397,7 +397,7 @@ static void blockSigpipe()
    sigemptyset(&mask);
    sigemptyset(&mask);
    sigaddset(&mask, SIGPIPE);
    sigaddset(&mask, SIGPIPE);
    if (sigprocmask(SIG_BLOCK, &mask, NULL) != 0)
    if (sigprocmask(SIG_BLOCK, &mask, NULL) != 0)
        LOGW("WARNING: SIGPIPE not blocked\n");
        ALOGW("WARNING: SIGPIPE not blocked\n");
}
}


/*
/*
@@ -890,9 +890,9 @@ void AndroidRuntime::start(const char* className, const char* options)


    ALOGD("Shutting down VM\n");
    ALOGD("Shutting down VM\n");
    if (mJavaVM->DetachCurrentThread() != JNI_OK)
    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)
    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)
void AndroidRuntime::onExit(int code)
Loading