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

Commit 40763914 authored by Kenny Root's avatar Kenny Root Committed by Android (Google) Code Review
Browse files

Merge "Exit immediately on some linklib failures" into gingerbread

parents 0b01eb26 0332d1c5
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -946,14 +946,12 @@ int linklib(const char* dataDir, const char* asecLibDir)
    const size_t libdirLen = strlen(dataDir) + strlen(PKG_LIB_POSTFIX);
    const size_t libdirLen = strlen(dataDir) + strlen(PKG_LIB_POSTFIX);
    if (libdirLen >= PKG_PATH_MAX) {
    if (libdirLen >= PKG_PATH_MAX) {
        LOGE("library dir len too large");
        LOGE("library dir len too large");
        rc = -1;
        return -1;
        goto out;
    }
    }


    if (snprintf(libdir, sizeof(libdir), "%s%s", dataDir, PKG_LIB_POSTFIX) != (ssize_t)libdirLen) {
    if (snprintf(libdir, sizeof(libdir), "%s%s", dataDir, PKG_LIB_POSTFIX) != (ssize_t)libdirLen) {
        LOGE("library dir not written successfully: %s\n", strerror(errno));
        LOGE("library dir not written successfully: %s\n", strerror(errno));
        rc = -1;
        return -1;
        goto out;
    }
    }


    if (stat(dataDir, &s) < 0) return -1;
    if (stat(dataDir, &s) < 0) return -1;