This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
RAMFS: return ENOSPC not EINVAL when out of space in findbuffer_node
- From: Jonathan Larmour <jlarmour at jifvik dot org>
- To: ecos-patches at ecos dot sourceware dot org
- Date: Wed, 25 Feb 2004 14:45:45 GMT
- Subject: RAMFS: return ENOSPC not EINVAL when out of space in findbuffer_node
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/fs/ram/current/ChangeLog,v
retrieving revision 1.8
diff -u -5 -p -r1.8 ChangeLog
--- ChangeLog 8 Jan 2004 17:24:27 -0000 1.8
+++ ChangeLog 25 Feb 2004 14:45:40 -0000
@@ -1,5 +1,11 @@
+2004-02-25 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/ramfs.c (findbuffer_node): If pos larger than even INDIRECT2_MAX
+ then return ENOSPC, not EINVAL. Thanks to Vincent Catros for spotting
+ this.
+
2004-01-08 Vincent Catros <Vincent.Catros@elios-informatique.fr>
* src/ramfs.c (ramfs_fo_write): Return ENOSPC when the filesystem
is full.
Index: src/ramfs.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/fs/ram/current/src/ramfs.c,v
retrieving revision 1.5
diff -u -5 -p -r1.5 ramfs.c
--- src/ramfs.c 8 Jan 2004 17:24:27 -0000 1.5
+++ src/ramfs.c 25 Feb 2004 14:45:42 -0000
@@ -903,11 +903,11 @@ static int findbuffer_node( ramfs_node
buffer,
size,
alloc);
#endif
- return EINVAL;
+ return ENOSPC;
}
// -------------------------------------------------------------------------
// freeblock_list()
// Free a list of data blocks.