chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
journal: add _public_ to all sd-journal calls, and add parameter checks
[elogind.git]
/
src
/
journal
/
sd-journal.h
diff --git
a/src/journal/sd-journal.h
b/src/journal/sd-journal.h
index b167dcf097bdda01480686907e7e973ab64ddf8d..d7e2528a35d47ec0a70f6147439981b44d723057 100644
(file)
--- a/
src/journal/sd-journal.h
+++ b/
src/journal/sd-journal.h
@@
-31,31
+31,44
@@
/* TODO:
*
/* TODO:
*
- * - check LE/BE conversion for 8bit, 16bit, 32bit values
- * - implement inotify usage on client
- * - implement audit gateway
- * - implement stdout gateway
+ * - add options for copy-to-console, copy-to-kmsg
+ * - OR of matches is borked...
* - extend hash tables table as we go
* - accelerate looking for "all hostnames" and suchlike.
* - extend hash tables table as we go
* - accelerate looking for "all hostnames" and suchlike.
- * - throttling
+ * - hookup with systemctl
+ * - handle incomplete header
+ *
+ * - local deserializer
+ * - http server
+ * - message catalog
+ *
+ * - check LE/BE conversion for 8bit, 16bit, 32bit values
* - cryptographic hash
* - cryptographic hash
- * -
fix space reservation logic
- * -
comm, argv can be manipulated, should it be _COMM=, _CMDLINE= or COMM=, CMDLINE=?
+ * -
think about manipulations of header
+ * -
implement audit gateway
*/
/* Write to daemon */
*/
/* 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_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;
/* Browse journal stream */
typedef struct sd_journal sd_journal;
-int sd_journal_open(sd_journal **ret);
+enum {
+ SD_JOURNAL_LOCAL_ONLY = 1,
+ SD_JOURNAL_RUNTIME_ONLY = 2,
+ SD_JOURNAL_SYSTEM_ONLY = 4
+};
+
+int sd_journal_open(sd_journal **ret, int flags);
void sd_journal_close(sd_journal *j);
int sd_journal_previous(sd_journal *j);
void sd_journal_close(sd_journal *j);
int sd_journal_previous(sd_journal *j);
@@
-92,16
+105,16
@@
enum {
SD_JOURNAL_INVALIDATE_REMOVE
};
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) \
#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) \
#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; )
#define SD_JOURNAL_FOREACH_DATA(j, data, l) \
for (sd_journal_restart_data(j); sd_journal_enumerate_data((j), &(data), &(l)) > 0; )