chiark / gitweb /
udevd: remove TIMEOUT= handling
authorKay Sievers <kay.sievers@vrfy.org>
Wed, 28 Dec 2011 00:06:55 +0000 (01:06 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 28 Dec 2011 00:06:55 +0000 (01:06 +0100)
  http://thread.gmane.org/gmane.linux.hotplug.devel/17206/focus=17211

TODO
libudev/libudev-device.c
libudev/libudev-private.h
udev/udevd.c

diff --git a/TODO b/TODO
index 32a6b55..22a067a 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,5 +1,3 @@
- - remove TIMEOUT= handling
-
  - move /lib/udev/devices/ to tmpfiles
 
  - trigger --subsystem-match=usb/usb_device
index 1024b46..28df7a2 100644 (file)
@@ -69,7 +69,6 @@ struct udev_device {
        struct udev_list tags_list;
        unsigned long long int seqnum;
        unsigned long long int usec_initialized;
-       int timeout;
        int devlink_priority;
        int refcount;
        dev_t devnum;
@@ -162,21 +161,6 @@ static int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum)
        return 0;
 }
 
-int udev_device_get_timeout(struct udev_device *udev_device)
-{
-       return udev_device->timeout;
-}
-
-static int udev_device_set_timeout(struct udev_device *udev_device, int timeout)
-{
-       char num[32];
-
-       udev_device->timeout = timeout;
-       snprintf(num, sizeof(num), "%u", timeout);
-       udev_device_add_property(udev_device, "TIMEOUT", num);
-       return 0;
-}
-
 const char *udev_device_get_knodename(struct udev_device *udev_device)
 {
        return udev_device->knodename;
@@ -451,8 +435,6 @@ void udev_device_add_property_from_string_parse(struct udev_device *udev_device,
                udev_device_set_devpath_old(udev_device, &property[12]);
        } else if (strncmp(property, "SEQNUM=", 7) == 0) {
                udev_device_set_seqnum(udev_device, strtoull(&property[7], NULL, 10));
-       } else if (strncmp(property, "TIMEOUT=", 8) == 0) {
-               udev_device_set_timeout(udev_device, strtoull(&property[8], NULL, 10));
        } else if (strncmp(property, "IFINDEX=", 8) == 0) {
                udev_device_set_ifindex(udev_device, strtoull(&property[8], NULL, 10));
        } else if (strncmp(property, "DEVMODE=", 8) == 0) {
@@ -635,7 +617,6 @@ struct udev_device *udev_device_new(struct udev *udev)
        udev_list_init(udev, &udev_device->sysattr_value_list, true);
        udev_list_init(udev, &udev_device->sysattr_list, false);
        udev_list_init(udev, &udev_device->tags_list, true);
-       udev_device->timeout = -1;
        udev_device->watch_handle = -1;
        /* copy global properties */
        udev_list_entry_foreach(list_entry, udev_get_properties_list_entry(udev))
index fed5863..b86f6a8 100644 (file)
@@ -88,7 +88,6 @@ const char *udev_device_get_id_filename(struct udev_device *udev_device);
 void udev_device_set_is_initialized(struct udev_device *udev_device);
 int udev_device_add_tag(struct udev_device *udev_device, const char *tag);
 void udev_device_cleanup_tags_list(struct udev_device *udev_device);
-int udev_device_get_timeout(struct udev_device *udev_device);
 unsigned long long udev_device_get_usec_initialized(struct udev_device *udev_device);
 void udev_device_set_usec_initialized(struct udev_device *udev_device, unsigned long long usec_initialized);
 int udev_device_get_devlink_priority(struct udev_device *udev_device);
index c1a4fcf..1e12eb3 100644 (file)
@@ -457,13 +457,6 @@ static int event_queue_insert(struct udev_device *dev)
 
        event->state = EVENT_QUEUED;
        udev_list_node_append(&event->node, &event_list);
-
-       /* run all events with a timeout set immediately */
-       if (udev_device_get_timeout(dev) > 0) {
-               event_run(event, true);
-               return 0;
-       }
-
        return 0;
 }