summaryrefslogtreecommitdiff
path: root/udevd.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-03-16 03:09:02 +0100
committerKay Sievers <kay.sievers@vrfy.org>2007-03-16 03:09:02 +0100
commitfc6da921ad3bcb251aa317376e81701700e925c9 (patch)
tree560871390bf3c4d25b57dbb878186aeb55013d3b /udevd.c
parent043c6f6d4a97ab3a4aeea8cca16c1cc754b0e5ee (diff)
store devpath with the usual leading slash
Diffstat (limited to 'udevd.c')
-rw-r--r--udevd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/udevd.c b/udevd.c
index efb24ff651..2c92590dcd 100644
--- a/udevd.c
+++ b/udevd.c
@@ -174,16 +174,16 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st
/* add location of queue files */
strlcpy(filename, udev_root, sizeof(filename));
strlcat(filename, "/", sizeof(filename));
- start = strlcat(filename, EVENT_QUEUE_DIR, sizeof(filename));
+ start = strlcat(filename, EVENT_QUEUE_DIR"/", sizeof(filename));
strlcat(filename, msg->devpath, sizeof(filename));
- path_encode(&filename[start+1], sizeof(filename) - (start+1));
+ path_encode(&filename[start], sizeof(filename) - start);
/* add location of failed files */
strlcpy(filename_failed, udev_root, sizeof(filename_failed));
strlcat(filename_failed, "/", sizeof(filename_failed));
- start = strlcat(filename_failed, EVENT_FAILED_DIR, sizeof(filename_failed));
+ start = strlcat(filename_failed, EVENT_FAILED_DIR"/", sizeof(filename_failed));
strlcat(filename_failed, msg->devpath, sizeof(filename_failed));
- path_encode(&filename_failed[start+1], sizeof(filename) - (start+1));
+ path_encode(&filename_failed[start], sizeof(filename) - start);
switch (state) {
case EVENT_QUEUED: