]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: Use pread where appropriate
authorTobias Stoeckmann <tobias@stoeckmann.org>
Thu, 17 Oct 2024 21:55:06 +0000 (23:55 +0200)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 18 Oct 2024 18:45:23 +0000 (13:45 -0500)
commit8d03b6c7d990af301950d3ecdc4b5c69fa525928
tree233b7ac8befb3f547a705f1d3bc33dc53feefd2b
parent386acb3fdc801262866717dd3f5063b8b25d614d
libkmod: Use pread where appropriate

Since we do not want to modify the current position in file, use pread
instead of read + lseek. Removes one lseek call per module, which for
depmod on Arch Linux means 6143 calls.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Link: https://github.com/kmod-project/kmod/pull/189
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-file.c
shared/util.c
shared/util.h