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;
data.dptr = (void *)dev;
data.dsize = UDEVICE_LEN;
+ dbg("store key '%s' for device '%s'", path, dev->name);
return tdb_store(udevdb, key, data, TDB_REPLACE);
}