Opened on 08/20/21 at 19:23:54
Closed on 09/20/21 at 19:08:11
#4505 closed defect (fixed)
posix_devctl() should return the errno directly not -1 and set errno
Reported by: | Joel Sherrill | Owned by: | Ryan Long <ryan.long@…> |
---|---|---|---|
Priority: | normal | Milestone: | 5.2 |
Component: | posix | Version: | 5 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description (last modified by Joel Sherrill)
The RTEMS implementation of posix_devctl() from POSIX 1003.26 does not return error codes as required by the standard.
"Upon successful completion, posix_devctl() shall return zero; otherwise an error number shall be returned to indicate the error. The value returned via the dev_info_ptr argument is driver dependent."
It should return the errno value and not -1 and set the errno variable. The current behavior is wrong but understandable because the implementation is a wrapper for close() and ioctl() which do set errno and return -1.
Change History (2)
comment:1 Changed on 08/24/21 at 18:35:37 by Joel Sherrill
Description: | modified (diff) |
---|
comment:2 Changed on 09/20/21 at 19:08:11 by Ryan Long <ryan.long@…>
Owner: | set to Ryan Long <ryan.long@…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
In e9712e78/rtems: