summaryrefslogtreecommitdiff
path: root/src/libudev/libudev-monitor.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-05-15 22:57:58 +0200
committerKay Sievers <kay@vrfy.org>2012-05-15 23:06:26 +0200
commit20bbd54f603994a3cc211d2795de16550882ed8d (patch)
treede65aaa655d6c3d50d52c7c5db8607fc83a550a8 /src/libudev/libudev-monitor.c
parent6e92b23f0d6dd398848376bbaf47e54a90ed3389 (diff)
udev: libudev - bump soname, remove deprecated functions, introduce symbol versions
Diffstat (limited to 'src/libudev/libudev-monitor.c')
-rw-r--r--src/libudev/libudev-monitor.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c
index 5f448e6d47..96506fe580 100644
--- a/src/libudev/libudev-monitor.c
+++ b/src/libudev/libudev-monitor.c
@@ -97,23 +97,6 @@ static struct udev_monitor *udev_monitor_new(struct udev *udev)
return udev_monitor;
}
-/**
- * udev_monitor_new_from_socket:
- * @udev: udev library context
- * @socket_path: unix socket path
- *
- * This function is removed from libudev and will not do anything.
- *
- * Returns: #NULL
- **/
-struct udev_monitor *udev_monitor_new_from_socket(struct udev *udev, const char *socket_path);
-_public_ struct udev_monitor *udev_monitor_new_from_socket(struct udev *udev, const char *socket_path)
-{
- udev_err(udev, "udev_monitor_new_from_socket() does not do anything; please migrate to netlink\n");
- errno = ENOSYS;
- return NULL;
-}
-
struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const char *name, int fd)
{
struct udev_monitor *udev_monitor;
@@ -418,18 +401,19 @@ _public_ struct udev_monitor *udev_monitor_ref(struct udev_monitor *udev_monitor
* will be released.
*
**/
-_public_ void udev_monitor_unref(struct udev_monitor *udev_monitor)
+_public_ struct udev_monitor *udev_monitor_unref(struct udev_monitor *udev_monitor)
{
if (udev_monitor == NULL)
- return;
+ return NULL;
udev_monitor->refcount--;
if (udev_monitor->refcount > 0)
- return;
+ return udev_monitor;
if (udev_monitor->sock >= 0)
close(udev_monitor->sock);
udev_list_cleanup(&udev_monitor->filter_subsystem_list);
udev_list_cleanup(&udev_monitor->filter_tag_list);
free(udev_monitor);
+ return NULL;
}
/**