Skip to content

Commit

Permalink
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
Browse files Browse the repository at this point in the history
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Id297c768e26290752c1accd2110d10437a73920e
  • Loading branch information
Steve Block committed Jan 6, 2012
1 parent 9f71f85 commit 9657b13
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions bluedroid/bluetooth.c
Expand Up @@ -82,13 +82,13 @@ static int check_bluetooth_power() {

fd = open(rfkill_state_path, O_RDONLY);
if (fd < 0) {
LOGE("open(%s) failed: %s (%d)", rfkill_state_path, strerror(errno),
ALOGE("open(%s) failed: %s (%d)", rfkill_state_path, strerror(errno),
errno);
goto out;
}
sz = read(fd, &buffer, 1);
if (sz != 1) {
LOGE("read(%s) failed: %s (%d)", rfkill_state_path, strerror(errno),
ALOGE("read(%s) failed: %s (%d)", rfkill_state_path, strerror(errno),
errno);
goto out;
}
Expand Down Expand Up @@ -119,13 +119,13 @@ static int set_bluetooth_power(int on) {

fd = open(rfkill_state_path, O_WRONLY);
if (fd < 0) {
LOGE("open(%s) for write failed: %s (%d)", rfkill_state_path,
ALOGE("open(%s) for write failed: %s (%d)", rfkill_state_path,
strerror(errno), errno);
goto out;
}
sz = write(fd, &buffer, 1);
if (sz < 0) {
LOGE("write(%s) failed: %s (%d)", rfkill_state_path, strerror(errno),
ALOGE("write(%s) failed: %s (%d)", rfkill_state_path, strerror(errno),
errno);
goto out;
}
Expand All @@ -139,7 +139,7 @@ static int set_bluetooth_power(int on) {
static inline int create_hci_sock() {
int sk = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
if (sk < 0) {
LOGE("Failed to create bluetooth hci socket: %s (%d)",
ALOGE("Failed to create bluetooth hci socket: %s (%d)",
strerror(errno), errno);
}
return sk;
Expand All @@ -156,7 +156,7 @@ int bt_enable() {

ALOGI("Starting hciattach daemon");
if (property_set("ctl.start", "hciattach") < 0) {
LOGE("Failed to start hciattach");
ALOGE("Failed to start hciattach");
set_bluetooth_power(0);
goto out;
}
Expand All @@ -181,18 +181,18 @@ int bt_enable() {
usleep(100000); // 100 ms retry delay
}
if (attempt == 0) {
LOGE("%s: Timeout waiting for HCI device to come up, error- %d, ",
ALOGE("%s: Timeout waiting for HCI device to come up, error- %d, ",
__FUNCTION__, ret);
if (property_set("ctl.stop", "hciattach") < 0) {
LOGE("Error stopping hciattach");
ALOGE("Error stopping hciattach");
}
set_bluetooth_power(0);
goto out;
}

ALOGI("Starting bluetoothd deamon");
if (property_set("ctl.start", "bluetoothd") < 0) {
LOGE("Failed to start bluetoothd");
ALOGE("Failed to start bluetoothd");
set_bluetooth_power(0);
goto out;
}
Expand All @@ -212,7 +212,7 @@ int bt_disable() {

ALOGI("Stopping bluetoothd deamon");
if (property_set("ctl.stop", "bluetoothd") < 0) {
LOGE("Error stopping bluetoothd");
ALOGE("Error stopping bluetoothd");
goto out;
}
usleep(HCID_STOP_DELAY_USEC);
Expand All @@ -223,7 +223,7 @@ int bt_disable() {

ALOGI("Stopping hciattach deamon");
if (property_set("ctl.stop", "hciattach") < 0) {
LOGE("Error stopping hciattach");
ALOGE("Error stopping hciattach");
goto out;
}

Expand Down
2 changes: 1 addition & 1 deletion brcm_patchram_plus/brcm_patchram_plus.c
Expand Up @@ -133,7 +133,7 @@
#define printf ALOGD
#undef fprintf
#define fprintf(x, ...) \
{ if(x==stderr) LOGE(__VA_ARGS__); else fprintf(x, __VA_ARGS__); }
{ if(x==stderr) ALOGE(__VA_ARGS__); else fprintf(x, __VA_ARGS__); }

#endif //ANDROID

Expand Down

0 comments on commit 9657b13

Please sign in to comment.