summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/systemd.journal-fields.xml10
-rw-r--r--src/journal/journald-server.c6
2 files changed, 6 insertions, 10 deletions
diff --git a/man/systemd.journal-fields.xml b/man/systemd.journal-fields.xml
index 320b782992..68581a21cc 100644
--- a/man/systemd.journal-fields.xml
+++ b/man/systemd.journal-fields.xml
@@ -399,12 +399,12 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><varname>_SYSTEM_CONTEXT=</varname></term>
+ <term><varname>_RUNTIME_SCOPE=</varname></term>
- <listitem><para>A string field that specifies the context in which the message was logged. If
- <literal>initrd</literal>, the log message was processed while systemd-journald
- was running inside the initrd. If <literal>main</literal>, the log message was generated after
- journald switched root to the root filesystem.</para></listitem>
+ <listitem><para>A string field that specifies the runtime scope in which the message was logged. If
+ <literal>initrd</literal>, the log message was processed while the system was running inside the
+ initial RAM disk (initrd). If <literal>system</literal>, the log message was generated after the
+ system switched execution to the host root filesystem.</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 49cede6892..3992d15664 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -1035,11 +1035,7 @@ static void dispatch_message_real(
if (!isempty(s->namespace_field))
iovec[n++] = IOVEC_MAKE_STRING(s->namespace_field);
- if (in_initrd())
- iovec[n++] = IOVEC_MAKE_STRING("_SYSTEM_CONTEXT=initrd");
- else
- iovec[n++] = IOVEC_MAKE_STRING("_SYSTEM_CONTEXT=main");
-
+ iovec[n++] = in_initrd() ? IOVEC_MAKE_STRING("_RUNTIME_SCOPE=initrd") : IOVEC_MAKE_STRING("_RUNTIME_SCOPE=system");
assert(n <= m);
if (s->split_mode == SPLIT_UID && c && uid_is_valid(c->uid))