errno in devctl

hi:
in most of the resource manage handlers, errno is set by returning that
errno and the library does the job of returning -1 and setting errno to
the specified value.

however, that dosent seem to be the sae in io_devctl. any similar easy
way to set errno and return error?

help will be appreciated.

-rommel

Rommel Dongre <rdongre@pillardata.com> wrote:

in most of the resource manage handlers, errno is set by returning that
errno and the library does the job of returning -1 and setting errno to
the specified value.
however, that dosent seem to be the sae in io_devctl. any similar easy
way to set errno and return error?

For the server-side it is the same, just return the error from the
callback or an appropriate _RESMGR_PTR()-style data. For the client-
side, note that devctl() does not set errno but returns the error
directly as the function result (and not -1) …