* [PATCH kmod 00/20] man: convert to scdoc and minor improvements
@ 2024-06-11 15:05 Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 01/20] man: add script to generate/compare the xslt vs upcoming scdoc Emil Velikov via B4 Relay
` (20 more replies)
0 siblings, 21 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
Hello all,
As mentioned previously, here is a series converting the existing xml
based documentation to scdoc.
Despite the size of this series, one should be able to review nearly all
of it during their first morning coffee ;-)
I've went ahead with scdoc instead of other solutions since it's a
simple 1K LoC, C99 program with trivial markdown-like syntax. Which is
practically available for any distro [1].
A quick search in Arch shows that over 50 packages/projects use scdoc.
This series:
- patch 1 - simple comparison script of man page _output_ (the roff
files themselves vary significantly) - DO NOT MERGE
- patch 2 - the scdoc files themselves, including typos to make diff vs
original smaller
- patch 3 - wires scdoc to the build and removes the old xml files
- patch 4-9 - trivial fixes as white space, punctuation, etc
- patch 10-18 - expand documentation around {depmod,modprobe}.d handling
- patch 19 - remove "maintained by" references
- patch 20 - list short and long options on separate lines
The last two might be little controversial, so feel free to drop them.
NOTE: Some patches have respective question or two within.
As always - comments and suggestions are greatly appreciated.
[1] https://repology.org/project/scdoc/versions
[2] https://archlinux.org/packages/extra/x86_64/scdoc/
---
Emil Velikov (20):
man: add script to generate/compare the xslt vs upcoming scdoc
man: add scdoc based man pages
man: build the scdoc based man pages
man: remove no longer used XML files
man: add some extra bold/italic annotations
man: white space fixes
man: misc punctuation fixes
man: some options take an argument, mention that
man: couple of grammar/language fixes
man: stop removing DISTCONFDIR lines
man: depmod.d: document the config file order handling
man: depmod.d: factor out a CONFIGURATION FORMAT section
man: depmod.d: rework the opening description sentence
man: depmod: remove hard-coded /etc/depmod.d references
man: modprobe.d: document the config file order handling
man: modprobe.d: factor out a CONFIGURATION FORMAT section
man: modprobe.d: mention about MODPROBE_OPTIONS
man: modprobe: remove hard-coded /etc/modprobe.d references
man: remove the "Maintained by" references
man: list options one per line
configure.ac | 2 +-
man/Makefile.am | 30 +--
man/compare.sh | 63 ++++++
man/depmod.8.scd | 139 +++++++++++++
man/depmod.8.xml | 343 -------------------------------
man/depmod.d.5.scd | 115 +++++++++++
man/depmod.d.5.xml | 164 ---------------
man/insmod.8.scd | 35 ++++
man/insmod.8.xml | 87 --------
man/kmod.8.scd | 49 +++++
man/kmod.8.xml | 120 -----------
man/lsmod.8.scd | 29 +++
man/lsmod.8.xml | 73 -------
man/modinfo.8.scd | 84 ++++++++
man/modinfo.8.xml | 201 -------------------
man/modprobe.8.scd | 232 +++++++++++++++++++++
man/modprobe.8.xml | 544 --------------------------------------------------
man/modprobe.d.5.scd | 187 +++++++++++++++++
man/modprobe.d.5.xml | 265 ------------------------
man/modules.dep.5.scd | 43 ++++
man/modules.dep.5.xml | 80 --------
man/modules.dep.bin.5 | 1 +
man/rmmod.8.scd | 53 +++++
man/rmmod.8.xml | 148 --------------
24 files changed, 1041 insertions(+), 2046 deletions(-)
---
base-commit: 8837461494761d58be579641f20cc043274adddf
change-id: 20240523-man-743d6e51eb6f
Best regards,
--
Emil Velikov <emil.l.velikov@gmail.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH kmod 01/20] man: add script to generate/compare the xslt vs upcoming scdoc
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 02/20] man: add scdoc based man pages Emil Velikov via B4 Relay
` (19 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
man/compare.sh | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/man/compare.sh b/man/compare.sh
new file mode 100755
index 0000000..7579ab5
--- /dev/null
+++ b/man/compare.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+the_sed()
+{
+ sed -e 's|@DISTCONFDIR@|/TEST|g;s|@MODULE_DIRECTORY@|/TEST|g' $1
+}
+
+gen_xslt()
+{
+ #--output ${xml//.xml}.xslt \
+ #--noout \
+ for xml in *xml; do
+ the_sed $xml | xsltproc \
+ --stringparam man.output.quietly 1 \
+ --param funcsynopsis.style "'ansi'" \
+ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl -
+ # The output and noout args seems cosmetic, sigh
+ mv ${xml//.xml}{,.xslt}
+ done
+}
+
+gen_scdoc()
+{
+ for scd in *scd; do
+ the_sed $scd | scdoc > ${scd//.scd}.scdoc
+ done
+}
+
+comp_output()
+{
+ export LESS='-F -i -M -R -S -w -X -z-4'
+ unset MANPAGER
+
+ for xslt in $(ls --sort=version *xslt); do
+ _name=${xslt//.xslt}
+
+ echo "Checking $_name"
+
+ diff --unified --color=always \
+ <(man ./$_name.xslt) \
+ <(man ./$_name.scdoc) | less
+
+ read
+ done
+}
+
+comp_raw()
+{
+ for xslt in *xslt; do
+ _name=${xslt//.xslt}
+
+ diff --unified --color=always ./$_name.{xslt,scdoc}
+ done
+}
+
+time gen_xslt
+time gen_scdoc
+
+comp_output
+#comp_raw
+
+rm -f *xslt
+rm -f *scdoc
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 02/20] man: add scdoc based man pages
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 01/20] man: add script to generate/compare the xslt vs upcoming scdoc Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 03/20] man: build the " Emil Velikov via B4 Relay
` (18 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Working with xml is quite fiddly. Swap that for scdoc, which has very
trivial markup-like syntax.
We have opted for scdoc since it's available on practically any linux
distribution. Implementation-wise it's a trivial C99 project, at 1k LoC.
If using scdoc proves to be a burden, we can trivially port these to
pandoc or similar - 90% of the content will stay the same.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
Comparing the output via the compare.sh script, we can see a few
advantages of scdoc over xsltproc:
- uses ISO 8601 date format
- does not choke for short opt + arg
- does not escape every non-alphanum char so we get proper word breaks
and nicer word wrapping
There are a couple of cons though:
- uses leading [ for table handling, so we need to manually escape it
- manual indentation with spaces is not allowed, escape again
Initially I was inclined to send patches in upstream scdoc to "fix"
this. Then I noticed that:
- only a couple of instances are affected
- both are very crowded and could use some love
I would be happy to prep something up - if anyone has concrete
suggestions, please let me know.
---
man/depmod.8.scd | 126 +++++++++++++++++++++++++++++
man/depmod.d.5.scd | 95 ++++++++++++++++++++++
man/insmod.8.scd | 36 +++++++++
man/kmod.8.scd | 48 +++++++++++
man/lsmod.8.scd | 30 +++++++
man/modinfo.8.scd | 78 ++++++++++++++++++
man/modprobe.8.scd | 216 ++++++++++++++++++++++++++++++++++++++++++++++++++
man/modprobe.d.5.scd | 168 +++++++++++++++++++++++++++++++++++++++
man/modules.dep.5.scd | 43 ++++++++++
man/rmmod.8.scd | 50 ++++++++++++
10 files changed, 890 insertions(+)
diff --git a/man/depmod.8.scd b/man/depmod.8.scd
new file mode 100644
index 0000000..0fe9128
--- /dev/null
+++ b/man/depmod.8.scd
@@ -0,0 +1,126 @@
+DEPMOD(8) "kmod" "depmod"
+
+# NAME
+
+depmod - Generate modules.dep and map files.
+
+# SYNOPSIS
+
+*depmod* [*-b* _basedir_] [*-o* _outdir_] [*-e*] [*-E* _Module.symvers_]
+\ \ \ \ \ \ \ \[*-F* _System.map_] [*-n*] [*-v*] [*-A*] [*-P* _prefix_] [*-w*] [_version_]
+
+*depmod* [*-e*] [*-E* _Module.symvers_] [*-F* _System.map_] [*-n*] [*-v*] [*-P* _prefix_]
+\ \ \ \ \ \ \ \[*-w*] [_version_] [_filename_...]
+
+# DESCRIPTION
+
+Linux kernel modules can provide services (called "symbols") for other modules
+to use (using one of the EXPORT_SYMBOL variants in the code). If a second module
+uses this symbol, that second module clearly depends on the first module. These
+dependencies can get quite complex.
+
+*depmod* creates a list of module dependencies by reading each module under
+@MODULE_DIRECTORY@/_version_ and determining what symbols it exports and what
+symbols it needs. By default, this list is written to modules.dep, and a binary
+hashed version named modules.dep.bin, in the same directory. If filenames are
+given on the command line, only those modules are examined (which is rarely
+useful unless all modules are listed). * depmod* also creates a list of symbols
+provided by modules in the file named modules.symbols and its binary hashed
+version, modules.symbols.bin. Finally, *depmod* will output a file named
+modules.devname if modules supply special device names (devname) that should be
+populated in /dev on boot (by a utility such as systemd-tmpfiles).
+
+If a _version_ is provided, then that kernel version's module directory is used
+rather than the current kernel version (as returned by *uname -r*).
+
+# OPTIONS
+
+*-a*, *--all*
+ Probe all modules. This option is enabled by default if no file names
+ are given in the command-line.
+
+*-A*, *--quick*
+ This option scans to see if any modules are newer than the
+ modules.dep file before any work is done: if not, it silently exits
+ rather than regenerating the files.
+
+*-b* _basedir_, *--basedir* _basedir_
+ If your modules are not currently in the (normal) directory
+ @MODULE_DIRECTORY@/_version_, but in a staging area, you can specify a
+ _basedir_ which is prepended to the directory name. This _basedir_ is
+ stripped from the resulting modules.dep file, so it is ready to be moved
+ into the normal location. Use this option if you are a distribution
+ vendor who needs to pre-generate the meta-data files rather than running
+ depmod again later.
+
+*-o* _outdir_, *--outdir* _outdir_
+ Set the output directory where depmod will store any generated file.
+ _ outdir_ serves as a root to that location, similar to how _basedir_ is
+ used. Also this setting takes precedence and if used together with
+ _basedir_ it will result in the input being that directory, but the output
+ being the one set by _outdir_.
+
+*-C*, *--config* _file_ _or_ _directory_
+ This option overrides the default configuration directory at
+ /etc/depmod.d/.
+
+*-e*, *--errsyms*
+ When combined with the *-F* option, this reports any symbols which a
+ module needs which are not supplied by other modules or the kernel.
+ Normally, any symbols not provided by modules are assumed to be provided
+ by the kernel (which should be true in a perfect world), but this
+ assumption can break especially when additionally updated third party
+ drivers are not correctly installed or were built incorrectly.
+
+*-E*, *--symvers*
+ When combined with the *-e* option, this reports any symbol versions
+ supplied by modules that do not match with the symbol versions provided
+ by the kernel in its Module.symvers. This option is mutually
+ incompatible with *-F*.
+
+*-F*, *--filesyms* _System.map_
+ Supplied with the System.map produced when the kernel was built, this
+ allows the *-e* option to report unresolved symbols. This option is
+ mutually incompatible with *-E*.
+
+*-h*, *--help*
+ Print the help message and exit.
+
+*-n*, *--show*, *--dry-run*
+ This sends the resulting modules.dep and the various map files to
+ standard output rather than writing them into the module directory.
+
+*-P*
+ Some architectures prefix symbols with an extraneous character. This
+ specifies a prefix character (for example '\_') to ignore.
+
+*-v*, *--verbose*
+ In verbose mode, *depmod* will print (to stdout) all the symbols each
+ module depends on and the module's file name which provides that symbol.
+
+*-V*, *--version*
+ Show version of program and exit. See below for caveats when run on
+ older kernels.
+
+*-w*
+ Warn on duplicate dependencies, aliases, symbol versions, etc.
+
+# COPYRIGHT
+
+This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
+Portions Copyright Jon Masters, and others.
+
+# SEE ALSO
+
+*depmod.d*(5), *modprobe*(8), *modules.dep*(5)
+
+# AUTHORS
+
+*Jon Masters* <jcm@jonmasters.org>
+ Developer
+
+*Robby Workman* <rworkman@slackware.com>
+ Developer
+
+*Lucas De Marchi* <lucas.de.marchi@gmail.com>
+ Developer
diff --git a/man/depmod.d.5.scd b/man/depmod.d.5.scd
new file mode 100644
index 0000000..9c42478
--- /dev/null
+++ b/man/depmod.d.5.scd
@@ -0,0 +1,95 @@
+DEPMOD.D(5) "kmod" "depmod.d"
+
+# NAME
+
+depmod.d - Configuration directory for depmod
+
+# SYNOPSIS
+
+/lib/depmod.d/\*.conf
+
+@DISTCONFDIR@/depmod.d/\*.conf
+
+/usr/local/lib/depmod.d/\*.conf
+
+/run/depmod.d/\*.conf
+
+/etc/depmod.d/\*.conf
+
+# DESCRIPTION
+
+The order in which modules are processed by the *depmod* command can be altered
+on a global or per-module basis. This is typically useful in cases where
+built-in kernel modules are complemented by custom built versions of the same
+and the user wishes to affect the priority of processing in order to override
+the module version supplied by the kernel.
+
+The format of files under depmod.d is simple: one command per line, with blank
+lines and lines starting with '#' ignored (useful for adding comments). A '\\'
+at the end of a line causes it to continue on the next line, which makes the
+files a bit neater.
+
+# COMMANDS
+
+search _subdirectory..._
+ This allows you to specify the order in which @MODULE_DIRECTORY@ (or
+ other configured module location) subdirectories will be processed by
+ *depmod*. Directories are listed in order, with the highest priority
+ given to the first listed directory and the lowest priority given to the
+ last directory listed. The special keyword *built-in* refers to the
+ standard module directories installed by the kernel. Another special
+ keyword *external* refers to the list of external directories, defined
+ by the *external* command.
+
+ By default, depmod will give a higher priority to a directory with the
+ name *updates* using this built-in search string: "updates built-in" but
+ more complex arrangements are possible and are used in several popular
+ distributions.
+
+override _modulename_ _kernelversion_ _modulesubdirectory_
+ This command allows you to override which version of a specific module
+ will be used when more than one module sharing the same name is
+ processed by the *depmod* command. It is possible to specify one kernel
+ or all kernels using the \* wildcard. _ modulesubdirectory_ is the name
+ of the subdirectory under @MODULE_DIRECTORY@ (or other module location)
+ where the target module is installed.
+
+ For example, it is possible to override the priority of an updated test
+ module called *kmod* by specifying the following command: "override
+ kmod \* extra". This will ensure that any matching module name installed
+ under the *extra* subdirectory within @MODULE_DIRECTORY@ (or other
+ module location) will take priority over any likenamed module already
+ provided by the kernel.
+
+external _kernelversion_ _absolutemodulesdirectory..._
+ This specifies a list of directories, which will be checked according to
+ the priorities in the *search* command. The order matters also, the
+ first directory has the higher priority.
+
+ The _kernelversion_ is a POSIX regular expression or \* wildcard, like
+ in the *override*.
+
+exclude _excludedir_
+ This specifies the trailing directories that will be excluded during the
+ search for kernel modules.
+
+ The _excludedir_ is the trailing directory to exclude
+
+# COPYRIGHT
+
+This manual page Copyright 2006-2010, Jon Masters, Red Hat, Inc.
+
+# SEE ALSO
+
+*depmod*(8)
+
+# AUTHORS
+
+*Jon Masters* <jcm@jonmasters.org>
+ Developer
+
+*Robby Workman* <rworkman@slackware.com>
+ Developer
+
+*Lucas De Marchi* <lucas.de.marchi@gmail.com>
+ Developer
diff --git a/man/insmod.8.scd b/man/insmod.8.scd
new file mode 100644
index 0000000..b6f8654
--- /dev/null
+++ b/man/insmod.8.scd
@@ -0,0 +1,36 @@
+INSMOD(8) "kmod" "insmod"
+
+# NAME
+
+insmod - Simple program to insert a module into the Linux Kernel
+
+# SYNOPSIS
+
+*insmod* [_filename_] [_module options_...]
+
+# DESCRIPTION
+
+*insmod* is a trivial program to insert a module into the kernel. Most users
+will want to use* modprobe*(8) instead, which is more clever and can handle
+module dependencies.
+
+Only the most general of error messages are reported: as the work of trying to
+link the module is now done inside the kernel, the *dmesg* usually gives more
+information about errors.
+
+# COPYRIGHT
+
+This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
+Maintained by Jon Masters and others.
+
+# SEE ALSO
+
+*modprobe*(8), *rmmod*(8), *lsmod*(8), *modinfo*(8) *depmod*(8)
+
+# AUTHORS
+
+*Jon Masters* <jcm@jonmasters.org>
+ Developer
+
+*Lucas De Marchi* <lucas.de.marchi@gmail.com>
+ Developer
diff --git a/man/kmod.8.scd b/man/kmod.8.scd
new file mode 100644
index 0000000..d292a13
--- /dev/null
+++ b/man/kmod.8.scd
@@ -0,0 +1,48 @@
+KMOD(8) "kmod" "kmod"
+
+# NAME
+
+kmod - Program to manage Linux Kernel modules
+
+# SYNOPSIS
+
+*kmod* [*OPTIONS*...] [_COMMAND_] [*COMMAND_OPTIONS*...]
+
+# DESCRIPTION
+
+*kmod* is a multi-call binary which implements the programs used to control
+Linux Kernel modules. Most users will only run it using its other names.
+
+# OPTIONS
+
+*-V --version*
+ Show the program version and exit.
+
+*-h --help*
+ Show the help message.
+
+# COMMANDS
+
+*help*
+ Show the help message.
+
+*list*
+ List the currently loaded modules.
+
+*static-nodes*
+ Output the static device nodes information provided by the modules of
+ the currently running kernel version.
+
+# COPYRIGHT
+
+This manual page originally Copyright 2014, Marco d'Itri. Maintained by Lucas De
+Marchi and others.
+
+# SEE ALSO
+
+*lsmod*(8), *rmmod*(8), *insmod*(8), *modinfo*(8), *modprobe*(8), *depmod*(8)
+
+# AUTHOR
+
+*Lucas De Marchi* <lucas.de.marchi@gmail.com>
+ Developer
diff --git a/man/lsmod.8.scd b/man/lsmod.8.scd
new file mode 100644
index 0000000..7195cba
--- /dev/null
+++ b/man/lsmod.8.scd
@@ -0,0 +1,30 @@
+LSMOD(8) "kmod" "lsmod"
+
+# NAME
+
+lsmod - Show the status of modules in the Linux Kernel
+
+# SYNOPSIS
+*lsmod*
+
+# DESCRIPTION
+
+*lsmod* is a trivial program which nicely formats the contents of the
+/proc/modules, showing what kernel modules are currently loaded.
+
+# COPYRIGHT
+
+This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
+Maintained by Jon Masters and others.
+
+# SEE ALSO
+
+*insmod*(8), *modprobe*(8), *modinfo*(8) *depmod*(8)
+
+# AUTHORS
+
+*Jon Masters* <jcm@jonmasters.org>
+ Developer
+
+*Lucas De Marchi* <lucas.de.marchi@gmail.com>
+ Developer
diff --git a/man/modinfo.8.scd b/man/modinfo.8.scd
new file mode 100644
index 0000000..fd945ce
--- /dev/null
+++ b/man/modinfo.8.scd
@@ -0,0 +1,78 @@
+MODINFO(8) "kmod" "modinfo"
+
+# NAME
+
+modinfo - Show information about a Linux Kernel module
+
+# SYNOPSIS
+
+*modinfo* [*-0*] [*-F* _field_] [*-k* _kernel_] [modulename|filename...]
+
+*modinfo* *-V*
+
+*modinfo* *-h*
+
+# DESCRIPTION
+
+*modinfo* extracts information from the Linux Kernel modules given on the
+command line. If the module name is not a filename, then the @MODULE_DIRECTORY@/
+_version_ directory is searched, as is also done by *modprobe*(8) when loading
+kernel modules.
+
+*modinfo* by default lists each attribute of the module in form _fieldname_ :
+_value_, for easy reading. The filename is listed the same way (although it's
+not really an attribute).
+
+This version of *modinfo* can understand modules of any Linux Kernel
+architecture.
+
+# OPTIONS
+
+*-V*, *--version*
+ Print the modinfo version.
+
+*-F*, *--field*
+ Only print this field value, one per line. This is most useful for
+ scripts. Field names are case-insensitive. Common fields (which may not
+ be in every module) include author, description, license, parm, depends,
+ and alias. There are often multiple parm, alias and depends fields. The
+ special field filename lists the filename of the module.
+
+*-b* _basedir_, *--basedir* _basedir_
+ Root directory for modules, / by default.
+
+*-k* _kernel_
+ Provide information about a kernel other than the running one. This is
+ particularly useful for distributions needing to extract information
+ from a newly installed (but not yet running) set of kernel modules. For
+ example, you wish to find which firmware files are needed by various
+ modules in a new kernel for which you must make an initrd/initramfs
+ image prior to booting.
+
+*-0*, *--null*
+ Use the ASCII zero character to separate field values, instead of a new
+ line. This is useful for scripts, since a new line can theoretically
+ appear inside a field.
+
+*-a* *--author*, *-d* *--description*, *-l* *--license*, *-p* *--parameters*,
+*-n* *--filename*
+ These are shortcuts for the *--field* flag's author, description,
+ license, parm and filename arguments, to ease the transition from the
+ old modutils *modinfo*.
+
+# COPYRIGHT
+
+This manual page originally Copyright 2003, Rusty Russell, IBM Corporation.
+Maintained by Jon Masters and others.
+
+# SEE ALSO
+
+*modprobe*(8)
+
+# AUTHORS
+
+*Jon Masters* <jcm@jonmasters.org>
+ Developer
+
+*Lucas De Marchi* <lucas.de.marchi@gmail.com>
+ Developer
diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd
new file mode 100644
index 0000000..f678654
--- /dev/null
+++ b/man/modprobe.8.scd
@@ -0,0 +1,216 @@
+MODPROBE(8) "kmod" "modprobe"
+
+# NAME
+
+modprobe - Add and remove modules from the Linux Kernel
+
+# SYNOPSIS
+
+*modprobe* [*-v*] [*-V*] [*-C *_config-file_] [*-n*] [*-i*] [*-q*] [*-b*] [_modulename_]
+\ \ \ \ \ \ \ \ \ \[_module parameters_...]
+
+*modprobe* [-r] [*-v*] [*-n*] [*-i*] [_modulename_...]
+
+*modprobe* [-c]
+
+*modprobe* [--dump-modversions] [_filename_]
+
+# DESCRIPTION
+
+*modprobe* intelligently adds or removes a module from the Linux kernel: note
+that for convenience, there is no difference between \_ and - in module names
+(automatic underscore conversion is performed). * modprobe* looks in the module
+directory @DISTCONFDIR@/`uname -r` for all the modules and other files, except
+for the optional configuration files in the /etc/modprobe.d directory (see
+*modprobe.d*(5)). * modprobe* will also use module options specified on the
+kernel command line in the form of <module>.<option> and blacklists in the form
+of modprobe.blacklist=<module>.
+
+Note that unlike in 2.4 series Linux kernels (which are not supported by this
+tool) this version of *modprobe* does not do anything to the module itself: the
+work of resolving symbols and understanding parameters is done inside the
+kernel. So module failure is sometimes accompanied by a kernel message: see
+*dmesg*(8).
+
+*modprobe* expects an up-to-date modules.dep.bin file as generated by the
+corresponding *depmod* utility shipped along with *modprobe* (see *depmod*(8)).
+This file lists what other modules each module needs (if any), and *modprobe*
+uses this to add or remove these dependencies automatically.
+
+If any arguments are given after the _modulename_, they are passed to the kernel
+(in addition to any options listed in the configuration file).
+
+When loading modules, _modulename_ can also be a path to the module. If the path
+is relative, it must explicitly start with "./". Note that this may fail when
+using a path to a module with dependencies not matching the installed depmod
+database.
+
+# OPTIONS
+
+*-a*, *--all*
+ Insert all module names on the command line.
+
+*-b*, *--use-blacklist*
+ This option causes *modprobe* to apply the *blacklist* commands in the
+ configuration files (if any) to module names as well. It is usually used
+ by *udev*(7).
+
+*-C*, *--config*
+ This option overrides the default configuration directory
+ (/etc/modprobe.d).
+
+ This option is passed through *install* or *remove* commands to other
+ *modprobe* commands in the MODPROBE_OPTIONS environment variable.
+
+*-c*, *--showconfig*
+ Dump out the effective configuration from the config directory and exit.
+
+*--dump-modversions*
+ Print out a list of module versioning information required by a module.
+ This option is commonly used by distributions in order to package up a
+ Linux kernel module using module versioning deps.
+
+*-d*, *--dirname*
+ Root directory for modules, / by default.
+
+*--first-time*
+ Normally, *modprobe* will succeed (and do nothing) if told to insert a
+ module which is already present or to remove a module which isn't
+ present. This is ideal for simple scripts; however, more complicated
+ scripts often want to know whether *modprobe* really did something: this
+ option makes modprobe fail in the case that it actually didn't do
+ anything.
+
+*--force-vermagic*
+ Every module contains a small string containing important information,
+ such as the kernel and compiler versions. If a module fails to load and
+ the kernel complains that the "version magic" doesn't match, you can use
+ this option to remove it. Naturally, this check is there for your
+ protection, so using this option is dangerous unless you know what
+ you're doing.
+
+ This applies to any modules inserted: both the module (or alias) on the
+ command line and any modules on which it depends.
+
+*--force-modversion*
+ When modules are compiled with CONFIG_MODVERSIONS set, a section
+ detailing the versions of every interfaced used by (or supplied by) the
+ module is created. If a module fails to load and the kernel complains
+ that the module disagrees about a version of some interface, you can use
+ "--force-modversion" to remove the version information altogether.
+ Naturally, this check is there for your protection, so using this option
+ is dangerous unless you know what you're doing.
+
+ This applies any modules inserted: both the module (or alias) on the
+ command line and any modules on which it depends.
+
+*-f*, *--force*
+ Try to strip any versioning information from the module which might
+ otherwise stop it from loading: this is the same as using both
+ *--force-vermagic* and *--force-modversion*. Naturally, these checks are
+ there for your protection, so using this option is dangerous unless you
+ know what you are doing.
+
+ This applies to any modules inserted: both the module (or alias) on the
+ command line and any modules it on which it depends.
+
+*-i*, *--ignore-install*, *--ignore-remove*
+ This option causes *modprobe* to ignore *install* and *remove* commands
+ in the configuration file (if any) for the module specified on the
+ command line (any dependent modules are still subject to commands set
+ for them in the configuration file). Both *install* and *remove* commands
+ will currently be ignored when this option is used regardless of whether
+ the request was more specifically made with only one or other (and not
+ both) of *--ignore-install* or *--ignore-remove*. See *modprobe.d*(5).
+
+*-n*, *--dry-run*, *--show*
+ This option does everything but actually insert or delete the modules
+ (or run the install or remove commands). Combined with *-v*, it is
+ useful for debugging problems. For historical reasons both *--dry-run*
+ and *--show* actually mean the same thing and are interchangeable.
+
+*-q*, *--quiet*
+ With this flag, *modprobe* won't print an error message if you try to
+ remove or insert a module it can't find (and isn't an alias or
+ *install*/*remove* command). However, it will still return with a non-zero
+ exit status. The kernel uses this to opportunistically probe for modules
+ which might exist using request_module.
+
+*-R*, *--resolve-alias*
+ Print all module names matching an alias. This can be useful for
+ debugging module alias problems.
+
+*-r*, *--remove*
+ This option causes *modprobe* to remove rather than insert a module. If
+ the modules it depends on are also unused, *modprobe* will try to remove
+ them too. Unlike insertion, more than one module can be specified on the
+ command line (it does not make sense to specify module parameters when
+ removing modules).
+
+ There is usually no reason to remove modules, but some buggy modules
+ require it. Your distribution kernel may not have been built to support
+ removal of modules at all.
+
+*-w*, *--wait=*TIMEOUT_MSEC
+ This option causes *modprobe -r *to continue trying to remove a module
+ if it fails due to the module being busy, i.e. its refcount is not 0 at
+ the time the call is made. Modprobe tries to remove the module with an
+ incremental sleep time between each tentative up until the maximum wait
+ time in milliseconds passed in this option.
+
+*-S*, *--set-version*
+ Set the kernel version, rather than using *uname*(2) to decide on the
+ kernel version (which dictates where to find the modules).
+
+*--show-depends*
+ List the dependencies of a module (or alias), including the module
+ itself. This produces a (possibly empty) set of module filenames, one
+ per line, each starting with "insmod" and is typically used by
+ distributions to determine which modules to include when generating
+ initrd/initramfs images. * Install* commands which apply are shown
+ prefixed by "install". It does not run any of the install commands. Note
+ that *modinfo*(8) can be used to extract dependencies of a module from the
+ module itself, but knows nothing of aliases or install commands.
+
+*-s*, *--syslog*
+ This option causes any error messages to go through the syslog mechanism
+ (as LOG_DAEMON with level LOG_NOTICE) rather than to standard error.
+ This is also automatically enabled when stderr is unavailable.
+
+ This option is passed through *install* or *remove* commands to other
+ *modprobe* commands in the MODPROBE_OPTIONS environment variable.
+
+*-V*, *--version*
+ Show version of program and exit.
+
+*-v*, *--verbose*
+ Print messages about what the program is doing. Usually *modprobe* only
+ prints messages if something goes wrong.
+
+ This option is passed through *install* or *remove* commands to other
+ *modprobe* commands in the MODPROBE_OPTIONS environment variable.
+
+# ENVIRONMENT
+
+The MODPROBE_OPTIONS environment variable can also be used to pass arguments to
+*modprobe*.
+
+# COPYRIGHT
+
+This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
+Maintained by Jon Masters and others.
+
+# SEE ALSO
+
+*modprobe.d*(5), *insmod*(8), *rmmod*(8), *lsmod*(8), *modinfo*(8) *depmod*(8)
+
+# AUTHORS
+
+*Jon Masters* <jcm@jonmasters.org>
+ Developer
+
+*Robby Workman* <rworkman@slackware.com>
+ Developer
+
+*Lucas De Marchi* <lucas.de.marchi@gmail.com>
+ Developer
diff --git a/man/modprobe.d.5.scd b/man/modprobe.d.5.scd
new file mode 100644
index 0000000..93b9522
--- /dev/null
+++ b/man/modprobe.d.5.scd
@@ -0,0 +1,168 @@
+MODPROBE.D(5) "kmod" "modprobe.d"
+
+# NAME
+
+modprobe.d - Configuration directory for modprobe
+
+# SYNOPSIS
+
+/lib/modprobe.d/\*.conf
+
+@DISTCONFDIR@/modprobe.d/\*.conf
+
+/usr/local/lib/modprobe.d/\*.conf
+
+/run/modprobe.d/\*.conf
+
+/etc/modprobe.d/\*.conf
+
+# DESCRIPTION
+
+Because the *modprobe* command can add or remove more than one module, due to
+modules having dependencies, we need a method of specifying what options are to
+be used with those modules. All files underneath the /etc/modprobe.d directory
+which end with the .conf extension specify those options as required. They can
+also be used to create convenient aliases: alternate names for a module, or they
+can override the normal *modprobe* behavior altogether for those with special
+requirements (such as inserting more than one module).
+
+Note that module and alias names (like other module names) can have - or \_ in
+them: both are interchangeable throughout all the module commands as underscore
+conversion happens automatically.
+
+The format of files under modprobe.d is simple: one command per line, with blank
+lines and lines starting with '#' ignored (useful for adding comments). A '\\'
+at the end of a line causes it to continue on the next line, which makes the
+file a bit neater.
+
+# COMMANDS
+
+alias _wildcard_ _modulename_
+ This allows you to give alternate names for a module. For example:
+ "alias my-mod really_long_modulename" means you can use "modprobe
+ my-mod" instead of "modprobe really_long_modulename". You can also use
+ shell-style wildcards, so "alias my-mod\* really_long_modulename" means
+ that "modprobe my-mod-something" has the same effect. You can't have
+ aliases to other aliases (that way lies madness), but aliases can have
+ options, which will be added to any other options.
+
+ Note that modules can also contain their own aliases, which you can see
+ using *modinfo*. These aliases are used as a last resort (ie. if there
+ is no real module, *install*, *remove*, or *alias* command in the
+ configuration).
+
+blacklist _modulename_
+ Modules can contain their own aliases: usually these are aliases
+ describing the devices they support, such as "pci:123...". These
+ "internal" aliases can be overridden by normal "alias" keywords, but
+ there are cases where two or more modules both support the same devices,
+ or a module invalidly claims to support a device that it does not: the
+ *blacklist* keyword indicates that all of that particular module's
+ internal aliases are to be ignored.
+
+install _modulename_ _command..._
+ This command instructs *modprobe* to run your command instead of
+ inserting the module in the kernel as normal. The command can be any
+ shell command: this allows you to do any kind of complex processing you
+ might wish. For example, if the module "fred" works better with the
+ module "barney" already installed (but it doesn't depend on it, so
+ *modprobe* won't automatically load it), you could say "install fred
+ /sbin/modprobe barney; /sbin/modprobe --ignore-install fred", which
+ would do what you wanted. Note the *--ignore-install*, which stops the
+ second *modprobe* from running the same *install* command again. See
+ also *remove* below.
+
+ The long term future of this command as a solution to the problem of
+ providing additional module dependencies is not assured and it is
+ intended to replace this command with a warning about its eventual
+ removal or deprecation at some point in a future release. Its use
+ complicates the automated determination of module dependencies by
+ distribution utilities, such as mkinitrd (because these now need to
+ somehow interpret what the *install* commands might be doing. In a
+ perfect world, modules would provide all dependency information without
+ the use of this command and work is underway to implement soft
+ dependency support within the Linux kernel.
+
+ If you use the string "$CMDLINE_OPTS" in the command, it will be
+ replaced by any options specified on the modprobe command line. This can
+ be useful because users expect "modprobe fred opt=1" to pass the "opt=1"
+ arg to the module, even if there's an install command in the
+ configuration file. So our above example becomes "install fred
+ /sbin/modprobe barney; /sbin/modprobe --ignore-install fred
+ $CMDLINE_OPTS"
+
+options _modulename_ _option..._
+ This command allows you to add options to the module _modulename_ (which
+ might be an alias) every time it is inserted into the kernel: whether
+ directly (using *modprobe* _ modulename_) or because the module being
+ inserted depends on this module.
+
+ All options are added together: they can come from an *option* for the
+ module itself, for an alias, and on the command line.
+
+remove _modulename_ _command..._
+ This is similar to the *install* command above, except it is invoked
+ when "modprobe -r" is run.
+
+softdep _modulename_ pre: _modules..._ post: _modules..._
+ The *softdep* command allows you to specify soft, or optional, module
+ dependencies. _ modulename_ can be used without these optional modules
+ installed, but usually with some features missing. For example, a driver
+ for a storage HBA might require another module be loaded in order to use
+ management features.
+
+ pre-deps and post-deps modules are lists of names and/or aliases of
+ other modules that modprobe will attempt to install (or remove) in order
+ before and after the main module given in the _modulename_ argument.
+
+ Example: Assume "softdep c pre: a b post: d e" is provided in the
+ configuration. Running "modprobe c" is now equivalent to "modprobe a b c
+ d e" without the softdep. Flags such as --use-blacklist are applied to
+ all the specified modules, while module parameters only apply to module
+ c.
+
+ Note: if there are *install* or *remove* commands with the same
+ _modulename_ argument, *softdep* takes precedence.
+
+weakdep _modulename_ _modules..._
+ The *weakdep* command allows you to specify weak module dependencies.
+ Those are similar to pre softdep, with the difference that userspace
+ doesn't attempt to load that dependency before the specified module.
+ Instead the kernel may request one or multiple of them during module
+ probe, depending on the hardware it's binding to. The purpose of weak
+ module is to allow a driver to specify that a certain dependency may be
+ needed, so it should be present in the filesystem (e.g. in initramfs)
+ when that module is probed.
+
+ Example: Assume "weakdep c a b". A program creating an initramfs knows
+ it should add a, b, and c to the filesystem since a and b may be
+ required/desired at runtime. When c is loaded and is being probed, it
+ may issue calls to request_module() causing a or b to also be loaded.
+
+# COMPATIBILITY
+
+A future version of kmod will come with a strong warning to avoid use of the
+*install* as explained above. This will happen once support for soft
+dependencies in the kernel is complete. That support will complement the
+existing softdep support within this utility by providing such dependencies
+directly within the modules.
+
+# COPYRIGHT
+
+This manual page originally Copyright 2004, Rusty Russell, IBM Corporation.
+Maintained by Jon Masters and others.
+
+# SEE ALSO
+
+*modprobe*(8), *modules.dep*(5)
+
+# AUTHORS
+
+*Jon Masters* <jcm@jonmasters.org>
+ Developer
+
+*Robby Workman* <rworkman@slackware.com>
+ Developer
+
+*Lucas De Marchi* <lucas.de.marchi@gmail.com>
+ Developer
diff --git a/man/modules.dep.5.scd b/man/modules.dep.5.scd
new file mode 100644
index 0000000..34ffb83
--- /dev/null
+++ b/man/modules.dep.5.scd
@@ -0,0 +1,43 @@
+MODULES.DEP(5) "kmod" "modules.dep"
+
+# NAME
+
+modules.dep, modules.dep.bin - Module dependency information
+
+# SYNOPSIS
+
+@MODULE_DIRECTORY@/modules.dep
+
+@MODULE_DIRECTORY@/modules.dep.bin
+
+# DESCRIPTION
+
+modules.dep.bin is a binary file generated by *depmod* listing the dependencies
+for every module in the directories under @MODULE_DIRECTORY@/_version_. It is
+used by kmod tools such as *modprobe* and libkmod.
+
+Its text counterpart is located in the same directory with the name
+modules.dep. The text version is maintained only for easy of reading by humans
+and is in no way used by any kmod tool.
+
+These files are not intended for editing or use by any additional utilities as
+their format is subject to change in the future. You should use the *modinfo*(8)
+command to obtain information about modules in a future proof and compatible
+fashion rather than touching these files.
+
+# COPYRIGHT
+
+This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
+Maintained by Jon Masters and others.
+
+# SEE ALSO
+
+*depmod*(8), *modprobe*(8)
+
+# AUTHORS
+
+*Jon Masters* <jcm@jonmasters.org>
+ Developer
+
+*Lucas De Marchi* <lucas.de.marchi@gmail.com>
+ Developer
diff --git a/man/rmmod.8.scd b/man/rmmod.8.scd
new file mode 100644
index 0000000..72947a6
--- /dev/null
+++ b/man/rmmod.8.scd
@@ -0,0 +1,50 @@
+RMMOD(8) "kmod" "rmmod"
+
+# NAME
+
+rmmod - Simple program to remove a module from the Linux Kernel
+
+# SYNOPSIS
+
+*rmmod* [*-f*] [*-s*] [*-v*] [_modulename_]
+
+# 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.
+
+# OPTIONS
+
+*-v*, *--verbose*
+ Print messages about what the program is doing. Usually *rmmod* prints
+ messages only if something goes wrong.
+
+*-f*, *--force*
+ This option can be extremely dangerous: it has no effect unless
+ CONFIG_MODULE_FORCE_UNLOAD was set when the kernel was compiled. With
+ this option, you can remove modules which are being used, or which are
+ not designed to be removed, or have been marked as unsafe (see *lsmod*(8)).
+
+*-s*, *--syslog*
+ Send errors to syslog instead of standard error.
+
+*-V --version*
+ Show version of program and exit.
+
+# COPYRIGHT
+
+This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
+Maintained by Jon Masters and others.
+
+# SEE ALSO
+
+*modprobe*(8), *insmod*(8), *lsmod*(8), *modinfo*(8) *depmod*(8)
+
+# AUTHORS
+
+*Jon Masters* <jcm@jonmasters.org>
+ Developer
+
+*Lucas De Marchi* <lucas.de.marchi@gmail.com>
+ Developer
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 03/20] man: build the scdoc based man pages
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 01/20] man: add script to generate/compare the xslt vs upcoming scdoc Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 02/20] man: add scdoc based man pages Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-29 18:04 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 04/20] man: remove no longer used XML files Emil Velikov via B4 Relay
` (17 subsequent siblings)
20 siblings, 1 reply; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Note that scdoc does not handle natively handle the dummy
modules.dep.bin.5 entry, so we need to create one manually.
Not a big deal, since it's single static line anyway.
Also: pkg-config --variable=scdoc scdoc, produces the full executable
and path, although for now we stick with the AC_PATH_PROG approach.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
configure.ac | 2 +-
man/Makefile.am | 24 ++++++++----------------
man/modules.dep.bin.5 | 1 +
3 files changed, 10 insertions(+), 17 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9527aa2..dcf7479 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,7 @@ AC_PROG_SED
AC_PROG_MKDIR_P
AC_PROG_LN_S
PKG_PROG_PKG_CONFIG
-AC_PATH_PROG([XSLTPROC], [xsltproc])
+AC_PATH_PROG([SCDOC], [scdoc])
AC_PROG_CC_C99
diff --git a/man/Makefile.am b/man/Makefile.am
index d62ff21..0285fdd 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -2,37 +2,29 @@ MAN5 = depmod.d.5 modprobe.d.5 modules.dep.5
MAN8 = kmod.8 depmod.8 insmod.8 lsmod.8 rmmod.8 modprobe.8 modinfo.8
MAN_STUB = modules.dep.bin.5
-AM_V_XSLT = $(AM_V_XSLT_$(V))
-AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
-AM_V_XSLT_0 = @echo " XSLT " $@;
-
-XSLT = $(if $(XSLTPROC), $(XSLTPROC), xsltproc)
+AM_V_SCDOC = $(AM_V_SCDOC_$(V))
+AM_V_SCDOC_ = $(AM_V_SCDOR_$(AM_DEFAULT_VERBOSITY))
+AM_V_SCDOC_0 = @echo " SCDOC " $@;
if BUILD_TOOLS
dist_man_MANS = $(MAN5) $(MAN8) $(MAN_STUB)
-modules.dep.bin.5: modules.dep.5
endif
-EXTRA_DIST = $(MAN5:%.5=%.5.xml) $(MAN8:%.8=%.8.xml)
+EXTRA_DIST = $(MAN5:%.5=%.5.scd) $(MAN8:%.8=%.8.scd)
CLEANFILES = $(dist_man_MANS)
define generate_manpage
- $(AM_V_XSLT)if [ '$(distconfdir)' != '/lib' ] ; then \
+ $(AM_V_SCDOC)if [ '$(distconfdir)' != '/lib' ] ; then \
sed -e 's|@DISTCONFDIR@|$(distconfdir)|g' $< ; \
else \
sed -e '/@DISTCONFDIR@/d' $< ; \
fi | \
sed -e 's|@MODULE_DIRECTORY@|$(module_directory)|g' | \
- $(XSLT) \
- -o $@ \
- --nonet \
- --stringparam man.output.quietly 1 \
- --param funcsynopsis.style "'ansi'" \
- http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl -
+ $(SCDOC) > $@
endef
-%.5: %.5.xml
+%.5: %.5.scd
$(generate_manpage)
-%.8: %.8.xml
+%.8: %.8.scd
$(generate_manpage)
diff --git a/man/modules.dep.bin.5 b/man/modules.dep.bin.5
new file mode 100644
index 0000000..795636b
--- /dev/null
+++ b/man/modules.dep.bin.5
@@ -0,0 +1 @@
+.so modules.dep.5
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 04/20] man: remove no longer used XML files
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (2 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 03/20] man: build the " Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 05/20] man: add some extra bold/italic annotations Emil Velikov via B4 Relay
` (16 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
man/depmod.8.xml | 343 -------------------------------
man/depmod.d.5.xml | 164 ---------------
man/insmod.8.xml | 87 --------
man/kmod.8.xml | 120 -----------
man/lsmod.8.xml | 73 -------
man/modinfo.8.xml | 201 -------------------
man/modprobe.8.xml | 544 --------------------------------------------------
man/modprobe.d.5.xml | 265 ------------------------
man/modules.dep.5.xml | 80 --------
man/rmmod.8.xml | 148 --------------
10 files changed, 2025 deletions(-)
diff --git a/man/depmod.8.xml b/man/depmod.8.xml
deleted file mode 100644
index fce2a4a..0000000
--- a/man/depmod.8.xml
+++ /dev/null
@@ -1,343 +0,0 @@
-<?xml version='1.0'?>
-<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<refentry id="depmod">
- <refentryinfo>
- <title>depmod</title>
- <productname>kmod</productname>
-
- <authorgroup>
- <author>
- <contrib>Developer</contrib>
- <firstname>Jon</firstname>
- <surname>Masters</surname>
- <email>jcm@jonmasters.org</email>
- </author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Robby</firstname>
- <surname>Workman</surname>
- <email>rworkman@slackware.com</email>
- </author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Lucas</firstname>
- <surname>De Marchi</surname>
- <email>lucas.de.marchi@gmail.com</email>
- </author>
- </authorgroup>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>depmod</refentrytitle>
- <manvolnum>8</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>depmod</refname>
- <refpurpose>
- Generate <filename>modules.dep</filename> and map files.
- </refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>depmod</command>
- <arg><option>-b <replaceable>basedir</replaceable></option></arg>
- <arg><option>-o <replaceable>outdir</replaceable></option></arg>
- <arg><option>-e</option></arg>
- <arg><option>-E <replaceable>Module.symvers</replaceable></option></arg>
- <arg><option>-F <replaceable>System.map</replaceable></option></arg>
- <arg><option>-n</option></arg>
- <arg><option>-v</option></arg>
- <arg><option>-A</option></arg>
- <arg><option>-P <replaceable>prefix</replaceable></option></arg>
- <arg><option>-w</option></arg>
- <arg><option><replaceable>version</replaceable></option></arg>
- </cmdsynopsis>
-
- <cmdsynopsis>
- <command>depmod</command>
- <arg><option>-e</option></arg>
- <arg><option>-E <replaceable>Module.symvers</replaceable></option></arg>
- <arg><option>-F <replaceable>System.map</replaceable></option></arg>
- <arg><option>-n</option></arg>
- <arg><option>-v</option></arg>
- <arg><option>-P <replaceable>prefix</replaceable></option></arg>
- <arg><option>-w</option></arg>
- <arg><option><replaceable>version</replaceable></option></arg>
- <arg rep='repeat'><option><replaceable>filename</replaceable></option></arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1><title>DESCRIPTION</title>
- <para>
- Linux kernel modules can provide services (called "symbols") for other
- modules to use (using one of the EXPORT_SYMBOL variants in the code). If
- a second module uses this symbol, that second module clearly depends on
- the first module. These dependencies can get quite complex.
- </para>
- <para> <command>depmod</command> creates a list of module dependencies by
- reading each module under
- <filename>@MODULE_DIRECTORY@/</filename><replaceable>version</replaceable> and
- determining what symbols it exports and what symbols it needs. By
- default, this list is written to <filename>modules.dep</filename>, and a
- binary hashed version named <filename>modules.dep.bin</filename>, in the
- same directory. If filenames are given on the command line, only those
- modules are examined (which is rarely useful unless all modules are
- listed). <command>depmod</command> also creates a list of symbols
- provided by modules in the file named
- <filename>modules.symbols</filename> and its binary hashed version,
- <filename>modules.symbols.bin</filename>. Finally,
- <command>depmod</command> will output a file named
- <filename>modules.devname</filename> if modules supply special device
- names (devname) that should be populated in /dev on boot (by a utility
- such as systemd-tmpfiles).
- </para>
- <para> If a <replaceable>version</replaceable> is provided, then that kernel
- version's module directory is used rather than the current kernel version
- (as returned by <command>uname -r</command>).
- </para>
- </refsect1>
- <refsect1><title>OPTIONS</title>
- <variablelist>
- <varlistentry>
- <term>
- <option>-a</option>
- </term>
- <term>
- <option>--all</option>
- </term>
- <listitem>
- <para>
- Probe all modules. This option is enabled by default if no
- file names are given in the command-line.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-A</option>
- </term>
- <term>
- <option>--quick</option>
- </term>
- <listitem>
- <para>
- This option scans to see if any modules are newer than the
- <filename>modules.dep</filename> file before any work is done:
- if not, it silently exits rather than regenerating the files.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-b <replaceable>basedir</replaceable></option>
- </term>
- <term>
- <option>--basedir <replaceable>basedir</replaceable></option>
- </term>
- <listitem>
- <para>
- If your modules are not currently in the (normal) directory
- <filename>@MODULE_DIRECTORY@/</filename><replaceable>version</replaceable>,
- but in a staging area, you can specify a
- <replaceable>basedir</replaceable> which is prepended to the
- directory name. This <replaceable>basedir</replaceable> is
- stripped from the resulting <filename>modules.dep</filename> file,
- so it is ready to be moved into the normal location. Use this
- option if you are a distribution vendor who needs to pre-generate
- the meta-data files rather than running depmod again later.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-o <replaceable>outdir</replaceable></option>
- </term>
- <term>
- <option>--outdir <replaceable>outdir</replaceable></option>
- </term>
- <listitem>
- <para>
- Set the output directory where depmod will store any generated file.
- <replaceable>outdir</replaceable> serves as a root to that location,
- similar to how <replaceable>basedir</replaceable> is used. Also this
- setting takes precedence and if used together with
- <replaceable>basedir</replaceable> it will result in the input being
- that directory, but the output being the one set by
- <replaceable>outdir</replaceable>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-C</option>
- </term>
- <term>
- <option>--config <replaceable>file or directory</replaceable></option>
- </term>
- <listitem>
- <para>
- This option overrides the default configuration directory at
- <filename>/etc/depmod.d/</filename>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-e</option>
- </term>
- <term>
- <option>--errsyms</option>
- </term>
- <listitem>
- <para>
- When combined with the <option>-F</option> option, this reports any
- symbols which a module needs which are not supplied by other
- modules or the kernel. Normally, any symbols not provided by
- modules are assumed to be provided by the kernel (which should be
- true in a perfect world), but this assumption can break especially
- when additionally updated third party drivers are not correctly
- installed or were built incorrectly.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-E</option>
- </term>
- <term>
- <option>--symvers</option>
- </term>
- <listitem>
- <para>
- When combined with the <option>-e</option> option, this
- reports any symbol versions supplied by modules that do
- not match with the symbol versions provided by the
- kernel in its <filename>Module.symvers</filename>.
- This option is mutually incompatible with <option>-F</option>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-F</option>
- </term>
- <term>
- <option>--filesyms <replaceable>System.map</replaceable></option>
- </term>
- <listitem>
- <para>
- Supplied with the <filename>System.map</filename> produced when the
- kernel was built, this allows the <option>-e</option> option to
- report unresolved symbols. This option is mutually incompatible
- with <option>-E</option>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-h</option>
- </term>
- <term>
- <option>--help</option>
- </term>
- <listitem>
- <para>
- Print the help message and exit.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-n</option>
- </term>
- <term>
- <option>--show</option>
- </term>
- <term>
- <option>--dry-run</option>
- </term>
- <listitem>
- <para>
- This sends the resulting modules.dep and the various map files to
- standard output rather than writing them into the module directory.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-P</option>
- </term>
- <listitem>
- <para>
- Some architectures prefix symbols with an extraneous character.
- This specifies a prefix character (for example '_') to ignore.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-v</option>
- </term>
- <term>
- <option>--verbose</option>
- </term>
- <listitem>
- <para>
- In verbose mode, <command>depmod</command> will print (to stdout)
- all the symbols each module depends on and the module's file name
- which provides that symbol.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-V</option>
- </term>
- <term>
- <option>--version</option>
- </term>
- <listitem>
- <para>
- Show version of program and exit. See below for caveats when
- run on older kernels.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-w</option>
- </term>
- <listitem>
- <para>
- Warn on duplicate dependencies, aliases, symbol versions, etc.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1><title>COPYRIGHT</title>
- <para>
- This manual page originally Copyright 2002, Rusty Russell,
- IBM Corporation. Portions Copyright Jon Masters, and others.
- </para>
- </refsect1>
-
- <refsect1><title>SEE ALSO</title>
- <para>
- <citerefentry>
- <refentrytitle>depmod.d</refentrytitle><manvolnum>5</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>modules.dep</refentrytitle><manvolnum>5</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
-</refentry>
diff --git a/man/depmod.d.5.xml b/man/depmod.d.5.xml
deleted file mode 100644
index b07e6a2..0000000
--- a/man/depmod.d.5.xml
+++ /dev/null
@@ -1,164 +0,0 @@
-<?xml version="1.0"?>
-<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<refentry id="depmod.d">
- <refentryinfo>
- <title>depmod.d</title>
- <productname>kmod</productname>
-
- <authorgroup>
- <author>
- <contrib>Developer</contrib>
- <firstname>Jon</firstname>
- <surname>Masters</surname>
- <email>jcm@jonmasters.org</email>
- </author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Robby</firstname>
- <surname>Workman</surname>
- <email>rworkman@slackware.com</email>
- </author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Lucas</firstname>
- <surname>De Marchi</surname>
- <email>lucas.de.marchi@gmail.com</email>
- </author>
- </authorgroup>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>depmod.d</refentrytitle>
- <manvolnum>5</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>depmod.d</refname>
- <refpurpose>Configuration directory for depmod</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <para><filename>/lib/depmod.d/*.conf</filename></para>
- <para><filename>@DISTCONFDIR@/depmod.d/*.conf</filename></para>
- <para><filename>/usr/local/lib/depmod.d/*.conf</filename></para>
- <para><filename>/run/depmod.d/*.conf</filename></para>
- <para><filename>/etc/depmod.d/*.conf</filename></para>
- </refsynopsisdiv>
-
- <refsect1><title>DESCRIPTION</title>
- <para>The order in which modules are processed by the
- <command>depmod</command> command can be altered on a global or
- per-module basis. This is typically useful in cases where built-in
- kernel modules are complemented by custom built versions of the
- same and the user wishes to affect the priority of processing in
- order to override the module version supplied by the kernel.
- </para>
- <para>
- The format of files under <filename>depmod.d</filename> is simple: one
- command per line, with blank lines and lines starting with '#'
- ignored (useful for adding comments). A '\' at the end of a line
- causes it to continue on the next line, which makes the files a
- bit neater.
- </para>
- </refsect1>
- <refsect1>
- <title>COMMANDS</title>
- <variablelist>
- <varlistentry>
- <term>search <replaceable>subdirectory...</replaceable>
- </term>
- <listitem>
- <para>
- This allows you to specify the order in which @MODULE_DIRECTORY@
- (or other configured module location) subdirectories will
- be processed by <command>depmod</command>. Directories are
- listed in order, with the highest priority given to the
- first listed directory and the lowest priority given to the last
- directory listed. The special keyword <command>built-in</command>
- refers to the standard module directories installed by the kernel.
- Another special keyword <command>external</command> refers to the
- list of external directories, defined by the
- <command>external</command> command.
- </para>
- <para>
- By default, depmod will give a higher priority to
- a directory with the name <command>updates</command>
- using this built-in search string: "updates built-in"
- but more complex arrangements are possible and are
- used in several popular distributions.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>override <replaceable>modulename</replaceable> <replaceable>kernelversion</replaceable> <replaceable>modulesubdirectory</replaceable>
- </term>
- <listitem>
- <para>
- This command allows you to override which version of a
- specific module will be used when more than one module
- sharing the same name is processed by the
- <command>depmod</command> command. It is possible to
- specify one kernel or all kernels using the * wildcard.
- <replaceable>modulesubdirectory</replaceable> is the
- name of the subdirectory under @MODULE_DIRECTORY@ (or other
- module location) where the target module is installed.
- </para>
- <para>
- For example, it is possible to override the priority of
- an updated test module called <command>kmod</command> by
- specifying the following command: "override kmod * extra".
- This will ensure that any matching module name installed
- under the <command>extra</command> subdirectory within
- @MODULE_DIRECTORY@ (or other module location) will take priority
- over any likenamed module already provided by the kernel.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>external <replaceable>kernelversion</replaceable>
- <replaceable>absolutemodulesdirectory...</replaceable>
- </term>
- <listitem>
- <para>
- This specifies a list of directories, which will be checked
- according to the priorities in the <command>search</command>
- command. The order matters also, the first directory has the higher
- priority.
- </para>
- <para>
- The <replaceable>kernelversion</replaceable> is a POSIX regular
- expression or * wildcard, like in the <command>override</command>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>exclude <replaceable>excludedir</replaceable>
- </term>
- <listitem>
- <para>
- This specifies the trailing directories that will be excluded
- during the search for kernel modules.
- </para>
- <para>
- The <replaceable>excludedir</replaceable> is the trailing directory
- to exclude
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1><title>COPYRIGHT</title>
- <para>
- This manual page Copyright 2006-2010, Jon Masters, Red Hat, Inc.
- </para>
- </refsect1>
- <refsect1><title>SEE ALSO</title>
- <para>
- <citerefentry>
- <refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
-</refentry>
diff --git a/man/insmod.8.xml b/man/insmod.8.xml
deleted file mode 100644
index 3ebdccd..0000000
--- a/man/insmod.8.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version='1.0'?>
-<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<refentry id="insmod">
- <refentryinfo>
- <title>insmod</title>
- <productname>kmod</productname>
-
- <authorgroup>
- <author>
- <contrib>Developer</contrib>
- <firstname>Jon</firstname>
- <surname>Masters</surname>
- <email>jcm@jonmasters.org</email>
- </author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Lucas</firstname>
- <surname>De Marchi</surname>
- <email>lucas.de.marchi@gmail.com</email>
- </author>
- </authorgroup>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>insmod</refentrytitle>
- <manvolnum>8</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>insmod</refname>
- <refpurpose>
- Simple program to insert a module into the Linux Kernel
- </refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>insmod</command>
- <arg><replaceable>filename</replaceable></arg>
- <arg rep='repeat'><replaceable>module options</replaceable></arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1><title>DESCRIPTION</title>
- <para>
- <command>insmod</command> is a trivial program to insert a module into
- the kernel. Most users will want to use
- <citerefentry><refentrytitle>modprobe</refentrytitle>
- <manvolnum>8</manvolnum> </citerefentry> instead, which is more clever
- and can handle module dependencies.
- </para>
- <para>
- Only the most general of error messages are reported: as the work of
- trying to link the module is now done inside the kernel, the
- <command>dmesg</command> usually gives more information about errors.
- </para>
- </refsect1>
-
- <refsect1><title>COPYRIGHT</title>
- <para>
- This manual page originally Copyright 2002, Rusty Russell, IBM
- Corporation. Maintained by Jon Masters and others.
- </para>
- </refsect1>
-
- <refsect1><title>SEE ALSO</title>
- <para>
- <citerefentry>
- <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>rmmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>lsmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>modinfo</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>
- <citerefentry>
- <refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
-</refentry>
diff --git a/man/kmod.8.xml b/man/kmod.8.xml
deleted file mode 100644
index 0706ad5..0000000
--- a/man/kmod.8.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version='1.0'?>
-<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<refentry id="kmod">
- <refentryinfo>
- <title>kmod</title>
- <productname>kmod</productname>
-
- <authorgroup>
- <author>
- <contrib>Developer</contrib>
- <firstname>Lucas</firstname>
- <surname>De Marchi</surname>
- <email>lucas.de.marchi@gmail.com</email>
- </author>
- </authorgroup>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>kmod</refentrytitle>
- <manvolnum>8</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>kmod</refname>
- <refpurpose>Program to manage Linux Kernel modules</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>kmod</command>
- <arg rep='repeat'><option>OPTIONS</option></arg>
- <arg><replaceable>COMMAND</replaceable></arg>
- <arg rep='repeat'><option>COMMAND_OPTIONS</option></arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1><title>DESCRIPTION</title>
- <para>
- <command>kmod</command> is a multi-call binary which implements the
- programs used to control Linux Kernel modules. Most users will only
- run it using its other names.
- </para>
- </refsect1>
-
- <refsect1><title>OPTIONS</title>
- <variablelist>
- <varlistentry>
- <term><option>-V</option> <option>--version</option>
- </term>
- <listitem>
- <para>Show the program version and exit.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-h</option> <option>--help</option>
- </term>
- <listitem>
- <para>Show the help message.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1><title>COMMANDS</title>
- <variablelist>
- <varlistentry>
- <term><command>help</command></term>
- <listitem>
- <para>Show the help message.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><command>list</command></term>
- <listitem>
- <para>List the currently loaded modules.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><command>static-nodes</command></term>
- <listitem>
- <para>Output the static device nodes information provided by
- the modules of the currently running kernel version.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1>
- <title>COPYRIGHT</title>
- <para>
- This manual page originally Copyright 2014, Marco d'Itri.
- Maintained by Lucas De Marchi and others.
- </para>
- </refsect1>
-
- <refsect1><title>SEE ALSO</title>
- <para>
- <citerefentry>
- <refentrytitle>lsmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>rmmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>insmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>modinfo</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
-</refentry>
diff --git a/man/lsmod.8.xml b/man/lsmod.8.xml
deleted file mode 100644
index 588f228..0000000
--- a/man/lsmod.8.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version='1.0'?>
-<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<refentry id="lsmod">
- <refentryinfo>
- <title>lsmod</title>
- <productname>kmod</productname>
-
- <authorgroup>
- <author>
- <contrib>Developer</contrib>
- <firstname>Jon</firstname>
- <surname>Masters</surname>
- <email>jcm@jonmasters.org</email>
- </author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Lucas</firstname>
- <surname>De Marchi</surname>
- <email>lucas.de.marchi@gmail.com</email>
- </author>
- </authorgroup>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lsmod</refentrytitle>
- <manvolnum>8</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>lsmod</refname>
- <refpurpose>Show the status of modules in the Linux Kernel</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>lsmod</command>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1><title>DESCRIPTION</title>
- <para>
- <command>lsmod</command> is a trivial program which nicely formats the
- contents of the <filename>/proc/modules</filename>, showing what kernel
- modules are currently loaded.
- </para>
- </refsect1>
-
- <refsect1><title>COPYRIGHT</title>
- <para>
- This manual page originally Copyright 2002, Rusty Russell, IBM
- Corporation. Maintained by Jon Masters and others.
- </para>
- </refsect1>
-
- <refsect1><title>SEE ALSO</title>
- <para>
- <citerefentry>
- <refentrytitle>insmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>modinfo</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>
- <citerefentry>
- <refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
-</refentry>
diff --git a/man/modinfo.8.xml b/man/modinfo.8.xml
deleted file mode 100644
index b6c4d60..0000000
--- a/man/modinfo.8.xml
+++ /dev/null
@@ -1,201 +0,0 @@
-<?xml version='1.0'?>
-<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<refentry id="modinfo">
- <refentryinfo>
- <title>modinfo</title>
- <productname>kmod</productname>
-
- <authorgroup>
- <author>
- <contrib>Developer</contrib>
- <firstname>Jon</firstname>
- <surname>Masters</surname>
- <email>jcm@jonmasters.org</email>
- </author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Lucas</firstname>
- <surname>De Marchi</surname>
- <email>lucas.de.marchi@gmail.com</email>
- </author>
- </authorgroup>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>modinfo</refentrytitle>
- <manvolnum>8</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>modinfo</refname>
- <refpurpose>Show information about a Linux Kernel module</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>modinfo</command>
- <arg><option>-0</option></arg>
- <arg><option>-F <replaceable>field</replaceable></option></arg>
- <arg><option>-k <replaceable>kernel</replaceable></option></arg>
- <arg rep='repeat'>modulename|filename</arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>modinfo -V</command>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>modinfo -h</command>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1><title>DESCRIPTION</title>
- <para>
- <command>modinfo</command> extracts information from the Linux Kernel
- modules given on the command line. If the module name is not a filename,
- then the
- <filename>@MODULE_DIRECTORY@/</filename><replaceable>version</replaceable>
- directory is searched, as is also done by
- <citerefentry><refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum></citerefentry>
- when loading kernel modules.
- </para>
- <para>
- <command>modinfo</command> by default lists each attribute of the module
- in form <replaceable>fieldname</replaceable> :
- <replaceable>value</replaceable>, for easy reading. The filename is
- listed the same way (although it's not really an attribute).
- </para>
- <para>
- This version of <command>modinfo</command> can understand modules of any
- Linux Kernel architecture.
- </para>
- </refsect1>
-
- <refsect1><title>OPTIONS</title>
- <variablelist>
- <varlistentry>
- <term>
- <option>-V</option>
- </term>
- <term>
- <option>--version</option>
- </term>
- <listitem>
- <para>
- Print the modinfo version.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-F</option>
- </term>
- <term>
- <option>--field</option>
- </term>
- <listitem>
- <para>
- Only print this field value, one per line. This is most useful for
- scripts. Field names are case-insensitive. Common fields (which
- may not be in every module) include <literal>author</literal>,
- <literal>description</literal>, <literal>license</literal>,
- <literal>parm</literal>, <literal>depends</literal>, and
- <literal>alias</literal>. There are often multiple
- <literal>parm</literal>, <literal>alias</literal> and
- <literal>depends</literal> fields. The special field
- <literal>filename</literal> lists the filename of the module.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-b <replaceable>basedir</replaceable></option>
- </term>
- <term>
- <option>--basedir <replaceable>basedir</replaceable></option>
- </term>
- <listitem>
- <para>
- Root directory for modules, <filename>/</filename> by default.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-k <replaceable>kernel</replaceable></option>
- </term>
- <listitem>
- <para>
- Provide information about a kernel other than the running one. This
- is particularly useful for distributions needing to extract
- information from a newly installed (but not yet running) set of
- kernel modules. For example, you wish to find which firmware files
- are needed by various modules in a new kernel for which you must
- make an initrd/initramfs image prior to booting.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-0</option>
- </term>
- <term>
- <option>--null</option>
- </term>
- <listitem>
- <para>
- Use the ASCII zero character to separate field values, instead of a
- new line. This is useful for scripts, since a new line can
- theoretically appear inside a field.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-a</option>
- <option>--author</option>
- </term>
- <term>
- <option>-d</option>
- <option>--description</option>
- </term>
- <term>
- <option>-l</option>
- <option>--license</option>
- </term>
- <term>
- <option>-p</option>
- <option>--parameters</option>
- </term>
- <term>
- <option>-n</option>
- <option>--filename</option>
- </term>
- <listitem>
- <para>
- These are shortcuts for the <option>--field</option> flag's
- <literal>author</literal>, <literal>description</literal>,
- <literal>license</literal>, <literal>parm</literal> and
- <literal>filename</literal> arguments, to ease the transition
- from the old modutils <command>modinfo</command>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1><title>COPYRIGHT</title>
- <para>
- This manual page originally Copyright 2003, Rusty Russell, IBM
- Corporation. Maintained by Jon Masters and others.
- </para>
- </refsect1>
-
- <refsect1><title>SEE ALSO</title>
- <para>
- <citerefentry>
- <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
-</refentry>
diff --git a/man/modprobe.8.xml b/man/modprobe.8.xml
deleted file mode 100644
index 4d1fd59..0000000
--- a/man/modprobe.8.xml
+++ /dev/null
@@ -1,544 +0,0 @@
-<?xml version='1.0'?>
-<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<refentry id="modprobe">
- <refentryinfo>
- <title>modprobe</title>
- <productname>kmod</productname>
-
- <authorgroup>
- <author>
- <contrib>Developer</contrib>
- <firstname>Jon</firstname>
- <surname>Masters</surname>
- <email>jcm@jonmasters.org</email>
- </author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Robby</firstname>
- <surname>Workman</surname>
- <email>rworkman@slackware.com</email>
- </author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Lucas</firstname>
- <surname>De Marchi</surname>
- <email>lucas.de.marchi@gmail.com</email>
- </author>
- </authorgroup>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>modprobe</refentrytitle>
- <manvolnum>8</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>modprobe</refname>
- <refpurpose>Add and remove modules from the Linux Kernel</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>modprobe</command>
- <arg><option>-v</option></arg>
- <arg><option>-V</option></arg>
- <arg><option>-C <replaceable>config-file</replaceable></option></arg>
- <arg><option>-n</option></arg>
- <arg><option>-i</option></arg>
- <arg><option>-q</option></arg>
- <arg><option>-b</option></arg>
- <arg><replaceable>modulename</replaceable></arg>
- <arg rep='repeat'><option><replaceable>module parameters</replaceable></option></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>modprobe</command>
- <arg>-r</arg>
- <arg><option>-v</option></arg>
- <arg><option>-n</option></arg>
- <arg><option>-i</option></arg>
- <arg rep='repeat'><option><replaceable>modulename</replaceable></option></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>modprobe</command>
- <arg>-c</arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>modprobe</command>
- <arg>--dump-modversions</arg> <arg><replaceable>filename</replaceable></arg>
- </cmdsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>Description</title>
-
- <para>
- <command>modprobe</command> intelligently adds or removes a
- module from the Linux kernel: note that for convenience, there
- is no difference between _ and - in module names (automatic
- underscore conversion is performed).
- <command>modprobe</command> looks in the module directory
- <filename>@MODULE_DIRECTORY@/`uname -r`</filename> for all
- the modules and other files, except for the optional
- configuration files in the
- <filename>/etc/modprobe.d</filename> directory
- (see <citerefentry>
- <refentrytitle>modprobe.d</refentrytitle><manvolnum>5</manvolnum>
- </citerefentry>). <command>modprobe</command> will also use module
- options specified on the kernel command line in the form of
- <module>.<option> and blacklists in the form of
- modprobe.blacklist=<module>.
- </para>
- <para>
- Note that unlike in 2.4 series Linux kernels (which are not supported
- by this tool) this version of <command>modprobe</command> does not
- do anything to the module itself: the work of resolving symbols
- and understanding parameters is done inside the kernel. So
- module failure is sometimes accompanied by a kernel message: see
- <citerefentry>
- <refentrytitle>dmesg</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>.
- </para>
- <para>
- <command>modprobe</command> expects an up-to-date
- <filename>modules.dep.bin</filename> file as generated
- by the corresponding <command>depmod</command> utility shipped
- along with <command>modprobe</command> (see
- <citerefentry><refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>). This file lists what other modules each
- module needs (if any), and <command>modprobe</command> uses this
- to add or remove these dependencies automatically.
- </para>
- <para>
- If any arguments are given after the
- <replaceable>modulename</replaceable>, they are passed to the
- kernel (in addition to any options listed in the configuration
- file).
- </para>
- <para>
- When loading modules, <replaceable>modulename</replaceable> can also
- be a path to the module. If the path is relative, it must
- explicitly start with "./". Note that this may fail when using a
- path to a module with dependencies not matching the installed depmod
- database.
- </para>
- </refsect1>
-
- <refsect1><title>OPTIONS</title>
- <variablelist>
- <varlistentry>
- <term>
- <option>-a</option>
- </term>
- <term>
- <option>--all</option>
- </term>
- <listitem>
- <para>Insert all module names on the command line.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-b</option>
- </term>
- <term>
- <option>--use-blacklist</option>
- </term>
- <listitem>
- <para>
- This option causes <command>modprobe</command> to apply the
- <command>blacklist</command> commands in the configuration files
- (if any) to module names as well. It is usually used by
- <citerefentry>
- <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
- </citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-C</option>
- </term>
- <term>
- <option>--config</option>
- </term>
- <listitem>
- <para>This option overrides the default configuration directory
- (<filename>/etc/modprobe.d</filename>).
- </para>
- <para>
- This option is passed through <command>install</command>
- or <command>remove</command> commands to other
- <command>modprobe</command> commands in the
- MODPROBE_OPTIONS environment variable.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-c</option>
- </term>
- <term>
- <option>--showconfig</option>
- </term>
- <listitem>
- <para>
- Dump out the effective configuration from the config directory and
- exit.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>--dump-modversions</option>
- </term>
- <listitem>
- <para>
- Print out a list of module versioning information required by a
- module. This option is commonly used by distributions in order to
- package up a Linux kernel module using module versioning deps.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-d</option>
- </term>
- <term>
- <option>--dirname</option>
- </term>
- <listitem>
- <para>
- Root directory for modules, <filename>/</filename> by default.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>--first-time</option>
- </term>
- <listitem>
- <para>
- Normally, <command>modprobe</command> will succeed (and do
- nothing) if told to insert a module which is already
- present or to remove a module which isn't present. This is
- ideal for simple scripts; however, more complicated scripts often
- want to know whether <command>modprobe</command> really
- did something: this option makes modprobe fail in the
- case that it actually didn't do anything.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>--force-vermagic</option>
- </term>
- <listitem>
- <para>
- Every module contains a small string containing important
- information, such as the kernel and compiler versions. If a module
- fails to load and the kernel complains that the "version magic"
- doesn't match, you can use this option to remove it. Naturally,
- this check is there for your protection, so using this option is
- dangerous unless you know what you're doing.
- </para>
- <para>
- This applies to any modules inserted: both the module (or alias) on
- the command line and any modules on which it depends.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>--force-modversion</option>
- </term>
- <listitem>
- <para>
- When modules are compiled with CONFIG_MODVERSIONS set, a section
- detailing the versions of every interfaced used by (or supplied by)
- the module is created. If a module fails to load and the kernel
- complains that the module disagrees about a version of some
- interface, you can use "--force-modversion" to remove the version
- information altogether. Naturally, this check is there for your
- protection, so using this option is dangerous unless you know what
- you're doing.
- </para>
- <para>
- This applies any modules inserted: both the module (or alias) on
- the command line and any modules on which it depends.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-f</option>
- </term>
- <term>
- <option>--force</option>
- </term>
- <listitem>
- <para>
- Try to strip any versioning information from the module which might
- otherwise stop it from loading: this is the same as using both
- <option>--force-vermagic</option> and
- <option>--force-modversion</option>. Naturally, these checks are
- there for your protection, so using this option is dangerous unless
- you know what you are doing.
- </para>
- <para>
- This applies to any modules inserted: both the module (or alias) on
- the command line and any modules it on which it depends.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-i</option>
- </term>
- <term>
- <option>--ignore-install</option>
- </term>
- <term>
- <option>--ignore-remove</option>
- </term>
- <listitem>
- <para>
- This option causes <command>modprobe</command> to ignore
- <command>install</command> and <command>remove</command> commands
- in the configuration file (if any) for the module specified on the
- command line (any dependent modules are still subject to commands
- set for them in the configuration file). Both
- <command>install</command> and <command>remove</command> commands
- will currently be ignored when this option is used regardless of
- whether the request was more specifically made with only one or
- other (and not both) of <option>--ignore-install</option> or
- <option>--ignore-remove</option>. See <citerefentry>
- <refentrytitle>modprobe.d</refentrytitle><manvolnum>5</manvolnum>
- </citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-n</option>
- </term>
- <term>
- <option>--dry-run</option>
- </term>
- <term>
- <option>--show</option>
- </term>
- <listitem>
- <para>
- This option does everything but actually insert or delete the
- modules (or run the install or remove commands). Combined with
- <option>-v</option>, it is useful for debugging problems. For
- historical reasons both <option>--dry-run</option> and
- <option>--show</option> actually mean the same thing and are
- interchangeable.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-q</option>
- </term>
- <term>
- <option>--quiet</option>
- </term>
- <listitem>
- <para>
- With this flag, <command>modprobe</command> won't print an error
- message if you try to remove or insert a module it can't find (and
- isn't an alias or
- <command>install</command>/<command>remove</command> command).
- However, it will still return with a non-zero exit status. The
- kernel uses this to opportunistically probe for modules which might
- exist using request_module.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-R</option>
- </term>
- <term>
- <option>--resolve-alias</option>
- </term>
- <listitem>
- <para>
- Print all module names matching an alias. This can be useful for
- debugging module alias problems.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-r</option>
- </term>
- <term>
- <option>--remove</option>
- </term>
- <listitem>
- <para>
- This option causes <command>modprobe</command> to remove rather
- than insert a module. If the modules it depends on are also
- unused, <command>modprobe</command> will try to remove them too.
- Unlike insertion, more than one module can be specified on the
- command line (it does not make sense to specify module parameters
- when removing modules).
- </para>
- <para>
- There is usually no reason to remove modules, but some buggy
- modules require it. Your distribution kernel may not have been
- built to support removal of modules at all.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-w</option>
- </term>
- <term>
- <option>--wait=</option>TIMEOUT_MSEC
- </term>
- <listitem>
- <para>
- This option causes <command>modprobe -r</command> to continue trying to
- remove a module if it fails due to the module being busy, i.e. its refcount
- is not 0 at the time the call is made. Modprobe tries to remove the module
- with an incremental sleep time between each tentative up until the maximum
- wait time in milliseconds passed in this option.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-S</option>
- </term>
- <term>
- <option>--set-version</option>
- </term>
- <listitem>
- <para>
- Set the kernel version, rather than using
- <citerefentry><refentrytitle>uname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
- to decide on the kernel version (which dictates where to find the
- modules).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>--show-depends</option>
- </term>
- <listitem>
- <para>
- List the dependencies of a module (or alias), including the module
- itself. This produces a (possibly empty) set of module filenames,
- one per line, each starting with "insmod" and is typically used by
- distributions to determine which modules to include when generating
- initrd/initramfs images. <command>Install</command> commands which
- apply are shown prefixed by "install". It does not run any of the
- install commands. Note that
- <citerefentry><refentrytitle>modinfo</refentrytitle><manvolnum>8</manvolnum></citerefentry>
- can be used to extract dependencies of a module from the module
- itself, but knows nothing of aliases or install commands.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-s</option>
- </term>
- <term>
- <option>--syslog</option>
- </term>
- <listitem>
- <para>
- This option causes any error messages to go through the syslog
- mechanism (as LOG_DAEMON with level LOG_NOTICE) rather than to
- standard error. This is also automatically enabled when stderr is
- unavailable.
- </para>
- <para>
- This option is passed through <command>install</command> or
- <command>remove</command> commands to other
- <command>modprobe</command> commands in the MODPROBE_OPTIONS
- environment variable.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-V</option>
- </term>
- <term>
- <option>--version</option>
- </term>
- <listitem>
- <para>Show version of program and exit.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-v</option>
- </term>
- <term>
- <option>--verbose</option>
- </term>
- <listitem>
- <para>
- Print messages about what the program is doing. Usually
- <command>modprobe</command> only prints messages if something goes
- wrong.
- </para>
- <para>
- This option is passed through <command>install</command> or
- <command>remove</command> commands to other
- <command>modprobe</command> commands in the MODPROBE_OPTIONS
- environment variable.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1><title>ENVIRONMENT</title>
- <para>
- The MODPROBE_OPTIONS environment variable can also be used to pass
- arguments to <command>modprobe</command>.
- </para>
- </refsect1>
-
- <refsect1><title>COPYRIGHT</title>
- <para>
- This manual page originally Copyright 2002, Rusty Russell, IBM
- Corporation. Maintained by Jon Masters and others.
- </para>
- </refsect1>
-
- <refsect1>
- <title>SEE ALSO</title>
- <para>
- <citerefentry>
- <refentrytitle>modprobe.d</refentrytitle><manvolnum>5</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>insmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>rmmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>lsmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>modinfo</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>
- <citerefentry>
- <refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
-</refentry>
diff --git a/man/modprobe.d.5.xml b/man/modprobe.d.5.xml
deleted file mode 100644
index cc90da6..0000000
--- a/man/modprobe.d.5.xml
+++ /dev/null
@@ -1,265 +0,0 @@
-<?xml version="1.0"?>
-<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<refentry id="modprobe.d">
- <refentryinfo>
- <title>modprobe.d</title>
- <productname>kmod</productname>
-
- <authorgroup>
- <author>
- <contrib>Developer</contrib>
- <firstname>Jon</firstname>
- <surname>Masters</surname>
- <email>jcm@jonmasters.org</email>
- </author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Robby</firstname>
- <surname>Workman</surname>
- <email>rworkman@slackware.com</email>
- </author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Lucas</firstname>
- <surname>De Marchi</surname>
- <email>lucas.de.marchi@gmail.com</email>
- </author>
- </authorgroup>
- </refentryinfo>
-
-
- <refmeta>
- <refentrytitle>modprobe.d</refentrytitle>
- <manvolnum>5</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>modprobe.d</refname>
- <refpurpose>Configuration directory for modprobe</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <para><filename>/lib/modprobe.d/*.conf</filename></para>
- <para><filename>@DISTCONFDIR@/modprobe.d/*.conf</filename></para>
- <para><filename>/usr/local/lib/modprobe.d/*.conf</filename></para>
- <para><filename>/run/modprobe.d/*.conf</filename></para>
- <para><filename>/etc/modprobe.d/*.conf</filename></para>
- </refsynopsisdiv>
-
- <refsect1><title>DESCRIPTION</title>
- <para>Because the <command>modprobe</command> command can add or
- remove more than one module, due to modules having dependencies,
- we need a method of specifying what options are to be used with
- those modules. All files underneath the
- <filename>/etc/modprobe.d</filename> directory which end with the
- <filename>.conf</filename> extension specify those options as
- required. They can also be used to create convenient aliases:
- alternate names for a module, or they can override the normal
- <command>modprobe</command> behavior altogether for those with
- special requirements (such as inserting more than one module).
- </para>
- <para>
- Note that module and alias names (like other module names) can
- have - or _ in them: both are interchangeable throughout all the
- module commands as underscore conversion happens automatically.
- </para>
- <para>
- The format of files under <filename>modprobe.d</filename> is
- simple: one command per line, with blank lines and lines starting
- with '#' ignored (useful for adding comments). A '\' at the end
- of a line causes it to continue on the next line, which makes the
- file a bit neater.
- </para>
- </refsect1>
-
- <refsect1><title>COMMANDS</title>
- <variablelist>
- <varlistentry>
- <term>alias <replaceable>wildcard</replaceable> <replaceable>modulename</replaceable>
- </term>
- <listitem>
- <para>
- This allows you to give alternate names for a module. For example:
- "alias my-mod really_long_modulename" means you can use "modprobe
- my-mod" instead of "modprobe really_long_modulename". You can also
- use shell-style wildcards, so "alias my-mod*
- really_long_modulename" means that "modprobe my-mod-something" has
- the same effect. You can't have aliases to other aliases (that way
- lies madness), but aliases can have options, which will be added to
- any other options.
- </para>
- <para>
- Note that modules can also contain their own aliases, which you can
- see using <command>modinfo</command>. These aliases are used as a
- last resort (ie. if there is no real module,
- <command>install</command>, <command>remove</command>, or
- <command>alias</command> command in the configuration).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>blacklist <replaceable>modulename</replaceable>
- </term>
- <listitem>
- <para>
- Modules can contain their own aliases: usually these are aliases
- describing the devices they support, such as "pci:123...". These
- "internal" aliases can be overridden by normal "alias" keywords,
- but there are cases where two or more modules both support the same
- devices, or a module invalidly claims to support a device that it
- does not: the <command>blacklist</command> keyword indicates that
- all of that particular module's internal aliases are to be ignored.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>install <replaceable>modulename</replaceable> <replaceable>command...</replaceable>
- </term>
- <listitem>
- <para>
- This command instructs <command>modprobe</command> to run your
- command instead of inserting the module in the kernel as normal.
- The command can be any shell command: this allows you to do any
- kind of complex processing you might wish. For example, if the
- module "fred" works better with the module "barney" already
- installed (but it doesn't depend on it, so
- <command>modprobe</command> won't automatically load it), you could
- say "install fred /sbin/modprobe barney; /sbin/modprobe
- --ignore-install fred", which would do what you wanted. Note the
- <option>--ignore-install</option>, which stops the second
- <command>modprobe</command> from running the same
- <command>install</command> command again. See also
- <command>remove</command> below. </para> <para>The long term
- future of this command as a solution to the problem of providing
- additional module dependencies is not assured and it is intended to
- replace this command with a warning about its eventual removal or
- deprecation at some point in a future release. Its use complicates
- the automated determination of module dependencies by distribution
- utilities, such as mkinitrd (because these now need to somehow
- interpret what the <command>install</command> commands might be
- doing. In a perfect world, modules would provide all dependency
- information without the use of this command and work is underway to
- implement soft dependency support within the Linux kernel. </para>
- <para> If you use the string "$CMDLINE_OPTS" in the command, it will
- be replaced by any options specified on the modprobe command line.
- This can be useful because users expect "modprobe fred opt=1" to
- pass the "opt=1" arg to the module, even if there's an install
- command in the configuration file. So our above example becomes
- "install fred /sbin/modprobe barney; /sbin/modprobe
- --ignore-install fred $CMDLINE_OPTS"
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>options <replaceable>modulename</replaceable> <replaceable>option...</replaceable>
- </term>
- <listitem>
- <para>
- This command allows you to add options to the module
- <replaceable>modulename</replaceable> (which might be an
- alias) every time it is inserted into the kernel: whether
- directly (using <command>modprobe </command>
- <replaceable>modulename</replaceable>) or because the
- module being inserted depends on this module.
- </para>
- <para>
- All options are added together: they can come from an
- <command>option</command> for the module itself, for an
- alias, and on the command line.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>remove <replaceable>modulename</replaceable> <replaceable>command...</replaceable>
- </term>
- <listitem>
- <para>
- This is similar to the <command>install</command> command
- above, except it is invoked when "modprobe -r" is run.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>softdep <replaceable>modulename</replaceable> pre: <replaceable>modules...</replaceable> post: <replaceable>modules...</replaceable>
- </term>
- <listitem>
- <para>
- The <command>softdep</command> command allows you to specify soft,
- or optional, module dependencies. <replaceable>modulename</replaceable>
- can be used without these optional modules installed, but usually with
- some features missing. For example, a driver for a storage HBA might
- require another module be loaded in order to use management features.
- </para>
- <para>
- pre-deps and post-deps modules are lists of names and/or aliases of other
- modules that modprobe will attempt to install (or remove) in order
- before and after the main module given in the
- <replaceable>modulename</replaceable> argument.
- </para>
- <para>
- Example: Assume "softdep c pre: a b post: d e" is provided in the
- configuration. Running "modprobe c" is now equivalent to
- "modprobe a b c d e" without the softdep.
- Flags such as --use-blacklist are applied to all the specified
- modules, while module parameters only apply to module c.
- </para>
- <para>
- Note: if there are <command>install</command> or
- <command>remove</command> commands with the same
- <replaceable>modulename</replaceable> argument,
- <command>softdep</command> takes precedence.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>weakdep <replaceable>modulename</replaceable> <replaceable>modules...</replaceable>
- </term>
- <listitem>
- <para>
- The <command>weakdep</command> command allows you to specify weak module
- dependencies. Those are similar to pre softdep, with the
- difference that userspace doesn't attempt to load that
- dependency before the specified module. Instead the kernel
- may request one or multiple of them during module probe,
- depending on the hardware it's binding to. The purpose of
- weak module is to allow a driver to specify that a certain
- dependency may be needed, so it should be present in the
- filesystem (e.g. in initramfs) when that module is probed.
- </para>
- <para>
- Example: Assume "weakdep c a b". A program creating an
- initramfs knows it should add a, b, and c to the filesystem
- since a and b may be required/desired at runtime. When c is
- loaded and is being probed, it may issue calls to
- request_module() causing a or b to also be loaded.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1><title>COMPATIBILITY</title>
- <para>
- A future version of kmod will come with a strong warning to avoid use of
- the <command>install</command> as explained above. This will happen once
- support for soft dependencies in the kernel is complete. That support
- will complement the existing softdep support within this utility by
- providing such dependencies directly within the modules.
- </para>
- </refsect1>
- <refsect1><title>COPYRIGHT</title>
- <para>
- This manual page originally Copyright 2004, Rusty Russell, IBM
- Corporation. Maintained by Jon Masters and others.
- </para>
- </refsect1>
- <refsect1><title>SEE ALSO</title>
- <para><citerefentry>
- <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>modules.dep</refentrytitle><manvolnum>5</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
-</refentry>
diff --git a/man/modules.dep.5.xml b/man/modules.dep.5.xml
deleted file mode 100644
index 8ef6d8b..0000000
--- a/man/modules.dep.5.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0"?>
-<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<refentry id="modules.dep">
- <refentryinfo>
- <title>modules.dep</title>
- <productname>kmod</productname>
-
- <authorgroup>
- <author>
- <contrib>Developer</contrib>
- <firstname>Jon</firstname>
- <surname>Masters</surname>
- <email>jcm@jonmasters.org</email>
- </author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Lucas</firstname>
- <surname>De Marchi</surname>
- <email>lucas.de.marchi@gmail.com</email>
- </author>
- </authorgroup>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>modules.dep</refentrytitle>
- <manvolnum>5</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>modules.dep</refname>
- <refname>modules.dep.bin</refname>
- <refpurpose>Module dependency information</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <para><filename>@MODULE_DIRECTORY@/modules.dep</filename></para>
- <para><filename>@MODULE_DIRECTORY@/modules.dep.bin</filename></para>
- </refsynopsisdiv>
-
- <refsect1><title>DESCRIPTION</title>
- <para>
- <filename>modules.dep.bin</filename> is a binary file generated by
- <command>depmod</command> listing the dependencies for
- every module in the directories under
- <filename>@MODULE_DIRECTORY@/</filename><replaceable>version</replaceable>.
- It is used by kmod tools such as <command>modprobe</command> and
- libkmod.
- </para>
- <para>
- Its text counterpart is located in the same directory with the name
- <filename>modules.dep</filename>. The text version is maintained only
- for easy of reading by humans and is in no way used by any kmod tool.
- </para>
- <para>
- These files are not intended for editing or use by any additional
- utilities as their format is subject to change in the future. You should
- use the
- <citerefentry><refentrytitle>modinfo</refentrytitle><manvolnum>8</manvolnum></citerefentry>
- command to obtain information about modules in a future proof and
- compatible fashion rather than touching these files.
- </para>
- </refsect1>
- <refsect1><title>COPYRIGHT</title>
- <para>
- This manual page originally Copyright 2002, Rusty Russell, IBM
- Corporation. Maintained by Jon Masters and others.
- </para>
- </refsect1>
- <refsect1><title>SEE ALSO</title>
- <para>
- <citerefentry>
- <refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
-</refentry>
diff --git a/man/rmmod.8.xml b/man/rmmod.8.xml
deleted file mode 100644
index 67bcbed..0000000
--- a/man/rmmod.8.xml
+++ /dev/null
@@ -1,148 +0,0 @@
-<?xml version='1.0'?>
-<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<refentry id="rmmod">
- <refentryinfo>
- <title>rmmod</title>
- <productname>kmod</productname>
-
- <authorgroup>
- <author>
- <contrib>Developer</contrib>
- <firstname>Jon</firstname>
- <surname>Masters</surname>
- <email>jcm@jonmasters.org</email>
- </author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Lucas</firstname>
- <surname>De Marchi</surname>
- <email>lucas.de.marchi@gmail.com</email>
- </author>
- </authorgroup>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>rmmod</refentrytitle>
- <manvolnum>8</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>rmmod</refname>
- <refpurpose>
- Simple program to remove a module from the Linux Kernel
- </refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>rmmod</command>
- <arg><option>-f</option></arg>
- <arg><option>-s</option></arg>
- <arg><option>-v</option></arg>
- <arg><replaceable>modulename</replaceable></arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1><title>DESCRIPTION</title>
- <para>
- <command>rmmod</command> is a trivial program to remove a module (when
- module unloading support is provided) from the kernel. Most users will
- want to use
- <citerefentry>
- <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry> with the <option>-r</option> option instead
- since it removes unused dependent modules as well.
- </para>
- </refsect1>
-
- <refsect1><title>OPTIONS</title>
- <variablelist>
- <varlistentry>
- <term>
- <option>-v</option>
- </term>
- <term>
- <option>--verbose</option>
- </term>
- <listitem>
- <para>
- Print messages about what the program is doing.
- Usually <command>rmmod</command> prints messages
- only if something goes wrong.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-f</option>
- </term>
- <term>
- <option>--force</option>
- </term>
- <listitem>
- <para>
- This option can be extremely dangerous: it has no effect unless
- CONFIG_MODULE_FORCE_UNLOAD was set when the kernel was compiled.
- With this option, you can remove modules which are being used, or
- which are not designed to be removed, or have been marked as unsafe
- (see <citerefentry>
- <refentrytitle>lsmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <option>-s</option>
- </term>
- <term>
- <option>--syslog</option>
- </term>
- <listitem>
- <para>
- Send errors to syslog instead of standard error.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-V</option> <option>--version</option>
- </term>
- <listitem>
- <para>
- Show version of program and exit.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1>
- <title>COPYRIGHT</title>
- <para>
- This manual page originally Copyright 2002, Rusty Russell, IBM
- Corporation. Maintained by Jon Masters and others.
- </para>
- </refsect1>
-
- <refsect1><title>SEE ALSO</title>
- <para>
- <citerefentry>
- <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>insmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>lsmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>modinfo</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>
- <citerefentry>
- <refentrytitle>depmod</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
-</refentry>
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 05/20] man: add some extra bold/italic annotations
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (3 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 04/20] man: remove no longer used XML files Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-28 22:27 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 06/20] man: white space fixes Emil Velikov via B4 Relay
` (15 subsequent siblings)
20 siblings, 1 reply; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
man/depmod.8.scd | 18 +++++++++---------
man/kmod.8.scd | 2 +-
man/modinfo.8.scd | 8 ++++----
man/modprobe.8.scd | 12 ++++++------
man/modules.dep.5.scd | 11 ++++++-----
man/rmmod.8.scd | 2 +-
6 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/man/depmod.8.scd b/man/depmod.8.scd
index 0fe9128..8cb6449 100644
--- a/man/depmod.8.scd
+++ b/man/depmod.8.scd
@@ -21,7 +21,7 @@ dependencies can get quite complex.
*depmod* creates a list of module dependencies by reading each module under
@MODULE_DIRECTORY@/_version_ and determining what symbols it exports and what
-symbols it needs. By default, this list is written to modules.dep, and a binary
+symbols it needs. By default, this list is written to *modules.dep*, and a binary
hashed version named modules.dep.bin, in the same directory. If filenames are
given on the command line, only those modules are examined (which is rarely
useful unless all modules are listed). * depmod* also creates a list of symbols
@@ -41,17 +41,17 @@ rather than the current kernel version (as returned by *uname -r*).
*-A*, *--quick*
This option scans to see if any modules are newer than the
- modules.dep file before any work is done: if not, it silently exits
+ *modules.dep* file before any work is done: if not, it silently exits
rather than regenerating the files.
*-b* _basedir_, *--basedir* _basedir_
If your modules are not currently in the (normal) directory
@MODULE_DIRECTORY@/_version_, but in a staging area, you can specify a
_basedir_ which is prepended to the directory name. This _basedir_ is
- stripped from the resulting modules.dep file, so it is ready to be moved
- into the normal location. Use this option if you are a distribution
- vendor who needs to pre-generate the meta-data files rather than running
- depmod again later.
+ stripped from the resulting *modules.dep* file, so it is ready to be
+ moved into the normal location. Use this option if you are a
+ distribution vendor who needs to pre-generate the meta-data files rather
+ than running *depmod* again later.
*-o* _outdir_, *--outdir* _outdir_
Set the output directory where depmod will store any generated file.
@@ -75,11 +75,11 @@ rather than the current kernel version (as returned by *uname -r*).
*-E*, *--symvers*
When combined with the *-e* option, this reports any symbol versions
supplied by modules that do not match with the symbol versions provided
- by the kernel in its Module.symvers. This option is mutually
+ by the kernel in its _Module.symvers_. This option is mutually
incompatible with *-F*.
*-F*, *--filesyms* _System.map_
- Supplied with the System.map produced when the kernel was built, this
+ Supplied with the _System.map_ produced when the kernel was built, this
allows the *-e* option to report unresolved symbols. This option is
mutually incompatible with *-E*.
@@ -87,7 +87,7 @@ rather than the current kernel version (as returned by *uname -r*).
Print the help message and exit.
*-n*, *--show*, *--dry-run*
- This sends the resulting modules.dep and the various map files to
+ This sends the resulting *modules.dep* and the various map files to
standard output rather than writing them into the module directory.
*-P*
diff --git a/man/kmod.8.scd b/man/kmod.8.scd
index d292a13..7bef863 100644
--- a/man/kmod.8.scd
+++ b/man/kmod.8.scd
@@ -6,7 +6,7 @@ kmod - Program to manage Linux Kernel modules
# SYNOPSIS
-*kmod* [*OPTIONS*...] [_COMMAND_] [*COMMAND_OPTIONS*...]
+*kmod* [*OPTIONS...*] [_COMMAND_] [*COMMAND_OPTIONS...*]
# DESCRIPTION
diff --git a/man/modinfo.8.scd b/man/modinfo.8.scd
index fd945ce..75267bc 100644
--- a/man/modinfo.8.scd
+++ b/man/modinfo.8.scd
@@ -29,14 +29,14 @@ architecture.
# OPTIONS
*-V*, *--version*
- Print the modinfo version.
+ Print the *modinfo* version.
*-F*, *--field*
Only print this field value, one per line. This is most useful for
scripts. Field names are case-insensitive. Common fields (which may not
be in every module) include author, description, license, parm, depends,
and alias. There are often multiple parm, alias and depends fields. The
- special field filename lists the filename of the module.
+ special _field_ filename lists the filename of the module.
*-b* _basedir_, *--basedir* _basedir_
Root directory for modules, / by default.
@@ -50,9 +50,9 @@ architecture.
image prior to booting.
*-0*, *--null*
- Use the ASCII zero character to separate field values, instead of a new
+ Use the ASCII zero character to separate _field_ values, instead of a new
line. This is useful for scripts, since a new line can theoretically
- appear inside a field.
+ appear inside a _field_.
*-a* *--author*, *-d* *--description*, *-l* *--license*, *-p* *--parameters*,
*-n* *--filename*
diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd
index f678654..653fbd9 100644
--- a/man/modprobe.8.scd
+++ b/man/modprobe.8.scd
@@ -9,11 +9,11 @@ modprobe - Add and remove modules from the Linux Kernel
*modprobe* [*-v*] [*-V*] [*-C *_config-file_] [*-n*] [*-i*] [*-q*] [*-b*] [_modulename_]
\ \ \ \ \ \ \ \ \ \[_module parameters_...]
-*modprobe* [-r] [*-v*] [*-n*] [*-i*] [_modulename_...]
+*modprobe* [*-r*] [*-v*] [*-n*] [*-i*] [_modulename_...]
-*modprobe* [-c]
+*modprobe* [*-c*]
-*modprobe* [--dump-modversions] [_filename_]
+*modprobe* [*--dump-modversions*] [_filename_]
# DESCRIPTION
@@ -42,7 +42,7 @@ If any arguments are given after the _modulename_, they are passed to the kernel
When loading modules, _modulename_ can also be a path to the module. If the path
is relative, it must explicitly start with "./". Note that this may fail when
-using a path to a module with dependencies not matching the installed depmod
+using a path to a module with dependencies not matching the installed *depmod*
database.
# OPTIONS
@@ -78,7 +78,7 @@ database.
module which is already present or to remove a module which isn't
present. This is ideal for simple scripts; however, more complicated
scripts often want to know whether *modprobe* really did something: this
- option makes modprobe fail in the case that it actually didn't do
+ option makes *modprobe* fail in the case that it actually didn't do
anything.
*--force-vermagic*
@@ -97,7 +97,7 @@ database.
detailing the versions of every interfaced used by (or supplied by) the
module is created. If a module fails to load and the kernel complains
that the module disagrees about a version of some interface, you can use
- "--force-modversion" to remove the version information altogether.
+ *--force-modversion* to remove the version information altogether.
Naturally, this check is there for your protection, so using this option
is dangerous unless you know what you're doing.
diff --git a/man/modules.dep.5.scd b/man/modules.dep.5.scd
index 34ffb83..c4e7653 100644
--- a/man/modules.dep.5.scd
+++ b/man/modules.dep.5.scd
@@ -12,13 +12,14 @@ modules.dep, modules.dep.bin - Module dependency information
# DESCRIPTION
-modules.dep.bin is a binary file generated by *depmod* listing the dependencies
-for every module in the directories under @MODULE_DIRECTORY@/_version_. It is
-used by kmod tools such as *modprobe* and libkmod.
+*modules.dep.bin* is a binary file generated by *depmod* listing the
+dependencies for every module in the directories under
+@MODULE_DIRECTORY@/_version_. It is used by *kmod* tools such as *modprobe* and
+libkmod.
Its text counterpart is located in the same directory with the name
-modules.dep. The text version is maintained only for easy of reading by humans
-and is in no way used by any kmod tool.
+*modules.dep*. The text version is maintained only for easy of reading by humans
+and is in no way used by any *kmod* tool.
These files are not intended for editing or use by any additional utilities as
their format is subject to change in the future. You should use the *modinfo*(8)
diff --git a/man/rmmod.8.scd b/man/rmmod.8.scd
index 72947a6..7813448 100644
--- a/man/rmmod.8.scd
+++ b/man/rmmod.8.scd
@@ -29,7 +29,7 @@ is provided) from the kernel. Most users will want to use *modprobe*(8) with the
*-s*, *--syslog*
Send errors to syslog instead of standard error.
-*-V --version*
+*-V*, *--version*
Show version of program and exit.
# COPYRIGHT
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 06/20] man: white space fixes
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (4 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 05/20] man: add some extra bold/italic annotations Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-28 22:30 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 07/20] man: misc punctuation fixes Emil Velikov via B4 Relay
` (14 subsequent siblings)
20 siblings, 1 reply; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
These were present in the original xml files and I opted to keep them
separate fix to make the transition/comparison easier.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
man/depmod.8.scd | 4 ++--
man/depmod.d.5.scd | 2 +-
man/modprobe.8.scd | 8 ++++----
man/modprobe.d.5.scd | 4 ++--
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/man/depmod.8.scd b/man/depmod.8.scd
index 8cb6449..80cc48d 100644
--- a/man/depmod.8.scd
+++ b/man/depmod.8.scd
@@ -54,8 +54,8 @@ rather than the current kernel version (as returned by *uname -r*).
than running *depmod* again later.
*-o* _outdir_, *--outdir* _outdir_
- Set the output directory where depmod will store any generated file.
- _ outdir_ serves as a root to that location, similar to how _basedir_ is
+ Set the output directory where *depmod* will store any generated file.
+ _outdir_ serves as a root to that location, similar to how _basedir_ is
used. Also this setting takes precedence and if used together with
_basedir_ it will result in the input being that directory, but the output
being the one set by _outdir_.
diff --git a/man/depmod.d.5.scd b/man/depmod.d.5.scd
index 9c42478..4e05b93 100644
--- a/man/depmod.d.5.scd
+++ b/man/depmod.d.5.scd
@@ -50,7 +50,7 @@ override _modulename_ _kernelversion_ _modulesubdirectory_
This command allows you to override which version of a specific module
will be used when more than one module sharing the same name is
processed by the *depmod* command. It is possible to specify one kernel
- or all kernels using the \* wildcard. _ modulesubdirectory_ is the name
+ or all kernels using the \* wildcard. _modulesubdirectory_ is the name
of the subdirectory under @MODULE_DIRECTORY@ (or other module location)
where the target module is installed.
diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd
index 653fbd9..aac3a74 100644
--- a/man/modprobe.8.scd
+++ b/man/modprobe.8.scd
@@ -6,7 +6,7 @@ modprobe - Add and remove modules from the Linux Kernel
# SYNOPSIS
-*modprobe* [*-v*] [*-V*] [*-C *_config-file_] [*-n*] [*-i*] [*-q*] [*-b*] [_modulename_]
+*modprobe* [*-v*] [*-V*] [*-C* _config-file_] [*-n*] [*-i*] [*-q*] [*-b*] [_modulename_]
\ \ \ \ \ \ \ \ \ \[_module parameters_...]
*modprobe* [*-r*] [*-v*] [*-n*] [*-i*] [_modulename_...]
@@ -19,10 +19,10 @@ modprobe - Add and remove modules from the Linux Kernel
*modprobe* intelligently adds or removes a module from the Linux kernel: note
that for convenience, there is no difference between \_ and - in module names
-(automatic underscore conversion is performed). * modprobe* looks in the module
+(automatic underscore conversion is performed). *modprobe* looks in the module
directory @DISTCONFDIR@/`uname -r` for all the modules and other files, except
for the optional configuration files in the /etc/modprobe.d directory (see
-*modprobe.d*(5)). * modprobe* will also use module options specified on the
+*modprobe.d*(5)). *modprobe* will also use module options specified on the
kernel command line in the form of <module>.<option> and blacklists in the form
of modprobe.blacklist=<module>.
@@ -167,7 +167,7 @@ database.
itself. This produces a (possibly empty) set of module filenames, one
per line, each starting with "insmod" and is typically used by
distributions to determine which modules to include when generating
- initrd/initramfs images. * Install* commands which apply are shown
+ initrd/initramfs images. *Install* commands which apply are shown
prefixed by "install". It does not run any of the install commands. Note
that *modinfo*(8) can be used to extract dependencies of a module from the
module itself, but knows nothing of aliases or install commands.
diff --git a/man/modprobe.d.5.scd b/man/modprobe.d.5.scd
index 93b9522..2907175 100644
--- a/man/modprobe.d.5.scd
+++ b/man/modprobe.d.5.scd
@@ -94,7 +94,7 @@ install _modulename_ _command..._
options _modulename_ _option..._
This command allows you to add options to the module _modulename_ (which
might be an alias) every time it is inserted into the kernel: whether
- directly (using *modprobe* _ modulename_) or because the module being
+ directly (using *modprobe* _modulename_) or because the module being
inserted depends on this module.
All options are added together: they can come from an *option* for the
@@ -106,7 +106,7 @@ remove _modulename_ _command..._
softdep _modulename_ pre: _modules..._ post: _modules..._
The *softdep* command allows you to specify soft, or optional, module
- dependencies. _ modulename_ can be used without these optional modules
+ dependencies. _modulename_ can be used without these optional modules
installed, but usually with some features missing. For example, a driver
for a storage HBA might require another module be loaded in order to use
management features.
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 07/20] man: misc punctuation fixes
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (5 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 06/20] man: white space fixes Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 08/20] man: some options take an argument, mention that Emil Velikov via B4 Relay
` (13 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Some commas and a full stop was missing ;-)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
man/depmod.d.5.scd | 2 +-
man/kmod.8.scd | 4 ++--
man/lsmod.8.scd | 2 +-
man/modprobe.8.scd | 2 +-
man/rmmod.8.scd | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/man/depmod.d.5.scd b/man/depmod.d.5.scd
index 4e05b93..9cf99d5 100644
--- a/man/depmod.d.5.scd
+++ b/man/depmod.d.5.scd
@@ -73,7 +73,7 @@ exclude _excludedir_
This specifies the trailing directories that will be excluded during the
search for kernel modules.
- The _excludedir_ is the trailing directory to exclude
+ The _excludedir_ is the trailing directory to exclude.
# COPYRIGHT
diff --git a/man/kmod.8.scd b/man/kmod.8.scd
index 7bef863..2007a2d 100644
--- a/man/kmod.8.scd
+++ b/man/kmod.8.scd
@@ -15,10 +15,10 @@ Linux Kernel modules. Most users will only run it using its other names.
# OPTIONS
-*-V --version*
+*-V*, *--version*
Show the program version and exit.
-*-h --help*
+*-h*, *--help*
Show the help message.
# COMMANDS
diff --git a/man/lsmod.8.scd b/man/lsmod.8.scd
index 7195cba..eb2f2e8 100644
--- a/man/lsmod.8.scd
+++ b/man/lsmod.8.scd
@@ -19,7 +19,7 @@ Maintained by Jon Masters and others.
# SEE ALSO
-*insmod*(8), *modprobe*(8), *modinfo*(8) *depmod*(8)
+*insmod*(8), *modprobe*(8), *modinfo*(8), *depmod*(8)
# AUTHORS
diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd
index aac3a74..f4ce0be 100644
--- a/man/modprobe.8.scd
+++ b/man/modprobe.8.scd
@@ -202,7 +202,7 @@ Maintained by Jon Masters and others.
# SEE ALSO
-*modprobe.d*(5), *insmod*(8), *rmmod*(8), *lsmod*(8), *modinfo*(8) *depmod*(8)
+*modprobe.d*(5), *insmod*(8), *rmmod*(8), *lsmod*(8), *modinfo*(8), *depmod*(8)
# AUTHORS
diff --git a/man/rmmod.8.scd b/man/rmmod.8.scd
index 7813448..e1f656f 100644
--- a/man/rmmod.8.scd
+++ b/man/rmmod.8.scd
@@ -39,7 +39,7 @@ Maintained by Jon Masters and others.
# SEE ALSO
-*modprobe*(8), *insmod*(8), *lsmod*(8), *modinfo*(8) *depmod*(8)
+*modprobe*(8), *insmod*(8), *lsmod*(8), *modinfo*(8), *depmod*(8)
# AUTHORS
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 08/20] man: some options take an argument, mention that
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (6 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 07/20] man: misc punctuation fixes Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 09/20] man: couple of grammar/language fixes Emil Velikov via B4 Relay
` (12 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
For example modinfo -F requires the field name, although the
documentation was missing the "field".
Similarly modprobe has omissions, so let's fix those as well.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
There are two different styles across the man pages:
-s, --short foo
-s foo, --short foo
A proposal to resolve these comes with a later patch in this series.
---
man/depmod.8.scd | 2 +-
man/modinfo.8.scd | 4 ++--
man/modprobe.8.scd | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/man/depmod.8.scd b/man/depmod.8.scd
index 80cc48d..7a2e84b 100644
--- a/man/depmod.8.scd
+++ b/man/depmod.8.scd
@@ -72,7 +72,7 @@ rather than the current kernel version (as returned by *uname -r*).
assumption can break especially when additionally updated third party
drivers are not correctly installed or were built incorrectly.
-*-E*, *--symvers*
+*-E*, *--symvers* _Module.symvers_
When combined with the *-e* option, this reports any symbol versions
supplied by modules that do not match with the symbol versions provided
by the kernel in its _Module.symvers_. This option is mutually
diff --git a/man/modinfo.8.scd b/man/modinfo.8.scd
index 75267bc..9545257 100644
--- a/man/modinfo.8.scd
+++ b/man/modinfo.8.scd
@@ -31,8 +31,8 @@ architecture.
*-V*, *--version*
Print the *modinfo* version.
-*-F*, *--field*
- Only print this field value, one per line. This is most useful for
+*-F* _field_, *--field* _field_
+ Only print this _field_ value, one per line. This is most useful for
scripts. Field names are case-insensitive. Common fields (which may not
be in every module) include author, description, license, parm, depends,
and alias. There are often multiple parm, alias and depends fields. The
diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd
index f4ce0be..9594798 100644
--- a/man/modprobe.8.scd
+++ b/man/modprobe.8.scd
@@ -55,7 +55,7 @@ database.
configuration files (if any) to module names as well. It is usually used
by *udev*(7).
-*-C*, *--config*
+*-C* _directory_, *--config* _directory_
This option overrides the default configuration directory
(/etc/modprobe.d).
@@ -151,14 +151,14 @@ database.
require it. Your distribution kernel may not have been built to support
removal of modules at all.
-*-w*, *--wait=*TIMEOUT_MSEC
+*-w* _TIMEOUT_MSEC_, *--wait* _TIMEOUT_MSEC_
This option causes *modprobe -r *to continue trying to remove a module
if it fails due to the module being busy, i.e. its refcount is not 0 at
the time the call is made. Modprobe tries to remove the module with an
incremental sleep time between each tentative up until the maximum wait
time in milliseconds passed in this option.
-*-S*, *--set-version*
+*-S* _version_, *--set-version* _version_
Set the kernel version, rather than using *uname*(2) to decide on the
kernel version (which dictates where to find the modules).
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 09/20] man: couple of grammar/language fixes
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (7 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 08/20] man: some options take an argument, mention that Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 10/20] man: stop removing DISTCONFDIR lines Emil Velikov via B4 Relay
` (11 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
man/modprobe.8.scd | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd
index 9594798..b47908b 100644
--- a/man/modprobe.8.scd
+++ b/man/modprobe.8.scd
@@ -101,7 +101,7 @@ database.
Naturally, this check is there for your protection, so using this option
is dangerous unless you know what you're doing.
- This applies any modules inserted: both the module (or alias) on the
+ This applies to any modules inserted: both the module (or alias) on the
command line and any modules on which it depends.
*-f*, *--force*
@@ -112,7 +112,7 @@ database.
know what you are doing.
This applies to any modules inserted: both the module (or alias) on the
- command line and any modules it on which it depends.
+ command line and any modules on which it depends.
*-i*, *--ignore-install*, *--ignore-remove*
This option causes *modprobe* to ignore *install* and *remove* commands
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 10/20] man: stop removing DISTCONFDIR lines
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (8 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 09/20] man: couple of grammar/language fixes Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 11/20] man: depmod.d: document the config file order handling Emil Velikov via B4 Relay
` (10 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Presently when DISTCONFDIR is identical to /lib we remove the whole
line, since the man pages already have an /lib instance.
At the same time, there are in-text DISTCONFDIR entries, and removing
the whole line outright breaks the documentation.
Drop the removal line - worst case scenario we get a duplicate entry in
the synopsis.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
man/Makefile.am | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/man/Makefile.am b/man/Makefile.am
index 0285fdd..25135e9 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -14,11 +14,8 @@ EXTRA_DIST = $(MAN5:%.5=%.5.scd) $(MAN8:%.8=%.8.scd)
CLEANFILES = $(dist_man_MANS)
define generate_manpage
- $(AM_V_SCDOC)if [ '$(distconfdir)' != '/lib' ] ; then \
- sed -e 's|@DISTCONFDIR@|$(distconfdir)|g' $< ; \
- else \
- sed -e '/@DISTCONFDIR@/d' $< ; \
- fi | \
+ $(AM_V_SCDOC)cat $< | \
+ sed -e 's|@DISTCONFDIR@|$(distconfdir)|g' | \
sed -e 's|@MODULE_DIRECTORY@|$(module_directory)|g' | \
$(SCDOC) > $@
endef
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 11/20] man: depmod.d: document the config file order handling
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (9 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 10/20] man: stop removing DISTCONFDIR lines Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-29 17:26 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 12/20] man: depmod.d: factor out a CONFIGURATION FORMAT section Emil Velikov via B4 Relay
` (9 subsequent siblings)
20 siblings, 1 reply; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
The depmod.d configuration order/handling aligns with existing tools
such as sysctl.d, even though there is no mention in the manual.
Reorder the list in SYNOPSIS and add a bit of verbiage describing things.
Section is copied^Winspired by sysctl.d(5) ;-)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
man/Makefile.am | 1 +
man/depmod.d.5.scd | 22 ++++++++++++++++++----
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/man/Makefile.am b/man/Makefile.am
index 25135e9..181f619 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -15,6 +15,7 @@ CLEANFILES = $(dist_man_MANS)
define generate_manpage
$(AM_V_SCDOC)cat $< | \
+ sed -e 's|@SYSCONFDIR@|$(sysconfdir)|g' | \
sed -e 's|@DISTCONFDIR@|$(distconfdir)|g' | \
sed -e 's|@MODULE_DIRECTORY@|$(module_directory)|g' | \
$(SCDOC) > $@
diff --git a/man/depmod.d.5.scd b/man/depmod.d.5.scd
index 9cf99d5..9ee35e8 100644
--- a/man/depmod.d.5.scd
+++ b/man/depmod.d.5.scd
@@ -6,15 +6,15 @@ depmod.d - Configuration directory for depmod
# SYNOPSIS
-/lib/depmod.d/\*.conf
+@SYSCONFDIR@/depmod.d/\*.conf
-@DISTCONFDIR@/depmod.d/\*.conf
+/run/depmod.d/\*.conf
/usr/local/lib/depmod.d/\*.conf
-/run/depmod.d/\*.conf
+@DISTCONFDIR@/depmod.d/\*.conf
-/etc/depmod.d/\*.conf
+/lib/depmod.d/\*.conf
# DESCRIPTION
@@ -29,6 +29,20 @@ lines and lines starting with '#' ignored (useful for adding comments). A '\\'
at the end of a line causes it to continue on the next line, which makes the
files a bit neater.
+# CONFIGURATION DIRECTORIES AND PRECEDENCE
+
+Configuration files are read from directories in @SYSCONFDIR@/, /run/,
+/usr/local/lib/, @DISTCONFDIR@/, and /lib/ in order of precedence, as listed in
+the SYNOPSIS section above. Files must have the ".conf" extension. Files in
+@SYSCONFDIR@/ override files with the same name in /run/, /usr/local/lib/,
+@DISTCONFDIR@/, and /lib/. Files in /run/ override files with the same name
+under /usr/, @DISTCONFDIR@/ and /lib/.
+
+All configuration files are sorted by their filename in lexicographic order,
+regardless of which of the directories they reside in. If multiple files specify
+the same option, the entry in the file with the lexicographically latest name
+will take precedence.
+
# COMMANDS
search _subdirectory..._
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 12/20] man: depmod.d: factor out a CONFIGURATION FORMAT section
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (10 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 11/20] man: depmod.d: document the config file order handling Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 13/20] man: depmod.d: rework the opening description sentence Emil Velikov via B4 Relay
` (8 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Keep the description neat and tidy.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
man/depmod.d.5.scd | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/man/depmod.d.5.scd b/man/depmod.d.5.scd
index 9ee35e8..ef57aac 100644
--- a/man/depmod.d.5.scd
+++ b/man/depmod.d.5.scd
@@ -24,10 +24,13 @@ built-in kernel modules are complemented by custom built versions of the same
and the user wishes to affect the priority of processing in order to override
the module version supplied by the kernel.
-The format of files under depmod.d is simple: one command per line, with blank
-lines and lines starting with '#' ignored (useful for adding comments). A '\\'
-at the end of a line causes it to continue on the next line, which makes the
-files a bit neater.
+# CONFIGURATION FORMAT
+
+The configuration files contain one command per line, with blank lines and lines
+starting with '#' ignored (useful for adding comments). A '\\' at the end of a
+line causes it to continue on the next line, which makes the files a bit neater.
+
+See the COMMANDS section below for more.
# CONFIGURATION DIRECTORIES AND PRECEDENCE
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 13/20] man: depmod.d: rework the opening description sentence
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (11 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 12/20] man: depmod.d: factor out a CONFIGURATION FORMAT section Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 14/20] man: depmod: remove hard-coded /etc/depmod.d references Emil Velikov via B4 Relay
` (7 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Use a slightly longer, more gradual introduction.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
Lucas, I'm reading the first sentence and struggling a bit. What does
the "global or per-module" refer to?
Thanks in advance o/
---
man/depmod.d.5.scd | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/man/depmod.d.5.scd b/man/depmod.d.5.scd
index ef57aac..0950790 100644
--- a/man/depmod.d.5.scd
+++ b/man/depmod.d.5.scd
@@ -18,11 +18,14 @@ depmod.d - Configuration directory for depmod
# DESCRIPTION
-The order in which modules are processed by the *depmod* command can be altered
-on a global or per-module basis. This is typically useful in cases where
-built-in kernel modules are complemented by custom built versions of the same
-and the user wishes to affect the priority of processing in order to override
-the module version supplied by the kernel.
+On execution *depmod* reads the configuration files from the above location and
+based on that it processes the available modules and their dependencies. For
+example: one can change the search order, exclude folders, override specific
+module's location and more.
+
+This is typically useful in cases where built-in kernel modules are complemented
+by custom built versions of the same and the user wishes to affect the priority
+of processing in order to override the module version supplied by the kernel.
# CONFIGURATION FORMAT
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 14/20] man: depmod: remove hard-coded /etc/depmod.d references
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (12 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 13/20] man: depmod.d: rework the opening description sentence Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 15/20] man: modprobe.d: document the config file order handling Emil Velikov via B4 Relay
` (6 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Point the users to depmod.d(5) instead.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
man/depmod.8.scd | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/depmod.8.scd b/man/depmod.8.scd
index 7a2e84b..0252a72 100644
--- a/man/depmod.8.scd
+++ b/man/depmod.8.scd
@@ -61,8 +61,8 @@ rather than the current kernel version (as returned by *uname -r*).
being the one set by _outdir_.
*-C*, *--config* _file_ _or_ _directory_
- This option overrides the default configuration directory at
- /etc/depmod.d/.
+ This option overrides the default configuration files. See
+ *depmod.d*(5).
*-e*, *--errsyms*
When combined with the *-F* option, this reports any symbols which a
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 15/20] man: modprobe.d: document the config file order handling
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (13 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 14/20] man: depmod: remove hard-coded /etc/depmod.d references Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-28 22:55 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 16/20] man: modprobe.d: factor out a CONFIGURATION FORMAT section Emil Velikov via B4 Relay
` (5 subsequent siblings)
20 siblings, 1 reply; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
The modprobe.d configuration order/handling aligns with existing tools
such as sysctl.d, even though there is no mention in the manual.
Reorder the list in SYNOPSIS and add a bit of verbiage describing things.
Section is copied^Winspired by sysctl.d(5) ;-)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
The documentation says ".conf", yet the code in libkmod-config.c also
permits for .alias files. I haven't dug through history - is that
intentional? Should we document why - in-code or manual page?
---
man/modprobe.d.5.scd | 31 ++++++++++++++++++++++---------
1 file changed, 22 insertions(+), 9 deletions(-)
diff --git a/man/modprobe.d.5.scd b/man/modprobe.d.5.scd
index 2907175..2f78dd7 100644
--- a/man/modprobe.d.5.scd
+++ b/man/modprobe.d.5.scd
@@ -6,25 +6,24 @@ modprobe.d - Configuration directory for modprobe
# SYNOPSIS
-/lib/modprobe.d/\*.conf
+@SYSCONFDIR@/modprobe.d/\*.conf
-@DISTCONFDIR@/modprobe.d/\*.conf
+/run/modprobe.d/\*.conf
/usr/local/lib/modprobe.d/\*.conf
-/run/modprobe.d/\*.conf
+@DISTCONFDIR@/modprobe.d/\*.conf
-/etc/modprobe.d/\*.conf
+/lib/modprobe.d/\*.conf
# DESCRIPTION
Because the *modprobe* command can add or remove more than one module, due to
modules having dependencies, we need a method of specifying what options are to
-be used with those modules. All files underneath the /etc/modprobe.d directory
-which end with the .conf extension specify those options as required. They can
-also be used to create convenient aliases: alternate names for a module, or they
-can override the normal *modprobe* behavior altogether for those with special
-requirements (such as inserting more than one module).
+be used with those modules. One can also use them to create convenient aliases:
+alternate names for a module, or they can override the normal *modprobe*
+behavior altogether for those with special requirements (such as inserting more
+than one module).
Note that module and alias names (like other module names) can have - or \_ in
them: both are interchangeable throughout all the module commands as underscore
@@ -35,6 +34,20 @@ lines and lines starting with '#' ignored (useful for adding comments). A '\\'
at the end of a line causes it to continue on the next line, which makes the
file a bit neater.
+# CONFIGURATION DIRECTORIES AND PRECEDENCE
+
+Configuration files are read from directories in @SYSCONFDIR@/, /run/,
+/usr/local/lib/, @DISTCONFDIR@/, and /lib/ in order of precedence, as listed in
+the SYNOPSIS section above. Files must have the ".conf" extension. Files in
+@SYSCONFDIR@/ override files with the same name in /run/, /usr/local/lib/,
+@DISTCONFDIR@/, and /lib/. Files in /run/ override files with the same name
+under /usr/, @DISTCONFDIR@/ and /lib/.
+
+All configuration files are sorted by their filename in lexicographic order,
+regardless of which of the directories they reside in. If multiple files specify
+the same option, the entry in the file with the lexicographically latest name
+will take precedence.
+
# COMMANDS
alias _wildcard_ _modulename_
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 16/20] man: modprobe.d: factor out a CONFIGURATION FORMAT section
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (14 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 15/20] man: modprobe.d: document the config file order handling Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 17/20] man: modprobe.d: mention about MODPROBE_OPTIONS Emil Velikov via B4 Relay
` (4 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Keep the description neat and tidy.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
man/modprobe.d.5.scd | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/man/modprobe.d.5.scd b/man/modprobe.d.5.scd
index 2f78dd7..b300758 100644
--- a/man/modprobe.d.5.scd
+++ b/man/modprobe.d.5.scd
@@ -29,10 +29,13 @@ Note that module and alias names (like other module names) can have - or \_ in
them: both are interchangeable throughout all the module commands as underscore
conversion happens automatically.
-The format of files under modprobe.d is simple: one command per line, with blank
-lines and lines starting with '#' ignored (useful for adding comments). A '\\'
-at the end of a line causes it to continue on the next line, which makes the
-file a bit neater.
+# CONFIGURATION FORMAT
+
+The configuration files contain one command per line, with blank lines and lines
+starting with '#' ignored (useful for adding comments). A '\\' at the end of a
+line causes it to continue on the next line, which makes the files a bit neater.
+
+See the COMMANDS section below for more.
# CONFIGURATION DIRECTORIES AND PRECEDENCE
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 17/20] man: modprobe.d: mention about MODPROBE_OPTIONS
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (15 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 16/20] man: modprobe.d: factor out a CONFIGURATION FORMAT section Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-29 17:13 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 18/20] man: modprobe: remove hard-coded /etc/modprobe.d references Emil Velikov via B4 Relay
` (3 subsequent siblings)
20 siblings, 1 reply; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
The environment variable alters the config file ordering, so mention it
in the man page.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
Hi Lucas,
Looking at modprobe(8), while the variable is mentioned there is no
details about:
- the format and it's stability across versions - is it ABI
- is the same option (say config) allowed multiple times
- if so, does the latest(?) instance override the previous ones, or
- all instances are in effect, with the latest(?) having the highest
priority
Can you shed some light? I'd be happy to put that in patch form :-)
Thanks
Emil
---
man/modprobe.d.5.scd | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/man/modprobe.d.5.scd b/man/modprobe.d.5.scd
index b300758..9d03c49 100644
--- a/man/modprobe.d.5.scd
+++ b/man/modprobe.d.5.scd
@@ -46,6 +46,10 @@ the SYNOPSIS section above. Files must have the ".conf" extension. Files in
@DISTCONFDIR@/, and /lib/. Files in /run/ override files with the same name
under /usr/, @DISTCONFDIR@/ and /lib/.
+NOTE: Any configuration directories set via the MODPROBE_OPTIONS environment
+variable are added with the top-most priority. See the ENVIRONMENT section in
+*modprobe*(8).
+
All configuration files are sorted by their filename in lexicographic order,
regardless of which of the directories they reside in. If multiple files specify
the same option, the entry in the file with the lexicographically latest name
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 18/20] man: modprobe: remove hard-coded /etc/modprobe.d references
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (16 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 17/20] man: modprobe.d: mention about MODPROBE_OPTIONS Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 19/20] man: remove the "Maintained by" references Emil Velikov via B4 Relay
` (2 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Point the users to modprobe.d(5) instead.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
man/modprobe.8.scd | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd
index b47908b..8354765 100644
--- a/man/modprobe.8.scd
+++ b/man/modprobe.8.scd
@@ -21,10 +21,9 @@ modprobe - Add and remove modules from the Linux Kernel
that for convenience, there is no difference between \_ and - in module names
(automatic underscore conversion is performed). *modprobe* looks in the module
directory @DISTCONFDIR@/`uname -r` for all the modules and other files, except
-for the optional configuration files in the /etc/modprobe.d directory (see
-*modprobe.d*(5)). *modprobe* will also use module options specified on the
-kernel command line in the form of <module>.<option> and blacklists in the form
-of modprobe.blacklist=<module>.
+for the optional configuration files (see *modprobe.d*(5)). *modprobe* will also
+use module options specified on the kernel command line in the form of
+<module>.<option> and blacklists in the form of modprobe.blacklist=<module>.
Note that unlike in 2.4 series Linux kernels (which are not supported by this
tool) this version of *modprobe* does not do anything to the module itself: the
@@ -56,8 +55,8 @@ database.
by *udev*(7).
*-C* _directory_, *--config* _directory_
- This option overrides the default configuration directory
- (/etc/modprobe.d).
+ This option overrides the default configuration directory. See
+ *modprobe.d*(5).
This option is passed through *install* or *remove* commands to other
*modprobe* commands in the MODPROBE_OPTIONS environment variable.
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 19/20] man: remove the "Maintained by" references
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (17 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 18/20] man: modprobe: remove hard-coded /etc/modprobe.d references Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-29 17:51 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 20/20] man: list options one per line Emil Velikov via B4 Relay
2024-06-29 18:08 ` [PATCH kmod 00/20] man: convert to scdoc and minor improvements Lucas De Marchi
20 siblings, 1 reply; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
At a glance through my system, around 2% of the man pages include such
statement.
Looking through git log, Jon has been active in a while and presumably
have moved on.
Most importantly the Copyright section isn't the best place to reference
the maintainer/contact person.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
Instead we can add a note in the authors section, pointing people to the
ML/kernel.org/Github repo for when seeking contact.
Also should probably s/Developer/Maintainer/ for Lucas, who's been
keeping the project afloat the last few decades ;-)
Lucas, what do you think?
---
man/insmod.8.scd | 1 -
man/kmod.8.scd | 3 +--
man/lsmod.8.scd | 1 -
man/modinfo.8.scd | 1 -
man/modprobe.8.scd | 1 -
man/modprobe.d.5.scd | 1 -
man/modules.dep.5.scd | 1 -
man/rmmod.8.scd | 1 -
8 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/man/insmod.8.scd b/man/insmod.8.scd
index b6f8654..27d4409 100644
--- a/man/insmod.8.scd
+++ b/man/insmod.8.scd
@@ -21,7 +21,6 @@ information about errors.
# COPYRIGHT
This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
-Maintained by Jon Masters and others.
# SEE ALSO
diff --git a/man/kmod.8.scd b/man/kmod.8.scd
index 2007a2d..6bd9432 100644
--- a/man/kmod.8.scd
+++ b/man/kmod.8.scd
@@ -35,8 +35,7 @@ Linux Kernel modules. Most users will only run it using its other names.
# COPYRIGHT
-This manual page originally Copyright 2014, Marco d'Itri. Maintained by Lucas De
-Marchi and others.
+This manual page originally Copyright 2014, Marco d'Itri.
# SEE ALSO
diff --git a/man/lsmod.8.scd b/man/lsmod.8.scd
index eb2f2e8..ded619e 100644
--- a/man/lsmod.8.scd
+++ b/man/lsmod.8.scd
@@ -15,7 +15,6 @@ lsmod - Show the status of modules in the Linux Kernel
# COPYRIGHT
This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
-Maintained by Jon Masters and others.
# SEE ALSO
diff --git a/man/modinfo.8.scd b/man/modinfo.8.scd
index 9545257..d088c7e 100644
--- a/man/modinfo.8.scd
+++ b/man/modinfo.8.scd
@@ -63,7 +63,6 @@ architecture.
# COPYRIGHT
This manual page originally Copyright 2003, Rusty Russell, IBM Corporation.
-Maintained by Jon Masters and others.
# SEE ALSO
diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd
index 8354765..657d172 100644
--- a/man/modprobe.8.scd
+++ b/man/modprobe.8.scd
@@ -197,7 +197,6 @@ The MODPROBE_OPTIONS environment variable can also be used to pass arguments to
# COPYRIGHT
This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
-Maintained by Jon Masters and others.
# SEE ALSO
diff --git a/man/modprobe.d.5.scd b/man/modprobe.d.5.scd
index 9d03c49..41d2e78 100644
--- a/man/modprobe.d.5.scd
+++ b/man/modprobe.d.5.scd
@@ -170,7 +170,6 @@ directly within the modules.
# COPYRIGHT
This manual page originally Copyright 2004, Rusty Russell, IBM Corporation.
-Maintained by Jon Masters and others.
# SEE ALSO
diff --git a/man/modules.dep.5.scd b/man/modules.dep.5.scd
index c4e7653..7723a16 100644
--- a/man/modules.dep.5.scd
+++ b/man/modules.dep.5.scd
@@ -29,7 +29,6 @@ fashion rather than touching these files.
# COPYRIGHT
This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
-Maintained by Jon Masters and others.
# SEE ALSO
diff --git a/man/rmmod.8.scd b/man/rmmod.8.scd
index e1f656f..c4dcc3e 100644
--- a/man/rmmod.8.scd
+++ b/man/rmmod.8.scd
@@ -35,7 +35,6 @@ is provided) from the kernel. Most users will want to use *modprobe*(8) with the
# COPYRIGHT
This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
-Maintained by Jon Masters and others.
# SEE ALSO
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH kmod 20/20] man: list options one per line
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (18 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 19/20] man: remove the "Maintained by" references Emil Velikov via B4 Relay
@ 2024-06-11 15:05 ` Emil Velikov via B4 Relay
2024-06-29 18:08 ` [PATCH kmod 00/20] man: convert to scdoc and minor improvements Lucas De Marchi
20 siblings, 0 replies; 31+ messages in thread
From: Emil Velikov via B4 Relay @ 2024-06-11 15:05 UTC (permalink / raw)
To: linux-modules; +Cc: Emil Velikov
From: Emil Velikov <emil.l.velikov@gmail.com>
Somewhat inspired by my selfish use of VIM as man pager. Namely, when
there are multiple options on the same line, only the first one gets
properly rendered.
A good bonus point is that very long instances, like modinfo's legacy
"--author, --description ..." look a bit neater now.
With this is also more consistently handle short/long options which take
an argument.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
man/depmod.8.scd | 37 +++++++++++++++++++++++++------------
man/kmod.8.scd | 6 ++++--
man/modinfo.8.scd | 17 ++++++++++++-----
man/modprobe.8.scd | 50 ++++++++++++++++++++++++++++++++++----------------
man/rmmod.8.scd | 12 ++++++++----
5 files changed, 83 insertions(+), 39 deletions(-)
diff --git a/man/depmod.8.scd b/man/depmod.8.scd
index 0252a72..8c87a64 100644
--- a/man/depmod.8.scd
+++ b/man/depmod.8.scd
@@ -35,16 +35,19 @@ rather than the current kernel version (as returned by *uname -r*).
# OPTIONS
-*-a*, *--all*
+*-a*
+*--all*
Probe all modules. This option is enabled by default if no file names
are given in the command-line.
-*-A*, *--quick*
+*-A*
+*--quick*
This option scans to see if any modules are newer than the
*modules.dep* file before any work is done: if not, it silently exits
rather than regenerating the files.
-*-b* _basedir_, *--basedir* _basedir_
+*-b* _basedir_
+*--basedir* _basedir_
If your modules are not currently in the (normal) directory
@MODULE_DIRECTORY@/_version_, but in a staging area, you can specify a
_basedir_ which is prepended to the directory name. This _basedir_ is
@@ -53,18 +56,21 @@ rather than the current kernel version (as returned by *uname -r*).
distribution vendor who needs to pre-generate the meta-data files rather
than running *depmod* again later.
-*-o* _outdir_, *--outdir* _outdir_
+*-o* _outdir_
+*--outdir* _outdir_
Set the output directory where *depmod* will store any generated file.
_outdir_ serves as a root to that location, similar to how _basedir_ is
used. Also this setting takes precedence and if used together with
_basedir_ it will result in the input being that directory, but the output
being the one set by _outdir_.
-*-C*, *--config* _file_ _or_ _directory_
+*-C* _file_ _or_ _directory_
+*--config* _file_ _or_ _directory_
This option overrides the default configuration files. See
*depmod.d*(5).
-*-e*, *--errsyms*
+*-e*
+*--errsyms*
When combined with the *-F* option, this reports any symbols which a
module needs which are not supplied by other modules or the kernel.
Normally, any symbols not provided by modules are assumed to be provided
@@ -72,21 +78,26 @@ rather than the current kernel version (as returned by *uname -r*).
assumption can break especially when additionally updated third party
drivers are not correctly installed or were built incorrectly.
-*-E*, *--symvers* _Module.symvers_
+*-E* _Module.symvers_
+*--symvers* _Module.symvers_
When combined with the *-e* option, this reports any symbol versions
supplied by modules that do not match with the symbol versions provided
by the kernel in its _Module.symvers_. This option is mutually
incompatible with *-F*.
-*-F*, *--filesyms* _System.map_
+*-F* _System.map_
+*--filesyms* _System.map_
Supplied with the _System.map_ produced when the kernel was built, this
allows the *-e* option to report unresolved symbols. This option is
mutually incompatible with *-E*.
-*-h*, *--help*
+*-h*
+*--help*
Print the help message and exit.
-*-n*, *--show*, *--dry-run*
+*-n*
+*--show*
+*--dry-run*
This sends the resulting *modules.dep* and the various map files to
standard output rather than writing them into the module directory.
@@ -94,11 +105,13 @@ rather than the current kernel version (as returned by *uname -r*).
Some architectures prefix symbols with an extraneous character. This
specifies a prefix character (for example '\_') to ignore.
-*-v*, *--verbose*
+*-v*
+*--verbose*
In verbose mode, *depmod* will print (to stdout) all the symbols each
module depends on and the module's file name which provides that symbol.
-*-V*, *--version*
+*-V*
+*--version*
Show version of program and exit. See below for caveats when run on
older kernels.
diff --git a/man/kmod.8.scd b/man/kmod.8.scd
index 6bd9432..ff80c2f 100644
--- a/man/kmod.8.scd
+++ b/man/kmod.8.scd
@@ -15,10 +15,12 @@ Linux Kernel modules. Most users will only run it using its other names.
# OPTIONS
-*-V*, *--version*
+*-V*
+*--version*
Show the program version and exit.
-*-h*, *--help*
+*-h*
+*--help*
Show the help message.
# COMMANDS
diff --git a/man/modinfo.8.scd b/man/modinfo.8.scd
index d088c7e..038234d 100644
--- a/man/modinfo.8.scd
+++ b/man/modinfo.8.scd
@@ -28,17 +28,20 @@ architecture.
# OPTIONS
-*-V*, *--version*
+*-V*
+*--version*
Print the *modinfo* version.
-*-F* _field_, *--field* _field_
+*-F* _field_
+*--field* _field_
Only print this _field_ value, one per line. This is most useful for
scripts. Field names are case-insensitive. Common fields (which may not
be in every module) include author, description, license, parm, depends,
and alias. There are often multiple parm, alias and depends fields. The
special _field_ filename lists the filename of the module.
-*-b* _basedir_, *--basedir* _basedir_
+*-b* _basedir_
+*--basedir* _basedir_
Root directory for modules, / by default.
*-k* _kernel_
@@ -49,12 +52,16 @@ architecture.
modules in a new kernel for which you must make an initrd/initramfs
image prior to booting.
-*-0*, *--null*
+*-0*
+*--null*
Use the ASCII zero character to separate _field_ values, instead of a new
line. This is useful for scripts, since a new line can theoretically
appear inside a _field_.
-*-a* *--author*, *-d* *--description*, *-l* *--license*, *-p* *--parameters*,
+*-a* *--author*
+*-d* *--description*
+*-l* *--license*
+*-p* *--parameters*
*-n* *--filename*
These are shortcuts for the *--field* flag's author, description,
license, parm and filename arguments, to ease the transition from the
diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd
index 657d172..a06cf31 100644
--- a/man/modprobe.8.scd
+++ b/man/modprobe.8.scd
@@ -46,22 +46,26 @@ database.
# OPTIONS
-*-a*, *--all*
+*-a*
+*--all*
Insert all module names on the command line.
-*-b*, *--use-blacklist*
+*-b*
+*--use-blacklist*
This option causes *modprobe* to apply the *blacklist* commands in the
configuration files (if any) to module names as well. It is usually used
by *udev*(7).
-*-C* _directory_, *--config* _directory_
+*-C* _directory_
+*--config* _directory_
This option overrides the default configuration directory. See
*modprobe.d*(5).
This option is passed through *install* or *remove* commands to other
*modprobe* commands in the MODPROBE_OPTIONS environment variable.
-*-c*, *--showconfig*
+*-c*
+*--showconfig*
Dump out the effective configuration from the config directory and exit.
*--dump-modversions*
@@ -69,7 +73,8 @@ database.
This option is commonly used by distributions in order to package up a
Linux kernel module using module versioning deps.
-*-d*, *--dirname*
+*-d*
+*--dirname*
Root directory for modules, / by default.
*--first-time*
@@ -103,7 +108,8 @@ database.
This applies to any modules inserted: both the module (or alias) on the
command line and any modules on which it depends.
-*-f*, *--force*
+*-f*
+*--force*
Try to strip any versioning information from the module which might
otherwise stop it from loading: this is the same as using both
*--force-vermagic* and *--force-modversion*. Naturally, these checks are
@@ -113,7 +119,9 @@ database.
This applies to any modules inserted: both the module (or alias) on the
command line and any modules on which it depends.
-*-i*, *--ignore-install*, *--ignore-remove*
+*-i*
+*--ignore-install*
+*--ignore-remove*
This option causes *modprobe* to ignore *install* and *remove* commands
in the configuration file (if any) for the module specified on the
command line (any dependent modules are still subject to commands set
@@ -122,24 +130,29 @@ database.
the request was more specifically made with only one or other (and not
both) of *--ignore-install* or *--ignore-remove*. See *modprobe.d*(5).
-*-n*, *--dry-run*, *--show*
+*-n*
+*--dry-run*
+*--show*
This option does everything but actually insert or delete the modules
(or run the install or remove commands). Combined with *-v*, it is
useful for debugging problems. For historical reasons both *--dry-run*
and *--show* actually mean the same thing and are interchangeable.
-*-q*, *--quiet*
+*-q*
+*--quiet*
With this flag, *modprobe* won't print an error message if you try to
remove or insert a module it can't find (and isn't an alias or
*install*/*remove* command). However, it will still return with a non-zero
exit status. The kernel uses this to opportunistically probe for modules
which might exist using request_module.
-*-R*, *--resolve-alias*
+*-R*
+*--resolve-alias*
Print all module names matching an alias. This can be useful for
debugging module alias problems.
-*-r*, *--remove*
+***-r*
+*--remove*
This option causes *modprobe* to remove rather than insert a module. If
the modules it depends on are also unused, *modprobe* will try to remove
them too. Unlike insertion, more than one module can be specified on the
@@ -150,14 +163,16 @@ database.
require it. Your distribution kernel may not have been built to support
removal of modules at all.
-*-w* _TIMEOUT_MSEC_, *--wait* _TIMEOUT_MSEC_
+*-w* _TIMEOUT_MSEC_
+*--wait* _TIMEOUT_MSEC_
This option causes *modprobe -r *to continue trying to remove a module
if it fails due to the module being busy, i.e. its refcount is not 0 at
the time the call is made. Modprobe tries to remove the module with an
incremental sleep time between each tentative up until the maximum wait
time in milliseconds passed in this option.
-*-S* _version_, *--set-version* _version_
+*-S* _version_
+*--set-version* _version_
Set the kernel version, rather than using *uname*(2) to decide on the
kernel version (which dictates where to find the modules).
@@ -171,7 +186,8 @@ database.
that *modinfo*(8) can be used to extract dependencies of a module from the
module itself, but knows nothing of aliases or install commands.
-*-s*, *--syslog*
+*-s*
+*--syslog*
This option causes any error messages to go through the syslog mechanism
(as LOG_DAEMON with level LOG_NOTICE) rather than to standard error.
This is also automatically enabled when stderr is unavailable.
@@ -179,10 +195,12 @@ database.
This option is passed through *install* or *remove* commands to other
*modprobe* commands in the MODPROBE_OPTIONS environment variable.
-*-V*, *--version*
+*-V*
+*--version*
Show version of program and exit.
-*-v*, *--verbose*
+*-v*
+*--verbose*
Print messages about what the program is doing. Usually *modprobe* only
prints messages if something goes wrong.
diff --git a/man/rmmod.8.scd b/man/rmmod.8.scd
index c4dcc3e..1baed99 100644
--- a/man/rmmod.8.scd
+++ b/man/rmmod.8.scd
@@ -16,20 +16,24 @@ is provided) from the kernel. Most users will want to use *modprobe*(8) with the
# OPTIONS
-*-v*, *--verbose*
+*-v*
+*--verbose*
Print messages about what the program is doing. Usually *rmmod* prints
messages only if something goes wrong.
-*-f*, *--force*
+*-f*
+*--force*
This option can be extremely dangerous: it has no effect unless
CONFIG_MODULE_FORCE_UNLOAD was set when the kernel was compiled. With
this option, you can remove modules which are being used, or which are
not designed to be removed, or have been marked as unsafe (see *lsmod*(8)).
-*-s*, *--syslog*
+*-s*
+*--syslog*
Send errors to syslog instead of standard error.
-*-V*, *--version*
+*-V*
+*--version*
Show version of program and exit.
# COPYRIGHT
--
2.45.0
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH kmod 05/20] man: add some extra bold/italic annotations
2024-06-11 15:05 ` [PATCH kmod 05/20] man: add some extra bold/italic annotations Emil Velikov via B4 Relay
@ 2024-06-28 22:27 ` Lucas De Marchi
2024-06-28 22:32 ` Lucas De Marchi
0 siblings, 1 reply; 31+ messages in thread
From: Lucas De Marchi @ 2024-06-28 22:27 UTC (permalink / raw)
To: emil.l.velikov; +Cc: linux-modules
On Tue, Jun 11, 2024 at 04:05:05PM GMT, Emil Velikov via B4 Relay wrote:
>--- a/man/modinfo.8.scd
>+++ b/man/modinfo.8.scd
>@@ -29,14 +29,14 @@ architecture.
> # OPTIONS
>
> *-V*, *--version*
>- Print the modinfo version.
>+ Print the *modinfo* version.
>
> *-F*, *--field*
missing
^ _field_
so it's consistent with the rest?
Lucas De Marchi
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH kmod 06/20] man: white space fixes
2024-06-11 15:05 ` [PATCH kmod 06/20] man: white space fixes Emil Velikov via B4 Relay
@ 2024-06-28 22:30 ` Lucas De Marchi
0 siblings, 0 replies; 31+ messages in thread
From: Lucas De Marchi @ 2024-06-28 22:30 UTC (permalink / raw)
To: emil.l.velikov; +Cc: linux-modules
On Tue, Jun 11, 2024 at 04:05:06PM GMT, Emil Velikov via B4 Relay wrote:
>From: Emil Velikov <emil.l.velikov@gmail.com>
>
>These were present in the original xml files and I opted to keep them
>separate fix to make the transition/comparison easier.
>
>Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>---
> man/depmod.8.scd | 4 ++--
> man/depmod.d.5.scd | 2 +-
> man/modprobe.8.scd | 8 ++++----
> man/modprobe.d.5.scd | 4 ++--
> 4 files changed, 9 insertions(+), 9 deletions(-)
>
>diff --git a/man/depmod.8.scd b/man/depmod.8.scd
>index 8cb6449..80cc48d 100644
>--- a/man/depmod.8.scd
>+++ b/man/depmod.8.scd
>@@ -54,8 +54,8 @@ rather than the current kernel version (as returned by *uname -r*).
> than running *depmod* again later.
>
> *-o* _outdir_, *--outdir* _outdir_
>- Set the output directory where depmod will store any generated file.
>- _ outdir_ serves as a root to that location, similar to how _basedir_ is
>+ Set the output directory where *depmod* will store any generated file.
this one belongs to the previous patch.
Lucas De Marchi
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH kmod 05/20] man: add some extra bold/italic annotations
2024-06-28 22:27 ` Lucas De Marchi
@ 2024-06-28 22:32 ` Lucas De Marchi
0 siblings, 0 replies; 31+ messages in thread
From: Lucas De Marchi @ 2024-06-28 22:32 UTC (permalink / raw)
To: emil.l.velikov; +Cc: linux-modules
On Fri, Jun 28, 2024 at 05:27:09PM GMT, Lucas De Marchi wrote:
>On Tue, Jun 11, 2024 at 04:05:05PM GMT, Emil Velikov via B4 Relay wrote:
>>--- a/man/modinfo.8.scd
>>+++ b/man/modinfo.8.scd
>>@@ -29,14 +29,14 @@ architecture.
>># OPTIONS
>>
>>*-V*, *--version*
>>- Print the modinfo version.
>>+ Print the *modinfo* version.
>>
>>*-F*, *--field*
>missing
> ^ _field_
>
>so it's consistent with the rest?
oh, ok. This is in a later patch.
Lucas De Marchi
>
>Lucas De Marchi
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH kmod 15/20] man: modprobe.d: document the config file order handling
2024-06-11 15:05 ` [PATCH kmod 15/20] man: modprobe.d: document the config file order handling Emil Velikov via B4 Relay
@ 2024-06-28 22:55 ` Lucas De Marchi
0 siblings, 0 replies; 31+ messages in thread
From: Lucas De Marchi @ 2024-06-28 22:55 UTC (permalink / raw)
To: emil.l.velikov; +Cc: linux-modules
On Tue, Jun 11, 2024 at 04:05:15PM GMT, Emil Velikov via B4 Relay wrote:
>From: Emil Velikov <emil.l.velikov@gmail.com>
>
>The modprobe.d configuration order/handling aligns with existing tools
>such as sysctl.d, even though there is no mention in the manual.
>
>Reorder the list in SYNOPSIS and add a bit of verbiage describing things.
>
>Section is copied^Winspired by sysctl.d(5) ;-)
>
>Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>---
>The documentation says ".conf", yet the code in libkmod-config.c also
>permits for .alias files. I haven't dug through history - is that
>intentional? Should we document why - in-code or manual page?
to retain compatibility with the previous project used for loading
modules in Linux, module-init-tools:
if (len < 6 ||
(strcmp(&i->d_name[len-5], ".conf") != 0 &&
strcmp(&i->d_name[len-6], ".alias") != 0))
warn("All config files need .conf: %s/%s, "
"it will be ignored in a future release.\n"
filename, i->d_name);
And by "All config files need .conf" I imagine module-init-tools was
doing that to retain compatibility with distros using .alias or because
it was also using the same logic to parse modules.alias from the kernel.
Not sure.
The oldest commit I found referencing this in module-init-tools is:
commit 50f21358cf9937906f42be1352ba2b588375a344
Author: Kay Sievers <kay.sievers@vrfy.org>
Date: Mon Mar 2 13:59:29 2009 +0100
Before that, module-init-tools wouldn't enforce any suffix, but filtered
out the known-bad ones.
I think we can leave that undocumented and maybe 15 years is more than
enough to finally do what the warning said :)
Lucas De Marchi
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH kmod 17/20] man: modprobe.d: mention about MODPROBE_OPTIONS
2024-06-11 15:05 ` [PATCH kmod 17/20] man: modprobe.d: mention about MODPROBE_OPTIONS Emil Velikov via B4 Relay
@ 2024-06-29 17:13 ` Lucas De Marchi
0 siblings, 0 replies; 31+ messages in thread
From: Lucas De Marchi @ 2024-06-29 17:13 UTC (permalink / raw)
To: emil.l.velikov; +Cc: linux-modules
On Tue, Jun 11, 2024 at 04:05:17PM GMT, Emil Velikov via B4 Relay wrote:
>From: Emil Velikov <emil.l.velikov@gmail.com>
>
>The environment variable alters the config file ordering, so mention it
nops, it's not about config.
>in the man page.
>
>Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>---
>Hi Lucas,
>
>Looking at modprobe(8), while the variable is mentioned there is no
>details about:
> - the format and it's stability across versions - is it ABI
yes
> - is the same option (say config) allowed multiple times
this is not about config. This is about command line options.
MODPROBE_OPTIONS="-R" modprobe ext4
is equivalent to:
modprobe -R ext4
the format is as if you gave it as command line options, with a minimal
of shlex parsing to allow quotes.
> - if so, does the latest(?) instance override the previous ones, or
> - all instances are in effect, with the latest(?) having the highest
> priority
it depends on what arg you are passing. It's exactly the same as if you
did:
modprobe $MODPROBE_OPTIONS --foo --bar -x -y -z
we will preprend MODPROBE_OPTIONS and expand it.
>
>Can you shed some light? I'd be happy to put that in patch form :-)
yeah, it would be great to document it, although its use is kind of
discouraged, together with the reason for it to exist, install rules.
AFAIR the reason for it to exist is that when we have install rules, we
will call system(install_rule). Once upon a time distros would do
something like in their config:
install foo modprobe bar || modprobe foo
... or to simulate pre/post softdep.
Lucas De Marchi
>
>Thanks
>Emil
>---
> man/modprobe.d.5.scd | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/man/modprobe.d.5.scd b/man/modprobe.d.5.scd
>index b300758..9d03c49 100644
>--- a/man/modprobe.d.5.scd
>+++ b/man/modprobe.d.5.scd
>@@ -46,6 +46,10 @@ the SYNOPSIS section above. Files must have the ".conf" extension. Files in
> @DISTCONFDIR@/, and /lib/. Files in /run/ override files with the same name
> under /usr/, @DISTCONFDIR@/ and /lib/.
>
>+NOTE: Any configuration directories set via the MODPROBE_OPTIONS environment
>+variable are added with the top-most priority. See the ENVIRONMENT section in
>+*modprobe*(8).
>+
> All configuration files are sorted by their filename in lexicographic order,
> regardless of which of the directories they reside in. If multiple files specify
> the same option, the entry in the file with the lexicographically latest name
>
>--
>2.45.0
>
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH kmod 11/20] man: depmod.d: document the config file order handling
2024-06-11 15:05 ` [PATCH kmod 11/20] man: depmod.d: document the config file order handling Emil Velikov via B4 Relay
@ 2024-06-29 17:26 ` Lucas De Marchi
0 siblings, 0 replies; 31+ messages in thread
From: Lucas De Marchi @ 2024-06-29 17:26 UTC (permalink / raw)
To: emil.l.velikov; +Cc: linux-modules
On Tue, Jun 11, 2024 at 04:05:11PM GMT, Emil Velikov via B4 Relay wrote:
>From: Emil Velikov <emil.l.velikov@gmail.com>
>
>The depmod.d configuration order/handling aligns with existing tools
>such as sysctl.d, even though there is no mention in the manual.
>
>Reorder the list in SYNOPSIS and add a bit of verbiage describing things.
>
>Section is copied^Winspired by sysctl.d(5) ;-)
>
>Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>---
> man/Makefile.am | 1 +
> man/depmod.d.5.scd | 22 ++++++++++++++++++----
> 2 files changed, 19 insertions(+), 4 deletions(-)
>
>diff --git a/man/Makefile.am b/man/Makefile.am
>index 25135e9..181f619 100644
>--- a/man/Makefile.am
>+++ b/man/Makefile.am
>@@ -15,6 +15,7 @@ CLEANFILES = $(dist_man_MANS)
>
> define generate_manpage
> $(AM_V_SCDOC)cat $< | \
>+ sed -e 's|@SYSCONFDIR@|$(sysconfdir)|g' | \
> sed -e 's|@DISTCONFDIR@|$(distconfdir)|g' | \
> sed -e 's|@MODULE_DIRECTORY@|$(module_directory)|g' | \
> $(SCDOC) > $@
>diff --git a/man/depmod.d.5.scd b/man/depmod.d.5.scd
>index 9cf99d5..9ee35e8 100644
>--- a/man/depmod.d.5.scd
>+++ b/man/depmod.d.5.scd
>@@ -6,15 +6,15 @@ depmod.d - Configuration directory for depmod
>
> # SYNOPSIS
>
>-/lib/depmod.d/\*.conf
>+@SYSCONFDIR@/depmod.d/\*.conf
>
>-@DISTCONFDIR@/depmod.d/\*.conf
>+/run/depmod.d/\*.conf
>
> /usr/local/lib/depmod.d/\*.conf
>
>-/run/depmod.d/\*.conf
>+@DISTCONFDIR@/depmod.d/\*.conf
>
>-/etc/depmod.d/\*.conf
>+/lib/depmod.d/\*.conf
>
> # DESCRIPTION
>
>@@ -29,6 +29,20 @@ lines and lines starting with '#' ignored (useful for adding comments). A '\\'
> at the end of a line causes it to continue on the next line, which makes the
> files a bit neater.
>
>+# CONFIGURATION DIRECTORIES AND PRECEDENCE
>+
>+Configuration files are read from directories in @SYSCONFDIR@/, /run/,
>+/usr/local/lib/, @DISTCONFDIR@/, and /lib/ in order of precedence, as listed in
>+the SYNOPSIS section above. Files must have the ".conf" extension. Files in
>+@SYSCONFDIR@/ override files with the same name in /run/, /usr/local/lib/,
ok until here.
>+@DISTCONFDIR@/, and /lib/. Files in /run/ override files with the same name
>+under /usr/, @DISTCONFDIR@/ and /lib/.
I actually find this odd. Why mention /run overriding /usr/ (that
was not mentioneed before), and not mention the other overrides?
>+
>+All configuration files are sorted by their filename in lexicographic order,
>+regardless of which of the directories they reside in. If multiple files specify
>+the same option, the entry in the file with the lexicographically latest name
>+will take precedence.
Looking at sysctl(8) and systemd-system.conf for inspiration, I'd write
something like:
# CONFIGURATION DIRECTORIES AND PRECEDENCE
Configuration files are read from directories in listed in SYNOPSYS in
that order of precedence. Once a file of a given filename is loaded, any
file of the same name in subsequent directories is ignored.
All configuration files are sorted in lexicographic order, regardless of
the directory they reside in. Configuration files can either be
completely replaced (by having a new configuration file with the same
name in a directory of higher priority) or partially replaced (by having
a configuration file that is ordered later).
... or maybe also repeat the list of files like sysctl does to have it
all in one place.
thanks
Lucas De Marchi
>+
> # COMMANDS
>
> search _subdirectory..._
>
>--
>2.45.0
>
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH kmod 19/20] man: remove the "Maintained by" references
2024-06-11 15:05 ` [PATCH kmod 19/20] man: remove the "Maintained by" references Emil Velikov via B4 Relay
@ 2024-06-29 17:51 ` Lucas De Marchi
0 siblings, 0 replies; 31+ messages in thread
From: Lucas De Marchi @ 2024-06-29 17:51 UTC (permalink / raw)
To: emil.l.velikov; +Cc: linux-modules
On Tue, Jun 11, 2024 at 04:05:19PM GMT, Emil Velikov via B4 Relay wrote:
>From: Emil Velikov <emil.l.velikov@gmail.com>
>
>At a glance through my system, around 2% of the man pages include such
>statement.
>
>Looking through git log, Jon has been active in a while and presumably
>have moved on.
Jon was the author and maintainer of module-init-tools, that got replaced
by kmod:
https://lwn.net/Articles/472354/
my blog: https://politreco.com/2011/12/announce-kmod-1/
Jon's blog: http://www.jonmasters.org/blog/2011/12/20/libkmod-replaces-module-init-tools/
>
>Most importantly the Copyright section isn't the best place to reference
>the maintainer/contact person.
agreed
>
>Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>---
>Instead we can add a note in the authors section, pointing people to the
>ML/kernel.org/Github repo for when seeking contact.
>
>Also should probably s/Developer/Maintainer/ for Lucas, who's been
>keeping the project afloat the last few decades ;-)
>
>Lucas, what do you think?
I like the format used by git:
AUTHORS
Git was started by Linus Torvalds, and is currently maintained by
Junio C Hamano. Numerous contributions have come from the Git
mailing list <git@vger.kernel.org[6]>.
https://openhub.net/p/git/contributors/summary gives you a more
complete list of contributors.
If you have a clone of git.git itself, the output of
git-shortlog(1) and git-blame(1) can show you the authors for
specific parts of the project.
Can we get inspiration from there, remove the COPYRIGHT section and add
a new AUTHORS section? A brief history mentioning that kmod replaced
module-init-tools can be added in kmod(8). Something like this?
KMOD(8)
...
AUTHORS
kmod project was started by Lucas De Marchi as a drop-in
replacement to module-init-tools that was maintained by Jon
Masters, adding a library (libkmod) and additional features.
Numerous contributions have come from the linux-modules mailing
list <linux-modules@vger.kernel.org> and Github. If you have a
clone of kmod.git itself, the output of git-shortlog(1) and
git-blame(1) can show you the authors for specific parts of the
project.
Lucas De Marchi <lucas.de.marchi@gmail.com> is the current
maintainer of the project.
The other man pages can omit the first paragraph.
thanks
Lucas De Marchi
>---
> man/insmod.8.scd | 1 -
> man/kmod.8.scd | 3 +--
> man/lsmod.8.scd | 1 -
> man/modinfo.8.scd | 1 -
> man/modprobe.8.scd | 1 -
> man/modprobe.d.5.scd | 1 -
> man/modules.dep.5.scd | 1 -
> man/rmmod.8.scd | 1 -
> 8 files changed, 1 insertion(+), 9 deletions(-)
>
>diff --git a/man/insmod.8.scd b/man/insmod.8.scd
>index b6f8654..27d4409 100644
>--- a/man/insmod.8.scd
>+++ b/man/insmod.8.scd
>@@ -21,7 +21,6 @@ information about errors.
> # COPYRIGHT
>
> This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
>-Maintained by Jon Masters and others.
>
> # SEE ALSO
>
>diff --git a/man/kmod.8.scd b/man/kmod.8.scd
>index 2007a2d..6bd9432 100644
>--- a/man/kmod.8.scd
>+++ b/man/kmod.8.scd
>@@ -35,8 +35,7 @@ Linux Kernel modules. Most users will only run it using its other names.
>
> # COPYRIGHT
>
>-This manual page originally Copyright 2014, Marco d'Itri. Maintained by Lucas De
>-Marchi and others.
>+This manual page originally Copyright 2014, Marco d'Itri.
>
> # SEE ALSO
>
>diff --git a/man/lsmod.8.scd b/man/lsmod.8.scd
>index eb2f2e8..ded619e 100644
>--- a/man/lsmod.8.scd
>+++ b/man/lsmod.8.scd
>@@ -15,7 +15,6 @@ lsmod - Show the status of modules in the Linux Kernel
> # COPYRIGHT
>
> This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
>-Maintained by Jon Masters and others.
>
> # SEE ALSO
>
>diff --git a/man/modinfo.8.scd b/man/modinfo.8.scd
>index 9545257..d088c7e 100644
>--- a/man/modinfo.8.scd
>+++ b/man/modinfo.8.scd
>@@ -63,7 +63,6 @@ architecture.
> # COPYRIGHT
>
> This manual page originally Copyright 2003, Rusty Russell, IBM Corporation.
>-Maintained by Jon Masters and others.
>
> # SEE ALSO
>
>diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd
>index 8354765..657d172 100644
>--- a/man/modprobe.8.scd
>+++ b/man/modprobe.8.scd
>@@ -197,7 +197,6 @@ The MODPROBE_OPTIONS environment variable can also be used to pass arguments to
> # COPYRIGHT
>
> This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
>-Maintained by Jon Masters and others.
>
> # SEE ALSO
>
>diff --git a/man/modprobe.d.5.scd b/man/modprobe.d.5.scd
>index 9d03c49..41d2e78 100644
>--- a/man/modprobe.d.5.scd
>+++ b/man/modprobe.d.5.scd
>@@ -170,7 +170,6 @@ directly within the modules.
> # COPYRIGHT
>
> This manual page originally Copyright 2004, Rusty Russell, IBM Corporation.
>-Maintained by Jon Masters and others.
>
> # SEE ALSO
>
>diff --git a/man/modules.dep.5.scd b/man/modules.dep.5.scd
>index c4e7653..7723a16 100644
>--- a/man/modules.dep.5.scd
>+++ b/man/modules.dep.5.scd
>@@ -29,7 +29,6 @@ fashion rather than touching these files.
> # COPYRIGHT
>
> This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
>-Maintained by Jon Masters and others.
>
> # SEE ALSO
>
>diff --git a/man/rmmod.8.scd b/man/rmmod.8.scd
>index e1f656f..c4dcc3e 100644
>--- a/man/rmmod.8.scd
>+++ b/man/rmmod.8.scd
>@@ -35,7 +35,6 @@ is provided) from the kernel. Most users will want to use *modprobe*(8) with the
> # COPYRIGHT
>
> This manual page originally Copyright 2002, Rusty Russell, IBM Corporation.
>-Maintained by Jon Masters and others.
>
> # SEE ALSO
>
>
>--
>2.45.0
>
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH kmod 03/20] man: build the scdoc based man pages
2024-06-11 15:05 ` [PATCH kmod 03/20] man: build the " Emil Velikov via B4 Relay
@ 2024-06-29 18:04 ` Lucas De Marchi
2024-07-03 22:05 ` Lucas De Marchi
0 siblings, 1 reply; 31+ messages in thread
From: Lucas De Marchi @ 2024-06-29 18:04 UTC (permalink / raw)
To: emil.l.velikov; +Cc: linux-modules
On Tue, Jun 11, 2024 at 04:05:03PM GMT, Emil Velikov via B4 Relay wrote:
>From: Emil Velikov <emil.l.velikov@gmail.com>
>
>Note that scdoc does not handle natively handle the dummy
>modules.dep.bin.5 entry, so we need to create one manually.
>
>Not a big deal, since it's single static line anyway.
>
>Also: pkg-config --variable=scdoc scdoc, produces the full executable
>and path, although for now we stick with the AC_PATH_PROG approach.
>
>Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>---
> configure.ac | 2 +-
> man/Makefile.am | 24 ++++++++----------------
> man/modules.dep.bin.5 | 1 +
> 3 files changed, 10 insertions(+), 17 deletions(-)
>
>diff --git a/configure.ac b/configure.ac
>index 9527aa2..dcf7479 100644
>--- a/configure.ac
>+++ b/configure.ac
>@@ -32,7 +32,7 @@ AC_PROG_SED
> AC_PROG_MKDIR_P
> AC_PROG_LN_S
> PKG_PROG_PKG_CONFIG
>-AC_PATH_PROG([XSLTPROC], [xsltproc])
>+AC_PATH_PROG([SCDOC], [scdoc])
we should fail it if scdoc is not found and --disable-manpages
is not passed. Right now, it just proceeds without failing,
and create bogus manpages:
$ scdoc
bash: scdoc: command not found
$ make
...
Making all in man
if [ '/usr/lib' != '/lib' ] ; then sed -e 's|@DISTCONFDIR@|/usr/lib|g' ../../man/depmod.d.5.scd ; else sed -e '/@DISTCONFDIR@/d' ../../man/depmod.d.5.scd ; fi | sed -e 's|@MODULE_DIRECTORY@|/lib/modules|g' | > depmod.d.5
if [ '/usr/lib' != '/lib' ] ; then sed -e 's|@DISTCONFDIR@|/usr/lib|g' ../../man/modprobe.d.5.scd ; else sed -e '/@DISTCONFDIR@/d' ../../man/modprobe.d.5.scd ; fi | sed -e 's|@MODULE_DIRECTORY@|/lib/modules|g' | > modprobe.d.5
if [ '/usr/lib' != '/lib' ] ; then sed -e 's|@DISTCONFDIR@|/usr/lib|g' ../../man/modules.dep.5.scd ; else sed -e '/@DISTCONFDIR@/d' ../../man/modules.dep.5.scd ; fi | sed -e 's|@MODULE_DIRECTORY@|/lib/modules|g' | > modules.dep.5
if [ '/usr/lib' != '/lib' ] ; then sed -e 's|@DISTCONFDIR@|/usr/lib|g' ../../man/kmod.8.scd ; else sed -e '/@DISTCONFDIR@/d' ../../man/kmod.8.scd ; fi | sed -e 's|@MODULE_DIRECTORY@|/lib/modules|g' | > kmod.8
if [ '/usr/lib' != '/lib' ] ; then sed -e 's|@DISTCONFDIR@|/usr/lib|g' ../../man/depmod.8.scd ; else sed -e '/@DISTCONFDIR@/d' ../../man/depmod.8.scd ; fi | sed -e 's|@MODULE_DIRECTORY@|/lib/modules|g' | > depmod.8
if [ '/usr/lib' != '/lib' ] ; then sed -e 's|@DISTCONFDIR@|/usr/lib|g' ../../man/insmod.8.scd ; else sed -e '/@DISTCONFDIR@/d' ../../man/insmod.8.scd ; fi | sed -e 's|@MODULE_DIRECTORY@|/lib/modules|g' | > insmod.8
if [ '/usr/lib' != '/lib' ] ; then sed -e 's|@DISTCONFDIR@|/usr/lib|g' ../../man/lsmod.8.scd ; else sed -e '/@DISTCONFDIR@/d' ../../man/lsmod.8.scd ; fi | sed -e 's|@MODULE_DIRECTORY@|/lib/modules|g' | > lsmod.8
if [ '/usr/lib' != '/lib' ] ; then sed -e 's|@DISTCONFDIR@|/usr/lib|g' ../../man/rmmod.8.scd ; else sed -e '/@DISTCONFDIR@/d' ../../man/rmmod.8.scd ; fi | sed -e 's|@MODULE_DIRECTORY@|/lib/modules|g' | > rmmod.8
if [ '/usr/lib' != '/lib' ] ; then sed -e 's|@DISTCONFDIR@|/usr/lib|g' ../../man/modprobe.8.scd ; else sed -e '/@DISTCONFDIR@/d' ../../man/modprobe.8.scd ; fi | sed -e 's|@MODULE_DIRECTORY@|/lib/modules|g' | > modprobe.8
if [ '/usr/lib' != '/lib' ] ; then sed -e 's|@DISTCONFDIR@|/usr/lib|g' ../../man/modinfo.8.scd ; else sed -e '/@DISTCONFDIR@/d' ../../man/modinfo.8.scd ; fi | sed -e 's|@MODULE_DIRECTORY@|/lib/modules|g' | > modinfo.8
$ cat man/modprobe.8
$
>
> AC_PROG_CC_C99
>
>diff --git a/man/Makefile.am b/man/Makefile.am
>index d62ff21..0285fdd 100644
>--- a/man/Makefile.am
>+++ b/man/Makefile.am
>@@ -2,37 +2,29 @@ MAN5 = depmod.d.5 modprobe.d.5 modules.dep.5
> MAN8 = kmod.8 depmod.8 insmod.8 lsmod.8 rmmod.8 modprobe.8 modinfo.8
> MAN_STUB = modules.dep.bin.5
>
>-AM_V_XSLT = $(AM_V_XSLT_$(V))
>-AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
>-AM_V_XSLT_0 = @echo " XSLT " $@;
>-
>-XSLT = $(if $(XSLTPROC), $(XSLTPROC), xsltproc)
>+AM_V_SCDOC = $(AM_V_SCDOC_$(V))
>+AM_V_SCDOC_ = $(AM_V_SCDOR_$(AM_DEFAULT_VERBOSITY))
^ typo here,
so quieting the command doesn't work. Once fixed I get:
Making all in man
SCDOC modprobe.d.5
SCDOC depmod.d.5
SCDOC modules.dep.5
SCDOC kmod.8
SCDOC depmod.8
SCDOC insmod.8
SCDOC lsmod.8
SCDOC rmmod.8
SCDOC modprobe.8
SCDOC modinfo.8
thanks
Lucas De Marchi
>+AM_V_SCDOC_0 = @echo " SCDOC " $@;
>
> if BUILD_TOOLS
> dist_man_MANS = $(MAN5) $(MAN8) $(MAN_STUB)
>-modules.dep.bin.5: modules.dep.5
> endif
>
>-EXTRA_DIST = $(MAN5:%.5=%.5.xml) $(MAN8:%.8=%.8.xml)
>+EXTRA_DIST = $(MAN5:%.5=%.5.scd) $(MAN8:%.8=%.8.scd)
> CLEANFILES = $(dist_man_MANS)
>
> define generate_manpage
>- $(AM_V_XSLT)if [ '$(distconfdir)' != '/lib' ] ; then \
>+ $(AM_V_SCDOC)if [ '$(distconfdir)' != '/lib' ] ; then \
> sed -e 's|@DISTCONFDIR@|$(distconfdir)|g' $< ; \
> else \
> sed -e '/@DISTCONFDIR@/d' $< ; \
> fi | \
> sed -e 's|@MODULE_DIRECTORY@|$(module_directory)|g' | \
>- $(XSLT) \
>- -o $@ \
>- --nonet \
>- --stringparam man.output.quietly 1 \
>- --param funcsynopsis.style "'ansi'" \
>- http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl -
>+ $(SCDOC) > $@
> endef
>
>-%.5: %.5.xml
>+%.5: %.5.scd
> $(generate_manpage)
>
>-%.8: %.8.xml
>+%.8: %.8.scd
> $(generate_manpage)
>diff --git a/man/modules.dep.bin.5 b/man/modules.dep.bin.5
>new file mode 100644
>index 0000000..795636b
>--- /dev/null
>+++ b/man/modules.dep.bin.5
>@@ -0,0 +1 @@
>+.so modules.dep.5
>
>--
>2.45.0
>
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH kmod 00/20] man: convert to scdoc and minor improvements
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
` (19 preceding siblings ...)
2024-06-11 15:05 ` [PATCH kmod 20/20] man: list options one per line Emil Velikov via B4 Relay
@ 2024-06-29 18:08 ` Lucas De Marchi
20 siblings, 0 replies; 31+ messages in thread
From: Lucas De Marchi @ 2024-06-29 18:08 UTC (permalink / raw)
To: emil.l.velikov; +Cc: linux-modules
On Tue, Jun 11, 2024 at 04:05:00PM GMT, Emil Velikov via B4 Relay wrote:
>Hello all,
>
>As mentioned previously, here is a series converting the existing xml
>based documentation to scdoc.
>
>Despite the size of this series, one should be able to review nearly all
>of it during their first morning coffee ;-)
a serious review with git history fossology takes much more than that ;)
>
>I've went ahead with scdoc instead of other solutions since it's a
>simple 1K LoC, C99 program with trivial markdown-like syntax. Which is
>practically available for any distro [1].
>
>A quick search in Arch shows that over 50 packages/projects use scdoc.
>
>This series:
> - patch 1 - simple comparison script of man page _output_ (the roff
> files themselves vary significantly) - DO NOT MERGE
> - patch 2 - the scdoc files themselves, including typos to make diff vs
> original smaller
> - patch 3 - wires scdoc to the build and removes the old xml files
>
> - patch 4-9 - trivial fixes as white space, punctuation, etc
> - patch 10-18 - expand documentation around {depmod,modprobe}.d handling
>
> - patch 19 - remove "maintained by" references
> - patch 20 - list short and long options on separate lines
>
>The last two might be little controversial, so feel free to drop them.
>
>NOTE: Some patches have respective question or two within.
>
>As always - comments and suggestions are greatly appreciated.
I went through the entire series and unless I left comments, I agree
with the changes. Thanks a lot for cleaning this up. Can you submit a
v2 with those comments handled?
Lucas De Marchi
>
>[1] https://repology.org/project/scdoc/versions
>[2] https://archlinux.org/packages/extra/x86_64/scdoc/
>
>---
>Emil Velikov (20):
> man: add script to generate/compare the xslt vs upcoming scdoc
> man: add scdoc based man pages
> man: build the scdoc based man pages
> man: remove no longer used XML files
> man: add some extra bold/italic annotations
> man: white space fixes
> man: misc punctuation fixes
> man: some options take an argument, mention that
> man: couple of grammar/language fixes
> man: stop removing DISTCONFDIR lines
> man: depmod.d: document the config file order handling
> man: depmod.d: factor out a CONFIGURATION FORMAT section
> man: depmod.d: rework the opening description sentence
> man: depmod: remove hard-coded /etc/depmod.d references
> man: modprobe.d: document the config file order handling
> man: modprobe.d: factor out a CONFIGURATION FORMAT section
> man: modprobe.d: mention about MODPROBE_OPTIONS
> man: modprobe: remove hard-coded /etc/modprobe.d references
> man: remove the "Maintained by" references
> man: list options one per line
>
> configure.ac | 2 +-
> man/Makefile.am | 30 +--
> man/compare.sh | 63 ++++++
> man/depmod.8.scd | 139 +++++++++++++
> man/depmod.8.xml | 343 -------------------------------
> man/depmod.d.5.scd | 115 +++++++++++
> man/depmod.d.5.xml | 164 ---------------
> man/insmod.8.scd | 35 ++++
> man/insmod.8.xml | 87 --------
> man/kmod.8.scd | 49 +++++
> man/kmod.8.xml | 120 -----------
> man/lsmod.8.scd | 29 +++
> man/lsmod.8.xml | 73 -------
> man/modinfo.8.scd | 84 ++++++++
> man/modinfo.8.xml | 201 -------------------
> man/modprobe.8.scd | 232 +++++++++++++++++++++
> man/modprobe.8.xml | 544 --------------------------------------------------
> man/modprobe.d.5.scd | 187 +++++++++++++++++
> man/modprobe.d.5.xml | 265 ------------------------
> man/modules.dep.5.scd | 43 ++++
> man/modules.dep.5.xml | 80 --------
> man/modules.dep.bin.5 | 1 +
> man/rmmod.8.scd | 53 +++++
> man/rmmod.8.xml | 148 --------------
> 24 files changed, 1041 insertions(+), 2046 deletions(-)
>---
>base-commit: 8837461494761d58be579641f20cc043274adddf
>change-id: 20240523-man-743d6e51eb6f
>
>Best regards,
>--
>Emil Velikov <emil.l.velikov@gmail.com>
>
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH kmod 03/20] man: build the scdoc based man pages
2024-06-29 18:04 ` Lucas De Marchi
@ 2024-07-03 22:05 ` Lucas De Marchi
0 siblings, 0 replies; 31+ messages in thread
From: Lucas De Marchi @ 2024-07-03 22:05 UTC (permalink / raw)
To: emil.l.velikov; +Cc: linux-modules
On Sat, Jun 29, 2024 at 01:04:52PM GMT, Lucas De Marchi wrote:
>On Tue, Jun 11, 2024 at 04:05:03PM GMT, Emil Velikov via B4 Relay wrote:
>>From: Emil Velikov <emil.l.velikov@gmail.com>
>>
>>Note that scdoc does not handle natively handle the dummy
>>modules.dep.bin.5 entry, so we need to create one manually.
>>
>>Not a big deal, since it's single static line anyway.
>>
>>Also: pkg-config --variable=scdoc scdoc, produces the full executable
>>and path, although for now we stick with the AC_PATH_PROG approach.
>>
>>Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>>---
>>configure.ac | 2 +-
>>man/Makefile.am | 24 ++++++++----------------
>>man/modules.dep.bin.5 | 1 +
>>3 files changed, 10 insertions(+), 17 deletions(-)
>>
>>diff --git a/configure.ac b/configure.ac
>>index 9527aa2..dcf7479 100644
>>--- a/configure.ac
>>+++ b/configure.ac
>>@@ -32,7 +32,7 @@ AC_PROG_SED
>>AC_PROG_MKDIR_P
>>AC_PROG_LN_S
>>PKG_PROG_PKG_CONFIG
>>-AC_PATH_PROG([XSLTPROC], [xsltproc])
>>+AC_PATH_PROG([SCDOC], [scdoc])
>
>we should fail it if scdoc is not found and --disable-manpages
I added a patch on top to make it a required tool
>>+AM_V_SCDOC_ = $(AM_V_SCDOR_$(AM_DEFAULT_VERBOSITY))
>
> ^ typo here,
and squashed this fix in your patch.
Applied patches 2, 3 and 4 for now.
Lucas De Marchi
^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2024-07-03 22:06 UTC | newest]
Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11 15:05 [PATCH kmod 00/20] man: convert to scdoc and minor improvements Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 01/20] man: add script to generate/compare the xslt vs upcoming scdoc Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 02/20] man: add scdoc based man pages Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 03/20] man: build the " Emil Velikov via B4 Relay
2024-06-29 18:04 ` Lucas De Marchi
2024-07-03 22:05 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 04/20] man: remove no longer used XML files Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 05/20] man: add some extra bold/italic annotations Emil Velikov via B4 Relay
2024-06-28 22:27 ` Lucas De Marchi
2024-06-28 22:32 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 06/20] man: white space fixes Emil Velikov via B4 Relay
2024-06-28 22:30 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 07/20] man: misc punctuation fixes Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 08/20] man: some options take an argument, mention that Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 09/20] man: couple of grammar/language fixes Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 10/20] man: stop removing DISTCONFDIR lines Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 11/20] man: depmod.d: document the config file order handling Emil Velikov via B4 Relay
2024-06-29 17:26 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 12/20] man: depmod.d: factor out a CONFIGURATION FORMAT section Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 13/20] man: depmod.d: rework the opening description sentence Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 14/20] man: depmod: remove hard-coded /etc/depmod.d references Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 15/20] man: modprobe.d: document the config file order handling Emil Velikov via B4 Relay
2024-06-28 22:55 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 16/20] man: modprobe.d: factor out a CONFIGURATION FORMAT section Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 17/20] man: modprobe.d: mention about MODPROBE_OPTIONS Emil Velikov via B4 Relay
2024-06-29 17:13 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 18/20] man: modprobe: remove hard-coded /etc/modprobe.d references Emil Velikov via B4 Relay
2024-06-11 15:05 ` [PATCH kmod 19/20] man: remove the "Maintained by" references Emil Velikov via B4 Relay
2024-06-29 17:51 ` Lucas De Marchi
2024-06-11 15:05 ` [PATCH kmod 20/20] man: list options one per line Emil Velikov via B4 Relay
2024-06-29 18:08 ` [PATCH kmod 00/20] man: convert to scdoc and minor improvements Lucas De Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).