]> git.ipfire.org Git - thirdparty/kmod.git/commit
file: speed up loading non-gzipped modules when zlib is enabled.
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Sat, 24 Dec 2011 02:09:31 +0000 (00:09 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Sat, 24 Dec 2011 03:15:25 +0000 (01:15 -0200)
commitbb417099e481bc947f19b1a7c2f4073ec64c8086
tree9658021837d34f8bce6b2c1ac1c132899f6d5c88
parentcfb908bf660871f9475b485806e004ddcc5ced18
file: speed up loading non-gzipped modules when zlib is enabled.

Just now realized that my distro (Gentoo) enables support for gzip but
does not compress modules by default.

In this case it's better to have a special case that uses mmap()
instead of a loop of realloc() + gzread().
libkmod/libkmod-file.c