chiark / gitweb /
[PATCH] allow NAME_SIZE > SYSFS_PATH_MAX
authorolh@suse.de <olh@suse.de>
Sat, 3 Jul 2004 01:59:30 +0000 (18:59 -0700)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:36:59 +0000 (21:36 -0700)
NAME_SIZE is too small for some configurations. This patch allows more
or longer names, it just keeps the stack in a sane state.

udevdb.c

index f2469367109870009786cd6f5241c246ada8fafb..c4dc4f005cbd307deadffcc51095180d058bb12d 100644 (file)
--- a/udevdb.c
+++ b/udevdb.c
@@ -52,7 +52,7 @@ int udevdb_add_dev(const char *path, const struct udevice *dev)
        if ((path == NULL) || (dev == NULL))
                return -ENODEV;
 
-       memset(keystr, 0, NAME_SIZE);
+       memset(keystr, 0, SYSFS_PATH_MAX);
        strfieldcpy(keystr, path);
        key.dptr = keystr;
        key.dsize = strlen(keystr) + 1;