1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-29 11:37:31 +02:00

tools/lib/atusd.c (atusd_open): open /dev/mem with O_SYNC to disable caching

This commit is contained in:
Werner Almesberger 2011-01-03 18:53:56 -03:00
parent 9851e3ca88
commit f26d735dac

View File

@ -1,8 +1,8 @@
/* /*
* lib/atusd.c - ATRF access functions library (uSD version) * lib/atusd.c - ATRF access functions library (uSD version)
* *
* Written 2010 by Werner Almesberger * Written 2010-2011 by Werner Almesberger
* Copyright 2010 Werner Almesberger * Copyright 2010-2011 Werner Almesberger
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -181,7 +181,7 @@ static void *atusd_open(void)
exit(1); exit(1);
} }
dsc->fd = open("/dev/mem", O_RDWR); dsc->fd = open("/dev/mem", O_RDWR | O_SYNC);
if (dsc->fd < 0) { if (dsc->fd < 0) {
perror("/dev/mem"); perror("/dev/mem");
exit(1); exit(1);