buffer_flush(3)
π buffer_flush(3) π
from the Library Functions Manual, bestie π«Ά
πΈ NAME πΈ
buffer_flush β feed buffer to write function. that's the whole assignment, no cap. π
β¨ SYNTAX β¨
#include <libowfat/buffer.h>
int buffer_flush(buffer* b);
π DESCRIPTION π
okay so bestie, here's the tea β: buffer_flush feeds a string d[0], d[1], ..., d[dlen-1] to the write operation by calling
op(fd,d,dlen)
then the rules for op are giving very specific contract energy:
- If
opsuccessfully handles one or more bytes at the beginning of the string, it must return the number of bytes handled. π― If this number is smaller thandlen,buffer_flushwill callopagain with the rest of the string. no cap. - If
opdoes not handle any bytes, and does not encounter an error, it must return0, or return-1witherrnoset toEINTR; in either case,buffer_flushwill immediately callopagain. π - If
opencounters an error, it must return-1witherrnoset to something other thanEINTR;buffer_flushwill pass the error to the caller. π¨
On success, buffer_flush returns 0. β¨ On error, buffer_flush returns -1, setting errno appropriately. π
π SEE ALSO π
mwah π β that's the whole thing from the Library Functions Manual, buffer_flush(3), footer vibes only: no version/date drama, just the page name, iconic. π
β¨
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms