1 #ifndef UDEV_UTILS_H_ 2 #define UDEV_UTILS_H_ 3 4 #include "libudev.h" 5 6 #define LIBUDEV_EXPORT __attribute__((visibility("default"))) 7 8 #define DEV_PATH_ROOT "/dev" 9 #define DEV_PATH_MAX 80 10 #define SYS_PATH_MAX 80 11 12 #define UNKNOWN_SUBSYSTEM "#" 13 14 const char *get_subsystem_by_syspath(const char *syspath); 15 const char *get_sysname_by_syspath(const char *syspath); 16 const char *get_devpath_by_syspath(const char *syspath); 17 const char *get_syspath_by_devpath(const char *devpath); 18 const char *get_syspath_by_devnum(dev_t devnum); 19 20 void invoke_create_handler(struct udev_device *ud); 21 size_t syspathlen_wo_units(const char *path); 22 23 #endif /* UDEV_UTILS_H_ */ 24