chiark / gitweb /
bus: reduce calls to KDBUS_CMD_MEMFD_SIZE_SET ioctl
[elogind.git] / src / libsystemd-bus / bus-error.h
index c6e072eab4913e65fa53ce7d78188f67db85700f..cf0ad9d545804b4a42b683ff024acc74840903da 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stdbool.h>
+
 #include "sd-bus.h"
+#include "macro.h"
+
+struct name_error_mapping {
+        const char* name;
+        int code;
+};
+typedef struct name_error_mapping name_error_mapping;
 
-int bus_error_to_errno(const sd_bus_error *e);
-int bus_error_from_errno(sd_bus_error *e, int error);
+const name_error_mapping* bus_error_mapping_lookup(const char *str, unsigned int len);
 
 bool bus_error_is_dirty(sd_bus_error *e);
+
+const char *bus_error_message(const sd_bus_error *e, int error);
+
+int bus_error_setfv(sd_bus_error *e, const char *name, const char *format, va_list ap) _printf_(3,0);
+int bus_error_set_errnofv(sd_bus_error *e, int error, const char *format, va_list ap) _printf_(3,0);