]> git.ipfire.org Git - thirdparty/kmod.git/commit
tools/modprobe: Fix odd --remove-holders behavior kmod-34.y
authorLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 13 Jun 2025 18:57:08 +0000 (13:57 -0500)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Sun, 22 Jun 2025 00:40:02 +0000 (19:40 -0500)
commit6b93232c972b338e972a5d4ccc2651ff78cb359e
tree3c97d1ace91188f33e861fb4ab5da69a576c24fe
parent180335d11ce9e18d1e46dce71d8cee22a842703a
tools/modprobe: Fix odd --remove-holders behavior

--remove-holders was not implying --remove, which means that if the user
called `modprobe --remove-holders xe` it would actually try to insert
the xe module. Fix it and spell it out in the man page about one option
implying the other.

Considering i915 is not currently loaded:

Before:
kmod $ ./build/modprobe -v --dry-run --remove-holders i915
insmod /lib/modules/6.14.11-1-MANJARO/kernel/drivers/char/agp/intel-gtt.ko.zst
insmod /lib/modules/6.14.11-1-MANJARO/kernel/drivers/gpu/drm/i915/i915.ko.zst
kmod $

After:
kmod $ ./build/modprobe -v --dry-run --remove-holders i915
kmod $

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/372
(cherry picked from commit 15edeed38680c7ab5cfa2717b1721e3e51e41e33)
[ Conflicts:
man/modprobe.8.scd ]
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
tools/modprobe.c