diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-12 08:15:06 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-12 16:59:08 +0200 |
commit | 538bdb48d8c5ea9c7b3802708b049824fab23d02 (patch) | |
tree | 4615f9a67b3a468a4e334f58894c02fb0350f50c /src/libudev/libudev-device.c | |
parent | libudev: rescan devices when filter is updated (diff) | |
download | systemd-538bdb48d8c5ea9c7b3802708b049824fab23d02.tar.xz systemd-538bdb48d8c5ea9c7b3802708b049824fab23d02.zip |
libudev: hide definition of struct udev_device
Diffstat (limited to 'src/libudev/libudev-device.c')
-rw-r--r-- | src/libudev/libudev-device.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c index d3a3c53969..91dc910773 100644 --- a/src/libudev/libudev-device.c +++ b/src/libudev/libudev-device.c @@ -23,6 +23,7 @@ #include "device-private.h" #include "device-util.h" #include "libudev-device-internal.h" +#include "libudev-list-internal.h" #include "parse-util.h" #include "time-util.h" @@ -37,6 +38,36 @@ */ /** + * udev_device: + * + * Opaque object representing one kernel sys device. + */ +struct udev_device { + struct udev *udev; + + /* real device object */ + sd_device *device; + + /* legacy */ + unsigned n_ref; + + struct udev_device *parent; + bool parent_set; + + struct udev_list *properties; + uint64_t properties_generation; + struct udev_list *tags; + uint64_t tags_generation; + struct udev_list *devlinks; + uint64_t devlinks_generation; + bool properties_read:1; + bool tags_read:1; + bool devlinks_read:1; + struct udev_list *sysattrs; + bool sysattrs_read; +}; + +/** * udev_device_get_seqnum: * @udev_device: udev device * @@ -834,3 +865,9 @@ _public_ int udev_device_has_tag(struct udev_device *udev_device, const char *ta return sd_device_has_tag(udev_device->device, tag) > 0; } + +sd_device *udev_device_get_sd_device(struct udev_device *udev_device) { + assert(udev_device); + + return udev_device->device; +} |