mirror of
https://github.com/kmod-project/kmod.git
synced 2026-01-26 07:37:54 +00:00
tools/insmod: add --force longopt and document it
As of the initial import to git, the option was silently ignored. Shortly afterwards, functionality was reinstated lacking a longopt and any documentation. As per insmod(8) for most use-cases you'd want to use modprobe(8). Although since the option is available and we have an equivalent in rmmod(8) having it documented and consistent triumphs. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/138 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
This commit is contained in:
parent
ca8f04e87a
commit
e102d2c070
@ -20,6 +20,12 @@ information about errors.
|
||||
|
||||
# OPTIONS
|
||||
|
||||
*-f*
|
||||
*--force*
|
||||
This option can be extremely dangerous: it tells the kernel to ignore
|
||||
the module version and vermagic fields when loading. With this option,
|
||||
you can load modules build locally or by third parties, although this
|
||||
can lead to memory corruption, system crashes and data loss.
|
||||
*-s*
|
||||
*--syslog*
|
||||
Send errors to syslog instead of standard error.
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
static const char cmdopts_s[] = "fsvVh";
|
||||
static const struct option cmdopts[] = {
|
||||
// clang-format off
|
||||
{ "force", no_argument, 0, 'f' },
|
||||
{ "syslog", no_argument, 0, 's' },
|
||||
{ "verbose", no_argument, 0, 'v' },
|
||||
{ "version", no_argument, 0, 'V' },
|
||||
@ -31,6 +32,8 @@ static void help(void)
|
||||
printf("Usage:\n"
|
||||
"\t%s [options] filename [args]\n"
|
||||
"Options:\n"
|
||||
"\t-f, --force DANGEROUS: forces a module load, may cause\n"
|
||||
"\t data corruption and crash your machine\n"
|
||||
"\t-s, --syslog print to syslog, not stderr\n"
|
||||
"\t-v, --verbose enables more messages\n"
|
||||
"\t-V, --version show version\n"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user