ndbuf_write_raw_head manual added;

This commit is contained in:
Alexander Vdolainen 2025-10-28 01:09:04 +02:00
parent 9332a57be2
commit 07ea3de219
3 changed files with 18 additions and 4 deletions

View File

@ -1,5 +1,5 @@
man_MANS = ndbuf_new.3 ndbuf_new_palloc.3 ndbuf_new_wmops.3 ndbuf_new_frombuf.3 \
ndbuf_free.3 ndbuf_free_item.3 ndbuf_read_raw.3 ndbuf_read_u8.3 ndbuf_read_u16.3 \
ndbuf_read_u32.3 ndbuf_read_u64.3 ndbuf_write_raw.3 ndbuf_write_u8.3 ndbuf_write_u16.3 \
ndbuf_write_u32.3 ndbuf_write_u64.3
ndbuf_write_u32.3 ndbuf_write_u64.3 ndbuf_write_raw_head.3

View File

@ -11,6 +11,7 @@ uint32_t ndbuf_write_u16(ndbuf_t *b, uint16_t val);
uint32_t ndbuf_write_u32(ndbuf_t *b, uint32_t val);
uint32_t ndbuf_write_u64(ndbuf_t *b, uint64_t val);
uint32_t ndbuf_write_raw(ndbuf_t *b, void *src, uint32_t len);
uint32_t ndbuf_write_raw_head(ndbuf_t *b, void *src, uint32_t len);
.fi
.SH DESCRIPTION
The ndbuf_write_ family writes data to an
@ -42,17 +43,29 @@ Write one unsigned 64bit value, from
and advance the cursor by eight bytes. Returns 8 on success or 0 on error.
.TP
.B ndbuf_read_raw(ndbuf_t *b, void *dst, uint32_t len)
.B ndbuf_write_raw(ndbuf_t *b, void *src, uint32_t len)
Copy
.I len
from
.I dst
.I src
to the buffer and advance the cursor by
.I len. The caller must ensure
.I dst
.I src
points to memory at least
.I len
bytes long. Returns the number of bytes copied or 0 on error.
.TP
.B ndbuf_write_raw_head(ndbuf_t *b, void *src, uint32_t len)
Copy
.I len
from
.I src
to the buffer head. The caller must ensure
.I src
points to memory at least
.I len
bytes long. Returns the number of bytes copied or 0 on error.
.SH RETURN VALUE
On success each function returns the number of bytes read. On error they return 0; no specific
.I errno

1
man/ndbuf_write_raw_head.3 Symbolic link
View File

@ -0,0 +1 @@
ndbuf_write_raw.3