Fix fclose() return value when closing read-only file

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4036 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-10-10 19:40:56 +00:00
parent 4ad3944c1f
commit 61e5093a0b
7 changed files with 41 additions and 19 deletions
+4
View File
@@ -2155,4 +2155,8 @@
do not work with R61580 LCD.
* configs/pic32-starterkit: Beginning of a configuratin for the Microchip
PIC32 Ethernet Starter Kit.
* lib/stdio/lib_fclose.c: fclose() always returns an error (EOF) when it
closes a read-only file. This is because it calls flush() which will
fail on read-only files. No harm is done other that a bad value is
returned.