diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2012-04-04 13:30:09 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2012-04-04 13:30:09 +0200 |
commit | 54cf0b7fa67702bb3236851f0096910b3759f1b0 (patch) | |
tree | 565c30e12d13d47f2d59f6c7d14a1a127b37d5f7 | |
parent | 51fc11c10d7f7f24cf795d751a99d37aadf4da72 (diff) |
udev: replace UDEV_EXPORT with _public_
-rw-r--r-- | src/udev/libudev-device.c | 58 | ||||
-rw-r--r-- | src/udev/libudev-enumerate.c | 34 | ||||
-rw-r--r-- | src/udev/libudev-list.c | 8 | ||||
-rw-r--r-- | src/udev/libudev-monitor.c | 26 | ||||
-rw-r--r-- | src/udev/libudev-private.h | 3 | ||||
-rw-r--r-- | src/udev/libudev-queue.c | 24 | ||||
-rw-r--r-- | src/udev/libudev-util.c | 2 | ||||
-rw-r--r-- | src/udev/libudev.c | 22 |
8 files changed, 88 insertions, 89 deletions
diff --git a/src/udev/libudev-device.c b/src/udev/libudev-device.c index 10f28b8cd5..98bfa903d3 100644 --- a/src/udev/libudev-device.c +++ b/src/udev/libudev-device.c @@ -98,7 +98,7 @@ struct udev_device { * * 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; @@ -138,7 +138,7 @@ static int udev_device_set_ifindex(struct udev_device *udev_device, int ifindex) * * 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); @@ -187,7 +187,7 @@ static int udev_device_set_devpath_old(struct udev_device *udev_device, const ch * * 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]; @@ -220,7 +220,7 @@ static int udev_device_set_driver(struct udev_device *udev_device, const char *d * * 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; @@ -262,7 +262,7 @@ static int udev_device_set_subsystem(struct udev_device *udev_device, const char * * 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]; @@ -442,7 +442,7 @@ int udev_device_add_property_from_string_parse_finish(struct udev_device *udev_d * * 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; @@ -623,7 +623,7 @@ struct udev_device *udev_device_new(struct udev *udev) * * 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; @@ -699,7 +699,7 @@ UDEV_EXPORT struct udev_device *udev_device_new_from_syspath(struct udev *udev, * * 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; @@ -787,7 +787,7 @@ struct udev_device *udev_device_new_from_id_filename(struct udev *udev, char *id * * 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; @@ -871,7 +871,7 @@ found: * * 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; @@ -934,7 +934,7 @@ static struct udev_device *device_new_from_parent(struct udev_device *udev_devic * * 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; @@ -969,7 +969,7 @@ UDEV_EXPORT struct udev_device *udev_device_get_parent(struct udev_device *udev_ * * 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; @@ -1002,7 +1002,7 @@ UDEV_EXPORT struct udev_device *udev_device_get_parent_with_subsystem_devtype(st * * 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; @@ -1017,7 +1017,7 @@ UDEV_EXPORT struct udev *udev_device_get_udev(struct udev_device *udev_device) * * 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; @@ -1033,7 +1033,7 @@ UDEV_EXPORT struct udev_device *udev_device_ref(struct udev_device *udev_device) * 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; @@ -1071,7 +1071,7 @@ UDEV_EXPORT void udev_device_unref(struct udev_device *udev_device) * * 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; @@ -1087,7 +1087,7 @@ UDEV_EXPORT const char *udev_device_get_devpath(struct udev_device *udev_device) * * 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; @@ -1100,7 +1100,7 @@ UDEV_EXPORT const char *udev_device_get_syspath(struct udev_device *udev_device) * * 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; @@ -1113,7 +1113,7 @@ UDEV_EXPORT const char *udev_device_get_sysname(struct udev_device *udev_device) * * 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; @@ -1129,7 +1129,7 @@ UDEV_EXPORT const char *udev_device_get_sysnum(struct udev_device *udev_device) * * 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; @@ -1153,7 +1153,7 @@ UDEV_EXPORT const char *udev_device_get_devnode(struct udev_device *udev_device) * * 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; @@ -1180,7 +1180,7 @@ void udev_device_cleanup_devlinks_list(struct udev_device *udev_device) * * 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; @@ -1233,7 +1233,7 @@ UDEV_EXPORT struct udev_list_entry *udev_device_get_properties_list_entry(struct * * 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; @@ -1252,7 +1252,7 @@ UDEV_EXPORT const char *udev_device_get_action(struct udev_device *udev_device) * * 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; @@ -1292,7 +1292,7 @@ void udev_device_set_usec_initialized(struct udev_device *udev_device, unsigned * * 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]; @@ -1439,7 +1439,7 @@ static int udev_device_sysattr_list_read(struct udev_device *udev_device) * * 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; @@ -1564,7 +1564,7 @@ const char *udev_device_get_id_filename(struct udev_device *udev_device) * * 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); @@ -1603,7 +1603,7 @@ void udev_device_cleanup_tags_list(struct udev_device *udev_device) * * 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; @@ -1612,7 +1612,7 @@ UDEV_EXPORT struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_ 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; diff --git a/src/udev/libudev-enumerate.c b/src/udev/libudev-enumerate.c index 034d96feba..7f40367bf1 100644 --- a/src/udev/libudev-enumerate.c +++ b/src/udev/libudev-enumerate.c @@ -67,7 +67,7 @@ struct udev_enumerate { * * 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; @@ -95,7 +95,7 @@ UDEV_EXPORT struct udev_enumerate *udev_enumerate_new(struct udev *udev) * * 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; @@ -110,7 +110,7 @@ UDEV_EXPORT struct udev_enumerate *udev_enumerate_ref(struct udev_enumerate *ude * 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; @@ -140,7 +140,7 @@ UDEV_EXPORT void udev_enumerate_unref(struct udev_enumerate *udev_enumerate) * * 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; @@ -249,7 +249,7 @@ static size_t devices_delay_later(struct udev *udev, const char *syspath) * * 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; @@ -327,7 +327,7 @@ UDEV_EXPORT struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_en * * 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; @@ -345,7 +345,7 @@ UDEV_EXPORT int udev_enumerate_add_match_subsystem(struct udev_enumerate *udev_e * * 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; @@ -364,7 +364,7 @@ UDEV_EXPORT int udev_enumerate_add_nomatch_subsystem(struct udev_enumerate *udev * * 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; @@ -383,7 +383,7 @@ UDEV_EXPORT int udev_enumerate_add_match_sysattr(struct udev_enumerate *udev_enu * * 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; @@ -422,7 +422,7 @@ exit: * * 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; @@ -440,7 +440,7 @@ UDEV_EXPORT int udev_enumerate_add_match_property(struct udev_enumerate *udev_en * * 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; @@ -464,7 +464,7 @@ UDEV_EXPORT int udev_enumerate_add_match_tag(struct udev_enumerate *udev_enumera * * 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; @@ -494,7 +494,7 @@ UDEV_EXPORT int udev_enumerate_add_match_parent(struct udev_enumerate *udev_enum * * 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; @@ -509,7 +509,7 @@ UDEV_EXPORT int udev_enumerate_add_match_is_initialized(struct udev_enumerate *u * * 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; @@ -739,7 +739,7 @@ static int scan_dir(struct udev_enumerate *udev_enumerate, const char *basedir, * * 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; @@ -887,7 +887,7 @@ static int scan_devices_all(struct udev_enumerate *udev_enumerate) * * 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; @@ -910,7 +910,7 @@ UDEV_EXPORT int udev_enumerate_scan_devices(struct udev_enumerate *udev_enumerat * * 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]; diff --git a/src/udev/libudev-list.c b/src/udev/libudev-list.c index 4bdef35ae8..b5d6bfd213 100644 --- a/src/udev/libudev-list.c +++ b/src/udev/libudev-list.c @@ -267,7 +267,7 @@ struct udev_list_entry *udev_list_get_entry(struct udev_list *list) * * 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; @@ -287,7 +287,7 @@ UDEV_EXPORT struct udev_list_entry *udev_list_entry_get_next(struct udev_list_en * * 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; @@ -309,7 +309,7 @@ UDEV_EXPORT struct udev_list_entry *udev_list_entry_get_by_name(struct udev_list * * 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; @@ -322,7 +322,7 @@ UDEV_EXPORT const char *udev_list_entry_get_name(struct udev_list_entry *list_en * * 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; diff --git a/src/udev/libudev-monitor.c b/src/udev/libudev-monitor.c index 77dc55572f..d707b21aea 100644 --- a/src/udev/libudev-monitor.c +++ b/src/udev/libudev-monitor.c @@ -122,7 +122,7 @@ static struct udev_monitor *udev_monitor_new(struct udev *udev) * * 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; @@ -227,7 +227,7 @@ struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const c * * 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); } @@ -264,7 +264,7 @@ static inline void bpf_jmp(struct sock_filter *inss, unsigned int *i, * * 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; @@ -376,7 +376,7 @@ int udev_monitor_allow_unicast_sender(struct udev_monitor *udev_monitor, struct * * 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; @@ -433,7 +433,7 @@ UDEV_EXPORT int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor) * * 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; @@ -457,7 +457,7 @@ int udev_monitor_disconnect(struct udev_monitor *udev_monitor) * * 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; @@ -474,7 +474,7 @@ UDEV_EXPORT struct udev_monitor *udev_monitor_ref(struct udev_monitor *udev_moni * 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; @@ -497,7 +497,7 @@ UDEV_EXPORT void udev_monitor_unref(struct udev_monitor *udev_monitor) * * 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; @@ -512,7 +512,7 @@ UDEV_EXPORT struct udev *udev_monitor_get_udev(struct udev_monitor *udev_monitor * * 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; @@ -571,7 +571,7 @@ tag: * * 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; @@ -823,7 +823,7 @@ int udev_monitor_send_device(struct udev_monitor *udev_monitor, * * 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; @@ -846,7 +846,7 @@ UDEV_EXPORT int udev_monitor_filter_add_match_subsystem_devtype(struct udev_moni * * 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; @@ -865,7 +865,7 @@ UDEV_EXPORT int udev_monitor_filter_add_match_tag(struct udev_monitor *udev_moni * * 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 }; diff --git a/src/udev/libudev-private.h b/src/udev/libudev-private.h index 001c578540..df11e3743c 100644 --- a/src/udev/libudev-private.h +++ b/src/udev/libudev-private.h @@ -16,6 +16,7 @@ #include <signal.h> #include <stdint.h> #include <stdbool.h> +#include "macro.h" #include "libudev.h" #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) @@ -39,8 +40,6 @@ udev_log_null(struct udev *udev, const char *format, ...) {} #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); diff --git a/src/udev/libudev-queue.c b/src/udev/libudev-queue.c index 48184ddaa6..80a75a8fd7 100644 --- a/src/udev/libudev-queue.c +++ b/src/udev/libudev-queue.c @@ -54,7 +54,7 @@ struct udev_queue { * * 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; @@ -78,7 +78,7 @@ UDEV_EXPORT struct udev_queue *udev_queue_new(struct udev *udev) * * 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; @@ -93,7 +93,7 @@ UDEV_EXPORT struct udev_queue *udev_queue_ref(struct udev_queue *udev_queue) * 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; @@ -112,7 +112,7 @@ UDEV_EXPORT void udev_queue_unref(struct udev_queue *udev_queue) * * 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; @@ -146,7 +146,7 @@ unsigned long long int udev_get_kernel_seqnum(struct udev *udev) * * 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; @@ -231,7 +231,7 @@ static FILE *open_queue_file(struct udev_queue *udev_queue, unsigned long long i * * 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; @@ -263,7 +263,7 @@ UDEV_EXPORT unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue * * 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; @@ -282,7 +282,7 @@ UDEV_EXPORT int udev_queue_get_udev_is_active(struct udev_queue *udev_queue) * * 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; @@ -342,7 +342,7 @@ out: * * 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; @@ -404,7 +404,7 @@ UDEV_EXPORT int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *ud * * 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; @@ -419,7 +419,7 @@ UDEV_EXPORT int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, * * 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; @@ -467,7 +467,7 @@ UDEV_EXPORT struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev } 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; diff --git a/src/udev/libudev-util.c b/src/udev/libudev-util.c index 7e345f0fb6..387767145d 100644 --- a/src/udev/libudev-util.c +++ b/src/udev/libudev-util.c @@ -443,7 +443,7 @@ int util_replace_chars(char *str, const char *white) * * 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; diff --git a/src/udev/libudev.c b/src/udev/libudev.c index dcba15de41..c2c5cda7ac 100644 --- a/src/udev/libudev.c +++ b/src/udev/libudev.c @@ -79,7 +79,7 @@ static void log_stderr(struct udev *udev, * * 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; @@ -93,7 +93,7 @@ UDEV_EXPORT void *udev_get_userdata(struct udev *udev) * * 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; @@ -119,7 +119,7 @@ static char *set_value(char **s, const char *v) * * 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; @@ -296,7 +296,7 @@ err: * * 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; @@ -312,7 +312,7 @@ UDEV_EXPORT struct udev *udev_ref(struct udev *udev) * 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; @@ -340,7 +340,7 @@ UDEV_EXPORT void udev_unref(struct udev *udev) * 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)) @@ -358,7 +358,7 @@ UDEV_EXPORT void udev_set_log_fn(struct udev *udev, * * 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; } @@ -371,7 +371,7 @@ UDEV_EXPORT int udev_get_log_priority(struct udev *udev) * 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]; @@ -398,7 +398,7 @@ int udev_get_rules_path(struct udev *udev, char **path[], unsigned long long *st * * 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; @@ -415,7 +415,7 @@ UDEV_EXPORT const char *udev_get_sys_path(struct udev *udev) * * 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; @@ -430,7 +430,7 @@ UDEV_EXPORT const char *udev_get_dev_path(struct udev *udev) * * 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; |