OSDN Git Service

Audio route: log fopen xml_patch failure errno
authorKevin Rocard <krocard@google.com>
Tue, 18 Apr 2017 23:06:28 +0000 (16:06 -0700)
committerKevin Rocard <krocard@google.com>
Tue, 18 Apr 2017 23:06:30 +0000 (16:06 -0700)
Vts fail a log because of this open. It is likely a result of previous
leaks (EMFILE) but in order to be sure, log fopen errno value in case of
failure.

Test: play music
Bug: 36311550

Change-Id: I834b346d5387b142d7bd0bd9c1c6d9b9e2a85339
Signed-off-by: Kevin Rocard <krocard@google.com>
audio_route/audio_route.c

index c13b278..89b076b 100644 (file)
@@ -881,7 +881,7 @@ struct audio_route *audio_route_init(unsigned int card, const char *xml_path)
     file = fopen(xml_path, "r");
 
     if (!file) {
-        ALOGE("Failed to open %s", xml_path);
+        ALOGE("Failed to open %s: %s", xml_path, strerror(errno));
         goto err_fopen;
     }