XyrisOS / xyris

The Xyris Kernel
https://xyr.is
MIT License
154 stars 11 forks source link

Refactor & Use `KernelError` Where Appropriate #282

Open Kfeavel opened 3 years ago

Kfeavel commented 3 years ago

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.

mauryafunez commented 3 years ago

I got this

Kfeavel commented 3 years ago

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.