X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udev%2Flib%2Flibudev.h;h=be09ddb75a331c2cad155eb3c7f7fb4ad1cd9fe9;hp=bac362a360ac15c9af7ebb08bf1ee8663adef013;hb=116254097ad3c07d9f7ed06042dbec7ba4f0f4fd;hpb=883012d49b0635ab20898a649fcce6db21288571 diff --git a/udev/lib/libudev.h b/udev/lib/libudev.h index bac362a36..be09ddb75 100644 --- a/udev/lib/libudev.h +++ b/udev/lib/libudev.h @@ -3,18 +3,10 @@ * * Copyright (C) 2008 Kay Sievers * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. */ #ifndef _LIBUDEV_H_ @@ -62,8 +54,7 @@ extern struct udev_device *udev_device_new_from_syspath(struct udev *udev, const 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(struct udev_device *udev_device, const char *subsystem); -extern struct udev_device *udev_device_get_parent_with_subsytem_devtype(struct udev_device *udev_device, const char *subsystem, const char *devtype); +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); @@ -76,6 +67,7 @@ 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); @@ -84,8 +76,12 @@ extern const char *udev_device_get_sysattr_value(struct udev_device *udev_device /* udev and kernel device events */ struct udev_monitor; +enum udev_monitor_netlink_group { + UDEV_MONITOR_KERNEL = 1, + UDEV_MONITOR_UDEV = 2, +}; 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); +extern struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev, enum udev_monitor_netlink_group group); 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);