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 276318 c6bbf8f1b02b062e9acb42c0ec457ea689753f6e
parent 276317 1e6a5051bb4a0cc0cb68ae743ea0ad277d416a61
child 276333 5528e643a09a4efa72885868897989608e1534a7
child 276352 005a16f3d88113f6ee7daf4c49c5c808dece5ec4
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdhylands
bugs1167817
milestone41.0a1
first release with
nightly linux32
c6bbf8f1b02b / 41.0a1 / 20150526030202 / files
nightly linux64
c6bbf8f1b02b / 41.0a1 / 20150526030202 / files
nightly mac
c6bbf8f1b02b / 41.0a1 / 20150526030202 / files
nightly win32
c6bbf8f1b02b / 41.0a1 / 20150526030202 / files
nightly win64
c6bbf8f1b02b / 41.0a1 / 20150526030202 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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);