Errors may be reported from BMI in one of two ways:
- Return value of API function: If an API function
returns a value less than zero, it indicates that the function
failed. This is an indication of a critical internal error that
is not particular to any specific operation.
- Operation error code: This is a value filled in upon
completion of an operation. If less than zero, it indicates that
the operation in question failed, but that the BMI interface as a
whole is working properly.
Both types of error codes for the time being consist of -errno
values. This is not really expressive enough for long term use,
but at least gives a general idea of the type of failure for now.