diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-07-30 13:08:52 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-09-09 09:34:54 +0200 |
commit | dd630d3cac6d72e2f4661273d2b28c95c545881c (patch) | |
tree | 3fa0523f3f7f62321d21b0d1b7e81905a06f4d5b /man/sd_machine_get_class.xml | |
parent | 0ef14adc1c724eee8d5f4db3d298786b209afaa5 (diff) | |
download | systemd-dd630d3cac6d72e2f4661273d2b28c95c545881c.tar.gz |
Let sd_machine_get_ifindices() omit the output param too
Nowadays we do that almost everywhere, let's also do it here.
Diffstat (limited to 'man/sd_machine_get_class.xml')
-rw-r--r-- | man/sd_machine_get_class.xml | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/man/sd_machine_get_class.xml b/man/sd_machine_get_class.xml index 0a0d601899..a8db371230 100644 --- a/man/sd_machine_get_class.xml +++ b/man/sd_machine_get_class.xml @@ -53,21 +53,22 @@ project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry> call after use.</para> - <para><function>sd_machine_get_ifindices()</function> may be used - to determine the numeric indices of the network interfaces on the - host that are pointing towards the specified locally running - virtual machine or container that is registered with + <para><function>sd_machine_get_ifindices()</function> may be used to determine the numeric indices of the + network interfaces on the host that are pointing towards the specified locally running virtual machine or + container. The vm or container must be registered with <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. - The returned array needs to be freed with the libc <citerefentry - project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry> - call after use.</para> + The output parameter <parameter>ret_ifindices</parameter> may be passed as <constant>NULL</constant> when + the output value is not needed. The returned array needs to be freed with the libc <citerefentry + project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry> call after + use.</para> </refsect1> <refsect1> <title>Return Value</title> - <para>On success, these calls return 0 or a positive integer. On failure, these calls return a negative - errno-style error code.</para> + <para>On success, these functions return a non-negative integer. + <function>sd_machine_get_ifindices()</function> returns the number of the relevant network interfaces. + On failure, these calls return a negative errno-style error code.</para> <refsect2> <title>Errors</title> |