---
name: "buffer_puterror2"
section: "3"
platform: "linux"
package: "libowfat-dev"
version: "0.32-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/buffer_puterror2"
---

# buffer\_puterror2(3)

write error string to buffer and flush

## NAME

buffer\_puterror2 - write error string to buffer and flush

## SYNTAX

**#include \<libowfat/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*).

## SEE ALSO

[buffer\_puterror(3)](/buffer_puterror/3.md), [buffer\_puts(3)](/buffer_puts/3.md), [buffer\_put(3)](/buffer_put/3.md), [buffer\_flush(3)](/buffer_flush/3.md), [buffer(3)](/buffer/3.md)
