Bug 1167817 - Switch back to printf_stderr in GonkDiskSpaceWatcher.cpp r=dhylands
authorFabrice Desré <fabrice@mozilla.com>
Mon, 25 May 2015 21:34:44 -0700
changeset 245568 c6bbf8f1b02b062e9acb42c0ec457ea689753f6e
parent 245567 1e6a5051bb4a0cc0cb68ae743ea0ad277d416a61
child 245569 5528e643a09a4efa72885868897989608e1534a7
child 245614 005a16f3d88113f6ee7daf4c49c5c808dece5ec4
push id13158
push usercbook@mozilla.com
push dateTue, 26 May 2015 11:32:54 +0000
treeherderfx-team@2f7bd935c50d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdhylands
bugs1167817
milestone41.0a1
Bug 1167817 - Switch back to printf_stderr in GonkDiskSpaceWatcher.cpp r=dhylands
hal/gonk/GonkDiskSpaceWatcher.cpp
--- a/hal/gonk/GonkDiskSpaceWatcher.cpp
+++ b/hal/gonk/GonkDiskSpaceWatcher.cpp
@@ -175,22 +175,24 @@ void
 GonkDiskSpaceWatcher::DoStart()
 {
   NS_ASSERTION(XRE_GetIOMessageLoop() == MessageLoopForIO::current(),
                "Not on the correct message loop");
 
   mFd = fanotify_init(FAN_CLASS_NOTIF, FAN_CLOEXEC | O_LARGEFILE);
   if (mFd == -1) {
     if (errno == ENOSYS) {
-      NS_WARNING("Warning: No fanotify support in this device's kernel.\n");
+      // Don't change these printf_stderr since we need these logs even
+      // in opt builds.
+      printf_stderr("Warning: No fanotify support in this device's kernel.\n");
 #if ANDROID_VERSION >= 19
       MOZ_CRASH("Fanotify support must be enabled in the kernel.");
 #endif
     } else {
-      NS_WARNING("Error calling fanotify_init()");
+      printf_stderr("Error calling fanotify_init()");
     }
     return;
   }
 
   if (fanotify_mark(mFd, FAN_MARK_ADD | FAN_MARK_MOUNT, FAN_CLOSE,
                     0, kWatchedPath) < 0) {
     NS_WARNING("Error calling fanotify_mark");
     close(mFd);