1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-10 01:17:44 +03:00

sd-bus: export sd_bus_message_read_strv_extend()

The same story as before: it's a useful helper, other uses of the library
are likely to find it useful.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-06-13 11:17:17 +02:00
parent 944c124330
commit cf2edf1d5c
5 changed files with 6 additions and 5 deletions

View File

@ -781,6 +781,7 @@ global:
LIBSYSTEMD_252 {
global:
sd_bus_message_read_strv_extend;
sd_bus_error_setfv;
sd_id128_string_equal;

View File

@ -4256,7 +4256,7 @@ int bus_message_get_blob(sd_bus_message *m, void **buffer, size_t *sz) {
return 0;
}
int bus_message_read_strv_extend(sd_bus_message *m, char ***l) {
_public_ int sd_bus_message_read_strv_extend(sd_bus_message *m, char ***l) {
char type;
const char *contents, *s;
int r;
@ -4299,7 +4299,7 @@ _public_ int sd_bus_message_read_strv(sd_bus_message *m, char ***l) {
assert_return(m->sealed, -EPERM);
assert_return(l, -EINVAL);
r = bus_message_read_strv_extend(m, &strv);
r = sd_bus_message_read_strv_extend(m, &strv);
if (r <= 0)
return r;

View File

@ -159,7 +159,6 @@ static inline void* BUS_MESSAGE_FIELDS(sd_bus_message *m) {
}
int bus_message_get_blob(sd_bus_message *m, void **buffer, size_t *sz);
int bus_message_read_strv_extend(sd_bus_message *m, char ***l);
int bus_message_from_malloc(
sd_bus *bus,

View File

@ -30,7 +30,7 @@ int bus_map_strv_sort(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus
char ***p = userdata;
int r;
r = bus_message_read_strv_extend(m, &l);
r = sd_bus_message_read_strv_extend(m, &l);
if (r < 0)
return r;
@ -75,7 +75,7 @@ static int map_basic(sd_bus *bus, const char *member, sd_bus_message *m, unsigne
_cleanup_strv_free_ char **l = NULL;
char ***p = userdata;
r = bus_message_read_strv_extend(m, &l);
r = sd_bus_message_read_strv_extend(m, &l);
if (r < 0)
return r;

View File

@ -330,6 +330,7 @@ int sd_bus_message_readv(sd_bus_message *m, const char *types, va_list ap);
int sd_bus_message_read_basic(sd_bus_message *m, char type, void *p);
int sd_bus_message_read_array(sd_bus_message *m, char type, const void **ptr, size_t *size);
int sd_bus_message_read_strv(sd_bus_message *m, char ***l); /* free the result! */
int sd_bus_message_read_strv_extend(sd_bus_message *m, char ***l);
int sd_bus_message_skip(sd_bus_message *m, const char *types);
int sd_bus_message_enter_container(sd_bus_message *m, char type, const char *contents);
int sd_bus_message_exit_container(sd_bus_message *m);