diff --git a/utils/io/Makefile b/utils/io/Makefile index a861e7477e..fe3f779b2a 100644 --- a/utils/io/Makefile +++ b/utils/io/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=io -PKG_RELEASE:=1 +PKG_RELEASE:=2 include $(INCLUDE_DIR)/package.mk diff --git a/utils/io/src/io.c b/utils/io/src/io.c index 2572054049..5192912139 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");