SD_JOURNA...IME_FILES(3)
okay bestie, welcome to the SD_JOURNA...IME_FILES(3) page β the manual name in the header is sd_journal_has_runtime_files, and we're about to make journal-file availability make sense. π
β¨
π NAME π
sd_journal_has_runtime_files, sd_journal_has_persistent_files β query availability of runtime or persistent journal files. That's the whole assignment, and they ate. π
β¨ SYNOPSIS β¨
#include <systemd/sd-journal.h>
int sd_journal_has_runtime_files(sd_journal *j);
int sd_journal_has_persistent_files(sd_journal *j);
π¦ DESCRIPTION π¦
sd_journal_has_runtime_files() returns a positive value if runtime journal files (present in /run/systemd/journal/) have been found. Otherwise, returns 0. So it's giving "yes, runtime files are here" versus "nah, 0." π«Ά
sd_journal_has_persistent_files() returns a positive value if persistent journal files (present in /var/log/journal/) have been found. Otherwise, returns 0. Same energy, different directory, no cap. πΈ
π RETURN VALUE π
Both sd_journal_has_runtime_files() and sd_journal_has_persistent_files() return -EINVAL if their argument is NULL.
π¨ bestie, do not passNULLunless you want that-EINVALdelivered straight to your function call. It's not a vibe check, it's an error. π
πΈ NOTES πΈ
- 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.
- Functions described here are available as a shared library, which can be compiled against and linked to with the
libsystemdpkg-config(1)file. π§
π₯ HISTORY π₯
sd_journal_has_runtime_files() and sd_journal_has_persistent_files() were added in version 229. Iconic behavior, honestly. π
π SEE ALSO π
okay that's the page, bestie β the footer says systemd 261.3, and the date slot on this copy is blank, so no invented date from me, periodt. πβ¨
π¦ 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