This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: FAT FS enhancements
Andrew Lunn wrote:
Attached is the next round:
Great. I've made a few minor changes:
open() now returns EACCES which POSIX says it should do.
Attached is a trivial change to fix fileio1.c based on this change.
Index: fs/fat/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/fs/fat/current/ChangeLog,v
retrieving revision 1.4
diff -u -5 -w -r1.4 ChangeLog
--- fs/fat/current/ChangeLog 22 Oct 2004 14:10:21 -0000 1.4
+++ fs/fat/current/ChangeLog 23 Oct 2004 16:01:14 -0000
@@ -1,7 +1,12 @@
2004-10-17 David Brennan <eCos@brennanhome.com>
+ * tests/fileio1.c: fixed check for return value of open for writing a
+ read only file.
+
+2004-10-17 David Brennan <eCos@brennanhome.com>
+
* src/fatfs.c:
* src/fatfs_supp.c:
* include/fatfs.h (NEW):
* tests/fileio1.c:
* cdl/fatfs.cdl: Added configurable support for FAT filesystem
Index: fs/fat/current/tests/fileio1.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/fs/fat/current/tests/fileio1.c,v
retrieving revision 1.3
diff -u -5 -w -r1.3 fileio1.c
--- fs/fat/current/tests/fileio1.c 22 Oct 2004 14:10:23 -0000 1.3
+++ fs/fat/current/tests/fileio1.c 23 Oct 2004 16:01:15 -0000
@@ -709,11 +709,11 @@
// Verify we cannot open read-only file for writing
int fd;
diag_printf("<INFO>: create file /foo\n");
fd = open( "/foo", O_WRONLY );
- if( err != -EPERM ) SHOW_RESULT( rename, err );
+ if( err != -EACCES ) SHOW_RESULT( rename, err );
if( err > 0 ) close(fd);
// Make it Normal
diag_printf("<INFO>: attrib -H /foo\n");
err = cyg_fs_set_attrib( "/foo", 0 );