SUBDIRS = . po
-LIBUDEV_CURRENT=13
-LIBUDEV_REVISION=3
-LIBUDEV_AGE=13
+LIBUDEV_CURRENT=1
+LIBUDEV_REVISION=0
+LIBUDEV_AGE=0
LIBGUDEV_CURRENT=1
LIBGUDEV_REVISION=1
libudev_la_LDFLAGS = \
$(AM_LDFLAGS) \
- -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE)
+ -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
+ -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
libudev_la_LIBADD = \
libsystemd-shared.la
src/libudev/libudev.pc
EXTRA_DIST += \
- src/libudev/libudev.pc.in
+ src/libudev/libudev.pc.in \
+ src/libudev/libudev.sym
CLEANFILES += \
src/libudev/libudev.pc
* udev: add trigger --subsystem-match=usb/usb_device device
-* udev: libudev.so.1
- - use symbol versioning
- - always return object with *_unref()
- - remove deprecated symbols
- - udev_monitor_from_socket()
- - udev_queue_get_failed_list_entry()
- - udev_get_{dev,sys,run}_path()
-
* allow configuration of console width/height in vconsole.conf
* fstab should take priority over units in /usr
udev_set_log_priority
udev_get_userdata
udev_set_userdata
-udev_get_sys_path
-udev_get_dev_path
-udev_get_run_path
</SECTION>
<SECTION>
* the resources of the device will be released.
*
**/
-_public_ void udev_device_unref(struct udev_device *udev_device)
+_public_ struct udev_device *udev_device_unref(struct udev_device *udev_device)
{
if (udev_device == NULL)
- return;
+ return NULL;
udev_device->refcount--;
if (udev_device->refcount > 0)
- return;
+ return udev_device;
if (udev_device->parent_device != NULL)
udev_device_unref(udev_device->parent_device);
free(udev_device->syspath);
free(udev_device->envp);
free(udev_device->monitor_buf);
free(udev_device);
+ return NULL;
}
/**
* Drop a reference of an enumeration context. If the refcount reaches zero,
* all resources of the enumeration context will be released.
**/
-_public_ void udev_enumerate_unref(struct udev_enumerate *udev_enumerate)
+_public_ struct udev_enumerate *udev_enumerate_unref(struct udev_enumerate *udev_enumerate)
{
unsigned int i;
if (udev_enumerate == NULL)
- return;
+ return NULL;
udev_enumerate->refcount--;
if (udev_enumerate->refcount > 0)
- return;
+ return udev_enumerate;
udev_list_cleanup(&udev_enumerate->sysattr_match_list);
udev_list_cleanup(&udev_enumerate->sysattr_nomatch_list);
udev_list_cleanup(&udev_enumerate->subsystem_match_list);
free(udev_enumerate->devices[i].syspath);
free(udev_enumerate->devices);
free(udev_enumerate);
+ return NULL;
}
/**
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;
* 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;
}
/**
* Drop a reference of a udev queue context. If the refcount reaches zero,
* the resources of the queue context will be released.
**/
-_public_ void udev_queue_unref(struct udev_queue *udev_queue)
+_public_ struct udev_queue *udev_queue_unref(struct udev_queue *udev_queue)
{
if (udev_queue == NULL)
- return;
+ return NULL;
udev_queue->refcount--;
if (udev_queue->refcount > 0)
- return;
+ return udev_queue;
udev_list_cleanup(&udev_queue->queue_list);
free(udev_queue);
+ return NULL;
}
/**
return udev_list_get_entry(&udev_queue->queue_list);
}
-
-struct udev_list_entry *udev_queue_get_failed_list_entry(struct udev_queue *udev_queue);
-_public_ struct udev_list_entry *udev_queue_get_failed_list_entry(struct udev_queue *udev_queue)
-{
- udev_err(udev_queue->udev, "udev_queue_get_failed_list_entry() does not return anything; failed events are not recorded\n");
- errno = ENOSYS;
- return NULL;
-}
* reaches zero, the resources of the context will be released.
*
**/
-_public_ void udev_unref(struct udev *udev)
+_public_ struct udev *udev_unref(struct udev *udev)
{
if (udev == NULL)
- return;
+ return NULL;
udev->refcount--;
if (udev->refcount > 0)
- return;
+ return udev;
udev_list_cleanup(&udev->properties_list);
free(udev);
+ return NULL;
}
/**
udev_add_property(udev, "UDEV_LOG", num);
}
-/**
- * udev_get_sys_path:
- * @udev: udev library context
- *
- * Returns always "/sys"; deprecated, will be removed in a future version.
- *
- * Returns: the sys mount point
- **/
-_public_ const char *udev_get_sys_path(struct udev *udev)
-{
- if (udev == NULL)
- return NULL;
- return "/sys";
-}
-
-/**
- * udev_get_dev_path:
- * @udev: udev library context
- *
- * Returns always "/dev"; deprecated, will be removed in a future version.
- *
- * Returns: the device directory path
- **/
-_public_ const char *udev_get_dev_path(struct udev *udev)
-{
- if (udev == NULL)
- return NULL;
- return "/dev";
-}
-
-/**
- * udev_get_run_path:
- * @udev: udev library context
- *
- * Returns always "/run/udev"; deprecated, will be removed in a future version.
- *
- * Returns: the runtime directory path
- **/
-_public_ const char *udev_get_run_path(struct udev *udev)
-{
- if (udev == NULL)
- return NULL;
- return "/run/udev";
-}
-
struct udev_list_entry *udev_add_property(struct udev *udev, const char *key, const char *value)
{
if (value == NULL) {
*/
struct udev;
struct udev *udev_ref(struct udev *udev);
-void udev_unref(struct udev *udev);
+struct udev *udev_unref(struct udev *udev);
struct udev *udev_new(void);
void udev_set_log_fn(struct udev *udev,
void (*log_fn)(struct udev *udev,
const char *format, va_list args));
int udev_get_log_priority(struct udev *udev);
void udev_set_log_priority(struct udev *udev, int priority);
-const char *udev_get_sys_path(struct udev *udev);
-const char *udev_get_dev_path(struct udev *udev);
-const char *udev_get_run_path(struct udev *udev);
void *udev_get_userdata(struct udev *udev);
void udev_set_userdata(struct udev *udev, void *userdata);
*/
struct udev_device;
struct udev_device *udev_device_ref(struct udev_device *udev_device);
-void udev_device_unref(struct udev_device *udev_device);
+struct udev_device *udev_device_unref(struct udev_device *udev_device);
struct udev *udev_device_get_udev(struct udev_device *udev_device);
struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char *syspath);
struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum);
*/
struct udev_monitor;
struct udev_monitor *udev_monitor_ref(struct udev_monitor *udev_monitor);
-void udev_monitor_unref(struct udev_monitor *udev_monitor);
+struct udev_monitor *udev_monitor_unref(struct udev_monitor *udev_monitor);
struct udev *udev_monitor_get_udev(struct udev_monitor *udev_monitor);
/* kernel and udev generated events over netlink */
struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev, const char *name);
*/
struct udev_enumerate;
struct udev_enumerate *udev_enumerate_ref(struct udev_enumerate *udev_enumerate);
-void udev_enumerate_unref(struct udev_enumerate *udev_enumerate);
+struct udev_enumerate *udev_enumerate_unref(struct udev_enumerate *udev_enumerate);
struct udev *udev_enumerate_get_udev(struct udev_enumerate *udev_enumerate);
struct udev_enumerate *udev_enumerate_new(struct udev *udev);
/* device properties filter */
*/
struct udev_queue;
struct udev_queue *udev_queue_ref(struct udev_queue *udev_queue);
-void udev_queue_unref(struct udev_queue *udev_queue);
+struct udev_queue *udev_queue_unref(struct udev_queue *udev_queue);
struct udev *udev_queue_get_udev(struct udev_queue *udev_queue);
struct udev_queue *udev_queue_new(struct udev *udev);
unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue);
--- /dev/null
+/***
+ This file is part of systemd.
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+***/
+
+LIBUDEV_183 {
+global:
+ udev_device_get_action;
+ udev_device_get_devlinks_list_entry;
+ udev_device_get_devnode;
+ udev_device_get_devnum;
+ udev_device_get_devpath;
+ udev_device_get_devtype;
+ udev_device_get_driver;
+ udev_device_get_is_initialized;
+ udev_device_get_parent;
+ udev_device_get_parent_with_subsystem_devtype;
+ udev_device_get_properties_list_entry;
+ udev_device_get_property_value;
+ udev_device_get_seqnum;
+ udev_device_get_subsystem;
+ udev_device_get_sysattr_list_entry;
+ udev_device_get_sysattr_value;
+ udev_device_get_sysname;
+ udev_device_get_sysnum;
+ udev_device_get_syspath;
+ udev_device_get_tags_list_entry;
+ udev_device_get_udev;
+ udev_device_get_usec_since_initialized;
+ udev_device_has_tag;
+ udev_device_new_from_devnum;
+ udev_device_new_from_environment;
+ udev_device_new_from_subsystem_sysname;
+ udev_device_new_from_syspath;
+ udev_device_ref;
+ udev_device_unref;
+ udev_enumerate_add_match_is_initialized;
+ udev_enumerate_add_match_parent;
+ udev_enumerate_add_match_property;
+ udev_enumerate_add_match_subsystem;
+ udev_enumerate_add_match_sysattr;
+ udev_enumerate_add_match_sysname;
+ udev_enumerate_add_match_tag;
+ udev_enumerate_add_nomatch_subsystem;
+ udev_enumerate_add_nomatch_sysattr;
+ udev_enumerate_add_syspath;
+ udev_enumerate_get_list_entry;
+ udev_enumerate_get_udev;
+ udev_enumerate_new;
+ udev_enumerate_ref;
+ udev_enumerate_scan_devices;
+ udev_enumerate_scan_subsystems;
+ udev_enumerate_unref;
+ udev_get_log_priority;
+ udev_get_userdata;
+ udev_list_entry_get_by_name;
+ udev_list_entry_get_name;
+ udev_list_entry_get_next;
+ udev_list_entry_get_value;
+ udev_monitor_enable_receiving;
+ udev_monitor_filter_add_match_subsystem_devtype;
+ udev_monitor_filter_add_match_tag;
+ udev_monitor_filter_remove;
+ udev_monitor_filter_update;
+ udev_monitor_get_fd;
+ udev_monitor_get_udev;
+ udev_monitor_new_from_netlink;
+ udev_monitor_new_from_socket;
+ udev_monitor_receive_device;
+ udev_monitor_ref;
+ udev_monitor_set_receive_buffer_size;
+ udev_monitor_unref;
+ udev_new;
+ udev_queue_get_kernel_seqnum;
+ udev_queue_get_queue_is_empty;
+ udev_queue_get_queued_list_entry;
+ udev_queue_get_seqnum_is_finished;
+ udev_queue_get_seqnum_sequence_is_finished;
+ udev_queue_get_udev;
+ udev_queue_get_udev_is_active;
+ udev_queue_get_udev_seqnum;
+ udev_queue_new;
+ udev_queue_ref;
+ udev_queue_unref;
+ udev_ref;
+ udev_set_log_fn;
+ udev_set_log_priority;
+ udev_set_userdata;
+ udev_unref;
+ udev_util_encode_string;
+local:
+ *;
+};