Merge pull request #9549 from hauke/io-tool-sync
io: Open /dev/mem with O_SYNC for uncached access
This commit is contained in:
commit
626469860a
2 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=io
|
PKG_NAME:=io
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -343,7 +343,7 @@ main (int argc, char **argv)
|
||||||
printf("Attempting to map 0x%lx bytes at address 0x%08lx\n",
|
printf("Attempting to map 0x%lx bytes at address 0x%08lx\n",
|
||||||
real_len, real_addr);
|
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) {
|
if (mfd == -1) {
|
||||||
perror("open /dev/mem");
|
perror("open /dev/mem");
|
||||||
fprintf(stderr, "Is CONFIG_DEVMEM activated?\n");
|
fprintf(stderr, "Is CONFIG_DEVMEM activated?\n");
|
||||||
|
|
Loading…
Reference in a new issue