From 870c2aaf8cc21d9e096d4d26421fd651cad9d019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 13 Jun 2022 10:11:22 +0200 Subject: [PATCH] man: document sd_bus_error_setfv() The description for sd_bus_error_set_errnof/sd_bus_error_set_errnofv are adjusted to use the same pattern. --- man/rules/meson.build | 3 ++- man/sd_bus_error.xml | 43 +++++++++++++++++++++++++++---------------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/man/rules/meson.build b/man/rules/meson.build index e7fe10dcebc..48da2f8f8c1 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -267,7 +267,8 @@ manpages = [ 'sd_bus_error_set_errno', 'sd_bus_error_set_errnof', 'sd_bus_error_set_errnofv', - 'sd_bus_error_setf'], + 'sd_bus_error_setf', + 'sd_bus_error_setfv'], ''], ['sd_bus_error_add_map', '3', diff --git a/man/sd_bus_error.xml b/man/sd_bus_error.xml index d8f3317e29a..6f5e9e4b97b 100644 --- a/man/sd_bus_error.xml +++ b/man/sd_bus_error.xml @@ -22,6 +22,7 @@ sd_bus_error_free sd_bus_error_set sd_bus_error_setf + sd_bus_error_setfv sd_bus_error_set_const sd_bus_error_set_errno sd_bus_error_set_errnof @@ -74,6 +75,14 @@ + + int sd_bus_error_setfv + sd_bus_error *e + const char *name + const char *format + va_list ap + + int sd_bus_error_set_const sd_bus_error *e @@ -196,11 +205,15 @@ which case an SD_BUS_ERROR_NO_MEMORY error will be set instead and -ENOMEM returned. - sd_bus_error_setf() is similar to - sd_bus_error_set(), but takes a printf3 - format string and corresponding arguments to generate the - message field. + sd_bus_error_setf() and sd_bus_error_setfv() are similar + to sd_bus_error_set(), but take a printf3 format + string and corresponding arguments to generate the message field. + sd_bus_error_setf() uses variadic arguments, and + sd_bus_error_setfv() accepts the arguments as a + va_arg3 + parameter list. sd_bus_error_set_const() is similar to sd_bus_error_set(), but the string parameters are not copied internally, and must @@ -223,17 +236,15 @@ due to lack of memory, in which case an SD_BUS_ERROR_NO_MEMORY error is set instead, and -ENOMEM is returned. - sd_bus_error_set_errnof() is similar to - sd_bus_error_set_errno(), but in addition to - error, takes a printf3 - format string and corresponding arguments. The - message field will be generated from - format and the arguments. - - sd_bus_error_set_errnofv() is similar to - sd_bus_error_set_errnof(), but takes the - format string parameters as sd_bus_error_set_errnof() and sd_bus_error_set_errnof() + are similar to sd_bus_error_set_errno(), but in addition to + error, take a printf3 format + string and corresponding arguments. The message field will be generated from + format and the arguments. + sd_bus_error_set_errnof() uses variadic arguments, and + sd_bus_error_set_errnofv() accepts the arguments as a + va_arg3 parameter list.