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
3 changes: 3 additions & 0 deletions Cargo.lock

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

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ feat_os_unix_musl = [
"feat_require_unix_utmpx",
]
# "feat_os_windows" == set of utilities which can be built/run on modern windows platforms
feat_os_windows = ["feat_Tier1", "stdbuf"]
feat_os_windows = ["feat_Tier1", "stdbuf", "who"]
## (secondary platforms) feature sets
# "feat_os_unix_gnueabihf" == set of utilities which can be built/run on the "arm-unknown-linux-gnueabihf" target (ARMv6 Linux [hardfloat])
feat_os_unix_gnueabihf = [
Expand Down Expand Up @@ -623,7 +623,6 @@ uptime = { optional = true, version = "0.11.0", package = "uu_uptime", path = "s
users = { optional = true, version = "0.11.0", package = "uu_users", path = "src/uu/users" }
vdir = { optional = true, version = "0.11.0", package = "uu_vdir", path = "src/uu/vdir" }
wc = { optional = true, version = "0.11.0", package = "uu_wc", path = "src/uu/wc" }
who = { optional = true, version = "0.11.0", package = "uu_who", path = "src/uu/who" }
whoami = { optional = true, version = "0.11.0", package = "uu_whoami", path = "src/uu/whoami" }
yes = { optional = true, version = "0.11.0", package = "uu_yes", path = "src/uu/yes" }

Expand Down Expand Up @@ -665,6 +664,9 @@ rustix = { workspace = true, features = ["param", "use-libc-auxv"] }
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
selinux = { workspace = true, optional = true }

[target.'cfg(not(target_os = "openbsd"))'.dependencies]
who = { optional = true, version = "0.11.0", package = "uu_who", path = "src/uu/who" }

# * uutils
chcon = { optional = true, version = "0.11.0", package = "uu_chcon", path = "src/uu/chcon" }
runcon = { optional = true, version = "0.11.0", package = "uu_runcon", path = "src/uu/runcon" }
Expand Down
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ pub fn main() {
"chcon" | "runcon" => {
continue;
}
#[cfg(target_os = "openbsd")]
"who" => {
continue;
}
"default" | "macos" | "unix" | "windows" | "selinux" | "zip" | "clap_complete"
| "clap_mangen" | "fluent_syntax" | "openssl" => continue, // common/standard feature names
"nightly" | "test_unimplemented" | "expensive_tests" | "test_risky_names" => {
Expand Down
14 changes: 13 additions & 1 deletion src/uu/who/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,21 @@ doctest = false

[dependencies]
clap = { workspace = true }
fluent = { workspace = true }
time = { workspace = true, features = ["formatting", "local-offset"] }

[target.'cfg(unix)'.dependencies]
rustix = { workspace = true, features = ["fs", "termios"] }
uucore = { workspace = true, features = ["utmpx"] }
fluent = { workspace = true }

[target.'cfg(windows)'.dependencies]
dns-lookup = { workspace = true }
uucore = { workspace = true }
windows-sys = { workspace = true, features = [
"Win32_Foundation",
"Win32_System_RemoteDesktop",
"Win32_System_Threading",
] }

[lints]
workspace = true
Expand Down
3 changes: 0 additions & 3 deletions src/uu/who/locales/en-US.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,3 @@ who-heading-exit = EXIT

# Error messages
who-canonicalize-error = failed to canonicalize { $host }

# Platform-specific messages
who-unsupported-openbsd = unsupported command on OpenBSD
3 changes: 0 additions & 3 deletions src/uu/who/locales/fr-FR.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,3 @@ who-heading-exit = SORTIE

# Error messages
who-canonicalize-error = échec de canonicalisation de { $host }

# Platform-specific messages
who-unsupported-openbsd = commande non prise en charge sur OpenBSD
12 changes: 5 additions & 7 deletions src/uu/who/src/platform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.

#[cfg(not(target_os = "openbsd"))]
#[cfg(unix)]
mod unix;
#[cfg(not(target_os = "openbsd"))]
pub use self::unix::*;
#[cfg(unix)]
pub(crate) use unix::*;

#[cfg(target_os = "openbsd")]
mod openbsd;
#[cfg(target_os = "openbsd")]
pub use self::openbsd::*;
#[cfg(windows)]
mod windows;
17 changes: 0 additions & 17 deletions src/uu/who/src/platform/openbsd.rs

This file was deleted.

Loading
Loading