summaryrefslogtreecommitdiff
path: root/udev/udev-rules.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-05-20 18:58:52 +0200
committerKay Sievers <kay.sievers@vrfy.org>2009-05-20 18:58:52 +0200
commite6c1a2bde7609cc703a5fad34c3bc1d15d19bbdc (patch)
treef3a7af4b7a2539833db52afff062afc81e504e8a /udev/udev-rules.c
parenteba87f55f6383cd61a11fce2ae37ac8100d6ded2 (diff)
use openat(), unlinkat(), fstatat()
Diffstat (limited to 'udev/udev-rules.c')
-rw-r--r--udev/udev-rules.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/udev/udev-rules.c b/udev/udev-rules.c
index da1d322037..6d03ab63c0 100644
--- a/udev/udev-rules.c
+++ b/udev/udev-rules.c
@@ -1641,10 +1641,8 @@ static int add_matching_files(struct udev *udev, struct udev_list_node *file_lis
if (strcmp(ext, suffix) != 0)
continue;
}
- dbg(udev, "put file '%s/%s' into list\n", dirname, dent->d_name);
-
- snprintf(filename, sizeof(filename), "%s/%s", dirname, dent->d_name);
- filename[sizeof(filename)-1] = '\0';
+ util_strscpyl(filename, sizeof(filename), dirname, "/", dent->d_name, NULL);
+ dbg(udev, "put file '%s' into list\n", filename);
udev_list_entry_add(udev, file_list, filename, NULL, 1, 1);
}