Re: error code from afb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2018-09-05 13:18 GMT+02:00  <I37546_CHIN@xxxxxxxxxxxxxx>:
> Hi Jose
>
> We'd like to know all kinds error code come from afb to APPs,
> but we can't find the error define in afb headers
>
> Do we have an error define table? Or all the error codes are set into errno?

Hi ChenWei,

All errors are reported using errno and a meaningful code picked in
"man errno" list.

Currently the error code used are: E2BIG, EAFNOSUPPORT, EBADMSG,EBUSY,
ECONNABORTED, EEXIST, EFAULT, EFBIG, EINTR, EINVAL, ENAMETOOLONG,
ENOENT, ENOMEM, ENOTDIR, EPERM, EPIPE. Advantage of using system
predefined codes is the availability of strerror (and %m) and its
translations.

Not all of these codes are returned to bindings. Conversely, some
error reported by the system are returned directly (Think about
afb_api_rootdir_open_locale [1] that calls 'open'). Telling exactly
what error can be reported by what function shouldn't be so difficult.
It is probably a valuable documentation to add. Should we open a JIRA
issue to track that work?

This is for what bindings receive. About applications, it is different
because they receive errors from bindings, not from binder.

Best regards
José Bollo

[1] https://docs.automotivelinux.org/docs/apis_services/en/dev/reference/af-binder/reference-v3/func-api.html#afbapirootdiropenlocale

> Thanks/BR
> ChenWei
_______________________________________________
automotive-discussions mailing list
automotive-discussions@xxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/automotive-discussions




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux