diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-03-19 20:14:37 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-03-19 20:14:37 +0000 |
commit | faaa78e8988895aecf12f5ef113d3683c7986999 (patch) | |
tree | 6eafb6c706b9008cd788387d8b5acc4d33154000 /network | |
parent | fc191be1958b3d290e061b6af6f0f25ce27fcf1f (diff) |
Add HAL device for testing
Diffstat (limited to 'network')
-rw-r--r-- | network/hal.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/network/hal.c b/network/hal.c index 658e5f8c..a99dcd9e 100644 --- a/network/hal.c +++ b/network/hal.c @@ -25,6 +25,7 @@ #include <config.h> #endif +#include <stdio.h> #include <errno.h> #include <dbus/dbus.h> @@ -39,6 +40,8 @@ static LibHalContext *hal_ctx = NULL; int hal_init(DBusConnection *conn) { + char str[64], *udi; + hal_ctx = libhal_ctx_new(); if (!hal_ctx) return -ENOMEM; @@ -59,6 +62,14 @@ int hal_init(DBusConnection *conn) return -EIO; } + udi = libhal_new_device(hal_ctx, NULL); + + sprintf(str, "/org/freedesktop/Hal/devices/bluetooth_pan"); + + if (libhal_device_commit_to_gdl(hal_ctx, udi, str, NULL) == FALSE) { + error("Failed to add new HAL device"); + } + return 0; } |