summaryrefslogtreecommitdiff
path: root/src/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemd')
-rw-r--r--src/systemd/_sd-common.h2
-rw-r--r--src/systemd/sd-bus-protocol.h2
-rw-r--r--src/systemd/sd-bus-vtable.h2
-rw-r--r--src/systemd/sd-bus.h2
-rw-r--r--src/systemd/sd-daemon.h2
-rw-r--r--src/systemd/sd-device.h2
-rw-r--r--src/systemd/sd-dhcp-client.h2
-rw-r--r--src/systemd/sd-dhcp-lease.h2
-rw-r--r--src/systemd/sd-dhcp-server.h2
-rw-r--r--src/systemd/sd-dhcp6-client.h2
-rw-r--r--src/systemd/sd-dhcp6-lease.h2
-rw-r--r--src/systemd/sd-event.h2
-rw-r--r--src/systemd/sd-hwdb.h2
-rw-r--r--src/systemd/sd-id128.h2
-rw-r--r--src/systemd/sd-ipv4acd.h2
-rw-r--r--src/systemd/sd-ipv4ll.h2
-rw-r--r--src/systemd/sd-journal.h15
-rw-r--r--src/systemd/sd-lldp.h2
-rw-r--r--src/systemd/sd-login.h4
-rw-r--r--src/systemd/sd-messages.h2
-rw-r--r--src/systemd/sd-ndisc.h2
-rw-r--r--src/systemd/sd-netlink.h2
-rw-r--r--src/systemd/sd-network.h2
-rw-r--r--src/systemd/sd-path.h2
-rw-r--r--src/systemd/sd-resolve.h2
-rw-r--r--src/systemd/sd-utf8.h2
26 files changed, 12 insertions, 55 deletions
diff --git a/src/systemd/_sd-common.h b/src/systemd/_sd-common.h
index 6b5e6c50f9..2d4e1f26e1 100644
--- a/src/systemd/_sd-common.h
+++ b/src/systemd/_sd-common.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdcommonhfoo
#define foosdcommonhfoo
diff --git a/src/systemd/sd-bus-protocol.h b/src/systemd/sd-bus-protocol.h
index 5185a48b31..47b256d5b9 100644
--- a/src/systemd/sd-bus-protocol.h
+++ b/src/systemd/sd-bus-protocol.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdbusprotocolhfoo
#define foosdbusprotocolhfoo
diff --git a/src/systemd/sd-bus-vtable.h b/src/systemd/sd-bus-vtable.h
index c5d05a2db2..6ad6d51979 100644
--- a/src/systemd/sd-bus-vtable.h
+++ b/src/systemd/sd-bus-vtable.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdbusvtablehfoo
#define foosdbusvtablehfoo
diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h
index ac156fe19f..2a2ef0eb98 100644
--- a/src/systemd/sd-bus.h
+++ b/src/systemd/sd-bus.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdbushfoo
#define foosdbushfoo
diff --git a/src/systemd/sd-daemon.h b/src/systemd/sd-daemon.h
index c26cd1be3a..e6787b0a64 100644
--- a/src/systemd/sd-daemon.h
+++ b/src/systemd/sd-daemon.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosddaemonhfoo
#define foosddaemonhfoo
diff --git a/src/systemd/sd-device.h b/src/systemd/sd-device.h
index d3d4abd6ce..5bfca6ecec 100644
--- a/src/systemd/sd-device.h
+++ b/src/systemd/sd-device.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosddevicehfoo
#define foosddevicehfoo
diff --git a/src/systemd/sd-dhcp-client.h b/src/systemd/sd-dhcp-client.h
index bbf220e689..2b865a80e1 100644
--- a/src/systemd/sd-dhcp-client.h
+++ b/src/systemd/sd-dhcp-client.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosddhcpclienthfoo
#define foosddhcpclienthfoo
diff --git a/src/systemd/sd-dhcp-lease.h b/src/systemd/sd-dhcp-lease.h
index a0d24c211c..2f565ca825 100644
--- a/src/systemd/sd-dhcp-lease.h
+++ b/src/systemd/sd-dhcp-lease.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosddhcpleasehfoo
#define foosddhcpleasehfoo
diff --git a/src/systemd/sd-dhcp-server.h b/src/systemd/sd-dhcp-server.h
index dbebb4f294..8658197e80 100644
--- a/src/systemd/sd-dhcp-server.h
+++ b/src/systemd/sd-dhcp-server.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosddhcpserverhfoo
#define foosddhcpserverhfoo
diff --git a/src/systemd/sd-dhcp6-client.h b/src/systemd/sd-dhcp6-client.h
index fa90f7a670..9608060830 100644
--- a/src/systemd/sd-dhcp6-client.h
+++ b/src/systemd/sd-dhcp6-client.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosddhcp6clienthfoo
#define foosddhcp6clienthfoo
diff --git a/src/systemd/sd-dhcp6-lease.h b/src/systemd/sd-dhcp6-lease.h
index 3a62d3402d..184fbb8e0d 100644
--- a/src/systemd/sd-dhcp6-lease.h
+++ b/src/systemd/sd-dhcp6-lease.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosddhcp6leasehfoo
#define foosddhcp6leasehfoo
diff --git a/src/systemd/sd-event.h b/src/systemd/sd-event.h
index 59cea09e59..1ea97e47f8 100644
--- a/src/systemd/sd-event.h
+++ b/src/systemd/sd-event.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdeventhfoo
#define foosdeventhfoo
diff --git a/src/systemd/sd-hwdb.h b/src/systemd/sd-hwdb.h
index c0b8d94c9e..7105920492 100644
--- a/src/systemd/sd-hwdb.h
+++ b/src/systemd/sd-hwdb.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdhwdbhfoo
#define foosdhwdbhfoo
diff --git a/src/systemd/sd-id128.h b/src/systemd/sd-id128.h
index 9f445278bb..a3bf5897b8 100644
--- a/src/systemd/sd-id128.h
+++ b/src/systemd/sd-id128.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdid128hfoo
#define foosdid128hfoo
diff --git a/src/systemd/sd-ipv4acd.h b/src/systemd/sd-ipv4acd.h
index 9f0e2ba7d4..3a2219c82c 100644
--- a/src/systemd/sd-ipv4acd.h
+++ b/src/systemd/sd-ipv4acd.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdipv4acdfoo
#define foosdipv4acdfoo
diff --git a/src/systemd/sd-ipv4ll.h b/src/systemd/sd-ipv4ll.h
index 8c2533d1e6..67c566fe0d 100644
--- a/src/systemd/sd-ipv4ll.h
+++ b/src/systemd/sd-ipv4ll.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdipv4llfoo
#define foosdipv4llfoo
diff --git a/src/systemd/sd-journal.h b/src/systemd/sd-journal.h
index 7f16c69ce5..abb9eca576 100644
--- a/src/systemd/sd-journal.h
+++ b/src/systemd/sd-journal.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdjournalhfoo
#define foosdjournalhfoo
@@ -129,6 +127,9 @@ int sd_journal_query_unique(sd_journal *j, const char *field);
int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_t *l);
void sd_journal_restart_unique(sd_journal *j);
+int sd_journal_enumerate_fields(sd_journal *j, const char **field);
+void sd_journal_restart_fields(sd_journal *j);
+
int sd_journal_get_fd(sd_journal *j);
int sd_journal_get_events(sd_journal *j);
int sd_journal_get_timeout(sd_journal *j, uint64_t *timeout_usec);
@@ -142,22 +143,28 @@ int sd_journal_get_catalog_for_message_id(sd_id128_t id, char **text);
int sd_journal_has_runtime_files(sd_journal *j);
int sd_journal_has_persistent_files(sd_journal *j);
-/* the inverse condition avoids ambiguity of danling 'else' after the macro */
+/* The inverse condition avoids ambiguity of dangling 'else' after the macro */
#define SD_JOURNAL_FOREACH(j) \
if (sd_journal_seek_head(j) < 0) { } \
else while (sd_journal_next(j) > 0)
-/* the inverse condition avoids ambiguity of danling 'else' after the macro */
+/* The inverse condition avoids ambiguity of dangling 'else' after the macro */
#define SD_JOURNAL_FOREACH_BACKWARDS(j) \
if (sd_journal_seek_tail(j) < 0) { } \
else while (sd_journal_previous(j) > 0)
+/* Iterate through the data fields of the current journal entry */
#define SD_JOURNAL_FOREACH_DATA(j, data, l) \
for (sd_journal_restart_data(j); sd_journal_enumerate_data((j), &(data), &(l)) > 0; )
+/* Iterate through the all known values of a specific field */
#define SD_JOURNAL_FOREACH_UNIQUE(j, data, l) \
for (sd_journal_restart_unique(j); sd_journal_enumerate_unique((j), &(data), &(l)) > 0; )
+/* Iterate through all known field names */
+#define SD_JOURNAL_FOREACH_FIELD(j, field) \
+ for (sd_journal_restart_fields(j); sd_journal_enumerate_fields((j), &(field)) > 0; )
+
_SD_DEFINE_POINTER_CLEANUP_FUNC(sd_journal, sd_journal_close);
_SD_END_DECLARATIONS;
diff --git a/src/systemd/sd-lldp.h b/src/systemd/sd-lldp.h
index d912b08a6a..ea952ef187 100644
--- a/src/systemd/sd-lldp.h
+++ b/src/systemd/sd-lldp.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdlldphfoo
#define foosdlldphfoo
diff --git a/src/systemd/sd-login.h b/src/systemd/sd-login.h
index 164c75641c..e3ecbd8378 100644
--- a/src/systemd/sd-login.h
+++ b/src/systemd/sd-login.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdloginhfoo
#define foosdloginhfoo
@@ -110,7 +108,7 @@ int sd_peer_get_slice(int fd, char **slice);
int sd_peer_get_user_slice(int fd, char **slice);
/* Similar to sd_pid_get_machine_name(), but retrieves data about the
- * peer of a a connected AF_UNIX socket */
+ * peer of a connected AF_UNIX socket */
int sd_peer_get_machine_name(int fd, char **machine);
/* Similar to sd_pid_get_cgroup(), but retrieves data about the peer
diff --git a/src/systemd/sd-messages.h b/src/systemd/sd-messages.h
index 814263546b..8a72576ec8 100644
--- a/src/systemd/sd-messages.h
+++ b/src/systemd/sd-messages.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdmessageshfoo
#define foosdmessageshfoo
diff --git a/src/systemd/sd-ndisc.h b/src/systemd/sd-ndisc.h
index d48612efdf..762947531d 100644
--- a/src/systemd/sd-ndisc.h
+++ b/src/systemd/sd-ndisc.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdndiscfoo
#define foosdndiscfoo
diff --git a/src/systemd/sd-netlink.h b/src/systemd/sd-netlink.h
index 5d0d0643e1..b4798d2476 100644
--- a/src/systemd/sd-netlink.h
+++ b/src/systemd/sd-netlink.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdnetlinkhfoo
#define foosdnetlinkhfoo
diff --git a/src/systemd/sd-network.h b/src/systemd/sd-network.h
index ff0d2b191e..e20d12c44d 100644
--- a/src/systemd/sd-network.h
+++ b/src/systemd/sd-network.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdnetworkhfoo
#define foosdnetworkhfoo
diff --git a/src/systemd/sd-path.h b/src/systemd/sd-path.h
index 3280303633..be6abdcd03 100644
--- a/src/systemd/sd-path.h
+++ b/src/systemd/sd-path.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdpathhfoo
#define foosdpathhfoo
diff --git a/src/systemd/sd-resolve.h b/src/systemd/sd-resolve.h
index eb4548a2dc..903b917f70 100644
--- a/src/systemd/sd-resolve.h
+++ b/src/systemd/sd-resolve.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdresolvehfoo
#define foosdresolvehfoo
diff --git a/src/systemd/sd-utf8.h b/src/systemd/sd-utf8.h
index 205ee42213..6781983878 100644
--- a/src/systemd/sd-utf8.h
+++ b/src/systemd/sd-utf8.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#ifndef foosdutf8hfoo
#define foosdutf8hfoo