From 4d39e4d2ea552e2d4ad36c085700f513e10be7e0 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 8 May 2008 18:47:21 +0000 Subject: Move set_nonblocking() to the GLib helpers for now --- common/dbus.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'common/dbus.c') 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; -} -- cgit