summaryrefslogtreecommitdiff
path: root/udevd.c
diff options
context:
space:
mode:
Diffstat (limited to 'udevd.c')
-rw-r--r--udevd.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/udevd.c b/udevd.c
index 701165b9ad..8741a0901b 100644
--- a/udevd.c
+++ b/udevd.c
@@ -279,8 +279,23 @@ static void udev_event_run(struct uevent_msg *msg)
static void msg_queue_insert(struct uevent_msg *msg)
{
+ char filename[PATH_SIZE];
+ int fd;
+
msg->queue_time = time(NULL);
+ strlcpy(filename, udev_root, sizeof(filename));
+ strlcat(filename, "/" EVENT_SEQNUM, sizeof(filename));
+ fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644);
+ if (fd > 0) {
+ char str[32];
+ int len;
+
+ len = sprintf(str, "%llu\n", msg->seqnum);
+ write(fd, str, len);
+ close(fd);
+ }
+
export_event_state(msg, EVENT_QUEUED);
/* run all events with a timeout set immediately */