| udev.h | | udev.h | |
| | | | |
| skipping to change at line 30 | | skipping to change at line 30 | |
| */ | | */ | |
| | | | |
| #ifndef _UDEV_H_ | | #ifndef _UDEV_H_ | |
| #define _UDEV_H_ | | #define _UDEV_H_ | |
| | | | |
| #include <sys/types.h> | | #include <sys/types.h> | |
| #include <sys/param.h> | | #include <sys/param.h> | |
| | | | |
| #include "list.h" | | #include "list.h" | |
| #include "logging.h" | | #include "logging.h" | |
|
| #include "udev_libc_wrapper.h" | | #include "udev_sysdeps.h" | |
| #include "udev_version.h" | | #include "udev_version.h" | |
| | | | |
| #define COMMENT_CHARACTER '#' | | #define COMMENT_CHARACTER '#' | |
| #define PATH_TO_NAME_CHAR '@' | | #define PATH_TO_NAME_CHAR '@' | |
| #define LINE_SIZE 512 | | #define LINE_SIZE 512 | |
| #define PATH_SIZE 512 | | #define PATH_SIZE 512 | |
| #define NAME_SIZE 128 | | #define NAME_SIZE 128 | |
| #define VALUE_SIZE 128 | | #define VALUE_SIZE 128 | |
| | | | |
| #define DEFAULT_PARTITIONS_COUNT 15 | | #define DEFAULT_PARTITIONS_COUNT 15 | |
| | | | |
| skipping to change at line 57 | | skipping to change at line 57 | |
| #define WRITE_END 1 | | #define WRITE_END 1 | |
| | | | |
| #define DB_DIR ".udev/db" | | #define DB_DIR ".udev/db" | |
| | | | |
| struct udev_rules; | | struct udev_rules; | |
| | | | |
| struct sysfs_device { | | struct sysfs_device { | |
| struct list_head node; /* for device cache */ | | struct list_head node; /* for device cache */ | |
| struct sysfs_device *parent; /* already cached parent*/ | | struct sysfs_device *parent; /* already cached parent*/ | |
| char devpath[PATH_SIZE]; | | char devpath[PATH_SIZE]; | |
|
| char subsystem[NAME_SIZE]; /* $class/$bus/"drivers" */ | | char subsystem[NAME_SIZE]; /* $class, $bus, drivers, mo | |
| char kernel_name[NAME_SIZE]; /* device instance name */ | | dule */ | |
| | | char kernel[NAME_SIZE]; /* device instance name */ | |
| char kernel_number[NAME_SIZE]; | | char kernel_number[NAME_SIZE]; | |
| char driver[NAME_SIZE]; /* device driver name */ | | char driver[NAME_SIZE]; /* device driver name */ | |
| }; | | }; | |
| | | | |
| struct udevice { | | struct udevice { | |
| /* device event */ | | /* device event */ | |
| struct sysfs_device *dev; /* points to dev_local by de
fault */ | | struct sysfs_device *dev; /* points to dev_local by de
fault */ | |
| struct sysfs_device dev_local; | | struct sysfs_device dev_local; | |
| struct sysfs_device *dev_parent; /* current parent device use
d for matching */ | | struct sysfs_device *dev_parent; /* current parent device use
d for matching */ | |
| char action[NAME_SIZE]; | | char action[NAME_SIZE]; | |
| | | | |
| skipping to change at line 142 | | skipping to change at line 142 | |
| /* udev_utils.c */ | | /* udev_utils.c */ | |
| struct name_entry { | | struct name_entry { | |
| struct list_head node; | | struct list_head node; | |
| char name[PATH_SIZE]; | | char name[PATH_SIZE]; | |
| }; | | }; | |
| extern int log_priority(const char *priority); | | extern int log_priority(const char *priority); | |
| extern char *name_list_add(struct list_head *name_list, const char *name, i
nt sort); | | extern char *name_list_add(struct list_head *name_list, const char *name, i
nt sort); | |
| extern char *name_list_key_add(struct list_head *name_list, const char *key
, const char *value); | | extern char *name_list_key_add(struct list_head *name_list, const char *key
, const char *value); | |
| extern void name_list_cleanup(struct list_head *name_list); | | extern void name_list_cleanup(struct list_head *name_list); | |
| extern int add_matching_files(struct list_head *name_list, const char *dirn
ame, const char *suffix); | | extern int add_matching_files(struct list_head *name_list, const char *dirn
ame, const char *suffix); | |
|
| | | extern uid_t lookup_user(const char *user); | |
| | | extern gid_t lookup_group(const char *group); | |
| | | | |
| /* udev_utils_string.c */ | | /* udev_utils_string.c */ | |
| extern int strcmp_pattern(const char *p, const char *s); | | extern int strcmp_pattern(const char *p, const char *s); | |
| extern int string_is_true(const char *str); | | extern int string_is_true(const char *str); | |
| extern void remove_trailing_chars(char *path, char c); | | extern void remove_trailing_chars(char *path, char c); | |
| extern int utf8_encoded_valid_unichar(const char *str); | | extern int utf8_encoded_valid_unichar(const char *str); | |
| extern int replace_untrusted_chars(char *str); | | extern int replace_untrusted_chars(char *str); | |
| | | | |
| /* udev_utils_file.c */ | | /* udev_utils_file.c */ | |
| extern int create_path(const char *path); | | extern int create_path(const char *path); | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 6 lines changed or added | |
|