Add safe_close() helper that makes close(2) a bit nicer to use. This also
introduces PROTECT_ERRNO, which makes sure a function does not clutter
errno if called.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This adds two new components:
1) ratbagd
The ratbagd daemon is a very basic dbus daemon that provides an
org.freedesktop.DBus.ObjectManager based enumeration and modification
API for libratbag devices. So far, all it does is enumerate input
devices on the bus. However, this will be extended to advertise full
libratbag hierarchies on the bus and allow clients to modify
properties via DBus.
So far, it is root-only, but the DBus policy can be losened and PolKit
support can be added.
2) ratbagctl
A very basic command-line tool to manage ratbagd. It's basically a
command-line interface for the DBus API of ratbagd.
So far, it has no hookup for anything. This will be added once ratbagd
gains further DBus APIs.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Initial commit for the ratbagd project, a dbus daemon to manage libratbag
devices and proxy user accesses.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>