]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/sd_journal_add_match.xml
final v236 update (#7649)
[thirdparty/systemd.git] / man / sd_journal_add_match.xml
index fe89cbf75c59f6c4d6ce16ed063ce574514ea88e..b41d6189d9511cbfcccc3fbfb66e038709261775 100644 (file)
@@ -1,11 +1,10 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
-<!ENTITY % entities SYSTEM "custom-entities.ent" >
-%entities;
-]>
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
 
 <!--
+  SPDX-License-Identifier: LGPL-2.1+
+
   This file is part of systemd.
 
   Copyright 2012 Lennart Poettering
   This file is part of systemd.
 
   Copyright 2012 Lennart Poettering
     <citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     and
     <citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
     <citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     and
     <citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
-    Matches are of the form <literal>FIELD=value</literal>, where the
-    field part is a short uppercase string consisting only of 0-9, A-Z
-    and the underscore. It may not begin with two underscores or be
-    the empty string. The value part may be any value, including
-    binary. If a match is applied, only entries with this field set
+    Parameter <parameter>data</parameter> must be of the form
+    <literal><replaceable>FIELD</replaceable>=<replaceable>value</replaceable></literal>,
+    where the <replaceable>FIELD</replaceable> part is a short uppercase string consisting only
+    of 0–9, A–Z and the underscore; it may not begin with two underscores or be the empty
+    string. The <replaceable>value</replaceable> part may be anything, including binary. Parameter
+    <parameter>size</parameter> specifies the number of bytes in <parameter>data</parameter>
+    (i.e. the length of <replaceable>FIELD</replaceable>, plus one, plus the length of
+    <replaceable>value</replaceable>). Parameter <parameter>size</parameter> may also be
+    specified as <constant>0</constant>, in which case <parameter>data</parameter>
+    must be a <constant>NUL</constant>-terminated string, and the bytes before the terminating
+    zero are used as the match.</para>
+
+    <para>If a match is applied, only entries with this field set
     will be iterated. Multiple matches may be active at the same time:
     If they apply to different fields, only entries with both fields
     set like this will be iterated. If they apply to the same fields,
     will be iterated. Multiple matches may be active at the same time:
     If they apply to different fields, only entries with both fields
     set like this will be iterated. If they apply to the same fields,
   <refsect1>
     <title>Notes</title>
 
   <refsect1>
     <title>Notes</title>
 
+    <para>All functions listed here are thread-agnostic and only a single thread may operate
+    on a given <structname>sd_journal</structname> object.</para>
+
     <para>The <function>sd_journal_add_match()</function>,
     <function>sd_journal_add_disjunction()</function>,
     <function>sd_journal_add_conjunction()</function> and
     <para>The <function>sd_journal_add_match()</function>,
     <function>sd_journal_add_disjunction()</function>,
     <function>sd_journal_add_conjunction()</function> and
     message ID 03bb1dab98ab4ecfbf6fff2738bdd964 coming from any
     service (this example lacks the necessary error checking):</para>
 
     message ID 03bb1dab98ab4ecfbf6fff2738bdd964 coming from any
     service (this example lacks the necessary error checking):</para>
 
-    <programlisting>...
+    <programlisting>
 int add_matches(sd_journal *j) {
   sd_journal_add_match(j, "_SYSTEMD_UNIT=avahi-daemon.service", 0);
   sd_journal_add_match(j, "PRIORITY=0", 0);
 int add_matches(sd_journal *j) {
   sd_journal_add_match(j, "_SYSTEMD_UNIT=avahi-daemon.service", 0);
   sd_journal_add_match(j, "PRIORITY=0", 0);