systemd/SOURCES/0767-man-mention-that-sd_id128_get_boot-and-friend-may-re.patch

64 lines
2.8 KiB
Diff
Raw Permalink Normal View History

2024-10-04 13:28:39 +00:00
From 66c103ed26f623a54318a6f4fa48f895fb6efab8 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Thu, 8 Dec 2022 15:49:02 +0900
Subject: [PATCH] man: mention that sd_id128_get_boot() and friend may return
-ENOSYS
And drop to mention sd_id128_get_boot_app_specific() may return -ENOENT
or -ENOMEDIUM. The function does not read /etc/machine-id. But reads a
file in the procfs, which is a kind of the kernel API. Hence the
failures are caused only when the system has wrong setup.
(cherry picked from commit c576920e673114529c5bfe5ea29891a24a443338)
Related: RHEL-27512
---
man/sd_id128_get_machine.xml | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/man/sd_id128_get_machine.xml b/man/sd_id128_get_machine.xml
index 8bc76b686b..dbc6d4885d 100644
--- a/man/sd_id128_get_machine.xml
+++ b/man/sd_id128_get_machine.xml
@@ -129,19 +129,17 @@
<varlistentry>
<term><constant>-ENOENT</constant></term>
- <listitem><para>Returned by <function>sd_id128_get_machine()</function>,
- <function>sd_id128_get_machine_app_specific()</function>, and
- <function>sd_id128_get_boot_app_specific()</function> when <filename>/etc/machine-id</filename> is
- missing.</para></listitem>
+ <listitem><para>Returned by <function>sd_id128_get_machine()</function> and
+ <function>sd_id128_get_machine_app_specific()</function> when <filename>/etc/machine-id</filename>
+ is missing.</para></listitem>
</varlistentry>
<varlistentry>
<term><constant>-ENOMEDIUM</constant></term>
- <listitem><para>Returned by <function>sd_id128_get_machine()</function>,
- <function>sd_id128_get_machine_app_specific()</function>, and
- <function>sd_id128_get_boot_app_specific()</function> when <filename>/etc/machine-id</filename> is
- empty or all zeros.</para></listitem>
+ <listitem><para>Returned by <function>sd_id128_get_machine()</function> and
+ <function>sd_id128_get_machine_app_specific()</function> when <filename>/etc/machine-id</filename>
+ is empty or all zeros.</para></listitem>
</varlistentry>
<varlistentry>
@@ -152,6 +150,14 @@
<filename>/etc/machine-id</filename> is <literal>uninitialized</literal>.</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term><constant>-ENOSYS</constant></term>
+
+ <listitem><para>Returned by <function>sd_id128_get_boot()</function> and
+ <function>sd_id128_get_boot_app_specific()</function> when <filename>/proc/</filename> is not
+ mounted.</para></listitem>
+ </varlistentry>
+
<varlistentry>
<term><constant>-ENXIO</constant></term>