#2138 closed defect (fixed)

[PATCH] rtems_rfs_rtems_initialize() can erroneously set errno to rtems_rfs_fs_open()'s return value (-1 in the error case); violates spec

Reported by: Nick Withers Owned by: Chris Johns
Priority: normal Milestone: 4.11
Component: fs Version: 4.11
Severity: normal Keywords:
Cc: nick.withers@… Blocked By:
Blocking:

Description

rtems_rfs_fs_open() returns -1 in the event of a detected error, setting errno to indicate the cause. rtems_rfs_rtems_initialize() then erroneously sets errno to be the return value instead.

P.S.: The attached patch fixes handling only for this particular error case, but a quick glance suggests there may be more opportunities for rtems_rfs_rtems_initialize() to not set errno correctly

Attachments (1)

rtems-rfs-rtems.c.patch (526 bytes) - added by Nick Withers on Aug 9, 2013 at 12:29:12 AM.
Supply errno (set by rtems_rfs_fs_open()) to rtems_rfs_rtems_error() when rtems_rfs_fs_open() fails, rather than it's -1 return value

Download all attachments as: .zip

Change History (5)

Changed on Aug 9, 2013 at 12:29:12 AM by Nick Withers

Attachment: rtems-rfs-rtems.c.patch added

Supply errno (set by rtems_rfs_fs_open()) to rtems_rfs_rtems_error() when rtems_rfs_fs_open() fails, rather than it's -1 return value

comment:1 Changed on Aug 9, 2013 at 4:21:16 AM by Nick Withers

Summary: [PATCH] rtems_rfs_rtems_initialize() can erroneously set errno to rtems_rfs_fs_open()'s return value (-1 in the error); violates spec[PATCH] rtems_rfs_rtems_initialize() can erroneously set errno to rtems_rfs_fs_open()'s return value (-1 in the error case); violates spec

comment:2 Changed on Aug 9, 2013 at 4:22:07 AM by Nick Withers

Cc: Nick Withers added

comment:3 Changed on Dec 10, 2013 at 3:02:36 AM by Chris Johns

Resolution: fixed
Status: newclosed

comment:4 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.