[Replicant] [libsamsung-ril] [PATCH 16/23] Make libsamsung-ril print at startup

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Thu Mar 4 12:42:43 UTC 2021


If we are in a situation where there are no prints from
libsamsung-ril at all with 'logcat -b radio', having it
print a log in all situations helps debugging why this
could be hapenning.

This way even if there is nothing in the logs, we at
least know it was supposed to print a message at startup.

This already happened with Android 11, where before the
commit 34fdca14f7fb1623f733b64954c781b7dcf520f5 ("Fix
logging on Android 11") we had nothing in the logs.

Knowing that it should print something already takes
out of the equasion silent failures without having to
read lot of code or make error prone jugements.

It is also more reliable than having to go through
all the error paths like it is done with the
commit daa706393f381002205e35ebaaa42a586ad91e52 ("RIL_Init:
Make sure there are prints for each error paths").

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 samsung-ril.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/samsung-ril.c b/samsung-ril.c
index fe7a703..aaeedeb 100644
--- a/samsung-ril.c
+++ b/samsung-ril.c
@@ -1545,6 +1545,8 @@ const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env,
 	unsigned int i;
 	int rc;
 
+	RIL_LOGD("libsamsung-ril: Started from %s\n", __func__);
+
 	if (env == NULL) {
 		RIL_LOGE("%s: Aborting: Invalid RIL_Env (RIL_Env is NULL)",
 			 __func__);
-- 
2.30.1



More information about the Replicant mailing list