chiark / gitweb /
drop "extern" keyword from non-static function
authorKay Sievers <kay.sievers@vrfy.org>
Sun, 26 Apr 2009 11:59:39 +0000 (13:59 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sun, 26 Apr 2009 11:59:39 +0000 (13:59 +0200)
udev/lib/libudev-list.c
udev/lib/libudev-private.h
udev/lib/libudev-queue.c
udev/lib/libudev.h
udev/udev-node.c
udev/udev-util.c
udev/udev.h

index 0c13b6d..182d75a 100644 (file)
@@ -220,14 +220,14 @@ const char *udev_list_entry_get_value(struct udev_list_entry *list_entry)
        return list_entry->value;
 }
 
-extern int udev_list_entry_get_flag(struct udev_list_entry *list_entry)
+int udev_list_entry_get_flag(struct udev_list_entry *list_entry)
 {
        if (list_entry == NULL)
                return -EINVAL;
        return list_entry->flag;
 }
 
-extern void udev_list_entry_set_flag(struct udev_list_entry *list_entry, int flag)
+void udev_list_entry_set_flag(struct udev_list_entry *list_entry, int flag)
 {
        if (list_entry == NULL)
                return;
index 0756efe..b283ff4 100644 (file)
@@ -39,92 +39,92 @@ void udev_log(struct udev *udev,
              int priority, const char *file, int line, const char *fn,
              const char *format, ...)
              __attribute__ ((format(printf, 6, 7)));
-extern struct udev_device *device_new(struct udev *udev);
-extern const char *udev_get_rules_path(struct udev *udev);
-extern int udev_get_run(struct udev *udev);
-extern struct udev_list_entry *udev_add_property(struct udev *udev, const char *key, const char *value);
-extern struct udev_list_entry *udev_get_properties_list_entry(struct udev *udev);
+struct udev_device *device_new(struct udev *udev);
+const char *udev_get_rules_path(struct udev *udev);
+int udev_get_run(struct udev *udev);
+struct udev_list_entry *udev_add_property(struct udev *udev, const char *key, const char *value);
+struct udev_list_entry *udev_get_properties_list_entry(struct udev *udev);
 
 /* libudev-device */
-extern int udev_device_set_syspath(struct udev_device *udev_device, const char *syspath);
-extern int udev_device_set_subsystem(struct udev_device *udev_device, const char *subsystem);
-extern int udev_device_set_devtype(struct udev_device *udev_device, const char *devtype);
-extern int udev_device_set_devnode(struct udev_device *udev_device, const char *devnode);
-extern int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink);
-extern void udev_device_cleanup_devlinks_list(struct udev_device *udev_device);
-extern struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value);
-extern struct udev_list_entry *udev_device_add_property_from_string(struct udev_device *udev_device, const char *property);
-extern char **udev_device_get_properties_envp(struct udev_device *udev_device);
-extern ssize_t udev_device_get_properties_monitor_buf(struct udev_device *udev_device, const char **buf);
-extern int udev_device_read_db(struct udev_device *udev_device);
-extern int udev_device_read_uevent_file(struct udev_device *udev_device);
-extern int udev_device_set_action(struct udev_device *udev_device, const char *action);
-extern int udev_device_set_driver(struct udev_device *udev_device, const char *driver);
-extern const char *udev_device_get_devpath_old(struct udev_device *udev_device);
-extern int udev_device_set_devpath_old(struct udev_device *udev_device, const char *devpath_old);
-extern const char *udev_device_get_physdevpath(struct udev_device *udev_device);
-extern int udev_device_set_physdevpath(struct udev_device *udev_device, const char *physdevpath);
-extern int udev_device_get_timeout(struct udev_device *udev_device);
-extern int udev_device_set_timeout(struct udev_device *udev_device, int timeout);
-extern int udev_device_get_event_timeout(struct udev_device *udev_device);
-extern int udev_device_set_event_timeout(struct udev_device *udev_device, int event_timeout);
-extern int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum);
-extern int udev_device_set_seqnum(struct udev_device *udev_device, unsigned long long int seqnum);
-extern int udev_device_get_num_fake_partitions(struct udev_device *udev_device);
-extern int udev_device_set_num_fake_partitions(struct udev_device *udev_device, int num);
-extern int udev_device_get_devlink_priority(struct udev_device *udev_device);
-extern int udev_device_set_devlink_priority(struct udev_device *udev_device, int prio);
-extern int udev_device_get_ignore_remove(struct udev_device *udev_device);
-extern int udev_device_set_ignore_remove(struct udev_device *udev_device, int ignore);
-extern int udev_device_get_watch_handle(struct udev_device *udev_device);
-extern int udev_device_set_watch_handle(struct udev_device *udev_device, int handle);
-extern void udev_device_set_info_loaded(struct udev_device *device);
+int udev_device_set_syspath(struct udev_device *udev_device, const char *syspath);
+int udev_device_set_subsystem(struct udev_device *udev_device, const char *subsystem);
+int udev_device_set_devtype(struct udev_device *udev_device, const char *devtype);
+int udev_device_set_devnode(struct udev_device *udev_device, const char *devnode);
+int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink);
+void udev_device_cleanup_devlinks_list(struct udev_device *udev_device);
+struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value);
+struct udev_list_entry *udev_device_add_property_from_string(struct udev_device *udev_device, const char *property);
+char **udev_device_get_properties_envp(struct udev_device *udev_device);
+ssize_t udev_device_get_properties_monitor_buf(struct udev_device *udev_device, const char **buf);
+int udev_device_read_db(struct udev_device *udev_device);
+int udev_device_read_uevent_file(struct udev_device *udev_device);
+int udev_device_set_action(struct udev_device *udev_device, const char *action);
+int udev_device_set_driver(struct udev_device *udev_device, const char *driver);
+const char *udev_device_get_devpath_old(struct udev_device *udev_device);
+int udev_device_set_devpath_old(struct udev_device *udev_device, const char *devpath_old);
+const char *udev_device_get_physdevpath(struct udev_device *udev_device);
+int udev_device_set_physdevpath(struct udev_device *udev_device, const char *physdevpath);
+int udev_device_get_timeout(struct udev_device *udev_device);
+int udev_device_set_timeout(struct udev_device *udev_device, int timeout);
+int udev_device_get_event_timeout(struct udev_device *udev_device);
+int udev_device_set_event_timeout(struct udev_device *udev_device, int event_timeout);
+int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum);
+int udev_device_set_seqnum(struct udev_device *udev_device, unsigned long long int seqnum);
+int udev_device_get_num_fake_partitions(struct udev_device *udev_device);
+int udev_device_set_num_fake_partitions(struct udev_device *udev_device, int num);
+int udev_device_get_devlink_priority(struct udev_device *udev_device);
+int udev_device_set_devlink_priority(struct udev_device *udev_device, int prio);
+int udev_device_get_ignore_remove(struct udev_device *udev_device);
+int udev_device_set_ignore_remove(struct udev_device *udev_device, int ignore);
+int udev_device_get_watch_handle(struct udev_device *udev_device);
+int udev_device_set_watch_handle(struct udev_device *udev_device, int handle);
+void udev_device_set_info_loaded(struct udev_device *device);
 
 /* libudev-device-db-write.c */
-extern int udev_device_update_db(struct udev_device *udev_device);
-extern int udev_device_delete_db(struct udev_device *udev_device);
-extern int udev_device_rename_db(struct udev_device *udev_device, const char *devpath);
+int udev_device_update_db(struct udev_device *udev_device);
+int udev_device_delete_db(struct udev_device *udev_device);
+int udev_device_rename_db(struct udev_device *udev_device, const char *devpath);
 
 /* libudev-monitor - netlink/unix socket communication  */
-extern int udev_monitor_send_device(struct udev_monitor *udev_monitor, struct udev_device *udev_device);
-extern int udev_monitor_set_receive_buffer_size(struct udev_monitor *udev_monitor, int size);
+int udev_monitor_send_device(struct udev_monitor *udev_monitor, struct udev_device *udev_device);
+int udev_monitor_set_receive_buffer_size(struct udev_monitor *udev_monitor, int size);
 
 /* libudev-ctrl - daemon runtime setup */
 struct udev_ctrl;
-extern struct udev_ctrl *udev_ctrl_new_from_socket(struct udev *udev, const char *socket_path);
-extern int udev_ctrl_enable_receiving(struct udev_ctrl *uctrl);
-extern struct udev_ctrl *udev_ctrl_ref(struct udev_ctrl *uctrl);
-extern void udev_ctrl_unref(struct udev_ctrl *uctrl);
-extern struct udev *udev_ctrl_get_udev(struct udev_ctrl *uctrl);
-extern int udev_ctrl_get_fd(struct udev_ctrl *uctrl);
-extern int udev_ctrl_send_set_log_level(struct udev_ctrl *uctrl, int priority);
-extern int udev_ctrl_send_stop_exec_queue(struct udev_ctrl *uctrl);
-extern int udev_ctrl_send_start_exec_queue(struct udev_ctrl *uctrl);
-extern int udev_ctrl_send_reload_rules(struct udev_ctrl *uctrl);
-extern int udev_ctrl_send_settle(struct udev_ctrl *uctrl);
-extern int udev_ctrl_send_set_env(struct udev_ctrl *uctrl, const char *key);
-extern int udev_ctrl_send_set_max_childs(struct udev_ctrl *uctrl, int count);
+struct udev_ctrl *udev_ctrl_new_from_socket(struct udev *udev, const char *socket_path);
+int udev_ctrl_enable_receiving(struct udev_ctrl *uctrl);
+struct udev_ctrl *udev_ctrl_ref(struct udev_ctrl *uctrl);
+void udev_ctrl_unref(struct udev_ctrl *uctrl);
+struct udev *udev_ctrl_get_udev(struct udev_ctrl *uctrl);
+int udev_ctrl_get_fd(struct udev_ctrl *uctrl);
+int udev_ctrl_send_set_log_level(struct udev_ctrl *uctrl, int priority);
+int udev_ctrl_send_stop_exec_queue(struct udev_ctrl *uctrl);
+int udev_ctrl_send_start_exec_queue(struct udev_ctrl *uctrl);
+int udev_ctrl_send_reload_rules(struct udev_ctrl *uctrl);
+int udev_ctrl_send_settle(struct udev_ctrl *uctrl);
+int udev_ctrl_send_set_env(struct udev_ctrl *uctrl, const char *key);
+int udev_ctrl_send_set_max_childs(struct udev_ctrl *uctrl, int count);
 struct udev_ctrl_msg;
-extern struct udev_ctrl_msg *udev_ctrl_msg(struct udev_ctrl *uctrl);
-extern struct udev_ctrl_msg *udev_ctrl_receive_msg(struct udev_ctrl *uctrl);
-extern struct udev_ctrl_msg *udev_ctrl_msg_ref(struct udev_ctrl_msg *ctrl_msg);
-extern void udev_ctrl_msg_unref(struct udev_ctrl_msg *ctrl_msg);
-extern int udev_ctrl_get_set_log_level(struct udev_ctrl_msg *ctrl_msg);
-extern int udev_ctrl_get_stop_exec_queue(struct udev_ctrl_msg *ctrl_msg);
-extern int udev_ctrl_get_start_exec_queue(struct udev_ctrl_msg *ctrl_msg);
-extern int udev_ctrl_get_reload_rules(struct udev_ctrl_msg *ctrl_msg);
-extern pid_t udev_ctrl_get_settle(struct udev_ctrl_msg *ctrl_msg);
-extern const char *udev_ctrl_get_set_env(struct udev_ctrl_msg *ctrl_msg);
-extern int udev_ctrl_get_set_max_childs(struct udev_ctrl_msg *ctrl_msg);
+struct udev_ctrl_msg *udev_ctrl_msg(struct udev_ctrl *uctrl);
+struct udev_ctrl_msg *udev_ctrl_receive_msg(struct udev_ctrl *uctrl);
+struct udev_ctrl_msg *udev_ctrl_msg_ref(struct udev_ctrl_msg *ctrl_msg);
+void udev_ctrl_msg_unref(struct udev_ctrl_msg *ctrl_msg);
+int udev_ctrl_get_set_log_level(struct udev_ctrl_msg *ctrl_msg);
+int udev_ctrl_get_stop_exec_queue(struct udev_ctrl_msg *ctrl_msg);
+int udev_ctrl_get_start_exec_queue(struct udev_ctrl_msg *ctrl_msg);
+int udev_ctrl_get_reload_rules(struct udev_ctrl_msg *ctrl_msg);
+pid_t udev_ctrl_get_settle(struct udev_ctrl_msg *ctrl_msg);
+const char *udev_ctrl_get_set_env(struct udev_ctrl_msg *ctrl_msg);
+int udev_ctrl_get_set_max_childs(struct udev_ctrl_msg *ctrl_msg);
 
 /* libudev-list */
 struct udev_list_node {
        struct udev_list_node *next, *prev;
 };
-extern void udev_list_init(struct udev_list_node *list);
-extern int udev_list_is_empty(struct udev_list_node *list);
-extern void udev_list_node_append(struct udev_list_node *new, struct udev_list_node *list);
-extern void udev_list_node_remove(struct udev_list_node *entry);
+void udev_list_init(struct udev_list_node *list);
+int udev_list_is_empty(struct udev_list_node *list);
+void udev_list_node_append(struct udev_list_node *new, struct udev_list_node *list);
+void udev_list_node_remove(struct udev_list_node *entry);
 #define udev_list_node_foreach(node, list) \
        for (node = (list)->next; \
             node != list; \
@@ -133,45 +133,45 @@ extern void udev_list_node_remove(struct udev_list_node *entry);
        for (node = (list)->next, tmp = (node)->next; \
             node != list; \
             node = tmp, tmp = (tmp)->next)
-extern struct udev_list_entry *udev_list_entry_add(struct udev *udev, struct udev_list_node *list,
+struct udev_list_entry *udev_list_entry_add(struct udev *udev, struct udev_list_node *list,
                                                   const char *name, const char *value,
                                                   int unique, int sort);
-extern void udev_list_entry_delete(struct udev_list_entry *entry);
-extern void udev_list_entry_remove(struct udev_list_entry *entry);
-extern void udev_list_entry_insert_before(struct udev_list_entry *new, struct udev_list_entry *entry);
-extern void udev_list_entry_append(struct udev_list_entry *new, struct udev_list_node *list);
-extern void udev_list_cleanup_entries(struct udev *udev, struct udev_list_node *name_list);
-extern struct udev_list_entry *udev_list_get_entry(struct udev_list_node *list);
-extern int udev_list_entry_get_flag(struct udev_list_entry *list_entry);
-extern void udev_list_entry_set_flag(struct udev_list_entry *list_entry, int flag);
+void udev_list_entry_delete(struct udev_list_entry *entry);
+void udev_list_entry_remove(struct udev_list_entry *entry);
+void udev_list_entry_insert_before(struct udev_list_entry *new, struct udev_list_entry *entry);
+void udev_list_entry_append(struct udev_list_entry *new, struct udev_list_node *list);
+void udev_list_cleanup_entries(struct udev *udev, struct udev_list_node *name_list);
+struct udev_list_entry *udev_list_get_entry(struct udev_list_node *list);
+int udev_list_entry_get_flag(struct udev_list_entry *list_entry);
+void udev_list_entry_set_flag(struct udev_list_entry *list_entry, int flag);
 #define udev_list_entry_foreach_safe(entry, tmp, first) \
        for (entry = first, tmp = udev_list_entry_get_next(entry); \
             entry != NULL; \
             entry = tmp, tmp = udev_list_entry_get_next(tmp))
 
 /* libudev-queue */
-extern int udev_queue_export_udev_seqnum(struct udev_queue *udev_queue, unsigned long long int seqnum);
-extern int udev_queue_export_device_queued(struct udev_queue *udev_queue, struct udev_device *udev_device);
-extern int udev_queue_export_device_finished(struct udev_queue *udev_queue, struct udev_device *udev_device);
-extern int udev_queue_export_device_failed(struct udev_queue *udev_queue, struct udev_device *udev_device);
+int udev_queue_export_udev_seqnum(struct udev_queue *udev_queue, unsigned long long int seqnum);
+int udev_queue_export_device_queued(struct udev_queue *udev_queue, struct udev_device *udev_device);
+int udev_queue_export_device_finished(struct udev_queue *udev_queue, struct udev_device *udev_device);
+int udev_queue_export_device_failed(struct udev_queue *udev_queue, struct udev_device *udev_device);
 
 /* libudev-utils */
 #define UTIL_PATH_SIZE                         1024
 #define UTIL_LINE_SIZE                         2048
 #define UTIL_NAME_SIZE                         512
 #define UDEV_ALLOWED_CHARS_INPUT               "/ $%?,"
-extern ssize_t util_get_sys_subsystem(struct udev *udev, const char *syspath, char *subsystem, size_t size);
-extern ssize_t util_get_sys_driver(struct udev *udev, const char *syspath, char *driver, size_t size);
-extern int util_resolve_sys_link(struct udev *udev, char *syspath, size_t size);
-extern int util_log_priority(const char *priority);
-extern size_t util_path_encode(char *s, size_t len);
-extern size_t util_path_decode(char *s);
-extern void util_remove_trailing_chars(char *path, char c);
-extern size_t util_strlcpy(char *dst, const char *src, size_t size);
-extern size_t util_strlcat(char *dst, const char *src, size_t size);
-extern int udev_util_replace_whitespace(const char *str, char *to, size_t len);
-extern int udev_util_replace_chars(char *str, const char *white);
-extern int udev_util_encode_string(const char *str, char *str_enc, size_t len);
-extern void util_set_fd_cloexec(int fd);
-extern unsigned int util_string_hash32(const char *str);
+ssize_t util_get_sys_subsystem(struct udev *udev, const char *syspath, char *subsystem, size_t size);
+ssize_t util_get_sys_driver(struct udev *udev, const char *syspath, char *driver, size_t size);
+int util_resolve_sys_link(struct udev *udev, char *syspath, size_t size);
+int util_log_priority(const char *priority);
+size_t util_path_encode(char *s, size_t len);
+size_t util_path_decode(char *s);
+void util_remove_trailing_chars(char *path, char c);
+size_t util_strlcpy(char *dst, const char *src, size_t size);
+size_t util_strlcat(char *dst, const char *src, size_t size);
+int udev_util_replace_whitespace(const char *str, char *to, size_t len);
+int udev_util_replace_chars(char *str, const char *white);
+int udev_util_encode_string(const char *str, char *str_enc, size_t len);
+void util_set_fd_cloexec(int fd);
+unsigned int util_string_hash32(const char *str);
 #endif
index 5cd5ef7..63229fd 100644 (file)
@@ -277,17 +277,17 @@ int udev_queue_export_udev_seqnum(struct udev_queue *udev_queue, unsigned long l
        return -1;
 }
 
-extern int udev_queue_export_device_queued(struct udev_queue *udev_queue, struct udev_device *udev_device)
+int udev_queue_export_device_queued(struct udev_queue *udev_queue, struct udev_device *udev_device)
 {
        return -1;
 }
 
-extern int udev_queue_export_device_finished(struct udev_queue *udev_queue, struct udev_device *udev_device)
+int udev_queue_export_device_finished(struct udev_queue *udev_queue, struct udev_device *udev_device)
 {
        return -1;
 }
 
-extern int udev_queue_export_device_failed(struct udev_queue *udev_queue, struct udev_device *udev_device)
+int udev_queue_export_device_failed(struct udev_queue *udev_queue, struct udev_device *udev_device)
 {
        return -1;
 }
index 236e43b..9346eb4 100644 (file)
 
 /* library context */
 struct udev;
-extern struct udev *udev_new(void);
-extern struct udev *udev_ref(struct udev *udev);
-extern void udev_unref(struct udev *udev);
-extern void udev_set_log_fn(struct udev *udev,
+struct udev *udev_new(void);
+struct udev *udev_ref(struct udev *udev);
+void udev_unref(struct udev *udev);
+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));
-extern int udev_get_log_priority(struct udev *udev);
-extern void udev_set_log_priority(struct udev *udev, int priority);
-extern const char *udev_get_sys_path(struct udev *udev);
-extern const char *udev_get_dev_path(struct udev *udev);
-extern void *udev_get_userdata(struct udev *udev);
-extern void udev_set_userdata(struct udev *udev, void *userdata);
+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);
+void *udev_get_userdata(struct udev *udev);
+void udev_set_userdata(struct udev *udev, void *userdata);
 
 /* list iteration */
 struct udev_list_entry;
-extern struct udev_list_entry *udev_list_entry_get_next(struct udev_list_entry *list_entry);
-extern struct udev_list_entry *udev_list_entry_get_by_name(struct udev_list_entry *list_entry, const char *name);
-extern const char *udev_list_entry_get_name(struct udev_list_entry *list_entry);
-extern const char *udev_list_entry_get_value(struct udev_list_entry *list_entry);
+struct udev_list_entry *udev_list_entry_get_next(struct udev_list_entry *list_entry);
+struct udev_list_entry *udev_list_entry_get_by_name(struct udev_list_entry *list_entry, const char *name);
+const char *udev_list_entry_get_name(struct udev_list_entry *list_entry);
+const char *udev_list_entry_get_value(struct udev_list_entry *list_entry);
 #define udev_list_entry_foreach(entry, first) \
        for (entry = first; \
             entry != NULL; \
@@ -50,71 +50,71 @@ extern const char *udev_list_entry_get_value(struct udev_list_entry *list_entry)
 
 /* sys devices */
 struct udev_device;
-extern struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char *syspath);
-extern struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum);
-extern struct udev_device *udev_device_new_from_subsystem_sysname(struct udev *udev, const char *subsystem, const char *sysname);
-extern struct udev_device *udev_device_get_parent(struct udev_device *udev_device);
-extern struct udev_device *udev_device_get_parent_with_subsystem_devtype(struct udev_device *udev_device, const char *subsystem, const char *devtype);
-extern struct udev_device *udev_device_ref(struct udev_device *udev_device);
-extern void udev_device_unref(struct udev_device *udev_device);
-extern struct udev *udev_device_get_udev(struct udev_device *udev_device);
-extern const char *udev_device_get_devpath(struct udev_device *udev_device);
-extern const char *udev_device_get_subsystem(struct udev_device *udev_device);
-extern const char *udev_device_get_devtype(struct udev_device *udev_device);
-extern const char *udev_device_get_syspath(struct udev_device *udev_device);
-extern const char *udev_device_get_sysname(struct udev_device *udev_device);
-extern const char *udev_device_get_sysnum(struct udev_device *udev_device);
-extern const char *udev_device_get_devnode(struct udev_device *udev_device);
-extern struct udev_list_entry *udev_device_get_devlinks_list_entry(struct udev_device *udev_device);
-extern struct udev_list_entry *udev_device_get_properties_list_entry(struct udev_device *udev_device);
-extern const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key);
-extern const char *udev_device_get_driver(struct udev_device *udev_device);
-extern dev_t udev_device_get_devnum(struct udev_device *udev_device);
-extern const char *udev_device_get_action(struct udev_device *udev_device);
-extern unsigned long long int udev_device_get_seqnum(struct udev_device *udev_device);
-extern const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const char *sysattr);
+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_device *udev_device_new_from_subsystem_sysname(struct udev *udev, const char *subsystem, const char *sysname);
+struct udev_device *udev_device_get_parent(struct udev_device *udev_device);
+struct udev_device *udev_device_get_parent_with_subsystem_devtype(struct udev_device *udev_device, const char *subsystem, const char *devtype);
+struct udev_device *udev_device_ref(struct udev_device *udev_device);
+void udev_device_unref(struct udev_device *udev_device);
+struct udev *udev_device_get_udev(struct udev_device *udev_device);
+const char *udev_device_get_devpath(struct udev_device *udev_device);
+const char *udev_device_get_subsystem(struct udev_device *udev_device);
+const char *udev_device_get_devtype(struct udev_device *udev_device);
+const char *udev_device_get_syspath(struct udev_device *udev_device);
+const char *udev_device_get_sysname(struct udev_device *udev_device);
+const char *udev_device_get_sysnum(struct udev_device *udev_device);
+const char *udev_device_get_devnode(struct udev_device *udev_device);
+struct udev_list_entry *udev_device_get_devlinks_list_entry(struct udev_device *udev_device);
+struct udev_list_entry *udev_device_get_properties_list_entry(struct udev_device *udev_device);
+const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key);
+const char *udev_device_get_driver(struct udev_device *udev_device);
+dev_t udev_device_get_devnum(struct udev_device *udev_device);
+const char *udev_device_get_action(struct udev_device *udev_device);
+unsigned long long int udev_device_get_seqnum(struct udev_device *udev_device);
+const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const char *sysattr);
 
 /* udev and kernel device events */
 struct udev_monitor;
-extern struct udev_monitor *udev_monitor_new_from_socket(struct udev *udev, const char *socket_path);
-extern struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev, const char *name);
-extern int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor);
-extern struct udev_monitor *udev_monitor_ref(struct udev_monitor *udev_monitor);
-extern void udev_monitor_unref(struct udev_monitor *udev_monitor);
-extern struct udev *udev_monitor_get_udev(struct udev_monitor *udev_monitor);
-extern int udev_monitor_get_fd(struct udev_monitor *udev_monitor);
-extern struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monitor);
-extern int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_monitor, const char *subsystem, const char *devtype);
-extern int udev_monitor_filter_update(struct udev_monitor *udev_monitor);
-extern int udev_monitor_filter_remove(struct udev_monitor *udev_monitor);
+struct udev_monitor *udev_monitor_new_from_socket(struct udev *udev, const char *socket_path);
+struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev, const char *name);
+int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor);
+struct udev_monitor *udev_monitor_ref(struct udev_monitor *udev_monitor);
+void udev_monitor_unref(struct udev_monitor *udev_monitor);
+struct udev *udev_monitor_get_udev(struct udev_monitor *udev_monitor);
+int udev_monitor_get_fd(struct udev_monitor *udev_monitor);
+struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monitor);
+int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_monitor, const char *subsystem, const char *devtype);
+int udev_monitor_filter_update(struct udev_monitor *udev_monitor);
+int udev_monitor_filter_remove(struct udev_monitor *udev_monitor);
 
 /* sys enumeration */
 struct udev_enumerate;
-extern struct udev_enumerate *udev_enumerate_new(struct udev *udev);
-extern struct udev_enumerate *udev_enumerate_ref(struct udev_enumerate *udev_enumerate);
-extern void udev_enumerate_unref(struct udev_enumerate *udev_enumerate);
-extern struct udev *udev_enumerate_get_udev(struct udev_enumerate *udev_enumerate);
-extern int udev_enumerate_add_match_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem);
-extern int udev_enumerate_add_nomatch_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem);
-extern int udev_enumerate_add_match_sysattr(struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value);
-extern int udev_enumerate_add_nomatch_sysattr(struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value);
-extern int udev_enumerate_add_match_property(struct udev_enumerate *udev_enumerate, const char *property, const char *value);
-extern int udev_enumerate_add_syspath(struct udev_enumerate *udev_enumerate, const char *syspath);
-extern int udev_enumerate_scan_devices(struct udev_enumerate *udev_enumerate);
-extern int udev_enumerate_scan_subsystems(struct udev_enumerate *udev_enumerate);
-extern struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *udev_enumerate);
+struct udev_enumerate *udev_enumerate_new(struct udev *udev);
+struct udev_enumerate *udev_enumerate_ref(struct udev_enumerate *udev_enumerate);
+void udev_enumerate_unref(struct udev_enumerate *udev_enumerate);
+struct udev *udev_enumerate_get_udev(struct udev_enumerate *udev_enumerate);
+int udev_enumerate_add_match_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem);
+int udev_enumerate_add_nomatch_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem);
+int udev_enumerate_add_match_sysattr(struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value);
+int udev_enumerate_add_nomatch_sysattr(struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value);
+int udev_enumerate_add_match_property(struct udev_enumerate *udev_enumerate, const char *property, const char *value);
+int udev_enumerate_add_syspath(struct udev_enumerate *udev_enumerate, const char *syspath);
+int udev_enumerate_scan_devices(struct udev_enumerate *udev_enumerate);
+int udev_enumerate_scan_subsystems(struct udev_enumerate *udev_enumerate);
+struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *udev_enumerate);
 
 /* event queue */
 struct udev_queue;
-extern struct udev_queue *udev_queue_new(struct udev *udev);
-extern struct udev_queue *udev_queue_ref(struct udev_queue *udev_queue);
-extern void udev_queue_unref(struct udev_queue *udev_queue);
-extern struct udev *udev_queue_get_udev(struct udev_queue *udev_queue);
-extern unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue);
-extern unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue);
-extern int udev_queue_get_udev_is_active(struct udev_queue *udev_queue);
-extern int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue);
-extern int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum);
-extern struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue);
-extern struct udev_list_entry *udev_queue_get_failed_list_entry(struct udev_queue *udev_queue);
+struct udev_queue *udev_queue_new(struct udev *udev);
+struct udev_queue *udev_queue_ref(struct udev_queue *udev_queue);
+void udev_queue_unref(struct udev_queue *udev_queue);
+struct udev *udev_queue_get_udev(struct udev_queue *udev_queue);
+unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue);
+unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue);
+int udev_queue_get_udev_is_active(struct udev_queue *udev_queue);
+int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue);
+int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum);
+struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue);
+struct udev_list_entry *udev_queue_get_failed_list_entry(struct udev_queue *udev_queue);
 #endif
index 9650172..322e0b8 100644 (file)
@@ -462,7 +462,7 @@ exit:
        return err;
 }
 
-extern int udev_node_remove(struct udev_device *dev)
+int udev_node_remove(struct udev_device *dev)
 {
        struct udev *udev = udev_device_get_udev(dev);
        struct udev_list_entry *list_entry;
index 3d5eb76..d5eaef7 100644 (file)
@@ -150,7 +150,7 @@ uid_t util_lookup_user(struct udev *udev, const char *user)
        return 0;
 }
 
-extern gid_t util_lookup_group(struct udev *udev, const char *group)
+gid_t util_lookup_group(struct udev *udev, const char *group)
 {
        char *endptr;
        int buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
index d5fa4f3..478a51f 100644 (file)
@@ -87,64 +87,64 @@ struct udev_watch {
 
 /* udev-rules.c */
 struct udev_rules;
-extern struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names);
-extern void udev_rules_unref(struct udev_rules *rules);
-extern int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event);
+struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names);
+void udev_rules_unref(struct udev_rules *rules);
+int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event);
 
 /* udev-event.c */
-extern struct udev_event *udev_event_new(struct udev_device *dev);
-extern void udev_event_unref(struct udev_event *event);
-extern int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules);
-extern int udev_event_execute_run(struct udev_event *event);
-extern void udev_event_apply_format(struct udev_event *event, char *string, size_t maxsize);
-extern int udev_event_apply_subsys_kernel(struct udev_event *event, const char *string,
-                                         char *result, size_t maxsize, int read_value);
+struct udev_event *udev_event_new(struct udev_device *dev);
+void udev_event_unref(struct udev_event *event);
+int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules);
+int udev_event_execute_run(struct udev_event *event);
+void udev_event_apply_format(struct udev_event *event, char *string, size_t maxsize);
+int udev_event_apply_subsys_kernel(struct udev_event *event, const char *string,
+                                  char *result, size_t maxsize, int read_value);
 
 /* udev-watch.c */
 extern int inotify_fd;
-extern void udev_watch_init(struct udev *udev);
-extern void udev_watch_restore(struct udev *udev);
-extern void udev_watch_begin(struct udev *udev, struct udev_device *dev);
-extern void udev_watch_end(struct udev *udev, struct udev_device *dev);
-extern struct udev_device *udev_watch_lookup(struct udev *udev, int wd);
+void udev_watch_init(struct udev *udev);
+void udev_watch_restore(struct udev *udev);
+void udev_watch_begin(struct udev *udev, struct udev_device *dev);
+void udev_watch_end(struct udev *udev, struct udev_device *dev);
+struct udev_device *udev_watch_lookup(struct udev *udev, int wd);
 
 /* udev-node.c */
-extern int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mode_t mode, uid_t uid, gid_t gid);
-extern int udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid);
-extern int udev_node_remove(struct udev_device *dev);
-extern void udev_node_update_old_links(struct udev_device *dev, struct udev_device *dev_old);
+int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mode_t mode, uid_t uid, gid_t gid);
+int udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid);
+int udev_node_remove(struct udev_device *dev);
+void udev_node_update_old_links(struct udev_device *dev, struct udev_device *dev_old);
 
 /* udev-util.c */
-extern int util_create_path(struct udev *udev, const char *path);
-extern int util_delete_path(struct udev *udev, const char *path);
-extern int util_unlink_secure(struct udev *udev, const char *filename);
-extern uid_t util_lookup_user(struct udev *udev, const char *user);
-extern gid_t util_lookup_group(struct udev *udev, const char *group);
-extern int util_run_program(struct udev *udev, const char *command, char **envp,
-                           char *result, size_t ressize, size_t *reslen);
-extern int util_resolve_subsys_kernel(struct udev *udev, const char *string,
+int util_create_path(struct udev *udev, const char *path);
+int util_delete_path(struct udev *udev, const char *path);
+int util_unlink_secure(struct udev *udev, const char *filename);
+uid_t util_lookup_user(struct udev *udev, const char *user);
+gid_t util_lookup_group(struct udev *udev, const char *group);
+int util_run_program(struct udev *udev, const char *command, char **envp,
+                    char *result, size_t ressize, size_t *reslen);
+int util_resolve_subsys_kernel(struct udev *udev, const char *string,
                                      char *result, size_t maxsize, int read_value);
 
 /* udev-selinux.c */
 #ifndef USE_SELINUX
-static inline void udev_selinux_init(struct udev *udev) {}
-static inline void udev_selinux_exit(struct udev *udev) {}
-static inline void udev_selinux_lsetfilecon(struct udev *udev, const char *file, unsigned int mode) {}
-static inline void udev_selinux_setfscreatecon(struct udev *udev, const char *file, unsigned int mode) {}
-static inline void udev_selinux_resetfscreatecon(struct udev *udev) {}
+inline void udev_selinux_init(struct udev *udev) {}
+inline void udev_selinux_exit(struct udev *udev) {}
+inline void udev_selinux_lsetfilecon(struct udev *udev, const char *file, unsigned int mode) {}
+inline void udev_selinux_setfscreatecon(struct udev *udev, const char *file, unsigned int mode) {}
+inline void udev_selinux_resetfscreatecon(struct udev *udev) {}
 #else
-extern void udev_selinux_init(struct udev *udev);
-extern void udev_selinux_exit(struct udev *udev);
-extern void udev_selinux_lsetfilecon(struct udev *udev, const char *file, unsigned int mode);
-extern void udev_selinux_setfscreatecon(struct udev *udev, const char *file, unsigned int mode);
-extern void udev_selinux_resetfscreatecon(struct udev *udev);
+void udev_selinux_init(struct udev *udev);
+void udev_selinux_exit(struct udev *udev);
+void udev_selinux_lsetfilecon(struct udev *udev, const char *file, unsigned int mode);
+void udev_selinux_setfscreatecon(struct udev *udev, const char *file, unsigned int mode);
+void udev_selinux_resetfscreatecon(struct udev *udev);
 #endif
 
 /* udevadm commands */
-extern int udevadm_monitor(struct udev *udev, int argc, char *argv[]);
-extern int udevadm_info(struct udev *udev, int argc, char *argv[]);
-extern int udevadm_control(struct udev *udev, int argc, char *argv[]);
-extern int udevadm_trigger(struct udev *udev, int argc, char *argv[]);
-extern int udevadm_settle(struct udev *udev, int argc, char *argv[]);
-extern int udevadm_test(struct udev *udev, int argc, char *argv[]);
+int udevadm_monitor(struct udev *udev, int argc, char *argv[]);
+int udevadm_info(struct udev *udev, int argc, char *argv[]);
+int udevadm_control(struct udev *udev, int argc, char *argv[]);
+int udevadm_trigger(struct udev *udev, int argc, char *argv[]);
+int udevadm_settle(struct udev *udev, int argc, char *argv[]);
+int udevadm_test(struct udev *udev, int argc, char *argv[]);
 #endif