client: Lookup the private daemon bus

This commit is contained in:
Marcel Holtmann 2014-05-20 21:45:03 -07:00
parent bf7c041b47
commit 0dbb04b93f
2 changed files with 25 additions and 2 deletions

View File

@ -38,7 +38,8 @@ src_iwd_SOURCES = src/main.c linux/nl80211.h linux/kdbus.h \
src/sha1.h src/sha1.c
src_iwd_LDADD = ell/libell-internal.la
client_iwctl_SOURCES = client/main.c
client_iwctl_SOURCES = client/main.c linux/kdbus.h \
src/kdbus.h src/kdbus.c
client_iwctl_LDADD = ell/libell-internal.la
noinst_PROGRAMS =

View File

@ -25,8 +25,30 @@
#endif
#include <stdlib.h>
#include <ell/ell.h>
#include "src/kdbus.h"
int main(int argc, char *argv[])
{
return EXIT_SUCCESS;
char *bus_name;
int exit_status;
l_log_set_stderr();
l_debug_enable("*");
bus_name = kdbus_lookup_bus();
if (!bus_name) {
exit_status = EXIT_FAILURE;
goto done;
}
l_debug("Bus location: %s", bus_name);
exit_status = EXIT_SUCCESS;
l_free(bus_name);
done:
return exit_status;
}