[systemd-devel] [PATCH 7/7] systemd-stdio-bridge: make it socket-activatable and usable as kdbus bridge

Daniel Mack zonque at gmail.com
Fri Nov 15 13:24:29 PST 2013


On 11/15/2013 08:38 PM, Tom Gundersen wrote:
> On Fri, Nov 15, 2013 at 7:32 PM, Daniel Mack <zonque at gmail.com> wrote:
>> Augment systemd-stdio-bridge a bit to make it a 1:1 bridge from legacy
>> DBus clients to kdbus. In particular,
>>
>>  * allow setting the bus path of the upstream bus as command line
>>    argument
>>  * use sd_listen_fds() for systemd's socket activation
>>  * omit calling sd_bus_negotiate_fds() when upstream bus is kdbus
>>  * reply to bus send errors with proper dbus error messages
>>  * treat -ECONNRESET as expected end-of-connection condition
>> ---
>>  src/stdio-bridge/stdio-bridge.c | 116 +++++++++++++++++++++++++++++++++-------
>>  1 file changed, 98 insertions(+), 18 deletions(-)
>>
>> diff --git a/src/stdio-bridge/stdio-bridge.c b/src/stdio-bridge/stdio-bridge.c
>> index 07218e9..f16a146 100644
>> --- a/src/stdio-bridge/stdio-bridge.c
>> +++ b/src/stdio-bridge/stdio-bridge.c
>> @@ -28,6 +28,7 @@
>>  #include <errno.h>
>>  #include <sys/poll.h>
>>  #include <stddef.h>
>> +#include <getopt.h>
>>
>>  #include "log.h"
>>  #include "util.h"
>> @@ -37,25 +38,99 @@
>>  #include "bus-internal.h"
>>  #include "bus-message.h"
>>  #include "bus-util.h"
>> +#include "build.h"
>> +
>> +const char *arg_bus_path = "unix:path=/run/dbus/system_bus_socket";
>> +
>> +static int help(void) {
>> +
>> +        printf("%s [OPTIONS...]\n\n"
>> +               "Query or change system hostname.\n\n"
> 
> Copy paste error ^^^ ?

Ups, yes. Well spotted.

If that's the only remark on the series, I'd dare to ask Lennart to
amend this when applying :)




Thanks,
Daniel


More information about the systemd-devel mailing list