[RTEMS Project] #1695: bytes_transfered = rtems_rfs_rtems_error

RTEMS trac trac at rtems.org
Mon Feb 23 19:46:01 UTC 2015


#1695: bytes_transfered = rtems_rfs_rtems_error
----------------------------+----------------------
 Reporter:  ralf.corsepius  |       Owner:  chrisj
     Type:  defect          |      Status:  closed
 Priority:  normal          |   Milestone:  4.11
Component:  filesystem      |     Version:  4.11
 Severity:  normal          |  Resolution:  invalid
 Keywords:                  |
----------------------------+----------------------
Changes (by gedare):

 * status:  assigned => closed
 * resolution:   => invalid


Old description:

> Next to cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c:145
> you find this code:
> ..
>     if (rc > 0)
>     {
>       bytes_transfered = rtems_rfs_rtems_error ("dir_read: dir read",
> rc);
>       break;
>     }
> ..
>
> The bytes_transfered = rtems_rfs_rtems_error (...) doesn't seem right to
> me:
> * rtems_rfs_rtems_error returns a boolean error.
>
> => I doubt adding such a boolean error to a size is right

New description:

 Next to cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c:145
 you find this code:
 ..
     if (rc > 0)
     {
       bytes_transfered = rtems_rfs_rtems_error ("dir_read: dir read", rc);
       break;
     }
 ..

 The bytes_transfered = rtems_rfs_rtems_error (...) doesn't seem right to
 me:
 * rtems_rfs_rtems_error returns a boolean error.

 => I doubt adding such a boolean error to a size is right

--

Comment:

 This is no bug. The return from rtems_rfs_rtems_error is -1 for an error
 code, which is fine to return as an ssize_t.

--
Ticket URL: <http://devel.rtems.org/ticket/1695#comment:6>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list