summaryrefslogtreecommitdiff
path: root/udev/lib/libudev-device.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-09-10 10:09:34 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-09-10 10:09:34 +0200
commit6bd1c78a8a3d8f26f50670925934fb39f7aff56f (patch)
treeb7c4998357647f4c4510f76658f02068556ce361 /udev/lib/libudev-device.c
parent55e9959b155cefc5146f7a3d1ea73e74da91f303 (diff)
libudev: udev_device - add more properties
Diffstat (limited to 'udev/lib/libudev-device.c')
-rw-r--r--udev/lib/libudev-device.c41
1 files changed, 40 insertions, 1 deletions
diff --git a/udev/lib/libudev-device.c b/udev/lib/libudev-device.c
index 578afe7ec2..ec0aa9ae5d 100644
--- a/udev/lib/libudev-device.c
+++ b/udev/lib/libudev-device.c
@@ -47,7 +47,10 @@ struct udev_device {
char *physdevpath;
int timeout;
dev_t devnum;
- long long int seqnum;
+ unsigned long long int seqnum;
+ int num_fake_partitions;
+ int link_priority;
+ int ignore_remove;
};
struct udev_device *device_init(struct udev *udev)
@@ -487,3 +490,39 @@ int device_set_devnum(struct udev_device *udev_device, dev_t devnum)
udev_device->devnum = devnum;
return 0;
}
+
+int device_get_num_fake_partitions(struct udev_device *udev_device)
+{
+ if (udev_device == NULL)
+ return -1;
+ return udev_device->num_fake_partitions;
+}
+
+int device_set_num_fake_partitions(struct udev_device *udev_device, int num)
+{
+ udev_device->num_fake_partitions = num;
+}
+
+int device_get_link_priority(struct udev_device *udev_device)
+{
+ if (udev_device == NULL)
+ return -1;
+ return udev_device->link_priority;
+}
+
+int device_set_link_priority(struct udev_device *udev_device, int prio)
+{
+ udev_device->link_priority = prio;
+}
+
+int device_get_ignore_remove(struct udev_device *udev_device)
+{
+ if (udev_device == NULL)
+ return -1;
+ return udev_device->ignore_remove;
+}
+
+int device_set_ignore_remove(struct udev_device *udev_device, int ignore)
+{
+ udev_device->ignore_remove = ignore;
+}