diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-09-03 04:44:33 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2006-09-03 04:44:33 +0200 |
commit | 051445e078ab1a6d0cbbc1bd7f1a6fbd80e8bed1 (patch) | |
tree | c48ad168a0cfb3c048deb1b6a4a1fde8d0ee71f8 /udevd.c | |
parent | 11f1bb5ab42571fae5cc607d42b8d918c9e170ab (diff) |
udevd: use files instead of symlinks for /dev/.udev/queue,failed
Diffstat (limited to 'udevd.c')
-rw-r--r-- | udevd.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -155,9 +155,9 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st { char filename[PATH_SIZE]; char filename_failed[PATH_SIZE]; - char target[PATH_SIZE]; size_t start, end, i; struct udevd_uevent_msg *loop_msg; + int fd; /* add location of queue files */ strlcpy(filename, udev_root, sizeof(filename)); @@ -189,11 +189,10 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st case EVENT_QUEUED: unlink(filename_failed); delete_path(filename_failed); - - strlcpy(target, sysfs_path, sizeof(target)); - strlcat(target, msg->devpath, sizeof(target)); create_path(filename); - symlink(target, filename); + fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644); + if (fd > 0) + close(fd); return; case EVENT_FINISHED: case EVENT_FAILED: |