| 40 | using GcsCode = google::cloud::StatusCode; |
| 41 | |
| 42 | int ErrnoFromStatus(const google::cloud::Status& s) { |
| 43 | switch (s.code()) { |
| 44 | case GcsCode::kAlreadyExists: |
| 45 | return EEXIST; |
| 46 | case GcsCode::kInvalidArgument: |
| 47 | return EINVAL; |
| 48 | case GcsCode::kNotFound: |
| 49 | return ENOENT; |
| 50 | case GcsCode::kPermissionDenied: |
| 51 | case GcsCode::kUnauthenticated: |
| 52 | return EACCES; |
| 53 | default: |
| 54 | return 0; |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | Status ToArrowStatus(const google::cloud::Status& s) { |
| 59 | std::ostringstream os; |