1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-23 11:46:15 +02:00

libbb/libbbd.c (main): open /dev/mem with O_SYNC to disable caching

This commit is contained in:
Werner Almesberger 2011-01-03 18:52:49 -03:00
parent 3427d691e3
commit 4a04cdc51e

View File

@ -1,8 +1,8 @@
/* /*
* libbb/libbbd.c - Bitbang library daemon * libbb/libbbd.c - Bitbang library daemon
* *
* 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
@ -156,7 +156,7 @@ fprintf(stderr, "closefds\n");
closefds(); closefds();
fprintf(stderr, "open devmem\n"); fprintf(stderr, "open devmem\n");
fd = open("/dev/mem", O_RDWR); fd = open("/dev/mem", O_RDWR | O_SYNC);
if (fd < 0) { if (fd < 0) {
perror("/dev/mem"); perror("/dev/mem");
exit(1); exit(1);