X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Fjournal%2Fsd-journal.h;h=9872e9c29c2f2717ae1344c59aca6125d2d26275;hb=85a131e8d8aa9fe3c2115e281569bed64a4200f1;hp=b167dcf097bdda01480686907e7e973ab64ddf8d;hpb=cab8ac60837b489b27a247990f741315c71cb389;p=elogind.git diff --git a/src/journal/sd-journal.h b/src/journal/sd-journal.h index b167dcf09..9872e9c29 100644 --- a/src/journal/sd-journal.h +++ b/src/journal/sd-journal.h @@ -32,25 +32,24 @@ /* TODO: * * - check LE/BE conversion for 8bit, 16bit, 32bit values - * - implement inotify usage on client * - implement audit gateway - * - implement stdout gateway * - extend hash tables table as we go * - accelerate looking for "all hostnames" and suchlike. - * - throttling * - cryptographic hash - * - fix space reservation logic - * - comm, argv can be manipulated, should it be _COMM=, _CMDLINE= or COMM=, CMDLINE=? + * - never access beyond fle size check + * - OR of matches is borked... */ /* Write to daemon */ -int sd_journal_print(const char *format, ...) __attribute__ ((format (printf, 1, 2))); -int sd_journal_printv(const char *format, va_list ap); +int sd_journal_print(int piority, const char *format, ...) __attribute__ ((format (printf, 2, 3))); +int sd_journal_printv(int priority, const char *format, va_list ap); int sd_journal_send(const char *format, ...) __attribute__((sentinel)); int sd_journal_sendv(const struct iovec *iov, int n); +int sd_journal_stream_fd(const char *tag, int priority, int priority_prefix); + /* Browse journal stream */ typedef struct sd_journal sd_journal; @@ -92,16 +91,16 @@ enum { SD_JOURNAL_INVALIDATE_REMOVE }; -int sd_journal_get_fd(sd_journal *j); /* missing */ -int sd_journal_process(sd_journal *j); /* missing */ +int sd_journal_get_fd(sd_journal *j); +int sd_journal_process(sd_journal *j); #define SD_JOURNAL_FOREACH(j) \ if (sd_journal_seek_head(j) >= 0) \ - while (sd_journal_next(j) > 0) \ + while (sd_journal_next(j) > 0) #define SD_JOURNAL_FOREACH_BACKWARDS(j) \ if (sd_journal_seek_tail(j) >= 0) \ - while (sd_journal_previous(j) > 0) \ + while (sd_journal_previous(j) > 0) #define SD_JOURNAL_FOREACH_DATA(j, data, l) \ for (sd_journal_restart_data(j); sd_journal_enumerate_data((j), &(data), &(l)) > 0; )