Thursday, 21 January 2010

Small KBUS utility

Just committed to kbus/utils - this is a simple utility to conver Unix error numbers into their corresponding mnemonic and text, or vice versa:
EPERM is error 1 (0x1): Operation not permitted

but also, if the error is one used by KBUS, to give the appropriate text from the KBUS documentation:
$ 32
Error 32 (0x20) is EPIPE: Broken pipe

On attempting to send *to* a specific replier, the replier with that id is no
longer bound to the given message's name.

because I can never remember which magic number corresponds to what particular usage.