SD_BUS_SL...ESCRIPTION(3)
πΈ NAME πΈ
okay so welcome to SD_BUS_SL...ESCRIPTION(3), bestie β the manual page for sd_bus_slot_set_description() and sd_bus_slot_get_description(), aka the little duo that sets or queries the description of bus slot objects. No cap, that's the whole vibe. β¨
π¦ SYNOPSIS π¦
#include <systemd/sd-bus.h>
int sd_bus_slot_set_description(sd_bus_slot* slot,
const char *description);
int sd_bus_slot_get_description(sd_bus_slot* bus,
const char **description);
π DESCRIPTION π
sd_bus_slot_set_description() sets the description string that is used in logging to the specified string. The string is copied internally and freed when the bus slot object is deallocated. The description argument may be NULL, in which case the description is unset. Slay, but also: it's copied, so it's not just vibing on your pointer forever. π«Ά
sd_bus_slot_get_description() returns a description string in description. If the string is not set, e.g. with sd_bus_slot_set_description(), and the slot is a bus match callback slot, the match string will be returned. Otherwise, -ENXIO is returned. That's the fallback lore, iykyk. π
β RETURN VALUE β
On success, these functions return 0 or a positive integer. On failure, they return a negative errno-style error code. fr fr, no mystery numbers. π₯
π Errors π
Returned errors may indicate the following problems:
-EINVALβ a required argument isNULL. Bestie, you forgot something. π-ENXIOβ the bus slot object has no description. It's giving "no thoughts, head empty." π-ENOMEMβ memory allocation failed. The malloc said nope. π
π§ NOTES π§
Functions described here are available as a shared library, which can be compiled against and linked to with the libsystemd pkg-config(1) file. Link it, bestie. β¨
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: one thread per object at a time, but the timeline can hand objects around, and separate objects can do parallel main character energy. π
The code described here uses getenv(3), which is declared to be not multi-thread-safe. This means that the code calling the functions described here must not call setenv(3) from a parallel thread. It is recommended to only do calls to setenv() from an early phase of the program when no other threads have been started. This is the one where I need you to pay attention, okay? No parallel setenv(3) chaos. π¨
π HISTORY π
sd_bus_slot_set_description() and sd_bus_slot_get_description() were added in version 240. A little retro icon, but still iconic. π
π₯ SEE ALSO π₯
mwah π β source/version: systemd 261.3; the footer didn't give me a date, so no fake date from me, bestie. Page title: SD_BUS_SL...ESCRIPTION(3). π
π¦ 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