| 569 | } |
| 570 | |
| 571 | Error systemErrorCodeToError() { |
| 572 | #if defined(_WIN32) |
| 573 | if (GetLastError() == ERROR_IO_DEVICE) { |
| 574 | return io_error(); |
| 575 | } |
| 576 | #elif defined(__unixish__) |
| 577 | if (errno == EIO || errno == EROFS) { |
| 578 | return io_error(); |
| 579 | } |
| 580 | #else |
| 581 | #error Port me! |
| 582 | #endif |
| 583 | |
| 584 | return platform_error(); |
| 585 | } |
| 586 | |
| 587 | void getDiskBytes(std::string const& directory, int64_t& free, int64_t& total) { |
| 588 | INJECT_FAULT(platform_error, "getDiskBytes"); // Get disk bytes failed |
no outgoing calls
no test coverage detected