]> git.ipfire.org Git - thirdparty/kmod.git/commit
depmod: rewrite depmod modules search with scratchbuf
authorYauheni Kaliuta <yauheni.kaliuta@redhat.com>
Tue, 9 May 2017 19:09:22 +0000 (22:09 +0300)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 2 Jun 2017 03:23:13 +0000 (20:23 -0700)
commit1399c5ad53f380ebf4e465892bfd0c8b82b12aeb
tree87b64a630549d15dff9b25e6584c2949d1f4ccfc
parent369ca65620a00611285666c9b961e6156572e8d7
depmod: rewrite depmod modules search with scratchbuf

The recursive search code used used pretty big, PATH_MAX,
automatic storage buffer for the module directory scanning. Some
time ago there was scratchbuf implemented, which dynamically
reallocates its buffer on demand. The patch takes it in use for
the scanning code also. The initial size is hardcoded to 256
bytes which sounds good enough for most usecases so there should
be not many reallocations.

Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
tools/depmod.c