[Bug 1695] bytes_transfered = rtems_rfs_rtems_error
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Fri Sep 3 07:30:24 UTC 2010
https://www.rtems.org/bugzilla/show_bug.cgi?id=1695
--- Comment #15 from Ralf Corsepius <ralf.corsepius at rtems.org> 2010-09-03 02:30:23 CDT ---
(In reply to comment #14)
> > What I also do not understand in this context is rtems_rfs_dir_read():
> > AFAIU, it seem to return an error code. This seems inconsistent and
> > non-intuitive because read(2) returns ssize_t.
>
> I am not sure how to answer this one because I feel I am missing something. I
> assume you know as well as anyone read(2) returns -1 on an error if no data has
> been read.
read(2) returns an ssize_t (signed size_t), returning a -1 on error and sets
errno.
RTEMS *fs*read* functions and drivers are inconsistent wrt. this
(There are some spots in RTEMS , GCC even complains about it).
readdir(2) returns a ternary status (1, 0, -1).
... and this function?
...
int rc;
size_t bytes_transfered;
...
return (ssize_t) bytes_transfered;
/me feels, this function mixes status codes with ssize_t's.
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list