Mercurial > ecos
changeset 1819:082e09d84412
* tests/fileio1.c: fixed check for return value for attribute
tests.
| author | asl |
|---|---|
| date | Tue, 26 Oct 2004 08:00:08 +0000 |
| parents | 5663e2763ba6 |
| children | fdf22faea84c |
| files | packages/fs/fat/current/ChangeLog packages/fs/fat/current/tests/fileio1.c |
| diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/fs/fat/current/ChangeLog +++ b/packages/fs/fat/current/ChangeLog @@ -1,3 +1,8 @@ +2004-10-23 David Brennan <eCos@brennanhome.com> + + * tests/fileio1.c: fixed check for return value for attribute + tests. + 2004-10-17 David Brennan <eCos@brennanhome.com> * src/fatfs.c:
--- a/packages/fs/fat/current/tests/fileio1.c +++ b/packages/fs/fat/current/tests/fileio1.c @@ -700,18 +700,18 @@ void fileio1_main( CYG_ADDRESS id ) // Verify we cannot unlink a read-only file diag_printf("<INFO>: unlink /foo\n"); err = unlink( "/foo" ); - if( err != -EPERM ) SHOW_RESULT( unlink, err ); + if( (err != -1) || (errno != EPERM) ) SHOW_RESULT( unlink, err ); // Verify we cannot rename a read-only file diag_printf("<INFO>: rename /foo bundy\n"); err = rename( "/foo", "bundy" ); - if( err != -EPERM ) SHOW_RESULT( rename, err ); + if( (err != -1) || (errno != EPERM) ) SHOW_RESULT( rename, err ); // 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 != -1) || (errno != EACCES) ) SHOW_RESULT( open, err ); if( err > 0 ) close(fd); // Make it Normal
