]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
tools/modprobe: --dry-run shouldn't need -v
authorLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 13 Jun 2025 19:11:08 +0000 (14:11 -0500)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Mon, 16 Jun 2025 12:36:44 +0000 (07:36 -0500)
Make sure it shows something when running in dry-run mode.

Before:
kmod $ lsmod | grep i915
kmod $ ./build/modprobe --dry-run i915
kmod $ ./build/modprobe -v --dry-run 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

After:
kmod $ lsmod | grep i915
kmod $ ./build/modprobe --dry-run 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

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/372
tools/modprobe.c

index fa9757e24f085c0b1e8a9254f01a3bd1303a7e37..f97b9618f511e1e72b87f35c06f875e5d2694e16 100644 (file)
@@ -889,6 +889,7 @@ static int do_modprobe(int argc, char **orig_argv)
                        /* fall through */
                case 'n':
                        dry_run = 1;
+                       do_show = 1;
                        break;
                case 'C': {
                        size_t bytes = sizeof(char *) * (n_config_paths + 2);