Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/utils/utils_linux_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ void *utils_mmap_file(void *hint_addr, size_t length, int prot, int flags,
return addr;
}

LOG_PERR("mapping file with the MAP_SYNC flag failed (fd=%i, offset=%zu, "
"length=%zu, flags=%i)",
fd, fd_offset, length, sync_flags);

/* try to mmap with MAP_SHARED flag (without MAP_SYNC) */
if (errno == EINVAL || errno == ENOTSUP || errno == EOPNOTSUPP) {
const int shared_flags = flags | MAP_SHARED;
Expand All @@ -104,6 +100,11 @@ void *utils_mmap_file(void *hint_addr, size_t length, int prot, int flags,
LOG_PERR("mapping file with the MAP_SHARED flag failed (fd=%i, "
"offset=%zu, length=%zu, flags=%i)",
fd, fd_offset, length, shared_flags);
} else {
LOG_PERR(
"mapping file with the MAP_SYNC flag failed (fd=%i, offset=%zu, "
"length=%zu, flags=%i)",
fd, fd_offset, length, sync_flags);
}

return NULL;
Expand Down
Loading