]> git.ipfire.org Git - thirdparty/kmod.git/commit
depmod: Support modules.order with duplicate lines
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sun, 29 Sep 2024 19:29:56 +0000 (21:29 +0200)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 1 Oct 2024 14:12:26 +0000 (09:12 -0500)
commita1186faeac14763d11872ec93b572738a7a7e09a
treea12ad54bdf565d1c9f0444e352805b6d161ce16c
parent19c0df1b75bf7e9e3b733ea9a4850b867c34cb87
depmod: Support modules.order with duplicate lines

If the same line exists multiple times in modules.order, consider only
the first, since this is the earliest position requested.

This also makes sure that index iterator never turns positive or would
ever trigger a signed integer overflow.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/158
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
tools/depmod.c