logging.h | logging.h | |||
---|---|---|---|---|
skipping to change at line 41 | skipping to change at line 41 | |||
#define logging_close(foo) do { } while (0) | #define logging_close(foo) do { } while (0) | |||
#ifdef USE_LOG | #ifdef USE_LOG | |||
#include <stdarg.h> | #include <stdarg.h> | |||
#include <unistd.h> | #include <unistd.h> | |||
#include <syslog.h> | #include <syslog.h> | |||
#undef err | #undef err | |||
#define err(format, arg...) \ | #define err(format, arg...) \ | |||
do { \ | do { \ | |||
log_message(LOG_INFO ,"%s: " format ,__FILE__ ,## arg); \ | log_message(LOG_ERR ,"%s: " format ,__FILE__ ,## arg); \ | |||
} while (0) | } while (0) | |||
#undef info | #undef info | |||
#define info(format, arg...) \ | #define info(format, arg...) \ | |||
do { \ | do { \ | |||
log_message(LOG_INFO ,"%s: " format ,__FILE__ ,## arg); \ | log_message(LOG_INFO ,"%s: " format ,__FILE__ ,## arg); \ | |||
} while (0) | } while (0) | |||
#ifdef DEBUG | #ifdef DEBUG | |||
#undef dbg | #undef dbg | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
udev_libc_wrapper.h | udev_libc_wrapper.h | |||
---|---|---|---|---|
skipping to change at line 45 | skipping to change at line 45 | |||
#ifndef __FD_CLR | #ifndef __FD_CLR | |||
#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) | #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) | |||
#endif | #endif | |||
#ifndef __FD_ISSET | #ifndef __FD_ISSET | |||
#define __FD_ISSET(d, set) (((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) != 0) | #define __FD_ISSET(d, set) (((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) != 0) | |||
#endif | #endif | |||
#ifndef __FD_ZERO | #ifndef __FD_ZERO | |||
#define __FD_ZERO(set) ((void) memset ((void*) (set), 0, sizeof (fd_set))) | #define __FD_ZERO(set) ((void) memset ((void*) (set), 0, sizeof (fd_set))) | |||
#endif | #endif | |||
#ifndef NETLINK_KOBJECT_UEVENT | ||||
#define NETLINK_KOBJECT_UEVENT 15 | ||||
#endif | ||||
#include <string.h> | #include <string.h> | |||
#ifdef __KLIBC__ | #ifdef __KLIBC__ | |||
static inline int clearenv(void) | static inline int clearenv(void) | |||
{ | { | |||
environ[0] = NULL; | environ[0] = NULL; | |||
return 0; | return 0; | |||
} | } | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 4 lines changed or added | |||
udev_rules.h | udev_rules.h | |||
---|---|---|---|---|
skipping to change at line 107 | skipping to change at line 107 | |||
}; | }; | |||
struct udev_rules { | struct udev_rules { | |||
char *buf; | char *buf; | |||
size_t bufsize; | size_t bufsize; | |||
size_t current; | size_t current; | |||
int mapped; | int mapped; | |||
int resolve_names; | int resolve_names; | |||
}; | }; | |||
extern int udev_rules_init(struct udev_rules *rules, int resolve_names); | extern int udev_rules_init(struct udev_rules *rules, int read_compiled, int resolve_names); | |||
extern void udev_rules_close(struct udev_rules *rules); | extern void udev_rules_close(struct udev_rules *rules); | |||
extern void udev_apply_format(struct udevice *udev, char *string, size_t ma xsize, | extern void udev_apply_format(struct udevice *udev, char *string, size_t ma xsize, | |||
struct sysfs_class_device *class_dev, struct s ysfs_device *sysfs_device); | struct sysfs_class_device *class_dev, struct s ysfs_device *sysfs_device); | |||
extern void udev_rules_iter_init(struct udev_rules *rules); | extern void udev_rules_iter_init(struct udev_rules *rules); | |||
extern struct udev_rule *udev_rules_iter_next(struct udev_rules *rules); | extern struct udev_rule *udev_rules_iter_next(struct udev_rules *rules); | |||
extern struct udev_rule *udev_rules_iter_label(struct udev_rules *rules, co nst char *label); | extern struct udev_rule *udev_rules_iter_label(struct udev_rules *rules, co nst char *label); | |||
extern int udev_rules_get_name(struct udev_rules *rules, struct udevice *ud ev, | extern int udev_rules_get_name(struct udev_rules *rules, struct udevice *ud ev, | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
udev_utils.h | udev_utils.h | |||
---|---|---|---|---|
skipping to change at line 27 | skipping to change at line 27 | |||
* 675 Mass Ave, Cambridge, MA 02139, USA. | * 675 Mass Ave, Cambridge, MA 02139, USA. | |||
* | * | |||
*/ | */ | |||
#ifndef _UDEV_COMMON_H_ | #ifndef _UDEV_COMMON_H_ | |||
#define _UDEV_COMMON_H_ | #define _UDEV_COMMON_H_ | |||
#include "udev.h" | #include "udev.h" | |||
#include "list.h" | #include "list.h" | |||
#define UDEV_MAX(a,b) ((a) > (b) ? (a) : (b)) | ||||
struct name_entry { | struct name_entry { | |||
struct list_head node; | struct list_head node; | |||
char name[PATH_SIZE]; | char name[PATH_SIZE]; | |||
}; | }; | |||
extern int strcmp_pattern(const char *p, const char *s); | extern int strcmp_pattern(const char *p, const char *s); | |||
extern int kernel_release_satisfactory(unsigned int version, unsigned int p atchlevel, unsigned int sublevel); | extern int kernel_release_satisfactory(unsigned int version, unsigned int p atchlevel, unsigned int sublevel); | |||
extern int create_path(const char *path); | extern int create_path(const char *path); | |||
extern int log_priority(const char *priority); | extern int log_priority(const char *priority); | |||
extern int string_is_true(const char *str); | extern int string_is_true(const char *str); | |||
skipping to change at line 48 | skipping to change at line 50 | |||
extern int unlink_secure(const char *filename); | extern int unlink_secure(const char *filename); | |||
extern int file_map(const char *filename, char **buf, size_t *bufsize); | extern int file_map(const char *filename, char **buf, size_t *bufsize); | |||
extern void file_unmap(void *buf, size_t bufsize); | extern void file_unmap(void *buf, size_t bufsize); | |||
extern size_t buf_get_line(const char *buf, size_t buflen, size_t cur); | extern size_t buf_get_line(const char *buf, size_t buflen, size_t cur); | |||
extern void remove_trailing_char(char *path, char c); | extern void remove_trailing_char(char *path, char c); | |||
extern void replace_untrusted_chars(char *string); | extern void replace_untrusted_chars(char *string); | |||
extern int name_list_add(struct list_head *name_list, const char *name, int sort); | extern int name_list_add(struct list_head *name_list, const char *name, int sort); | |||
extern int name_list_key_add(struct list_head *name_list, const char *key, const char *value); | extern int name_list_key_add(struct list_head *name_list, const char *key, const char *value); | |||
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 int pass_env_to_socket(const char *name, const char *devpath, const char *action); | extern int pass_env_to_socket(const char *name, const char *devpath, const char *action); | |||
extern int execute_program(const char *command, const char *subsystem, | extern int run_program(const char *command, const char *subsystem, | |||
char *result, size_t ressize, size_t *reslen); | char *result, size_t ressize, size_t *reslen, int log | |||
); | ||||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 5 lines changed or added | |||
udev_version.h | udev_version.h | |||
---|---|---|---|---|
#define UDEV_VERSION "065" | #define UDEV_VERSION "067" | |||
#define UDEV_ROOT "/dev" | #define UDEV_ROOT "/dev" | |||
#define UDEV_DB "/dev/.udevdb" | #define UDEV_DB "/dev/.udevdb" | |||
#define UDEV_CONFIG_DIR "/etc/udev" | #define UDEV_CONFIG_DIR "/etc/udev" | |||
#define UDEV_CONFIG_FILE "/etc/udev/udev.conf" | #define UDEV_CONFIG_FILE "/etc/udev/udev.conf" | |||
#define UDEV_RULES_FILE "/etc/udev/rules.d" | #define UDEV_RULES_FILE "/etc/udev/rules.d" | |||
#define UDEV_BIN "/sbin/udev" | #define UDEV_BIN "/sbin/udev" | |||
#define UDEVD_BIN "/sbin/udevd" | #define UDEVD_BIN "/sbin/udevd" | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||