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

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Fri Aug 9 01:29:12 UTC 2013


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

             Bug #: 2138
           Summary: [PATCH] rtems_rfs_rtems_initialize() can erroneously
                    set errno to rtems_rfs_fs_open()'s return value (-1 in
                    the error); violates spec
    Classification: Unclassified
           Product: RTEMS
           Version: HEAD
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: filesystem
        AssignedTo: chrisj at rtems.org
        ReportedBy: nick.withers at anu.edu.au


Created attachment 1516
  --> https://www.rtems.org/bugzilla/attachment.cgi?id=1516
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

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

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