| 673 | } |
| 674 | |
| 675 | int do_open(const char *pathname, int flags, mode_t mode) |
| 676 | { |
| 677 | if (flags != O_RDONLY) { |
| 678 | RETURN_ERROR_IF(dry_run, 0); |
| 679 | RETURN_ERROR_IF_RO_OR_LO; |
| 680 | } |
| 681 | |
| 682 | #ifdef O_NOATIME |
| 683 | if (open_noatime) |
| 684 | flags |= O_NOATIME; |
| 685 | #endif |
| 686 | |
| 687 | return open(pathname, flags | O_BINARY, mode); |
| 688 | } |
| 689 | |
| 690 | /* |
| 691 | Symlink-race-safe variant of do_open() for receiver-side use. See |
no outgoing calls
no test coverage detected