How to return error ?

Hi !

In some sources in audio ddk, one driver return -Exxx error, but another
driver return Exxx error. Do I need to use sign ‘minus’ before error
constant or don’t ?

Thanks !

Thank you for pointing this out. We will be cleaning the -Exxx
return codes out of the drivers as time permits. However, they
may not make it into the 6.2 release.

The -Exxx convention is meant to be used on the client-side only.
The driver’s functions either return a positive errno, or use the
0 (pass) / -1 (fail) convention. I don’t have access to a 6.1
set of the audio DDK docs right now, but I do know that the next
revision (6.2) does document what the possible return codes are
for ctrl_init, ctrl_destroy and the callback functions.

If you have specific questions about the legal return values for
a specific function, please post them to this group and we will
clarify.

Mike Gorchak wrote:

Hi !

In some sources in audio ddk, one driver return -Exxx error, but another
driver return Exxx error. Do I need to use sign ‘minus’ before error
constant or don’t ?

Thanks !
\

If you have specific questions about the legal return values for
a specific function, please post them to this group and we will
clarify.

Thanks, but in the beginning I have been slightly confused with return codes
:slight_smile: . I’m wrote some commercial drivers for FreeBSD - it require positive
errors, but when I port that drivers for Linux - it require return negative
errors. When I porting CMedia 8338/8738 driver to QNX RtP I’m cannot
determine what type of errors (+/-) needed for QNX :slight_smile: So now I will using
the positive errors. Thanks.