]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
man/rmmod: document (how) we handle list of modules
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 9 Oct 2024 10:39:52 +0000 (11:39 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 15 Oct 2024 18:38:03 +0000 (13:38 -0500)
Mention in the help and docs that rmmod operates on list of modules,
alongside its current mode of operation.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/177
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
man/rmmod.8.scd
tools/rmmod.c

index f5085036c3f0b84e5e42f554627361e4b87d9ee8..7aa4e0e6d471c38e1f8ff4237f1ca61272f1a6a0 100644 (file)
@@ -6,13 +6,19 @@ rmmod - Simple program to remove a module from the Linux Kernel
 
 # SYNOPSIS
 
-*rmmod* [_OPTIONS_] [_modulename_]
+*rmmod* [_OPTIONS_] [_list of modulenames_]
 
 # DESCRIPTION
 
-*rmmod* is a trivial program to remove a module (when module unloading support
-is provided) from the kernel. Most users will want to use *modprobe*(8) with the
-*-r* option instead since it removes unused dependent modules as well.
+*rmmod* is a trivial program to remove a module or a list of modules from the
+kernel (when module unloading support is provided). Most users will want to use
+*modprobe*(8) with the *-r* option instead since it removes unused dependent
+modules as well.
+
+When a list of modules is provided, the program will process them one at a time.
+If a module is not found, *rmmod* will immediately exit with an error code.
+Should the module removal fail, the program will log an error AND continue with
+the next module. This behaviour is NOT controlled by the *--force* option.
 
 # OPTIONS
 
index 5dd7aa3a443c2168490cb68b0a5fab10dfbf839a..1315eda2bda0b67a0317b13fde2fe61c3fe42c44 100644 (file)
@@ -35,7 +35,7 @@ static const struct option cmdopts[] = {
 static void help(void)
 {
        printf("Usage:\n"
-              "\t%s [options] modulename ...\n"
+              "\t%s [options] [list of modulenames]\n"
               "Options:\n"
               "\t-f, --force       DANGEROUS: forces a module unload and may\n"
               "\t                  crash your machine\n"