#linux #kernel #module

app linux_modules

Tool To Manage Linux Kernel Modules

17 releases

0.3.2 Jul 24, 2021
0.3.1 May 3, 2021
0.2.5 Mar 31, 2021
0.2.4 Dec 9, 2020
0.1.5 Feb 27, 2020

#63 in Unix APIs

Download history 23/week @ 2021-08-15 4/week @ 2021-09-19 17/week @ 2021-09-26 1/week @ 2021-10-03 17/week @ 2021-10-10 3/week @ 2021-10-17 18/week @ 2021-11-07 4/week @ 2021-11-14 8/week @ 2021-11-21 22/week @ 2021-11-28

52 downloads per month

MIT/Apache

19KB
199 lines

Linux Modules

standard-readme compliant linux_modules crates.io version and link linux_modules Crates.io license linux_modules docs.rs badge

Tool To Manage Linux Kernel Modules

This is a tool to manage your Linux Kernel Modules. It is an alternative to modprobe, and supports listing, adding, and removing modules, as well as displaying information on them.

It does not yet support modprobe style dependencies or aliases, and is not capable of displaying module signature data, except whether one exists or not.

Install

cargo install linux_modules

Usage

CLI

$ nms info loop
╭───────────────────┬──────────────────────────────────────╮
 File              ┆ /lib/modules/5.5.13-arch1-1/kernel/d │
                   ┆ rivers/block/loop.ko.xz              │
╞═══════════════════╪══════════════════════════════════════╡
 Authors           ┆                                      │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 License           ┆ GPL                                  │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 Description       ┆                                      │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 Version           ┆                                      │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 Firmware          ┆                                      │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 Alias             ┆ devname:loop-control                 │
                   ┆ char-major-10-237                    │
                   ┆ block-major-7-*
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 Dependencies      ┆                                      │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 Soft Dependencies ┆                                      │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 In Tree           ┆ true                                 │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 Retpoline         ┆ true                                 │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 Staging           ┆ false                                │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 Version Magic     ┆ 5.5.13-arch1-1 SMP preempt           │
                   ┆ mod_unload                           │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 Source Checksum   ┆ 7EB1D1BC035F5C6FD6EE3FD              │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 Parameters        ┆ ╭──────────┬────────────────┬──────╮ │
                   ┆ │ Name     ┆ Desc           ┆ Type │ │
                   ┆ ╞══════════╪════════════════╪══════╡ │
                   ┆ │ max_loop ┆ Maximum number ┆ int  │ │
                   ┆ │          ┆ of loop        ┆      │ │
                   ┆ │          ┆ devices        ┆      │ │
                   ┆ ├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌┤ │
                   ┆ │ max_part ┆ Maximum number ┆ int  │ │
                   ┆ │          ┆ of partitions  ┆      │ │
                   ┆ │          ┆ per loop       ┆      │ │
                   ┆ │          ┆ device         ┆      │ │
                   ┆ ╰──────────┴────────────────┴──────╯ │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
 Signature         ┆ true                                 │
╰───────────────────┴──────────────────────────────────────╯

Note that the table size will adapt to your terminal. This example uses size 60.

Pager

nms info and nms list automatically pipe output to a pager, defaulting to less, but this may be customized through environment variables.

See the pager crate for details on how to customize what pager is used.

Changelog

Please see CHANGELOG for version history

Contributing

This crate is not looking for contributors at this time.

However, feel free to ask questions and request bindings using github issues, or suggest/discuss API improvements.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.

License

Licensed under either of

at your option.

Dependencies

~4MB
~70K SLoC

-X`