summaryrefslogtreecommitdiff
path: root/udev/lib/libudev-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev/lib/libudev-device.c')
-rw-r--r--udev/lib/libudev-device.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/udev/lib/libudev-device.c b/udev/lib/libudev-device.c
index bec0d69af3..fd7c962d3a 100644
--- a/udev/lib/libudev-device.c
+++ b/udev/lib/libudev-device.c
@@ -47,6 +47,7 @@ struct udev_device {
char *physdevpath;
int timeout;
dev_t devnum;
+ long long int seqnum;
};
struct udev_device *device_init(struct udev *udev)
@@ -360,6 +361,13 @@ const char *udev_device_get_action(struct udev_device *udev_device)
return udev_device->action;
}
+unsigned long long int udev_device_get_seqnum(struct udev_device *udev_device)
+{
+ if (udev_device == NULL)
+ return 0;
+ return udev_device->seqnum;
+}
+
int device_set_devpath(struct udev_device *udev_device, const char *devpath)
{
if (asprintf(&udev_device->syspath, "%s%s", udev_get_sys_path(udev_device->udev), devpath) < 0)
@@ -457,6 +465,12 @@ int device_set_timeout(struct udev_device *udev_device, int timeout)
return 0;
}
+int device_set_seqnum(struct udev_device *udev_device, unsigned long long int seqnum)
+{
+ udev_device->seqnum = seqnum;
+ return 0;
+}
+
int device_set_devnum(struct udev_device *udev_device, dev_t devnum)
{
udev_device->devnum = devnum;