summaryrefslogtreecommitdiff
path: root/udevdb.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 /udevdb.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 'udevdb.c')
-rw-r--r--udevdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/udevdb.c b/udevdb.c
index fc579a9451..38830b098e 100644
--- a/udevdb.c
+++ b/udevdb.c
@@ -51,7 +51,7 @@ static int get_db_filename(struct udevice *udev, char *filename, int len)
pos[0] = PATH_TO_NAME_CHAR;
pos = strchr(&pos[1], '/');
}
- snprintf(filename, len-1, "%s%s", udev_db_path, devpath);
+ snprintf(filename, len, "%s%s", udev_db_path, devpath);
filename[len-1] = '\0';
return 0;
@@ -175,7 +175,7 @@ int udevdb_get_dev_byname(struct udevice *udev, const char *name)
if (ent->d_name[0] == '.')
continue;
- snprintf(filename, NAME_SIZE-1, "%s/%s", udev_db_path, ent->d_name);
+ snprintf(filename, NAME_SIZE, "%s/%s", udev_db_path, ent->d_name);
filename[NAME_SIZE-1] = '\0';
memset(&db_udev, 0x00, sizeof(struct udevice));