summaryrefslogtreecommitdiff
path: root/udev_add.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-12 06:21:16 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 22:25:09 -0700
commit8673dcb84299fd2adba6281c5359bed4399d5b2d (patch)
tree9db3b5d4e7218b098c53d62b8805c9c9368a78af /udev_add.c
parentaf4b05d4917fdfa55eff3d8d53a830464d8162a1 (diff)
[PATCH] Make dev.d/ handling a separate processing stage
Move the logic when and how to call the dev.d/ scripts into the main processing path.
Diffstat (limited to 'udev_add.c')
-rw-r--r--udev_add.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/udev_add.c b/udev_add.c
index 60506b4243..c139bd38bf 100644
--- a/udev_add.c
+++ b/udev_add.c
@@ -129,7 +129,7 @@ static int create_node(struct udevice *udev)
char *pos;
int len;
- snprintf(filename, NAME_SIZE-1, "%s/%s", udev_root, udev->name);
+ snprintf(filename, NAME_SIZE, "%s/%s", udev_root, udev->name);
filename[NAME_SIZE-1] = '\0';
switch (udev->type) {
@@ -210,7 +210,7 @@ static int create_node(struct udevice *udev)
char linktarget[NAME_SIZE];
strfieldcpymax(linkname, pos, len+1);
- snprintf(filename, NAME_SIZE-1, "%s/%s", udev_root, linkname);
+ snprintf(filename, NAME_SIZE, "%s/%s", udev_root, linkname);
filename[NAME_SIZE-1] = '\0';
dbg("symlink '%s' to node '%s' requested", filename, udev->name);
@@ -308,7 +308,7 @@ int udev_add_device(struct udevice *udev, struct sysfs_class_device *class_dev)
"remove might not work for custom names");
/* use full path to the environment */
- snprintf(udev->devname, NAME_SIZE-1, "%s/%s", udev_root, udev->name);
+ snprintf(udev->devname, NAME_SIZE, "%s/%s", udev_root, udev->name);
udev->devname[NAME_SIZE-1] = '\0';
} else if (udev->type == 'n') {