views:

456

answers:

2

When developing a module (device driver, middleware, etc...) that will run in the kernel space, we would like to have some way to capture the reason an operation might fail.

In VxWorks, The errno mechanism seems to be a good way to do this.

Is it possible to define my own errno values?

+1  A: 

Errno is just a number and functions like strerror() return a describing text. If you want to extend it just provide an own function similar to strerror() that looks into your error list or delegates to strerror().

unexist
+2  A: 
Benoit