On Sun, 20.10.13 23:59, Tom Gundersen ([email protected]) wrote:
> Is there a better way to parse the messages in show_one()?
We have no API calls that can do property GetAll() for you. The reason
is simply that I couldn't see what we could do any easier than just
doing sd_bus_call_method() for it...
> + if (streq(contents, "s")) {
> + const char **s;
> + size_t n;
> + bool space = false;
> +
> + sd_bus_message_read_array(property,
> SD_BUS_TYPE_STRING, (const void**) &s, &n);
read_array only works for "trivial" types, i.e. those which do not
involve pointers and which have a fixed size. Strings are not of this kind...
Looks good otherwise!
Lennart
--
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel