summaryrefslogtreecommitdiffstats
path: root/common/dbus.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-05-08 18:47:21 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-05-08 18:47:21 +0000
commit4d39e4d2ea552e2d4ad36c085700f513e10be7e0 (patch)
tree49f9b22a972b09445eec7581b2d460bd0ee6189c /common/dbus.c
parentb5514e6c7f0258da455bbde02482fbcdb29d4442 (diff)
Move set_nonblocking() to the GLib helpers for now
Diffstat (limited to 'common/dbus.c')
-rw-r--r--common/dbus.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/common/dbus.c b/common/dbus.c
index ccf7c46c..15716d7f 100644
--- a/common/dbus.c
+++ b/common/dbus.c
@@ -826,27 +826,3 @@ DBusConnection *dbus_bus_system_setup_with_main_loop(const char *name,
{
return init_dbus(name, disconnect_cb, user_data);
}
-
-int set_nonblocking(int fd)
-{
- long arg;
-
- arg = fcntl(fd, F_GETFL);
- if (arg < 0) {
- error("fcntl(F_GETFL): %s (%d)", strerror(errno), errno);
- return -errno;
- }
-
- /* Return if already nonblocking */
- if (arg & O_NONBLOCK)
- return 0;
-
- arg |= O_NONBLOCK;
- if (fcntl(fd, F_SETFL, arg) < 0) {
- error("fcntl(F_SETFL, O_NONBLOCK): %s (%d)",
- strerror(errno), errno);
- return -errno;
- }
-
- return 0;
-}