*
* Returns: the kernel event sequence number, or 0 if there is no sequence number available.
**/
-_public_ unsigned long long int udev_device_get_seqnum(struct udev_device *udev_device)
-{
+_public_ unsigned long long int udev_device_get_seqnum(struct udev_device *udev_device) {
const char *seqnum;
unsigned long long ret;
int r;
*
* Returns: the dev_t number.
**/
-_public_ dev_t udev_device_get_devnum(struct udev_device *udev_device)
-{
+_public_ dev_t udev_device_get_devnum(struct udev_device *udev_device) {
dev_t devnum;
int r;
*
* Returns: the driver name string, or #NULL if there is no driver attached.
**/
-_public_ const char *udev_device_get_driver(struct udev_device *udev_device)
-{
+_public_ const char *udev_device_get_driver(struct udev_device *udev_device) {
const char *driver;
int r;
*
* Returns: the devtype name of the udev device, or #NULL if it cannot be determined
**/
-_public_ const char *udev_device_get_devtype(struct udev_device *udev_device)
-{
+_public_ const char *udev_device_get_devtype(struct udev_device *udev_device) {
const char *devtype;
int r;
*
* Returns: the subsystem name of the udev device, or #NULL if it cannot be determined
**/
-_public_ const char *udev_device_get_subsystem(struct udev_device *udev_device)
-{
+_public_ const char *udev_device_get_subsystem(struct udev_device *udev_device) {
const char *subsystem;
int r;
*
* Returns: the property string, or #NULL if there is no such property.
**/
-_public_ const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key)
-{
+_public_ const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key) {
const char *value = NULL;
int r;
*
* Returns: a new udev device, or #NULL, if it does not exist
**/
-_public_ struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum)
-{
+_public_ struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum) {
struct udev_device *udev_device;
int r;
*
* Returns: a new udev device, or #NULL, if it does not exist
**/
-_public_ struct udev_device *udev_device_new_from_device_id(struct udev *udev, const char *id)
-{
+_public_ struct udev_device *udev_device_new_from_device_id(struct udev *udev, const char *id) {
struct udev_device *udev_device;
int r;
*
* Returns: a new udev device, or #NULL, if it does not exist
**/
-_public_ struct udev_device *udev_device_new_from_subsystem_sysname(struct udev *udev, const char *subsystem, const char *sysname)
-{
+_public_ struct udev_device *udev_device_new_from_subsystem_sysname(struct udev *udev, const char *subsystem, const char *sysname) {
struct udev_device *udev_device;
int r;
*
* Returns: a new udev device, or #NULL, if it does not exist
**/
-_public_ struct udev_device *udev_device_new_from_environment(struct udev *udev)
-{
+_public_ struct udev_device *udev_device_new_from_environment(struct udev *udev) {
struct udev_device *udev_device;
int r;
return udev_device;
}
-static struct udev_device *device_new_from_parent(struct udev_device *child)
-{
+static struct udev_device *device_new_from_parent(struct udev_device *child) {
struct udev_device *parent;
int r;
*
* Returns: a new udev device, or #NULL, if it no parent exist.
**/
-_public_ struct udev_device *udev_device_get_parent(struct udev_device *udev_device)
-{
+_public_ struct udev_device *udev_device_get_parent(struct udev_device *udev_device) {
assert_return_errno(udev_device, NULL, EINVAL);
if (!udev_device->parent_set) {
*
* Returns: a new udev device, or #NULL if no matching parent exists.
**/
-_public_ struct udev_device *udev_device_get_parent_with_subsystem_devtype(struct udev_device *udev_device, const char *subsystem, const char *devtype)
-{
+_public_ struct udev_device *udev_device_get_parent_with_subsystem_devtype(struct udev_device *udev_device, const char *subsystem, const char *devtype) {
sd_device *parent;
int r;
*
* Returns: the udev library context
**/
-_public_ struct udev *udev_device_get_udev(struct udev_device *udev_device)
-{
+_public_ struct udev *udev_device_get_udev(struct udev_device *udev_device) {
assert_return_errno(udev_device, NULL, EINVAL);
return udev_device->udev;
*
* Returns: the devpath of the udev device
**/
-_public_ const char *udev_device_get_devpath(struct udev_device *udev_device)
-{
+_public_ const char *udev_device_get_devpath(struct udev_device *udev_device) {
const char *devpath;
int r;
*
* Returns: the sys path of the udev device
**/
-_public_ const char *udev_device_get_syspath(struct udev_device *udev_device)
-{
+_public_ const char *udev_device_get_syspath(struct udev_device *udev_device) {
const char *syspath;
int r;
*
* Returns: the name string of the device
**/
-_public_ const char *udev_device_get_sysname(struct udev_device *udev_device)
-{
+_public_ const char *udev_device_get_sysname(struct udev_device *udev_device) {
const char *sysname;
int r;
*
* Returns: the trailing number string of the device name
**/
-_public_ const char *udev_device_get_sysnum(struct udev_device *udev_device)
-{
+_public_ const char *udev_device_get_sysnum(struct udev_device *udev_device) {
const char *sysnum;
int r;
*
* Returns: the device node file name of the udev device, or #NULL if no device node exists
**/
-_public_ const char *udev_device_get_devnode(struct udev_device *udev_device)
-{
+_public_ const char *udev_device_get_devnode(struct udev_device *udev_device) {
const char *devnode;
int r;
*
* Returns: the first entry of the device node link list
**/
-_public_ struct udev_list_entry *udev_device_get_devlinks_list_entry(struct udev_device *udev_device)
-{
+_public_ struct udev_list_entry *udev_device_get_devlinks_list_entry(struct udev_device *udev_device) {
assert_return_errno(udev_device, NULL, EINVAL);
if (device_get_devlinks_generation(udev_device->device) != udev_device->devlinks_generation ||
*
* Returns: the first entry of the property list
**/
-_public_ struct udev_list_entry *udev_device_get_properties_list_entry(struct udev_device *udev_device)
-{
+_public_ struct udev_list_entry *udev_device_get_properties_list_entry(struct udev_device *udev_device) {
assert_return_errno(udev_device, NULL, EINVAL);
if (device_get_properties_generation(udev_device->device) != udev_device->properties_generation ||
*
* Returns: the number of microseconds since the device was first seen.
**/
-_public_ unsigned long long int udev_device_get_usec_since_initialized(struct udev_device *udev_device)
-{
+_public_ unsigned long long int udev_device_get_usec_since_initialized(struct udev_device *udev_device) {
usec_t ts;
int r;
*
* Returns: the content of a sys attribute file, or #NULL if there is no sys attribute value.
**/
-_public_ const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const char *sysattr)
-{
+_public_ const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const char *sysattr) {
const char *value;
int r;
*
* Returns: Negative error code on failure or 0 on success.
**/
-_public_ int udev_device_set_sysattr_value(struct udev_device *udev_device, const char *sysattr, char *value)
-{
+_public_ int udev_device_set_sysattr_value(struct udev_device *udev_device, const char *sysattr, char *value) {
int r;
assert_return(udev_device, -EINVAL);
*
* Returns: the first entry of the property list
**/
-_public_ struct udev_list_entry *udev_device_get_sysattr_list_entry(struct udev_device *udev_device)
-{
+_public_ struct udev_list_entry *udev_device_get_sysattr_list_entry(struct udev_device *udev_device) {
assert_return_errno(udev_device, NULL, EINVAL);
if (!udev_device->sysattrs_read) {
*
* Returns: 1 if the device is set up. 0 otherwise.
**/
-_public_ int udev_device_get_is_initialized(struct udev_device *udev_device)
-{
+_public_ int udev_device_get_is_initialized(struct udev_device *udev_device) {
int r, initialized;
assert_return(udev_device, -EINVAL);
r = sd_device_get_is_initialized(udev_device->device, &initialized);
if (r < 0) {
errno = -r;
-
return 0;
}
*
* Returns: the first entry of the tag list
**/
-_public_ struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device)
-{
+_public_ struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device) {
assert_return_errno(udev_device, NULL, EINVAL);
if (device_get_tags_generation(udev_device->device) != udev_device->tags_generation ||