XyrisOS/xyris

Refactor & Use `KernelError` Where Appropriate

Opened this issue · 2 comments

errno.h should be refactored such that it is no longer a long list of defines but a enum instead. There's no reason why we have to follow the POSIX errno model either (though that is an issue for another time).

Additionally, the new enum should be in an Error namespace. This will help prevent name collisions and also provide a meaningful prefix when addressing this next update:

Errors should be refactored such that the names are not abbreviated in typical POSIX fashion but are readable English.
E2BIG should become TooBig, EACCES should become Access, etc. Common abbreviations such as Addr for address and Msg for message are acceptable.

I got this

As part of #318 I refactored errno to enum KernelError and removed all of the errors not used. However, the second part of this issue, using KernelError where appropriate, still needs to be done.