Skip to content
  • Philippe Gerum's avatar
    cobalt: switch hand over status to -EADV for non-RTDM fd · 2db562ad
    Philippe Gerum authored and Jan Kiszka's avatar Jan Kiszka committed
    
    
    Having the RTDM core return -EBADF to indicate that it does not manage
    a file descriptor is a problem, as several drivers also raise this
    error to notify userland about an aborted wait due to a connection
    being dismantled (e.g. RTnet). In this case, libcobalt ends up
    forwarding the aborted request to the glibc, which is wrong.
    
    Switch from -EBADF to -EADV to notify userland that RTDM does not
    manage a file descriptor, which cannot conflict with any sensible
    error code the Cobalt core or any RTDM driver may return.
    
    Signed-off-by: default avatarPhilippe Gerum <rpm@xenomai.org>
    Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
    2db562ad