Without that patch, on Replicant 11, with 'adb logcat -b radio',
we do not see any of the log messages that libsamsung-ril is
supposed to emmit.
In addition, liblog[1]'s README.md has the following:
`[ASR]LOG[VDIWE]` calls are used to log to BAsic, System or
Radio sub-logs [...].
So we need to use RLOG anyway, at least with Replicant 11.
To avoid breaking the compatibility with older versions, we
fallback on ALOG when RLOG is not available.
[1]liblog is available in system/core/liblog/ in the Android
source code or in liblog/ in the following git repository:
https://android.googlesource.com/platform/system/core
Signed-off-by: Denis 'GNUtoo' Carikli <[email protected]>
---
samsung-ril.h | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/samsung-ril.h b/samsung-ril.h
index 3d4d9fc..8cc012d 100644
--- a/samsung-ril.h
+++ b/samsung-ril.h
@@ -47,22 +47,34 @@
* Macros
*/
-#ifdef ALOGI
+#if defined(RLOGI)
+#define RIL_LOGI RLOGI
+#elif defined(ALOGI)
#define RIL_LOGI ALOGI
-#else
+#elif defined(LOGI)
#define RIL_LOGI LOGI
+#else
+#error "Cannot define RIL_LOGI"
#endif
-#ifdef ALOGD
+#if defined(RLOGD)
+#define RIL_LOGD RLOGD
+#elif defined(ALOGD)
#define RIL_LOGD ALOGD
-#else
+#elif defined(LOGD)
#define RIL_LOGD LOGD
+#else
+#error "Cannot define RIL_LOGD"
#endif
-#ifdef ALOGE
+#if defined(RLOGE)
+#define RIL_LOGE RLOGE
+#elif defined(ALOGE)
#define RIL_LOGE ALOGE
-#else
+#elif defined(LOGE)
#define RIL_LOGE LOGE
+#else
+#error "Cannot define RIL_LOGE"
#endif
#define RIL_LOCK()
pthread_mutex_lock(&ril_data->mutex)
--
2.30.1
_______________________________________________
Replicant mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/replicant