]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
lib/hashtable.c: add CONFIG_ENV_MIN_ENTRIES
authorAndreas Bießmann <andreas.devel@googlemail.com>
Fri, 1 Oct 2010 20:51:02 +0000 (22:51 +0200)
committerWolfgang Denk <wd@denx.de>
Wed, 6 Oct 2010 20:46:35 +0000 (22:46 +0200)
commitfc5fc76bdad14425e3743e1494c9e444570df1be
tree5df077daeb219502a905e6291d2858b3ce5dd940
parentf44a928e7ea0912f278f2cf8ba1354fccf2ba64e
lib/hashtable.c: add CONFIG_ENV_MIN_ENTRIES

This patch adds a new config parameter for adjusting the calculation of
hash table size when importing a buffer.

When importing a extremely small buffer (e.g. the default_environment)
the old calculation generated a hash table which could hold at most the
buffer content but no more entires.

The new calculation add a fixed number of entries to the result to fit
better for small import buffers. This amount may be configured by the
user in board file to adjust the behaviour.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
lib/hashtable.c