Index: tools/android/memtrack_helper/memtrack_helper.c |
diff --git a/tools/android/memtrack_helper/memtrack_helper.c b/tools/android/memtrack_helper/memtrack_helper.c |
index 39d80752c276c22ed926e434e672ba18e0f595f5..9ce05fdea509945fea5d84b86b8fbe94e20a64bc 100644 |
--- a/tools/android/memtrack_helper/memtrack_helper.c |
+++ b/tools/android/memtrack_helper/memtrack_helper.c |
@@ -211,8 +211,13 @@ int main(int argc, char** argv) { |
if (argc > 1 && strcmp(argv[1], "-d") == 0) |
daemonize(); |
- if(memtrack_init()) |
- exit_with_failure("memtrack_init() returned non-zero"); |
+ res = memtrack_init(); |
+ if (res == -ENOENT) { |
Primiano Tucci (use gerrit)
2016/10/06 13:15:41
I was about to say that this looks wrong and usual
|
+ exit_with_failure("Unable to load memtrack module in libhardware. " |
+ "Probably implementation is missing in this ROM."); |
+ } else if (res != 0) { |
+ exit_with_failure("memtrack_init() returned non-zero status."); |
+ } |
if (listen(server_fd, 128 /* max number of queued requests */)) |
exit_with_failure("listen"); |