[PATCH] hayes-ril: rename LOGD/E macros to ALOGD/E
Lukas Märdian
luk at slyon.de
Tue Apr 8 13:22:04 UTC 2014
---
at.c | 26 ++++----
device.c | 168 +++++++++++++++++++++++++-------------------------
device/gta04/gta04.c | 26 ++++----
hayes-ril.c | 22 +++----
sim.c | 2 +-
sms.c | 4 +-
util.c | 14 ++---
7 files changed, 131 insertions(+), 131 deletions(-)
diff --git a/at.c b/at.c
index 2d4d9a5..0bdcf36 100644
--- a/at.c
+++ b/at.c
@@ -188,7 +188,7 @@ int at_response_register(char *string, int error, struct at_request *request)
if (ril_data->at_data.responses == NULL)
ril_data->at_data.responses = list;
-// LOGD("%d response(s) registered", list_head_count(ril_data->at_data.responses));
+// ALOGD("%d response(s) registered", list_head_count(ril_data->at_data.responses));
AT_RESPONSES_UNLOCK();
@@ -223,7 +223,7 @@ list_continue:
list = list->next;
}
-// LOGD("%d response(s) registered", list_head_count(ril_data->at_data.responses));
+// ALOGD("%d response(s) registered", list_head_count(ril_data->at_data.responses));
AT_RESPONSES_UNLOCK();
@@ -309,7 +309,7 @@ int at_response_process(char *data, int length)
l = i - p;
if (o + l > AT_RECV_BYTES_MAX) {
- LOGE("Buffer overflow!");
+ ALOGE("Buffer overflow!");
return -1;
}
@@ -331,7 +331,7 @@ int at_response_process(char *data, int length)
buffer[o+1] = '\0';
if (request_pending != NULL && at_strings_compare(request_pending->string, line)) {
- LOGD("Confirmation of pending request");
+ ALOGD("Confirmation of pending request");
request_pending->status = AT_STATUS_SENT;
request_sent = request_pending;
@@ -407,7 +407,7 @@ struct at_request *at_request_register(char *string, RIL_Token token,
if (ril_data->at_data.requests == NULL)
ril_data->at_data.requests = list;
-// LOGD("%d request(s) registered", list_head_count(ril_data->at_data.requests));
+// ALOGD("%d request(s) registered", list_head_count(ril_data->at_data.requests));
AT_REQUESTS_UNLOCK();
@@ -442,7 +442,7 @@ list_continue:
list = list->next;
}
-// LOGD("%d request(s) registered", list_head_count(ril_data->at_data.requests));
+// ALOGD("%d request(s) registered", list_head_count(ril_data->at_data.requests));
AT_REQUESTS_UNLOCK();
@@ -571,7 +571,7 @@ int at_request_send(struct at_request *request)
rc = ril_device_transport_send(ril_device, data, length);
if (rc <= 0) {
- LOGE("Sending data failed!");
+ ALOGE("Sending data failed!");
return -1;
}
@@ -590,18 +590,18 @@ int at_request_send_next(void)
if (at_request_find_status(AT_STATUS_SENT) != NULL ||
at_request_find_status(AT_STATUS_PENDING) != NULL ||
at_request_find_status(AT_STATUS_FREEZED) != NULL) {
- LOGD("There is still at least one unanswered request!");
+ ALOGD("There is still at least one unanswered request!");
return -1;
}
if (ril_data->at_data.freezed) {
- LOGD("AT requests are freezed!");
+ ALOGD("AT requests are freezed!");
return 0;
}
request = at_request_find_status(AT_STATUS_WAITING);
if (request == NULL) {
- LOGD("No waiting request to send");
+ ALOGD("No waiting request to send");
return 0;
}
@@ -672,13 +672,13 @@ int at_send(char *string, RIL_Token token,
struct at_request *request;
if (callback == NULL) {
- LOGE("%s: No callback function, aborting", __func__);
+ ALOGE("%s: No callback function, aborting", __func__);
return -1;
}
request = at_request_register(string, token, callback, flags);
if (request == NULL) {
- LOGE("%s: Failed to register AT request", __func__);
+ ALOGE("%s: Failed to register AT request", __func__);
return -1;
}
@@ -748,7 +748,7 @@ int at_send_request_data(RIL_Token token, char *data, int length)
free(buffer);
if (rc <= 0) {
- LOGE("Sending data failed!");
+ ALOGE("Sending data failed!");
return -1;
}
diff --git a/device.c b/device.c
index 4175f10..37b369c 100644
--- a/device.c
+++ b/device.c
@@ -38,25 +38,25 @@ int ril_device_init(void)
rc = ril_device_data_create(ril_device);
if (rc < 0) {
- LOGE("Failed to create device data!");
+ ALOGE("Failed to create device data!");
return -1;
}
rc = ril_device_power_on(ril_device);
if (rc < 0) {
- LOGE("Failed to power on device!");
+ ALOGE("Failed to power on device!");
return -1;
}
rc = ril_device_power_boot(ril_device);
if (rc < 0) {
- LOGE("Failed to boot device!");
+ ALOGE("Failed to boot device!");
return -1;
}
rc = ril_device_transport_open(ril_device);
if (rc < 0) {
- LOGE("Failed to open device!");
+ ALOGE("Failed to open device!");
return -1;
}
@@ -87,7 +87,7 @@ int ril_device_setup(void)
rc = ril_device_at_setup(ril_device);
if (rc < 0) {
- LOGE("Failed to setup device!");
+ ALOGE("Failed to setup device!");
return -1;
}
@@ -103,62 +103,62 @@ int ril_device_data_create(struct ril_device *ril_device)
int rc;
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
if (ril_device->handlers->power == NULL) {
- LOGE("Missing device power handlers!");
+ ALOGE("Missing device power handlers!");
return -1;
}
if (ril_device->handlers->power->sdata_create == NULL) {
- LOGE("Missing device power data handlers!");
+ ALOGE("Missing device power data handlers!");
return -1;
}
- LOGD("Creating data for power handlers...");
+ ALOGD("Creating data for power handlers...");
rc = ril_device->handlers->power->sdata_create(&ril_device->handlers->power->sdata);
if (rc < 0) {
- LOGE("Creating data for power handlers failed!");
+ ALOGE("Creating data for power handlers failed!");
return -1;
}
if (ril_device->handlers->transport == NULL) {
- LOGE("Missing device transport handlers!");
+ ALOGE("Missing device transport handlers!");
return -1;
}
if (ril_device->handlers->transport->sdata_create == NULL) {
- LOGE("Missing device transport data handlers!");
+ ALOGE("Missing device transport data handlers!");
return -1;
}
- LOGD("Creating data for transport handlers...");
+ ALOGD("Creating data for transport handlers...");
ril_device->handlers->transport->sdata_create(&ril_device->handlers->transport->sdata);
if (rc < 0) {
- LOGE("Creating data for transport handlers failed!");
+ ALOGE("Creating data for transport handlers failed!");
return -1;
}
- LOGD("Creating mutex for transport handlers...");
+ ALOGD("Creating mutex for transport handlers...");
pthread_mutex_init(&(ril_device->handlers->transport->mutex), NULL);
// Missing AT handlers is not fatal
if (ril_device->handlers->at == NULL) {
- LOGE("Missing device AT handlers!");
+ ALOGE("Missing device AT handlers!");
return 0;
}
if (ril_device->handlers->at->sdata_create == NULL) {
- LOGE("Missing device AT data handlers!");
+ ALOGE("Missing device AT data handlers!");
return 0;
}
- LOGD("Creating data for AT handlers...");
+ ALOGD("Creating data for AT handlers...");
ril_device->handlers->at->sdata_create(&ril_device->handlers->at->sdata);
if (rc < 0) {
- LOGE("Creating data for AT handlers failed!");
+ ALOGE("Creating data for AT handlers failed!");
return -1;
}
@@ -170,62 +170,62 @@ int ril_device_data_destroy(struct ril_device *ril_device)
int rc;
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
if (ril_device->handlers->power == NULL) {
- LOGE("Missing device power handlers!");
+ ALOGE("Missing device power handlers!");
return -1;
}
if (ril_device->handlers->power->sdata_destroy == NULL) {
- LOGE("Missing device power data handlers!");
+ ALOGE("Missing device power data handlers!");
return -1;
}
- LOGD("Destroying data for power handlers...");
+ ALOGD("Destroying data for power handlers...");
rc = ril_device->handlers->power->sdata_destroy(ril_device->handlers->power->sdata);
if (rc < 0) {
- LOGE("Destroying data for power handlers failed!");
+ ALOGE("Destroying data for power handlers failed!");
return -1;
}
if (ril_device->handlers->transport == NULL) {
- LOGE("Missing device transport handlers!");
+ ALOGE("Missing device transport handlers!");
return -1;
}
if (ril_device->handlers->transport->sdata_destroy == NULL) {
- LOGE("Missing device transport data handlers!");
+ ALOGE("Missing device transport data handlers!");
return -1;
}
- LOGD("Destroying data for transport handlers...");
+ ALOGD("Destroying data for transport handlers...");
ril_device->handlers->transport->sdata_destroy(ril_device->handlers->transport->sdata);
if (rc < 0) {
- LOGE("Destroying data for transport handlers failed!");
+ ALOGE("Destroying data for transport handlers failed!");
return -1;
}
- LOGD("Destroying mutex for transport handlers...");
+ ALOGD("Destroying mutex for transport handlers...");
pthread_mutex_destroy(&(ril_device->handlers->transport->mutex));
// Missing AT handlers is not fatal
if (ril_device->handlers->at == NULL) {
- LOGE("Missing device AT handlers!");
+ ALOGE("Missing device AT handlers!");
return 0;
}
if (ril_device->handlers->at->sdata_create == NULL) {
- LOGE("Missing device AT data handlers!");
+ ALOGE("Missing device AT data handlers!");
return 0;
}
- LOGD("Creating data for AT handlers...");
+ ALOGD("Creating data for AT handlers...");
ril_device->handlers->at->sdata_destroy(ril_device->handlers->at->sdata);
if (rc < 0) {
- LOGE("Destroying data for AT handlers failed!");
+ ALOGE("Destroying data for AT handlers failed!");
return -1;
}
@@ -241,21 +241,21 @@ int ril_device_power_on(struct ril_device *ril_device)
int rc;
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
if (ril_device->handlers->power == NULL) {
- LOGE("Missing device power handlers!");
+ ALOGE("Missing device power handlers!");
return -1;
}
if (ril_device->handlers->power->power_on == NULL) {
- LOGE("Missing device power on handler!");
+ ALOGE("Missing device power on handler!");
return -1;
}
- LOGD("Powering modem on...");
+ ALOGD("Powering modem on...");
rc = ril_device->handlers->power->power_on(ril_device->handlers->power->sdata);
return rc;
@@ -266,21 +266,21 @@ int ril_device_power_off(struct ril_device *ril_device)
int rc;
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
if (ril_device->handlers->power == NULL) {
- LOGE("Missing device power handlers!");
+ ALOGE("Missing device power handlers!");
return -1;
}
if (ril_device->handlers->power->power_off == NULL) {
- LOGE("Missing device power off handler!");
+ ALOGE("Missing device power off handler!");
return -1;
}
- LOGD("Powering modem off...");
+ ALOGD("Powering modem off...");
rc = ril_device->handlers->power->power_off(ril_device->handlers->power->sdata);
return rc;
@@ -291,21 +291,21 @@ int ril_device_power_boot(struct ril_device *ril_device)
int rc;
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
if (ril_device->handlers->power == NULL) {
- LOGE("Missing device power handlers!");
+ ALOGE("Missing device power handlers!");
return -1;
}
if (ril_device->handlers->power->boot == NULL) {
- LOGE("Missing device power boot handler!");
+ ALOGE("Missing device power boot handler!");
return -1;
}
- LOGD("Booting modem...");
+ ALOGD("Booting modem...");
rc = ril_device->handlers->power->boot(ril_device->handlers->power->sdata);
return rc;
@@ -321,21 +321,21 @@ int ril_device_transport_open(struct ril_device *ril_device)
int rc;
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
if (ril_device->handlers->transport == NULL) {
- LOGE("Missing device transport handlers!");
+ ALOGE("Missing device transport handlers!");
return -1;
}
if (ril_device->handlers->transport->open == NULL) {
- LOGE("Missing device transport open handler!");
+ ALOGE("Missing device transport open handler!");
return -1;
}
- LOGD("Opening modem...");
+ ALOGD("Opening modem...");
rc = ril_device->handlers->transport->open(ril_device->handlers->transport->sdata);
return rc;
@@ -346,21 +346,21 @@ int ril_device_transport_close(struct ril_device *ril_device)
int rc;
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
if (ril_device->handlers->transport == NULL) {
- LOGE("Missing device transport handlers!");
+ ALOGE("Missing device transport handlers!");
return -1;
}
if (ril_device->handlers->transport->close == NULL) {
- LOGE("Missing device transport close handler!");
+ ALOGE("Missing device transport close handler!");
return -1;
}
- LOGD("Closing modem...");
+ ALOGD("Closing modem...");
rc = ril_device->handlers->transport->close(ril_device->handlers->transport->sdata);
return rc;
@@ -371,17 +371,17 @@ int ril_device_transport_send(struct ril_device *ril_device, void *data, int len
int rc;
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
if (ril_device->handlers->transport == NULL) {
- LOGE("Missing device transport handlers!");
+ ALOGE("Missing device transport handlers!");
return -1;
}
if (ril_device->handlers->transport->send == NULL) {
- LOGE("Missing device transport send handler!");
+ ALOGE("Missing device transport send handler!");
return -1;
}
@@ -397,17 +397,17 @@ int ril_device_transport_recv(struct ril_device *ril_device, void *data, int len
int rc;
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
if (ril_device->handlers->transport == NULL) {
- LOGE("Missing device transport handlers!");
+ ALOGE("Missing device transport handlers!");
return -1;
}
if (ril_device->handlers->transport->recv == NULL) {
- LOGE("Missing device transport recv handler!");
+ ALOGE("Missing device transport recv handler!");
return -1;
}
@@ -423,17 +423,17 @@ int ril_device_transport_recv_poll(struct ril_device *ril_device)
int rc;
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
if (ril_device->handlers->transport == NULL) {
- LOGE("Missing device transport handlers!");
+ ALOGE("Missing device transport handlers!");
return -1;
}
if (ril_device->handlers->transport->recv_poll == NULL) {
- LOGE("Missing device transport recv poll handler!");
+ ALOGE("Missing device transport recv poll handler!");
return -1;
}
@@ -456,13 +456,13 @@ work:
while (run) {
rc = ril_device_transport_recv_poll(ril_device);
if (rc < 0) {
- LOGE("RIL device transport recv poll failed!");
+ ALOGE("RIL device transport recv poll failed!");
break;
}
rc = ril_device_transport_recv(ril_device, (void *) &buffer, AT_RECV_BYTES_MAX);
if (rc <= 0) {
- LOGE("RIL device transport recv failed!");
+ ALOGE("RIL device transport recv failed!");
break;
}
@@ -475,32 +475,32 @@ work:
at_response_process((char *) &buffer, length);
}
- LOGE("RIL device transport recv loop stopped!");
+ ALOGE("RIL device transport recv loop stopped!");
failures++;
at_requests_freeze();
if (failures < 4) {
- LOGD("Reopening transport...");
+ ALOGD("Reopening transport...");
ril_device_transport_close(ril_device);
} else if (failures < 7) {
- LOGD("Powering off and on again...");
+ ALOGD("Powering off and on again...");
ril_device_transport_close(ril_device);
ril_device_power_off(ril_device);
ril_device_power_on(ril_device);
- LOGD("Reopening transport...");
+ ALOGD("Reopening transport...");
} else {
- LOGE("Something bad is going on, it is advised to reboot!");
+ ALOGE("Something bad is going on, it is advised to reboot!");
return -1;
}
rc = ril_device_transport_open(ril_device);
if (rc < 0) {
- LOGE("Unable to reopen transport!");
+ ALOGE("Unable to reopen transport!");
run = 0;
} else {
run = 1;
@@ -517,7 +517,7 @@ void *ril_device_transport_recv_thread(void *data)
int i;
rc = ril_device_transport_recv_loop(ril_device);
- LOGE("RIL device transport recv thread returned with %d, aborting!", rc);
+ ALOGE("RIL device transport recv thread returned with %d, aborting!", rc);
ril_device_deinit();
@@ -533,12 +533,12 @@ int ril_device_transport_recv_thread_start(void)
ril_device = ril_data->device;
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
if (ril_device->handlers->transport == NULL) {
- LOGE("Missing device transport handlers!");
+ ALOGE("Missing device transport handlers!");
return -1;
}
@@ -547,7 +547,7 @@ int ril_device_transport_recv_thread_start(void)
rc = pthread_create(&(ril_device->handlers->transport->recv_thread), &attr, ril_device_transport_recv_thread, (void *) ril_device);
if (rc != 0) {
- LOGE("Creating transport recv thread failed!");
+ ALOGE("Creating transport recv thread failed!");
return -1;
}
@@ -563,18 +563,18 @@ int ril_device_at_power_on(struct ril_device *ril_device)
int rc;
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
// Missing AT handlers is not fatal
if (ril_device->handlers->at == NULL) {
- LOGE("Missing device AT handlers!");
+ ALOGE("Missing device AT handlers!");
return 0;
}
if (ril_device->handlers->at->power_on == NULL) {
- LOGE("Missing device AT power on handler!");
+ ALOGE("Missing device AT power on handler!");
return 0;
}
@@ -587,18 +587,18 @@ int ril_device_at_power_off(struct ril_device *ril_device)
int rc;
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
// Missing AT handlers is not fatal
if (ril_device->handlers->at == NULL) {
- LOGE("Missing device AT handlers!");
+ ALOGE("Missing device AT handlers!");
return 0;
}
if (ril_device->handlers->at->power_off == NULL) {
- LOGE("Missing device AT power off handler!");
+ ALOGE("Missing device AT power off handler!");
return 0;
}
@@ -627,25 +627,25 @@ int ril_device_at_setup(struct ril_device *ril_device)
// Network registration notifications
rc = at_send_locked("AT+CREG=2", AT_FLAG_URGENT);
if (at_error(rc) != AT_ERROR_OK) {
- LOGD("Modem doesn't support AT+CREG=2");
+ ALOGD("Modem doesn't support AT+CREG=2");
at_send_locked("AT+CREG=1", AT_FLAG_URGENT);
}
// Handler
if (ril_device->handlers == NULL) {
- LOGE("Missing device handlers!");
+ ALOGE("Missing device handlers!");
return -1;
}
// Missing AT handlers is not fatal
if (ril_device->handlers->at == NULL) {
- LOGE("Missing device AT handlers!");
+ ALOGE("Missing device AT handlers!");
return 0;
}
if (ril_device->handlers->at->setup == NULL) {
- LOGE("Missing device AT setup handler!");
+ ALOGE("Missing device AT setup handler!");
return 0;
}
diff --git a/device/gta04/gta04.c b/device/gta04/gta04.c
index 1c9f762..12cc481 100644
--- a/device/gta04/gta04.c
+++ b/device/gta04/gta04.c
@@ -59,11 +59,11 @@ int gta04_power_on(void *sdata)
tty_nodes_count = gta04_power_count_nodes();
if (tty_nodes_count < 2) {
- LOGD("Powering modem on");
+ ALOGD("Powering modem on");
fd = open(GPIO_SYSFS, O_RDWR);
if (fd < 0) {
- LOGE("Unable to open GPIO SYSFS node, modem will stay off");
+ ALOGE("Unable to open GPIO SYSFS node, modem will stay off");
return -1;
}
@@ -73,7 +73,7 @@ int gta04_power_on(void *sdata)
return 0;
}
- LOGD("Modem is already on");
+ ALOGD("Modem is already on");
return 0;
}
@@ -86,11 +86,11 @@ int gta04_power_off(void *sdata)
tty_nodes_count = gta04_power_count_nodes();
if (tty_nodes_count > 0) {
- LOGD("Powering modem off");
+ ALOGD("Powering modem off");
fd = open(GPIO_SYSFS, O_RDWR);
if (fd < 0) {
- LOGE("Unable to open GPIO SYSFS node, modem will stay on");
+ ALOGE("Unable to open GPIO SYSFS node, modem will stay on");
return -1;
}
@@ -104,7 +104,7 @@ int gta04_power_off(void *sdata)
return 0;
}
- LOGD("Modem is already off");
+ ALOGD("Modem is already off");
return 0;
}
@@ -115,7 +115,7 @@ int gta04_power_boot(void *sdata)
tty_nodes_count = gta04_power_count_nodes();
if (tty_nodes_count < 2) {
// We need at least Modem and Application
- LOGE("Not enough modem nodes available!");
+ ALOGE("Not enough modem nodes available!");
return -1;
}
@@ -238,17 +238,17 @@ int gta04_transport_open(void *sdata)
if (transport_data->modem_fd <= 0) {
rc = gta04_transport_find_node(&dev_node, "Modem");
if (rc < 0 || dev_node == NULL) {
- LOGE("Unable to find Modem node, aborting!");
+ ALOGE("Unable to find Modem node, aborting!");
goto failure;
}
fd = gta04_transport_open_node(dev_node);
if (fd < 0) {
- LOGE("Unable to open Modem node, aborting!");
+ ALOGE("Unable to open Modem node, aborting!");
goto failure;
}
- LOGD("Opened Modem node");
+ ALOGD("Opened Modem node");
transport_data->modem_fd = fd;
}
@@ -256,17 +256,17 @@ int gta04_transport_open(void *sdata)
if (transport_data->application_fd <= 0) {
rc = gta04_transport_find_node(&dev_node, "Application");
if (rc < 0) {
- LOGE("Unable to find Application node, aborting!");
+ ALOGE("Unable to find Application node, aborting!");
goto failure;
}
fd = gta04_transport_open_node(dev_node);
if (fd < 0) {
- LOGE("Unable to open Application node, aborting!");
+ ALOGE("Unable to open Application node, aborting!");
goto failure;
}
- LOGD("Opened Application node");
+ ALOGD("Opened Application node");
transport_data->application_fd = fd;
}
diff --git a/hayes-ril.c b/hayes-ril.c
index 586de5c..0dda5fe 100644
--- a/hayes-ril.c
+++ b/hayes-ril.c
@@ -147,7 +147,7 @@ const char *ril_get_version(void)
RIL_RadioState ril_on_state_request(void)
{
- LOGD("State request");
+ ALOGD("State request");
return ril_data->radio_state;
}
@@ -200,7 +200,7 @@ wait:
break;
if (response->string != NULL)
- LOGD("RIL DISPATCH [%s]", response->string);
+ ALOGD("RIL DISPATCH [%s]", response->string);
status = at_response_dispatch(response);
if (status == AT_STATUS_HANDLED)
@@ -243,7 +243,7 @@ int ril_dispatch_thread_start(void)
rc = pthread_create(&ril_data->dispatch_thread, &attr, ril_dispatch, NULL);
if (rc != 0) {
- LOGE("Creating dispatch thread failed!");
+ ALOGE("Creating dispatch thread failed!");
return -1;
}
@@ -281,7 +281,7 @@ const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **a
rc = ril_data_init();
if (rc < 0 || ril_data == NULL) {
- LOGE("Failed to init RIL data!");
+ ALOGE("Failed to init RIL data!");
return NULL;
}
@@ -289,15 +289,15 @@ const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **a
ril_device_register(&ril_data->device);
if (ril_data->device == NULL) {
- LOGE("Failed to register RIL device!");
+ ALOGE("Failed to register RIL device!");
return NULL;
}
- LOGD("Starting %s for device: %s", RIL_VERSION_STRING, ril_data->device->name);
+ ALOGD("Starting %s for device: %s", RIL_VERSION_STRING, ril_data->device->name);
rc = ril_device_init();
if (rc < 0) {
- LOGE("Failed to init device!");
+ ALOGE("Failed to init device!");
ril_device_deinit();
return NULL;
@@ -305,7 +305,7 @@ const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **a
rc = ril_device_transport_recv_thread_start();
if (rc < 0) {
- LOGE("Failed to start device recv thread!");
+ ALOGE("Failed to start device recv thread!");
ril_device_deinit();
return NULL;
@@ -313,7 +313,7 @@ const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **a
rc = ril_dispatch_thread_start();
if (rc < 0) {
- LOGE("Failed to start dispatch thread!");
+ ALOGE("Failed to start dispatch thread!");
ril_device_deinit();
return NULL;
@@ -321,13 +321,13 @@ const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **a
rc = ril_device_setup();
if (rc < 0) {
- LOGE("Failed to setup device!");
+ ALOGE("Failed to setup device!");
ril_device_deinit();
return NULL;
}
- LOGD("Initialization complete");
+ ALOGD("Initialization complete");
return &ril_ops;
}
diff --git a/sim.c b/sim.c
index ad88764..79dbfbb 100644
--- a/sim.c
+++ b/sim.c
@@ -206,7 +206,7 @@ RIL_RadioState at2ril_card_status(RIL_CardStatus *card_status, char *string, int
card_status->cdma_subscription_app_index = app_index;
card_status->num_applications = app_status_array_length;
- LOGD("Selecting application #%d on %d", app_index, app_status_array_length);
+ ALOGD("Selecting application #%d on %d", app_index, app_status_array_length);
complete:
return radio_state;
diff --git a/sms.c b/sms.c
index acb9d07..ce6a76e 100644
--- a/sms.c
+++ b/sms.c
@@ -333,13 +333,13 @@ int ril_outgoing_sms_send_next(void)
outgoing_sms = ril_outgoing_sms_find_waiting(0);
if (outgoing_sms != NULL) {
- LOGD("Another SMS is being sent!");
+ ALOGD("Another SMS is being sent!");
return 0;
}
outgoing_sms = ril_outgoing_sms_find_waiting(1);
if (outgoing_sms == NULL) {
- LOGD("No more SMS to send!");
+ ALOGD("No more SMS to send!");
return 0;
}
diff --git a/util.c b/util.c
index a446171..ff18543 100644
--- a/util.c
+++ b/util.c
@@ -121,7 +121,7 @@ void hex_dump(void *data, int size)
if (n%16 == 0) {
/* line completed */
- LOGD("[%4.4s] %-50.50s %s", addrstr, hexstr, charstr);
+ ALOGD("[%4.4s] %-50.50s %s", addrstr, hexstr, charstr);
hexstr[0] = 0;
charstr[0] = 0;
} else if (n%8 == 0) {
@@ -134,15 +134,15 @@ void hex_dump(void *data, int size)
if (strlen(hexstr) > 0) {
/* print rest of buffer if not empty */
- LOGD("[%4.4s] %-50.50s %s\n", addrstr, hexstr, charstr);
+ ALOGD("[%4.4s] %-50.50s %s\n", addrstr, hexstr, charstr);
}
}
void ril_data_log(char *data, int length)
{
RIL_LOG_LOCK();
- LOGD("\n");
- LOGD("%s: ==== DATA DUMP: %d BYTES ====", ril_data->device->tag, length);
+ ALOGD("\n");
+ ALOGD("%s: ==== DATA DUMP: %d BYTES ====", ril_data->device->tag, length);
hex_dump(data, length);
RIL_LOG_UNLOCK();
}
@@ -151,17 +151,17 @@ void ril_recv_log(char *string, int error)
{
RIL_LOG_LOCK();
if (error != AT_ERROR_UNDEF)
- LOGD("%s: AT RECV [%s] (error is %s, %d)", ril_data->device->tag,
+ ALOGD("%s: AT RECV [%s] (error is %s, %d)", ril_data->device->tag,
string, at_error_string(at_error(error)),
at_cme_error(error));
else
- LOGD("%s: AT RECV [%s]", ril_data->device->tag, string);
+ ALOGD("%s: AT RECV [%s]", ril_data->device->tag, string);
RIL_LOG_UNLOCK();
}
void ril_send_log(char *string)
{
RIL_LOG_LOCK();
- LOGD("%s: AT SEND [%s]", ril_data->device->tag, string);
+ ALOGD("%s: AT SEND [%s]", ril_data->device->tag, string);
RIL_LOG_UNLOCK();
}
--
1.7.9.5
More information about the Replicant
mailing list