206 lines
4.4 KiB
HTML
206 lines
4.4 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of SD_BUS_REPLY_METHOD_ERROR</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>SD_BUS_REPLY_METHOD_ERROR</H1>
|
|
Section: sd_bus_reply_method_error (3)<BR>Updated: <BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
sd_bus_reply_method_error, sd_bus_reply_method_errorf, sd_bus_reply_method_errno, sd_bus_reply_method_errnof - Reply with an error to a method call
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
<B>
|
|
</B><PRE>
|
|
#include <<A HREF="file:///usr/include/systemd/sd-bus.h">systemd/sd-bus.h</A>>
|
|
</PRE>
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>int sd_bus_reply_method_error(sd_bus_message *</B><I>call</I><B>, const sd_bus_error *</B><I>e</I><B>);</B>
|
|
|
|
<DT id="2">
|
|
<B>int sd_bus_reply_method_errorf(sd_bus_message *</B><I>call</I><B>, const char *</B><I>name</I><B>, const char *</B><I>format</I><B>, ...);</B>
|
|
|
|
<DT id="3">
|
|
<B>int sd_bus_reply_method_errno(sd_bus_message *</B><I>call</I><B>, int </B><I>error</I><B>, const sd_bus_error *</B><I>p</I><B>);</B>
|
|
|
|
<DT id="4">
|
|
<B>int sd_bus_reply_method_errnof(sd_bus_message *</B><I>call</I><B>, int </B><I>error</I><B>, const char *</B><I>format</I><B>, ...);</B>
|
|
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<DD>The
|
|
<B>sd_bus_reply_method_error()</B>
|
|
function sends an error reply to the
|
|
<I>call</I>
|
|
message. The error structure
|
|
<I>e</I>
|
|
specifies the error to send, and is used as described in
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd_bus_message_new_error">sd_bus_message_new_error</A></B>(3). If no reply is expected to
|
|
<I>call</I>, this function returns success without sending reply.
|
|
<P>
|
|
|
|
The
|
|
<B>sd_bus_reply_method_errorf()</B>
|
|
is to
|
|
<B>sd_bus_reply_method_error()</B>
|
|
what
|
|
<B>sd_bus_message_new_method_errorf()</B>
|
|
is to
|
|
<B>sd_bus_message_new_method_error()</B>.
|
|
<P>
|
|
|
|
The
|
|
<B>sd_bus_reply_method_errno()</B>
|
|
is to
|
|
<B>sd_bus_reply_method_error()</B>
|
|
what
|
|
<B>sd_bus_message_new_method_errno()</B>
|
|
is to
|
|
<B>sd_bus_message_new_method_error()</B>.
|
|
<P>
|
|
|
|
The
|
|
<B>sd_bus_reply_method_errnof()</B>
|
|
is to
|
|
<B>sd_bus_reply_method_error()</B>
|
|
what
|
|
<B>sd_bus_message_new_method_errnof()</B>
|
|
is to
|
|
<B>sd_bus_message_new_method_error()</B>.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>RETURN VALUE</H2>
|
|
|
|
<P>
|
|
|
|
These functions return 0 if the error reply was successfully sent or if none was expected, and a negative errno-style error code otherwise.
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Errors</H3>
|
|
|
|
<P>
|
|
|
|
Returned errors may indicate the following problems:
|
|
<P>
|
|
|
|
<B>-EINVAL</B>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
The call message
|
|
<I>call</I>
|
|
is
|
|
<B>NULL</B>.
|
|
<P>
|
|
Message
|
|
<I>call</I>
|
|
is not a method call message.
|
|
<P>
|
|
Message
|
|
<I>call</I>
|
|
is not attached to a bus.
|
|
<P>
|
|
The error
|
|
<I>error</I>
|
|
parameter to
|
|
<B>sd_bus_reply_method_error</B>
|
|
is not set, see
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd_bus_error_is_set">sd_bus_error_is_set</A></B>(3).
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-EPERM</B>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
Message
|
|
<I>call</I>
|
|
has been sealed.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-ENOTCONN</B>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
The bus to which message
|
|
<I>call</I>
|
|
is attached is not connected.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-ENOMEM</B>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
Memory allocation failed.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
In addition, any error message returned by
|
|
<B><A HREF="/cgi-bin/man/man2html?1+sd_bus_send">sd_bus_send</A></B>(1)
|
|
may be returned.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
<P>
|
|
|
|
These APIs are implemented as a shared library, which can be compiled and linked to with the
|
|
<B>libsystemd</B> <B><A HREF="/cgi-bin/man/man2html?1+pkg-config">pkg-config</A></B>(1)
|
|
file.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+systemd">systemd</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd-bus">sd-bus</A></B>(3),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd_bus_message_new_method_error">sd_bus_message_new_method_error</A></B>(3)
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="9"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="10"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="11"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="12"><A HREF="#lbAE">RETURN VALUE</A><DD>
|
|
<DL>
|
|
<DT id="13"><A HREF="#lbAF">Errors</A><DD>
|
|
</DL>
|
|
<DT id="14"><A HREF="#lbAG">NOTES</A><DD>
|
|
<DT id="15"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:55 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|