mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
sd-bus: export sd_bus_error_setfv()
The usual: if we find that function useful, other users of the library will too. In particular, the v-variants are necessary to build pass-thru wrappers.
This commit is contained in:
parent
7a1f261da3
commit
fc69fab5ec
@ -781,6 +781,8 @@ global:
|
||||
|
||||
LIBSYSTEMD_252 {
|
||||
global:
|
||||
sd_bus_error_setfv;
|
||||
|
||||
sd_hwdb_new_from_path;
|
||||
|
||||
sd_netlink_new_from_fd;
|
||||
|
@ -270,7 +270,7 @@ _public_ int sd_bus_reply_method_errorfv(
|
||||
if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
|
||||
return 0;
|
||||
|
||||
bus_error_setfv(&error, name, format, ap);
|
||||
sd_bus_error_setfv(&error, name, format, ap);
|
||||
|
||||
return sd_bus_reply_method_error(call, &error);
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ _public_ int sd_bus_error_set(sd_bus_error *e, const char *name, const char *mes
|
||||
return -r;
|
||||
}
|
||||
|
||||
int bus_error_setfv(sd_bus_error *e, const char *name, const char *format, va_list ap) {
|
||||
_public_ int sd_bus_error_setfv(sd_bus_error *e, const char *name, const char *format, va_list ap) {
|
||||
int r;
|
||||
|
||||
if (!name)
|
||||
@ -277,7 +277,7 @@ _public_ int sd_bus_error_setf(sd_bus_error *e, const char *name, const char *fo
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
r = bus_error_setfv(e, name, format, ap);
|
||||
r = sd_bus_error_setfv(e, name, format, ap);
|
||||
assert(!name || r < 0);
|
||||
va_end(ap);
|
||||
|
||||
|
@ -11,8 +11,6 @@ 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);
|
||||
|
||||
#define BUS_ERROR_OOM SD_BUS_ERROR_MAKE_CONST(SD_BUS_ERROR_NO_MEMORY, "Out of memory")
|
||||
#define BUS_ERROR_FAILED SD_BUS_ERROR_MAKE_CONST(SD_BUS_ERROR_FAILED, "Operation failed")
|
||||
|
||||
|
@ -674,7 +674,7 @@ _public_ int sd_bus_message_new_method_errorf(
|
||||
assert_return(m, -EINVAL);
|
||||
|
||||
va_start(ap, format);
|
||||
bus_error_setfv(&error, name, format, ap);
|
||||
sd_bus_error_setfv(&error, name, format, ap);
|
||||
va_end(ap);
|
||||
|
||||
return sd_bus_message_new_method_error(call, m, &error);
|
||||
|
@ -445,6 +445,8 @@ int sd_bus_creds_get_description(sd_bus_creds *c, const char **name);
|
||||
void sd_bus_error_free(sd_bus_error *e);
|
||||
int sd_bus_error_set(sd_bus_error *e, const char *name, const char *message);
|
||||
int sd_bus_error_setf(sd_bus_error *e, const char *name, const char *format, ...) _sd_printf_(3, 4);
|
||||
int sd_bus_error_setfv(sd_bus_error *e, const char *name, const char *format, va_list ap) _sd_printf_(3,0);
|
||||
|
||||
int sd_bus_error_set_const(sd_bus_error *e, const char *name, const char *message);
|
||||
int sd_bus_error_set_errno(sd_bus_error *e, int error);
|
||||
int sd_bus_error_set_errnof(sd_bus_error *e, int error, const char *format, ...) _sd_printf_(3, 4);
|
||||
|
Loading…
Reference in New Issue
Block a user