Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions Cargo.lock

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

15 changes: 10 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ feat_common_core = [
"setpgid",
"setsid",
"uuidgen",
"wall",
]

[workspace.dependencies]
Expand Down Expand Up @@ -75,6 +76,7 @@ sysinfo = "0.38"
tempfile = "3.9.0"
textwrap = { version = "0.16.0", features = ["terminal_size"] }
thiserror = "2.0"
unicode-width = { version = "0.2.2", default-features = false }
uucore = "0.2.2"
uuid = { version = "1.16.0", features = ["rng-rand"] }
uutests = "0.6.0"
Expand All @@ -86,10 +88,10 @@ clap = { workspace = true }
clap_complete = { workspace = true }
clap_mangen = { workspace = true }
dns-lookup = { workspace = true }
parse_datetime = {workspace = true}
parse_datetime = { workspace = true }
phf = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_json = { workspace = true }
textwrap = { workspace = true }
uucore = { workspace = true }

Expand All @@ -113,13 +115,16 @@ nologin = { optional = true, version = "0.0.1", package = "uu_nologin", path = "
renice = { optional = true, version = "0.0.1", package = "uu_renice", path = "src/uu/renice" }
rev = { optional = true, version = "0.0.1", package = "uu_rev", path = "src/uu/rev" }
setpgid = { optional = true, version = "0.0.1", package = "uu_setpgid", path = "src/uu/setpgid" }
setsid = { optional = true, version = "0.0.1", package = "uu_setsid", path ="src/uu/setsid" }
uuidgen = { optional = true, version = "0.0.1", package = "uu_uuidgen", path ="src/uu/uuidgen" }
setsid = { optional = true, version = "0.0.1", package = "uu_setsid", path = "src/uu/setsid" }
uuidgen = { optional = true, version = "0.0.1", package = "uu_uuidgen", path = "src/uu/uuidgen" }
wall = { optional = true, version = "0.0.1", package = "uu_wall", path = "src/uu/wall" }

[dev-dependencies]
ctor = "0.6.0"
# dmesg test require fixed-boot-time feature turned on.
dmesg = { version = "0.0.1", package = "uu_dmesg", path = "src/uu/dmesg", features = ["fixed-boot-time"] }
dmesg = { version = "0.0.1", package = "uu_dmesg", path = "src/uu/dmesg", features = [
"fixed-boot-time",
] }
libc = { workspace = true }
pretty_assertions = "1"
rand = { workspace = true }
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ We are rewriting [these tools](https://github.com/util-linux/util-linux) in Rust
First, reimplement the most important tools from util-linux:

## System Information

- `dmesg`: Displays kernel messages.
- `lscpu`: Shows CPU architecture information.
Started
Expand All @@ -23,13 +24,15 @@ First, reimplement the most important tools from util-linux:
- `lsns`: Lists namespaces.

## Hardware Management

- `chcpu`: Manages CPU state.
- `rtcwake`: Manages system sleep states.
- `zramctl`: Manages zram devices.
- `wdctl`: Shows watchdog status.
- `chmem`: Manages kernel memory usage.

## Filesystem Tools

- `findmnt`: Lists mounted filesystems.
- `mountpoint`: Checks if a directory is a mountpoint.
Started
Expand All @@ -40,6 +43,7 @@ First, reimplement the most important tools from util-linux:
- `wipefs`: Wipes filesystem signatures.

## Partition Management

- `blkdiscard`: Discards sectors on a device.
- `blkid`: Identifies block device attributes.
- `blkzone`: Manages zoned block device parameters.
Expand All @@ -52,6 +56,7 @@ First, reimplement the most important tools from util-linux:
- `resizepart`: Resizes a partition.

## Process and Resource Management

- `runuser`: Runs a shell with different user/group IDs.
- `sulogin`: Provides single-user mode login.
- `chrt`: Manages real-time process attributes.
Expand All @@ -63,6 +68,7 @@ First, reimplement the most important tools from util-linux:
- `uclampset`: Manages process utilization clamping.

## User and Session Management

- `su`: Changes user ID or becomes superuser.
- `agetty`: Manages TTYs for login prompts.
- `ctrlaltdel`: Configures Ctrl-Alt-Del action.
Expand All @@ -74,14 +80,17 @@ First, reimplement the most important tools from util-linux:
- `setsid`: Runs a program in a new session.
- `setterm`: Sets terminal attributes.
- `getty`: Manages virtual console login prompts.
- `wall`: Writes a message to all logged-in users.

## Networking and IPC

- `ipcmk`: Creates IPC resources.
- `ipcrm`: Removes IPC resources.
- `ipcs`: Shows IPC facilities status.
- `nsenter`: Enters different namespaces.

## Utility Tools

- `lsblk`: Lists block devices.
- `fallocate`: Preallocates file space.
- `flock`: Manages file locks.
Expand All @@ -102,7 +111,8 @@ First, reimplement the most important tools from util-linux:
- `uuidgen`: Generate different types of UUID.

Note:
* /bin/more is already implemented in https://github.com/uutils/coreutils

- /bin/more is already implemented in https://github.com/uutils/coreutils

Project:
http://www.kernel.org/pub/linux/utils/util-linux/
Expand Down
Empty file added rustfmt.toml
Empty file.
19 changes: 19 additions & 0 deletions src/uu/wall/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "uu_wall"
version = "0.0.1"
edition = "2021"
description = "wall ~ Write a mesage to all users."

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

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

[dependencies]
uucore = { workspace = true, features = ["process", "entries"] }
clap = { workspace = true }
libc = { workspace = true }
chrono = { workspace = true }
unicode-width = { workspace = true }
1 change: 1 addition & 0 deletions src/uu/wall/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uucore::bin!(uu_wall);
Loading