From 051445e078ab1a6d0cbbc1bd7f1a6fbd80e8bed1 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 3 Sep 2006 04:44:33 +0200 Subject: udevd: use files instead of symlinks for /dev/.udev/queue,failed --- udevd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'udevd.c') 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: -- cgit v1.2.3-54-g00ecf