From 629eed8893ba5ef978a9f777047d560e95e43456 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Tue, 26 Aug 2014 13:56:12 -0700 Subject: fallocate() returning ENOSYS is okay. Fall back just like ENOTSUP. Bug: 17285472 Change-Id: Ice4954726c14a0e84c39c5469d573644588934ae --- src/com/android/providers/downloads/DownloadThread.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java index 88f554e2..aa0190bf 100644 --- a/src/com/android/providers/downloads/DownloadThread.java +++ b/src/com/android/providers/downloads/DownloadThread.java @@ -467,8 +467,8 @@ public class DownloadThread implements Runnable { // We found enough space, so claim it for ourselves Os.posix_fallocate(outFd, 0, mInfoDelta.mTotalBytes); } catch (ErrnoException e) { - if (e.errno == OsConstants.ENOTSUP) { - Log.w(TAG, "fallocate() said ENOTSUP; falling back to ftruncate()"); + if (e.errno == OsConstants.ENOSYS || e.errno == OsConstants.ENOTSUP) { + Log.w(TAG, "fallocate() not supported; falling back to ftruncate()"); Os.ftruncate(outFd, mInfoDelta.mTotalBytes); } else { throw e; -- cgit v1.2.3