SD_BUS_MESSAGE_AT_END(3)
π SD_BUS_MESSAGE_AT_END(3) π
okay bestie so this is the manual page for sd_bus_message_at_end, from section 3 of the manual (the library-functions girlies β¨). Buckle up, it's short and sweet and honestly iconic.
πΈ NAME πΈ
sd_bus_message_at_end β check if a message has been fully read π
π SYNOPSIS π
like, here's the vibe:
#include <systemd/sd-bus.h>
int sd_bus_message_at_end(sd_bus_message *m, int complete);
π¦ DESCRIPTION π¦
so sd_bus_message_at_end() tells you whether all the data from the currently opened container in m has been read, or whether all the data from all the containers in m has been read. literally the vibe check of "are we done here bestie".
the tea is in the complete argument:
- if
completeis zero, the function returns whether all data from the currently opened container has been read. - if
completeis non-zero, it returns whether all data from all containers inmhas been read. all of them. every last one. periodt.
β¨ RETURN VALUE β¨
- if everything's been read (all containers or just the current one β depends on
complete, iykyk) βsd_bus_message_at_end()returns a positive integer π slayed. - if there's still data left to be read β it returns zero. not done yet bestie, keep going π.
- on failure β it returns a negative errno-style error code. rude.
π Errors π
the returned errors may indicate these problems:
-EINVALβ themparameter isNULL. yeah, that's a no from me. added in version 246.-EPERMβ the message is not sealed. added in version 246.
π₯ NOTES π₯
the functions described here are available as a shared library, which can be compiled against and linked to with the libsystemd pkg-config(1) file. very convenient of them honestly.
all functions listed here are thread-agnostic and only a single thread may operate on a given object at any given time. different threads may access the same object at different times. multiple independent objects may be used from different threads in parallel. so like, share the object responsibly π«Ά.
β οΈ heads up bestie β οΈ the code described here usesgetenv(3), which is declared to be not multi-thread-safe. this means that the code calling the functions described here must not callsetenv(3)from a parallel thread. it is recommended to only do calls tosetenv()from an early phase of the program when no other threads have been started. do it early, do it once, do it slay π .
π HISTORY π
sd_bus_message_at_end() was added in version 246. a lil classic, an icon, a legend π.
π SEE ALSO π
and that's the whole page bestie, no cap π§π β brought to you by systemd 261.3 (the SD_BUS_MESSAGE_AT_END(3) girlies stay winning ππ¦β).
π¦ where this page comes from
- ubuntu stonking: libsystemd-dev 261.3-0ubuntu3 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms