[En-Nut-Discussion] Strange behavior with files using file attributes '+' or 'a'
Harald Kipp
harald.kipp at egnite.de
Wed Feb 27 20:05:35 CET 2008
Harald Kipp wrote:
> Confirmed. Case '+' works for "r+" and "w+", but requires special
> handling for "a+".
>
> Harald
Hi Harald,
How about doing some research before posting such rubbish?
The Nut/OS API clearly states, that "r+" updates an existing file.
http://www.ethernut.de/api/group__xg_crt_stdio.html
Thus, changing
case '+':
mflags &= ~(_O_RDONLY | _O_WRONLY);
mflags |= _O_RDWR | _O_CREAT | _O_TRUNC;
break;
to
case '+':
mflags &= ~(_O_RDONLY | _O_WRONLY);
mflags |= _O_RDWR;
break;
as it had been before CVS file rev-1.2 should fix it.
Harald
More information about the En-Nut-Discussion
mailing list