aboutsummaryrefslogtreecommitdiff
path: root/utils/io/src/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/io/src/io.c')
-rw-r--r--utils/io/src/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/io/src/io.c b/utils/io/src/io.c
index 257205404..519291213 100644
--- a/utils/io/src/io.c
+++ b/utils/io/src/io.c
@@ -343,7 +343,7 @@ main (int argc, char **argv)
printf("Attempting to map 0x%lx bytes at address 0x%08lx\n",
real_len, real_addr);
- mfd = open("/dev/mem", (memfunc == MEM_READ) ? O_RDONLY : O_RDWR);
+ mfd = open("/dev/mem", (memfunc == MEM_READ) ? (O_RDONLY | O_SYNC) : (O_RDWR | O_SYNC));
if (mfd == -1) {
perror("open /dev/mem");
fprintf(stderr, "Is CONFIG_DEVMEM activated?\n");