diff options
author | Ilija Hadzic <ihadzic@research.bell-labs.com> | 2012-12-07 21:49:42 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-07 20:38:54 (GMT) |
commit | 328f7f8a0a1cdb25c91109dd9db32efc1c1ae74d (patch) | |
tree | e86c9baee9b1ea981536a62e1f6e2450e4b56852 /scripts | |
parent | 0d0651d492c5453f5066268fd8e37330f69e3de0 (diff) | |
download | linux-fsl-qoriq-328f7f8a0a1cdb25c91109dd9db32efc1c1ae74d.tar.xz |
staging: usbip: userspace: eliminate glib dependency
USBIP daemon relies on functions available in glib2 library
to spawn handler code for incoming connection. This makes the
whole program dependent on glib2 library, which is a GNOME library
that on systems that don't have GNOME results in pulling more
dependency, only to be able to run a relatively trivial
socket-based program.
While this may not seem to be a problem on full-blown desktops
that already have the necessary libraries, it is a big issue
on small embedded systems (think USB hub with an Ethernet port)
that only have bare essentials in their file systems.
This patch eliminates glib2 dependency by reworking the
code to use lower level system calls to dispatch connection
handler. Instead of using glib2-style event loop and dispatching
mechanism, just do a ppoll(2) system call in our own loop and call
accept(2) followed by fork(2) on the socket that has incoming
connection. Stevens' books taught us that more than twenty
years ago. No need for anything smarter in a simple server, such
as usbipd.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions