*
* Returns: the kernel event sequence number, or 0 if there is no sequence number available.
**/
-UDEV_EXPORT unsigned long long int udev_device_get_seqnum(struct udev_device *udev_device)
+_public_ unsigned long long int udev_device_get_seqnum(struct udev_device *udev_device)
{
if (udev_device == NULL)
return 0;
*
* Returns: the device major/minor number.
**/
-UDEV_EXPORT dev_t udev_device_get_devnum(struct udev_device *udev_device)
+_public_ dev_t udev_device_get_devnum(struct udev_device *udev_device)
{
if (udev_device == NULL)
return makedev(0, 0);
*
* Returns: the driver string, or #NULL if there is no driver attached.
**/
-UDEV_EXPORT const char *udev_device_get_driver(struct udev_device *udev_device)
+_public_ const char *udev_device_get_driver(struct udev_device *udev_device)
{
char driver[UTIL_NAME_SIZE];
*
* Returns: the devtype name of the udev device, or #NULL if it can not be determined
**/
-UDEV_EXPORT const char *udev_device_get_devtype(struct udev_device *udev_device)
+_public_ const char *udev_device_get_devtype(struct udev_device *udev_device)
{
if (udev_device == NULL)
return NULL;
*
* Returns: the subsystem name of the udev device, or #NULL if it can not be determined
**/
-UDEV_EXPORT const char *udev_device_get_subsystem(struct udev_device *udev_device)
+_public_ const char *udev_device_get_subsystem(struct udev_device *udev_device)
{
char subsystem[UTIL_NAME_SIZE];
*
* Returns: the value of a device property, or #NULL if there is no such property.
**/
-UDEV_EXPORT const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key)
+_public_ const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key)
{
struct udev_list_entry *list_entry;
*
* Returns: a new udev device, or #NULL, if it does not exist
**/
-UDEV_EXPORT struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char *syspath)
+_public_ struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char *syspath)
{
size_t len;
const char *subdir;
*
* Returns: a new udev device, or #NULL, if it does not exist
**/
-UDEV_EXPORT struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum)
+_public_ struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum)
{
char path[UTIL_PATH_SIZE];
const char *type_str;
*
* Returns: a new udev device, or #NULL, if it does not exist
**/
-UDEV_EXPORT struct udev_device *udev_device_new_from_subsystem_sysname(struct udev *udev, const char *subsystem, const char *sysname)
+_public_ struct udev_device *udev_device_new_from_subsystem_sysname(struct udev *udev, const char *subsystem, const char *sysname)
{
char path_full[UTIL_PATH_SIZE];
char *path;
*
* Returns: a new udev device, or #NULL, if it does not exist
**/
-UDEV_EXPORT struct udev_device *udev_device_new_from_environment(struct udev *udev)
+_public_ struct udev_device *udev_device_new_from_environment(struct udev *udev)
{
int i;
struct udev_device *udev_device;
*
* Returns: a new udev device, or #NULL, if it no parent exist.
**/
-UDEV_EXPORT struct udev_device *udev_device_get_parent(struct udev_device *udev_device)
+_public_ struct udev_device *udev_device_get_parent(struct udev_device *udev_device)
{
if (udev_device == NULL)
return NULL;
*
* Returns: a new udev device, or #NULL if no matching parent exists.
**/
-UDEV_EXPORT struct udev_device *udev_device_get_parent_with_subsystem_devtype(struct udev_device *udev_device, const char *subsystem, const char *devtype)
+_public_ struct udev_device *udev_device_get_parent_with_subsystem_devtype(struct udev_device *udev_device, const char *subsystem, const char *devtype)
{
struct udev_device *parent;
*
* Returns: the udev library context
**/
-UDEV_EXPORT struct udev *udev_device_get_udev(struct udev_device *udev_device)
+_public_ struct udev *udev_device_get_udev(struct udev_device *udev_device)
{
if (udev_device == NULL)
return NULL;
*
* Returns: the passed udev device
**/
-UDEV_EXPORT struct udev_device *udev_device_ref(struct udev_device *udev_device)
+_public_ struct udev_device *udev_device_ref(struct udev_device *udev_device)
{
if (udev_device == NULL)
return NULL;
* the resources of the device will be released.
*
**/
-UDEV_EXPORT void udev_device_unref(struct udev_device *udev_device)
+_public_ void udev_device_unref(struct udev_device *udev_device)
{
if (udev_device == NULL)
return;
*
* Returns: the devpath of the udev device
**/
-UDEV_EXPORT const char *udev_device_get_devpath(struct udev_device *udev_device)
+_public_ const char *udev_device_get_devpath(struct udev_device *udev_device)
{
if (udev_device == NULL)
return NULL;
*
* Returns: the sys path of the udev device
**/
-UDEV_EXPORT const char *udev_device_get_syspath(struct udev_device *udev_device)
+_public_ const char *udev_device_get_syspath(struct udev_device *udev_device)
{
if (udev_device == NULL)
return NULL;
*
* Returns: the sys name of the device device
**/
-UDEV_EXPORT const char *udev_device_get_sysname(struct udev_device *udev_device)
+_public_ const char *udev_device_get_sysname(struct udev_device *udev_device)
{
if (udev_device == NULL)
return NULL;
*
* Returns: the trailing number of of the device name
**/
-UDEV_EXPORT const char *udev_device_get_sysnum(struct udev_device *udev_device)
+_public_ const char *udev_device_get_sysnum(struct udev_device *udev_device)
{
if (udev_device == NULL)
return NULL;
*
* Returns: the device node file name of the udev device, or #NULL if no device node exists
**/
-UDEV_EXPORT const char *udev_device_get_devnode(struct udev_device *udev_device)
+_public_ const char *udev_device_get_devnode(struct udev_device *udev_device)
{
if (udev_device == NULL)
return NULL;
*
* Returns: the first entry of the device node link list
**/
-UDEV_EXPORT struct udev_list_entry *udev_device_get_devlinks_list_entry(struct udev_device *udev_device)
+_public_ struct udev_list_entry *udev_device_get_devlinks_list_entry(struct udev_device *udev_device)
{
if (udev_device == NULL)
return NULL;
*
* Returns: the first entry of the property list
**/
-UDEV_EXPORT struct udev_list_entry *udev_device_get_properties_list_entry(struct udev_device *udev_device)
+_public_ struct udev_list_entry *udev_device_get_properties_list_entry(struct udev_device *udev_device)
{
if (udev_device == NULL)
return NULL;
*
* Returns: the kernel action value, or #NULL if there is no action value available.
**/
-UDEV_EXPORT const char *udev_device_get_action(struct udev_device *udev_device)
+_public_ const char *udev_device_get_action(struct udev_device *udev_device)
{
if (udev_device == NULL)
return NULL;
*
* Returns: the number of microseconds since the device was first seen.
**/
-UDEV_EXPORT unsigned long long int udev_device_get_usec_since_initialized(struct udev_device *udev_device)
+_public_ unsigned long long int udev_device_get_usec_since_initialized(struct udev_device *udev_device)
{
unsigned long long now;
*
* Returns: the content of a sys attribute file, or #NULL if there is no sys attribute value.
**/
-UDEV_EXPORT const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const char *sysattr)
+_public_ const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const char *sysattr)
{
struct udev_list_entry *list_entry;
char path[UTIL_PATH_SIZE];
*
* Returns: the first entry of the property list
**/
-UDEV_EXPORT struct udev_list_entry *udev_device_get_sysattr_list_entry(struct udev_device *udev_device)
+_public_ struct udev_list_entry *udev_device_get_sysattr_list_entry(struct udev_device *udev_device)
{
if (!udev_device->sysattr_list_read) {
int ret;
*
* Returns: 1 if the device is set up. 0 otherwise.
**/
-UDEV_EXPORT int udev_device_get_is_initialized(struct udev_device *udev_device)
+_public_ int udev_device_get_is_initialized(struct udev_device *udev_device)
{
if (!udev_device->info_loaded)
udev_device_read_db(udev_device, NULL);
*
* Returns: the first entry of the tag list
**/
-UDEV_EXPORT struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device)
+_public_ struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device)
{
if (udev_device == NULL)
return NULL;
return udev_list_get_entry(&udev_device->tags_list);
}
-UDEV_EXPORT int udev_device_has_tag(struct udev_device *udev_device, const char *tag)
+_public_ int udev_device_has_tag(struct udev_device *udev_device, const char *tag)
{
struct udev_list_entry *list_entry;
*
* Returns: an enumeration context
**/
-UDEV_EXPORT struct udev_enumerate *udev_enumerate_new(struct udev *udev)
+_public_ struct udev_enumerate *udev_enumerate_new(struct udev *udev)
{
struct udev_enumerate *udev_enumerate;
*
* Returns: the passed enumeration context
**/
-UDEV_EXPORT struct udev_enumerate *udev_enumerate_ref(struct udev_enumerate *udev_enumerate)
+_public_ struct udev_enumerate *udev_enumerate_ref(struct udev_enumerate *udev_enumerate)
{
if (udev_enumerate == NULL)
return NULL;
* Drop a reference of an enumeration context. If the refcount reaches zero,
* all resources of the enumeration context will be released.
**/
-UDEV_EXPORT void udev_enumerate_unref(struct udev_enumerate *udev_enumerate)
+_public_ void udev_enumerate_unref(struct udev_enumerate *udev_enumerate)
{
unsigned int i;
*
* Returns: the udev library context.
*/
-UDEV_EXPORT struct udev *udev_enumerate_get_udev(struct udev_enumerate *udev_enumerate)
+_public_ struct udev *udev_enumerate_get_udev(struct udev_enumerate *udev_enumerate)
{
if (udev_enumerate == NULL)
return NULL;
*
* Returns: the first entry of the sorted list of device paths.
*/
-UDEV_EXPORT struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *udev_enumerate)
+_public_ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *udev_enumerate)
{
if (udev_enumerate == NULL)
return NULL;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_enumerate_add_match_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem)
+_public_ int udev_enumerate_add_match_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem)
{
if (udev_enumerate == NULL)
return -EINVAL;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_enumerate_add_nomatch_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem)
+_public_ int udev_enumerate_add_nomatch_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem)
{
if (udev_enumerate == NULL)
return -EINVAL;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_enumerate_add_match_sysattr(struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value)
+_public_ int udev_enumerate_add_match_sysattr(struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value)
{
if (udev_enumerate == NULL)
return -EINVAL;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_enumerate_add_nomatch_sysattr(struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value)
+_public_ int udev_enumerate_add_nomatch_sysattr(struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value)
{
if (udev_enumerate == NULL)
return -EINVAL;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_enumerate_add_match_property(struct udev_enumerate *udev_enumerate, const char *property, const char *value)
+_public_ int udev_enumerate_add_match_property(struct udev_enumerate *udev_enumerate, const char *property, const char *value)
{
if (udev_enumerate == NULL)
return -EINVAL;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_enumerate_add_match_tag(struct udev_enumerate *udev_enumerate, const char *tag)
+_public_ int udev_enumerate_add_match_tag(struct udev_enumerate *udev_enumerate, const char *tag)
{
if (udev_enumerate == NULL)
return -EINVAL;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_enumerate_add_match_parent(struct udev_enumerate *udev_enumerate, struct udev_device *parent)
+_public_ int udev_enumerate_add_match_parent(struct udev_enumerate *udev_enumerate, struct udev_device *parent)
{
if (udev_enumerate == NULL)
return -EINVAL;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_enumerate_add_match_is_initialized(struct udev_enumerate *udev_enumerate)
+_public_ int udev_enumerate_add_match_is_initialized(struct udev_enumerate *udev_enumerate)
{
if (udev_enumerate == NULL)
return -EINVAL;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_enumerate_add_match_sysname(struct udev_enumerate *udev_enumerate, const char *sysname)
+_public_ int udev_enumerate_add_match_sysname(struct udev_enumerate *udev_enumerate, const char *sysname)
{
if (udev_enumerate == NULL)
return -EINVAL;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_enumerate_add_syspath(struct udev_enumerate *udev_enumerate, const char *syspath)
+_public_ int udev_enumerate_add_syspath(struct udev_enumerate *udev_enumerate, const char *syspath)
{
struct udev_device *udev_device;
*
* Returns: 0 on success, otherwise a negative error value.
**/
-UDEV_EXPORT int udev_enumerate_scan_devices(struct udev_enumerate *udev_enumerate)
+_public_ int udev_enumerate_scan_devices(struct udev_enumerate *udev_enumerate)
{
if (udev_enumerate == NULL)
return -EINVAL;
*
* Returns: 0 on success, otherwise a negative error value.
**/
-UDEV_EXPORT int udev_enumerate_scan_subsystems(struct udev_enumerate *udev_enumerate)
+_public_ int udev_enumerate_scan_subsystems(struct udev_enumerate *udev_enumerate)
{
struct udev *udev = udev_enumerate_get_udev(udev_enumerate);
char base[UTIL_PATH_SIZE];
*
* Returns: the next entry from the list, #NULL is no more entries are found.
*/
-UDEV_EXPORT struct udev_list_entry *udev_list_entry_get_next(struct udev_list_entry *list_entry)
+_public_ struct udev_list_entry *udev_list_entry_get_next(struct udev_list_entry *list_entry)
{
struct udev_list_node *next;
*
* Returns: the entry where @name matched, #NULL if no matching entry is found.
*/
-UDEV_EXPORT struct udev_list_entry *udev_list_entry_get_by_name(struct udev_list_entry *list_entry, const char *name)
+_public_ struct udev_list_entry *udev_list_entry_get_by_name(struct udev_list_entry *list_entry, const char *name)
{
int i;
*
* Returns: the name string of this entry.
*/
-UDEV_EXPORT const char *udev_list_entry_get_name(struct udev_list_entry *list_entry)
+_public_ const char *udev_list_entry_get_name(struct udev_list_entry *list_entry)
{
if (list_entry == NULL)
return NULL;
*
* Returns: the value string of this entry.
*/
-UDEV_EXPORT const char *udev_list_entry_get_value(struct udev_list_entry *list_entry)
+_public_ const char *udev_list_entry_get_value(struct udev_list_entry *list_entry)
{
if (list_entry == NULL)
return NULL;
*
* Returns: a new udev monitor, or #NULL, in case of an error
**/
-UDEV_EXPORT 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)
{
struct udev_monitor *udev_monitor;
struct stat statbuf;
*
* Returns: a new udev monitor, or #NULL, in case of an error
**/
-UDEV_EXPORT struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev, const char *name)
+_public_ struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev, const char *name)
{
return udev_monitor_new_from_netlink_fd(udev, name, -1);
}
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_monitor_filter_update(struct udev_monitor *udev_monitor)
+_public_ int udev_monitor_filter_update(struct udev_monitor *udev_monitor)
{
struct sock_filter ins[512];
struct sock_fprog filter;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor)
+_public_ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor)
{
int err = 0;
const int on = 1;
*
* Returns: 0 on success, otherwise -1 on error.
*/
-UDEV_EXPORT int udev_monitor_set_receive_buffer_size(struct udev_monitor *udev_monitor, int size)
+_public_ int udev_monitor_set_receive_buffer_size(struct udev_monitor *udev_monitor, int size)
{
if (udev_monitor == NULL)
return -1;
*
* Returns: the passed udev monitor
**/
-UDEV_EXPORT struct udev_monitor *udev_monitor_ref(struct udev_monitor *udev_monitor)
+_public_ struct udev_monitor *udev_monitor_ref(struct udev_monitor *udev_monitor)
{
if (udev_monitor == NULL)
return NULL;
* will be released.
*
**/
-UDEV_EXPORT void udev_monitor_unref(struct udev_monitor *udev_monitor)
+_public_ void udev_monitor_unref(struct udev_monitor *udev_monitor)
{
if (udev_monitor == NULL)
return;
*
* Returns: the udev library context
**/
-UDEV_EXPORT struct udev *udev_monitor_get_udev(struct udev_monitor *udev_monitor)
+_public_ struct udev *udev_monitor_get_udev(struct udev_monitor *udev_monitor)
{
if (udev_monitor == NULL)
return NULL;
*
* Returns: the socket file descriptor
**/
-UDEV_EXPORT int udev_monitor_get_fd(struct udev_monitor *udev_monitor)
+_public_ int udev_monitor_get_fd(struct udev_monitor *udev_monitor)
{
if (udev_monitor == NULL)
return -1;
*
* Returns: a new udev device, or #NULL, in case of an error
**/
-UDEV_EXPORT struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monitor)
+_public_ struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monitor)
{
struct udev_device *udev_device;
struct msghdr smsg;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_monitor, const char *subsystem, const char *devtype)
+_public_ int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_monitor, const char *subsystem, const char *devtype)
{
if (udev_monitor == NULL)
return -EINVAL;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_monitor_filter_add_match_tag(struct udev_monitor *udev_monitor, const char *tag)
+_public_ int udev_monitor_filter_add_match_tag(struct udev_monitor *udev_monitor, const char *tag)
{
if (udev_monitor == NULL)
return -EINVAL;
*
* Returns: 0 on success, otherwise a negative error value.
*/
-UDEV_EXPORT int udev_monitor_filter_remove(struct udev_monitor *udev_monitor)
+_public_ int udev_monitor_filter_remove(struct udev_monitor *udev_monitor)
{
static struct sock_fprog filter = { 0, NULL };
#include <signal.h>
#include <stdint.h>
#include <stdbool.h>
+#include "macro.h"
#include "libudev.h"
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define info(udev, arg...) udev_log_cond(udev, LOG_INFO, ## arg)
#define err(udev, arg...) udev_log_cond(udev, LOG_ERR, ## arg)
-#define UDEV_EXPORT __attribute__ ((visibility("default")))
-
static inline void udev_log_init(const char *program_name)
{
openlog(program_name, LOG_PID | LOG_CONS, LOG_DAEMON);
*
* Returns: the udev queue context, or #NULL on error.
**/
-UDEV_EXPORT struct udev_queue *udev_queue_new(struct udev *udev)
+_public_ struct udev_queue *udev_queue_new(struct udev *udev)
{
struct udev_queue *udev_queue;
*
* Returns: the same udev queue context.
**/
-UDEV_EXPORT struct udev_queue *udev_queue_ref(struct udev_queue *udev_queue)
+_public_ struct udev_queue *udev_queue_ref(struct udev_queue *udev_queue)
{
if (udev_queue == NULL)
return NULL;
* Drop a reference of a udev queue context. If the refcount reaches zero,
* the resources of the queue context will be released.
**/
-UDEV_EXPORT void udev_queue_unref(struct udev_queue *udev_queue)
+_public_ void udev_queue_unref(struct udev_queue *udev_queue)
{
if (udev_queue == NULL)
return;
*
* Returns: the udev library context.
**/
-UDEV_EXPORT struct udev *udev_queue_get_udev(struct udev_queue *udev_queue)
+_public_ struct udev *udev_queue_get_udev(struct udev_queue *udev_queue)
{
if (udev_queue == NULL)
return NULL;
*
* Returns: the current kernel event sequence number.
**/
-UDEV_EXPORT unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue)
+_public_ unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue)
{
unsigned long long int seqnum;
*
* Returns: the last known udev event sequence number.
**/
-UDEV_EXPORT unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue)
+_public_ unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue)
{
unsigned long long int seqnum_udev;
FILE *queue_file;
*
* Returns: a flag indicating if udev is active.
**/
-UDEV_EXPORT int udev_queue_get_udev_is_active(struct udev_queue *udev_queue)
+_public_ int udev_queue_get_udev_is_active(struct udev_queue *udev_queue)
{
unsigned long long int seqnum_start;
FILE *queue_file;
*
* Returns: a flag indicating if udev is currently handling events.
**/
-UDEV_EXPORT int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue)
+_public_ int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue)
{
unsigned long long int seqnum_kernel;
unsigned long long int seqnum_udev = 0;
*
* Returns: a flag indicating if any of the sequence numbers in the given range is currently active.
**/
-UDEV_EXPORT int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue,
+_public_ int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue,
unsigned long long int start, unsigned long long int end)
{
unsigned long long int seqnum;
*
* Returns: a flag indicating if the given sequence number is currently active.
**/
-UDEV_EXPORT int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum)
+_public_ int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum)
{
if (!udev_queue_get_seqnum_sequence_is_finished(udev_queue, seqnum, seqnum))
return 0;
*
* Returns: the first entry of the list of queued events.
**/
-UDEV_EXPORT struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue)
+_public_ struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue)
{
unsigned long long int seqnum;
FILE *queue_file;
}
struct udev_list_entry *udev_queue_get_failed_list_entry(struct udev_queue *udev_queue);
-UDEV_EXPORT 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)
{
errno = ENOSYS;
return NULL;
*
* Returns: 0 if the entire string was copied, non-zero otherwise.
**/
-UDEV_EXPORT int udev_util_encode_string(const char *str, char *str_enc, size_t len)
+_public_ int udev_util_encode_string(const char *str, char *str_enc, size_t len)
{
size_t i, j;
*
* Returns: stored userdata
**/
-UDEV_EXPORT void *udev_get_userdata(struct udev *udev)
+_public_ void *udev_get_userdata(struct udev *udev)
{
if (udev == NULL)
return NULL;
*
* Store custom @userdata in the library context.
**/
-UDEV_EXPORT void udev_set_userdata(struct udev *udev, void *userdata)
+_public_ void udev_set_userdata(struct udev *udev, void *userdata)
{
if (udev == NULL)
return;
*
* Returns: a new udev library context
**/
-UDEV_EXPORT struct udev *udev_new(void)
+_public_ struct udev *udev_new(void)
{
struct udev *udev;
const char *env;
*
* Returns: the passed udev library context
**/
-UDEV_EXPORT struct udev *udev_ref(struct udev *udev)
+_public_ struct udev *udev_ref(struct udev *udev)
{
if (udev == NULL)
return NULL;
* reaches zero, the resources of the context will be released.
*
**/
-UDEV_EXPORT void udev_unref(struct udev *udev)
+_public_ void udev_unref(struct udev *udev)
{
if (udev == NULL)
return;
* into the users' logging functionality.
*
**/
-UDEV_EXPORT void udev_set_log_fn(struct udev *udev,
+_public_ void udev_set_log_fn(struct udev *udev,
void (*log_fn)(struct udev *udev,
int priority, const char *file, int line, const char *fn,
const char *format, va_list args))
*
* Returns: the current logging priority
**/
-UDEV_EXPORT int udev_get_log_priority(struct udev *udev)
+_public_ int udev_get_log_priority(struct udev *udev)
{
return udev->log_priority;
}
* Set the current logging priority. The value controls which messages
* are logged.
**/
-UDEV_EXPORT void udev_set_log_priority(struct udev *udev, int priority)
+_public_ void udev_set_log_priority(struct udev *udev, int priority)
{
char num[32];
*
* Returns: the sys mount point
**/
-UDEV_EXPORT const char *udev_get_sys_path(struct udev *udev)
+_public_ const char *udev_get_sys_path(struct udev *udev)
{
if (udev == NULL)
return NULL;
*
* Returns: the device directory path
**/
-UDEV_EXPORT const char *udev_get_dev_path(struct udev *udev)
+_public_ const char *udev_get_dev_path(struct udev *udev)
{
if (udev == NULL)
return NULL;
*
* Returns: the runtime directory path
**/
-UDEV_EXPORT const char *udev_get_run_path(struct udev *udev)
+_public_ const char *udev_get_run_path(struct udev *udev)
{
if (udev == NULL)
return NULL;