buffer_puterror2(3) write error string to buffer and flush

SYNTAX

#include <buffer.h>

int buffer_puterror2(buffer* b,int errnum);

DESCRIPTION

buffer_puterror2 writes the error message corresponding to the error number in errnum to the buffer (e.g. "No such file or directory" for ENOENT).

RETURN VALUE

0 if everything is fine, -1 on error (setting errno).