[systemd-devel] [PATCH V2 2/2] systemctl: port to libsystemd-bus

Lennart Poettering lennart at poettering.net
Fri Nov 8 05:14:24 PST 2013


On Fri, 08.11.13 10:34, Marc-Antoine Perennou (Marc-Antoine at Perennou.com) wrote:

Heya!

I already rebased the previous version you posted, and then applied with
some changes. Is this reposting of yours more than just a rebase?

I merged both commits into one, and made a couple of changes:

I didn't like the log_method_call_failed() thing, because I'd much
prefer having good explanatory error messages which usually require
format strings and stuff. I did like log_message_creation_failed()
though and moved it to bus-util.c as bus_log_create_error().

sd-bus.h is a public API, where we try to avoid everything that is not
C89. "bool" is C99. The message parser/append calls hence assume that
booleans are "int"s, as in traditional C, in glib or even the old
libdbus1. However, "bool" and "int" have different sizes, which means
taking a pointer of a bool and passing that to sd_bus_message_read() or
so for parsing a bool will explode. C can be ugly like hell
sometimes. Anyway, fixed those.

The bus transport generalization doesn't do direct PID1 connections
anymore, I will add this in a alter commit.

Thanks a lot for the patch!

We are now down to only PID 1 left in libdus-1 land!

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list