OSDN Git Service

Use ALOGE instead of fprintf in rild
authorWink Saville <wink@google.com>
Tue, 28 Aug 2012 22:42:46 +0000 (15:42 -0700)
committerWink Saville <wink@google.com>
Tue, 28 Aug 2012 22:42:46 +0000 (15:42 -0700)
This allows the errors to be seen in the log, otherwise there is
no visibility unless you run rild from the command line.

Change-Id: Id6c25eeef6c2cb118c2dff80a9d3742b99563bde

rild/rild.c

index 77dec1e..b1c5bac 100644 (file)
@@ -245,7 +245,7 @@ OpenLib:
     dlHandle = dlopen(rilLibPath, RTLD_NOW);
 
     if (dlHandle == NULL) {
-        fprintf(stderr, "dlopen failed: %s\n", dlerror());
+        ALOGE("dlopen failed: %s", dlerror());
         exit(-1);
     }
 
@@ -254,7 +254,7 @@ OpenLib:
     rilInit = (const RIL_RadioFunctions *(*)(const struct RIL_Env *, int, char **))dlsym(dlHandle, "RIL_Init");
 
     if (rilInit == NULL) {
-        fprintf(stderr, "RIL_Init not defined or exported in %s\n", rilLibPath);
+        ALOGE("RIL_Init not defined or exported in %s\n", rilLibPath);
         exit(-1);
     }