summaryrefslogtreecommitdiff
path: root/udevd.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-09-03 04:44:33 +0200
committerKay Sievers <kay.sievers@suse.de>2006-09-03 04:44:33 +0200
commit051445e078ab1a6d0cbbc1bd7f1a6fbd80e8bed1 (patch)
treec48ad168a0cfb3c048deb1b6a4a1fde8d0ee71f8 /udevd.c
parent11f1bb5ab42571fae5cc607d42b8d918c9e170ab (diff)
udevd: use files instead of symlinks for /dev/.udev/queue,failed
Diffstat (limited to 'udevd.c')
-rw-r--r--udevd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/udevd.c b/udevd.c
index 0702f5e2cb..a21d2ab77d 100644
--- a/udevd.c
+++ b/udevd.c
@@ -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: