Skip to content

Commit

Permalink
Configure command line parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
koutheir committed Feb 24, 2025
1 parent 0554e8c commit f705190
Show file tree
Hide file tree
Showing 7 changed files with 378 additions and 30 deletions.
76 changes: 46 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ uudoc = []

feat_common_core = [
"blockdev",
"chcpu",
"ctrlaltdel",
"dmesg",
"fsfreeze",
Expand Down Expand Up @@ -58,6 +59,7 @@ tempfile = "3.9.0"
textwrap = { version = "0.16.0", features = ["terminal_size"] }
uucore = "0.0.29"
xattr = "1.3.1"
rangemap = "1.5.1"

[dependencies]
clap = { workspace = true }
Expand All @@ -72,6 +74,7 @@ uucore = { workspace = true }

#
blockdev = { optional = true, version = "0.0.1", package = "uu_blockdev", path = "src/uu/blockdev" }
chcpu = { optional = true, version = "0.0.1", package = "uu_chcpu", path = "src/uu/chcpu" }
ctrlaltdel = { optional = true, version = "0.0.1", package = "uu_ctrlaltdel", path = "src/uu/ctrlaltdel" }
dmesg = { optional = true, version = "0.0.1", package = "uu_dmesg", path = "src/uu/dmesg" }
fsfreeze = { optional = true, version = "0.0.1", package = "uu_fsfreeze", path = "src/uu/fsfreeze" }
Expand Down
16 changes: 16 additions & 0 deletions src/uu/chcpu/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "uu_chcpu"
version = "0.0.1"
edition = "2024"

[lib]
path = "src/chcpu.rs"

[[bin]]
name = "chcpu"
path = "src/main.rs"

[dependencies]
uucore = { workspace = true }
clap = { workspace = true }
rangemap = { workspace = true }
11 changes: 11 additions & 0 deletions src/uu/chcpu/chcpu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# chcpu

```
chcpu {-e|--enable|-d|--disable|-c|--configure|-g|--deconfigure} cpu-list
chcpu {-p|--dispatch} mode
chcpu {-r|--rescan}
chcpu {-V|--version}
chcpu {-h|--help}
```

configure CPUs in a multi-processor system.
Loading

0 comments on commit f705190

Please sign in to comment.