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

Commit 8aeb6e24 authored by Steve Block's avatar Steve Block
Browse files

Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)

Change-Id: I52fce957db06c281e2618daa4e2ecba19974f2eb
parent 4f07a1f8
Loading
Loading
Loading
Loading
+16 −7
Original line number Original line Diff line number Diff line
@@ -171,17 +171,23 @@ extern "C" {
/*
/*
 * Simplified macro to send an error log message using the current LOG_TAG.
 * Simplified macro to send an error log message using the current LOG_TAG.
 */
 */
#ifndef ALOGE
#define ALOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
// Temporary measure for code still using old LOG macros.
#ifndef LOGE
#ifndef LOGE
#define LOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
#define LOGE ALOGE
#define ALOGE LOGE
#endif
#endif
#endif


#ifndef LOGE_IF
#ifndef ALOGE_IF
#define LOGE_IF(cond, ...) \
#define ALOGE_IF(cond, ...) \
    ( (CONDITION(cond)) \
    ( (CONDITION(cond)) \
    ? ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__)) \
    ? ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__)) \
    : (void)0 )
    : (void)0 )
#define ALOGE_IF LOGE_IF
// Temporary measure for code still using old LOG macros.
#ifndef LOGE_IF
#define LOGE_IF ALOGE_IF
#endif
#endif
#endif


// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
@@ -242,9 +248,12 @@ extern "C" {
 * Conditional based on whether the current LOG_TAG is enabled at
 * Conditional based on whether the current LOG_TAG is enabled at
 * error priority.
 * error priority.
 */
 */
#ifndef IF_ALOGE
#define IF_ALOGE() IF_ALOG(LOG_ERROR, LOG_TAG)
// Temporary measure for code still using old LOG macros.
#ifndef IF_LOGE
#ifndef IF_LOGE
#define IF_LOGE() IF_ALOG(LOG_ERROR, LOG_TAG)
#define IF_LOGE IF_ALOGE
#define IF_ALOGE IF_LOGE
#endif
#endif
#endif




+2 −2
Original line number Original line Diff line number Diff line
@@ -31,8 +31,8 @@
#define ALOGD(...)   ALOG("D", __VA_ARGS__)
#define ALOGD(...)   ALOG("D", __VA_ARGS__)
#define ALOGI(...)   ALOG("I", __VA_ARGS__)
#define ALOGI(...)   ALOG("I", __VA_ARGS__)
#define ALOGW(...)   ALOG("W", __VA_ARGS__)
#define ALOGW(...)   ALOG("W", __VA_ARGS__)
#define LOGE(...)   ALOG("E", __VA_ARGS__)
#define ALOGE(...)   ALOG("E", __VA_ARGS__)
#define LOG_ALWAYS_FATAL(...)   do { LOGE(__VA_ARGS__); exit(1); } while (0)
#define LOG_ALWAYS_FATAL(...)   do { ALOGE(__VA_ARGS__); exit(1); } while (0)
#endif
#endif


#endif // _CUTILS_LOGHACK_H
#endif // _CUTILS_LOGHACK_H
+1 −1
Original line number Original line Diff line number Diff line
@@ -189,7 +189,7 @@ int property_get(const char *key, char *value, const char *default_value)
        strcpy(value, recvBuf+1);
        strcpy(value, recvBuf+1);
        len = strlen(value);
        len = strlen(value);
    } else {
    } else {
        LOGE("Got strange response to property_get request (%d)\n",
        ALOGE("Got strange response to property_get request (%d)\n",
            recvBuf[0]);
            recvBuf[0]);
        assert(0);
        assert(0);
        return -1;
        return -1;
+1 −1
Original line number Original line Diff line number Diff line
@@ -144,7 +144,7 @@ int record_stream_get_next (RecordStream *p_rs, void ** p_outRecord,
        && p_rs->read_end == p_rs->buffer_end
        && p_rs->read_end == p_rs->buffer_end
    ) {
    ) {
        // this should never happen
        // this should never happen
        //LOGE("max record length exceeded\n");
        //ALOGE("max record length exceeded\n");
        assert (0);
        assert (0);
        errno = EFBIG;
        errno = EFBIG;
        return -1;
        return -1;
+2 −2
Original line number Original line Diff line number Diff line
@@ -30,12 +30,12 @@ bool socket_peer_is_trusted(int fd)
    int n = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &len);
    int n = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &len);


    if (n != 0) {
    if (n != 0) {
        LOGE("could not get socket credentials: %s\n", strerror(errno));
        ALOGE("could not get socket credentials: %s\n", strerror(errno));
        return false;
        return false;
    }
    }


    if ((cr.uid != AID_ROOT) && (cr.uid != AID_SHELL)) {
    if ((cr.uid != AID_ROOT) && (cr.uid != AID_SHELL)) {
        LOGE("untrusted userid on other end of socket: userid %d\n", cr.uid);
        ALOGE("untrusted userid on other end of socket: userid %d\n", cr.uid);
        return false;
        return false;
    }
    }
#endif
#endif
Loading