I chose to treat error codes as just another type of data. Error codes are usually a short integer: zero indicates no error, and a positive integer indicates one of many possible errno numbers. The directive %error returns the error code for the last function executed.
FiST can be instructed to return any error code which exists in <sys/errno.h> or even new error codes. New error codes would be suitable for new types of failure modes. For example, an encryption file system might have a new error code ``invalid key;'' a compression file system might have a code indicating ``file already compressed;'' a caching file system might have a code for ``cached file is too old,'' and so on.