Mapping file busy/exists in POSIX File::OSErrorToFileError().
Supporting two previously unmapped errno values: EBUSY to FILE_ERROR_IN_USE,
and EIO to FILE_ERROR_IO.
Both of these error values are reported in significant quantities when looking
at the results for PlatformFile.UnknownErrors.Posix.
Review URL: https://codereview.chromium.org/1001023002
Cr-Commit-Position: refs/heads/master@{#320549}
CrOS-Libchrome-Original-Commit: 96691e2856d9485d48c71ca40a2fb671a18ef3be
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc
index 245ea6a..663f099 100644
--- a/base/files/file_posix.cc
+++ b/base/files/file_posix.cc
@@ -471,12 +471,15 @@
case EROFS:
case EPERM:
return FILE_ERROR_ACCESS_DENIED;
+ case EBUSY:
#if !defined(OS_NACL) // ETXTBSY not defined by NaCl.
case ETXTBSY:
- return FILE_ERROR_IN_USE;
#endif
+ return FILE_ERROR_IN_USE;
case EEXIST:
return FILE_ERROR_EXISTS;
+ case EIO:
+ return FILE_ERROR_IO;
case ENOENT:
return FILE_ERROR_NOT_FOUND;
case EMFILE: