From: Kay Sievers Date: Wed, 28 Dec 2011 00:06:55 +0000 (+0100) Subject: udevd: remove TIMEOUT= handling X-Git-Tag: 176~25 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43d5c5f03645c4b842659f9b5bd0ae465e885e92;p=systemd udevd: remove TIMEOUT= handling http://thread.gmane.org/gmane.linux.hotplug.devel/17206/focus=17211 --- diff --git a/TODO b/TODO index 32a6b555..22a067a4 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,3 @@ - - remove TIMEOUT= handling - - move /lib/udev/devices/ to tmpfiles - trigger --subsystem-match=usb/usb_device diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c index 1024b468..28df7a2a 100644 --- a/libudev/libudev-device.c +++ b/libudev/libudev-device.c @@ -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)) diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h index fed58639..b86f6a83 100644 --- a/libudev/libudev-private.h +++ b/libudev/libudev-private.h @@ -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); diff --git a/udev/udevd.c b/udev/udevd.c index c1a4fcfa..1e12eb38 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -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; }