]> err.no Git - systemd/commitdiff
udevd: export .udev/queue/$seqnum before .udev/uevent_seqnum
authorXinwei Hu <hxinwei@gmail.com>
Fri, 30 May 2008 07:43:58 +0000 (09:43 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Fri, 30 May 2008 07:43:58 +0000 (09:43 +0200)
udevd.c

diff --git a/udevd.c b/udevd.c
index c895c1dc6a4a4384fb1d4280d0eb8772e1a0db50..d6977e9655de8442195c8ba98b9c728c3c452abc 100644 (file)
--- a/udevd.c
+++ b/udevd.c
@@ -269,6 +269,9 @@ static void msg_queue_insert(struct udevd_uevent_msg *msg)
 
        msg->queue_time = time(NULL);
 
+       export_event_state(msg, EVENT_QUEUED);
+       info("seq %llu queued, '%s' '%s'\n", msg->seqnum, msg->action, msg->subsystem);
+
        strlcpy(filename, udev_root, sizeof(filename));
        strlcat(filename, "/" EVENT_SEQNUM, sizeof(filename));
        fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644);
@@ -281,9 +284,6 @@ static void msg_queue_insert(struct udevd_uevent_msg *msg)
                close(fd);
        }
 
-       export_event_state(msg, EVENT_QUEUED);
-       info("seq %llu queued, '%s' '%s'\n", msg->seqnum, msg->action, msg->subsystem);
-
        /* run one event after the other in debug mode */
        if (debug_trace) {
                list_add_tail(&msg->node, &running_list);