]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging: usbip: userspace: eliminate glib dependency
authorIlija Hadzic <ihadzic@research.bell-labs.com>
Fri, 7 Dec 2012 21:49:42 +0000 (16:49 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jan 2013 20:38:54 +0000 (12:38 -0800)
commit328f7f8a0a1cdb25c91109dd9db32efc1c1ae74d
treee86c9baee9b1ea981536a62e1f6e2450e4b56852
parent0d0651d492c5453f5066268fd8e37330f69e3de0
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>
drivers/staging/usbip/userspace/README
drivers/staging/usbip/userspace/configure.ac
drivers/staging/usbip/userspace/src/Makefile.am
drivers/staging/usbip/userspace/src/usbipd.c