kparams: Extracts values from /proc/cmdline.

[ library, mit, program, text ] [ Propose Tags ] [ Report a vulnerability ]

Extracts values from /proc/cmdline, honoring quotes and \ sequences.


[Skip to Readme]

library kparams:internal

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1
Change log CHANGELOG.md
Dependencies base (>=4.13 && <5), kparams [details]
License MIT
Author Josh McSavaney
Maintainer me@mcsau.cc
Category Text
Bug tracker https://github.com/mcsaucy/kparams_hs/issues
Source repo head: git clone https://github.com/mcsaucy/kparams_hs.git
Uploaded by mcsaucy at 2021-09-09T02:23:23Z
Distributions NixOS:0.1.0.1
Executables kparams
Downloads 304 total (2 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user [build log]
All reported builds failed as of 2021-09-09 [all 1 reports]

Readme for kparams-0.1.0.1

[back to package description]

kparams (in Haskell)

Extracts kernel parameter values from /proc/cmdline. Handles bare and quoted parameters. This is a rewrite of the original kparams in Haskell.

See kernel.org's docs on kernel parameters for more information. While the docs mention using double-quotes to protect values with spaces, we also recognize single-quotes and certain escape sequences to support things like quoted="\"value\"".

Check out test/ to see examples of what we can extract.

Usage

$ kparams PARAM_NAME [DEFAULT_VALUE]

What's the difference between the shell implementation of kparams and this?

They should be functionally similar. Error messages will differ, although they should error under the same conditions. Most significantly, this version is hundreds of times faster.