Skip to content

Commit 01dda20

Browse files
author
Steve Block
committed
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
Bug: 5449033 Change-Id: Ibcffdcf620ebae1c389446ce8e9d908f11ac039c
1 parent 36afde3 commit 01dda20

37 files changed

+173
-173
lines changed

include/cutils/log.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ extern "C" {
139139
/*
140140
* Simplified macro to send an error log message using the current LOG_TAG.
141141
*/
142-
#ifndef LOGE
143-
#define LOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
142+
#ifndef ALOGE
143+
#define ALOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
144144
#endif
145145

146-
#ifndef LOGE_IF
147-
#define LOGE_IF(cond, ...) \
146+
#ifndef ALOGE_IF
147+
#define ALOGE_IF(cond, ...) \
148148
( (CONDITION(cond)) \
149149
? ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__)) \
150150
: (void)0 )
@@ -192,8 +192,8 @@ extern "C" {
192192
* Conditional based on whether the current LOG_TAG is enabled at
193193
* error priority.
194194
*/
195-
#ifndef IF_LOGE
196-
#define IF_LOGE() IF_ALOG(LOG_ERROR, LOG_TAG)
195+
#ifndef IF_ALOGE
196+
#define IF_ALOGE() IF_ALOG(LOG_ERROR, LOG_TAG)
197197
#endif
198198

199199

libcutils/loghack.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
#define ALOGD(...) ALOG("D", __VA_ARGS__)
3232
#define ALOGI(...) ALOG("I", __VA_ARGS__)
3333
#define ALOGW(...) ALOG("W", __VA_ARGS__)
34-
#define LOGE(...) ALOG("E", __VA_ARGS__)
35-
#define LOG_ALWAYS_FATAL(...) do { LOGE(__VA_ARGS__); exit(1); } while (0)
34+
#define ALOGE(...) ALOG("E", __VA_ARGS__)
35+
#define LOG_ALWAYS_FATAL(...) do { ALOGE(__VA_ARGS__); exit(1); } while (0)
3636
#endif
3737

3838
#endif // _CUTILS_LOGHACK_H

libcutils/properties.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ int property_get(const char *key, char *value, const char *default_value)
189189
strcpy(value, recvBuf+1);
190190
len = strlen(value);
191191
} else {
192-
LOGE("Got strange response to property_get request (%d)\n",
192+
ALOGE("Got strange response to property_get request (%d)\n",
193193
recvBuf[0]);
194194
assert(0);
195195
return -1;

libcutils/record_stream.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int record_stream_get_next (RecordStream *p_rs, void ** p_outRecord,
144144
&& p_rs->read_end == p_rs->buffer_end
145145
) {
146146
// this should never happen
147-
//LOGE("max record length exceeded\n");
147+
//ALOGE("max record length exceeded\n");
148148
assert (0);
149149
errno = EFBIG;
150150
return -1;

libcutils/sockets.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ bool socket_peer_is_trusted(int fd)
3030
int n = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &len);
3131

3232
if (n != 0) {
33-
LOGE("could not get socket credentials: %s\n", strerror(errno));
33+
ALOGE("could not get socket credentials: %s\n", strerror(errno));
3434
return false;
3535
}
3636

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

libcutils/zygote.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static int send_request(int fd, int sendStdio, int argc, const char **argv)
4646
{
4747
#ifndef HAVE_ANDROID_OS
4848
// not supported on simulator targets
49-
//LOGE("zygote_* not supported on simulator targets");
49+
//ALOGE("zygote_* not supported on simulator targets");
5050
return -1;
5151
#else /* HAVE_ANDROID_OS */
5252
uint32_t pid;

libdiskconfig/config_mbr.c

+11-11
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ kb_to_lba(uint32_t len_kb, uint32_t sect_size)
6262
lba = (lba + (uint64_t)sect_size - 1) & ~((uint64_t)sect_size - 1);
6363
lba /= (uint64_t)sect_size;
6464
if (lba >= 0xffffffffULL)
65-
LOGE("Error converting kb -> lba. 32bit overflow, expect weirdness");
65+
ALOGE("Error converting kb -> lba. 32bit overflow, expect weirdness");
6666
return (uint32_t)(lba & 0xffffffffULL);
6767
}
6868

@@ -75,12 +75,12 @@ mk_pri_pentry(struct disk_info *dinfo, struct part_info *pinfo, int pnum,
7575
struct pc_partition *pentry;
7676

7777
if (pnum >= PC_NUM_BOOT_RECORD_PARTS) {
78-
LOGE("Maximum number of primary partition exceeded.");
78+
ALOGE("Maximum number of primary partition exceeded.");
7979
return NULL;
8080
}
8181

8282
if (!(item = alloc_wl(sizeof(struct pc_partition)))) {
83-
LOGE("Unable to allocate memory for partition entry.");
83+
ALOGE("Unable to allocate memory for partition entry.");
8484
return NULL;
8585
}
8686

@@ -146,7 +146,7 @@ mk_ext_pentry(struct disk_info *dinfo, struct part_info *pinfo, uint32_t *lba,
146146
uint32_t len; /* in lba units */
147147

148148
if (!(item = alloc_wl(sizeof(struct pc_boot_record)))) {
149-
LOGE("Unable to allocate memory for EBR.");
149+
ALOGE("Unable to allocate memory for EBR.");
150150
return NULL;
151151
}
152152

@@ -163,7 +163,7 @@ mk_ext_pentry(struct disk_info *dinfo, struct part_info *pinfo, uint32_t *lba,
163163
len = kb_to_lba(pinfo->len_kb, dinfo->sect_size);
164164
else {
165165
if (pnext) {
166-
LOGE("Only the last partition can be specified to fill the disk "
166+
ALOGE("Only the last partition can be specified to fill the disk "
167167
"(name = '%s')", pinfo->name);
168168
goto fail;
169169
}
@@ -233,7 +233,7 @@ config_mbr(struct disk_info *dinfo)
233233
if ((temp_wr = mk_pri_pentry(dinfo, NULL, cnt, &cur_lba)))
234234
wlist_add(&wr_list, temp_wr);
235235
else {
236-
LOGE("Cannot create primary extended partition.");
236+
ALOGE("Cannot create primary extended partition.");
237237
goto fail;
238238
}
239239
}
@@ -259,7 +259,7 @@ config_mbr(struct disk_info *dinfo)
259259
if (temp_wr)
260260
wlist_add(&wr_list, temp_wr);
261261
else {
262-
LOGE("Cannot create partition %d (%s).", cnt, pinfo->name);
262+
ALOGE("Cannot create partition %d (%s).", cnt, pinfo->name);
263263
goto fail;
264264
}
265265
}
@@ -270,7 +270,7 @@ config_mbr(struct disk_info *dinfo)
270270
cur_lba = 0;
271271
memset(&blank, 0, sizeof(struct part_info));
272272
if (!(temp_wr = mk_pri_pentry(dinfo, &blank, cnt, &cur_lba))) {
273-
LOGE("Cannot create blank partition %d.", cnt);
273+
ALOGE("Cannot create blank partition %d.", cnt);
274274
goto fail;
275275
}
276276
wlist_add(&wr_list, temp_wr);
@@ -279,7 +279,7 @@ config_mbr(struct disk_info *dinfo)
279279
return wr_list;
280280

281281
nospace:
282-
LOGE("Not enough space to add parttion '%s'.", pinfo->name);
282+
ALOGE("Not enough space to add parttion '%s'.", pinfo->name);
283283

284284
fail:
285285
wlist_free(wr_list);
@@ -310,13 +310,13 @@ find_mbr_part(struct disk_info *dinfo, const char *name)
310310
num++;
311311

312312
if (!(dev_name = malloc(MAX_NAME_LEN))) {
313-
LOGE("Cannot allocate memory.");
313+
ALOGE("Cannot allocate memory.");
314314
return NULL;
315315
}
316316

317317
num = snprintf(dev_name, MAX_NAME_LEN, "%s%d", dinfo->device, num);
318318
if (num >= MAX_NAME_LEN) {
319-
LOGE("Device name is too long?!");
319+
ALOGE("Device name is too long?!");
320320
free(dev_name);
321321
return NULL;
322322
}

0 commit comments

Comments
 (0)