Re: Extending Error Codes
Zięcik, Piotr <piotr.ziecik@...>
From: Cufi, Carles
Sent: Monday, May 07, 2018 11:57 AM
To: Zięcik, Piotr <Piotr.Ziecik@...>; Puzdrowski, Andrzej <Andrzej.Puzdrowski@...>; devel@...
Subject: RE: [Zephyr-devel] Extending Error Codes
Hi.Hi.I agree. I think a single set of generic error codes that are flexible enough to convey the message are a better approach.
I have looked into the error list available in ./lib/libc/minimal/include/errno.h and it looks that there are plenty of errors defined, however most of these defines are rather high-level.
If this is not enough, I could recommend following the Linux approach, which in my opinion is pretty simple and gives some flexibility:
We can divide the error lists in 2 parts, listed in 2 different files. The first file, will cover generic, high level errors (and could be provided by libc).
The second file will be zephyr-specific. There should be also single errno.h header, which will include both libc and zephyr headers.
What do you think?