Of course, the problem with errstr is that now you have to translate it.While user-facing error messages should of course be translated, I think this is a false consideration for system-call-level errors. They do not need to be translated any more than open() needs to be renamed abrir(). The existing errno is still there, and can be looked up in translation tables as before; then the full errstr is available for more technical reporting of what went wrong. If you do not speak English you are unlikely to understand SELinux configuration either.
While it would be great to have a carefully specified 'error struct' with inheritance hierarchies, template-based localization and all the rest, that is icing on the cake compared to the basic task of getting some more useful information into error messages. Let's not let the best be the enemy of the good.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds