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 pass NULL unless you want that -EINVAL delivered 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 libsystemd pkg-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