From 8c6cd728480f28e1a3f53fab798a2e5b6ea2ca80 Mon Sep 17 00:00:00 2001 From: Knight Date: Thu, 11 Aug 2016 00:19:26 +0800 Subject: [PATCH] who: add entries --- Cargo.toml | 2 ++ Makefile | 3 ++- README.md | 1 - src/who/Cargo.toml | 21 +++++++++++++++++++++ src/who/main.rs | 5 +++++ 5 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 src/who/Cargo.toml create mode 100644 src/who/main.rs diff --git a/Cargo.toml b/Cargo.toml index 1263c63c8..92859ca85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,6 +34,7 @@ unix = [ "unlink", "uptime", "users", + "who", ] generic = [ "base32", @@ -187,6 +188,7 @@ unlink = { optional=true, path="src/unlink" } uptime = { optional=true, path="src/uptime" } users = { optional=true, path="src/users" } wc = { optional=true, path="src/wc" } +who = { optional=true, path="src/who" } whoami = { optional=true, path="src/whoami" } yes = { optional=true, path="src/yes" } diff --git a/Makefile b/Makefile index 5c766b1ff..38a9e3ec3 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,8 @@ UNIX_PROGS := \ uname \ unlink \ uptime \ - users + users \ + who ifneq ($(OS),Windows_NT) PROGS := $(PROGS) $(UNIX_PROGS) diff --git a/README.md b/README.md index 070b31865..99db360b9 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,6 @@ To do - tail (not all features implemented) - test (not all features implemented) - uniq (a couple of missing options) -- who License ------- diff --git a/src/who/Cargo.toml b/src/who/Cargo.toml new file mode 100644 index 000000000..aa769a348 --- /dev/null +++ b/src/who/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "who" +version = "0.0.1" +authors = [] + +[lib] +name = "uu_who" +path = "who.rs" + +[dependencies.uucore] +path = "../uucore" +default-features = false +features = ["utmpx"] + +[dependencies.clippy] +version = "*" +optional = true + +[[bin]] +name = "who" +path = "main.rs" diff --git a/src/who/main.rs b/src/who/main.rs new file mode 100644 index 000000000..2c3de969a --- /dev/null +++ b/src/who/main.rs @@ -0,0 +1,5 @@ +extern crate uu_who; + +fn main() { + std::process::exit(uu_who::uumain(std::env::args().collect())); +}