[Bug 1695] bytes_transfered = rtems_rfs_rtems_error

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Sat Sep 4 00:44:43 UTC 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1695

--- Comment #16 from Chris Johns <chrisj at rtems.org> 2010-09-03 19:44:42 CDT ---
(In reply to comment #15)
> 
> 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).
>

I will take look. Which architecture should I look at ?

> 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.

This is a bug. I propose to:

...
int rc;
ssize_t bytes_transferred;
...
return (ssize_t) bytes_transferred;

-- 
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