1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 01:55:22 +03:00

hostnamectl,localectl: use "(unset)" in empty fields

"n/a" is more ambiguous: not available or not set or maybe we didn't check it.
Let's just say directly that the field is not set.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-09-20 20:12:50 +02:00
parent eb5b6b7310
commit 639405b934
3 changed files with 5 additions and 5 deletions

View File

@ -92,7 +92,7 @@ static int print_status_info(StatusInfo *i) {
table_set_header(table, false);
r = table_set_empty_string(table, "n/a");
r = table_set_empty_string(table, "(unset)");
if (r < 0)
return log_oom();

View File

@ -81,7 +81,7 @@ static int print_status_info(StatusInfo *i) {
table_set_header(table, false);
r = table_set_empty_string(table, "n/a");
r = table_set_empty_string(table, "(unset)");
if (r < 0)
return log_oom();

View File

@ -251,7 +251,7 @@ test_vc_keymap() {
assert_in "X11 Variant: intl" "$output"
assert_in "X11 Options: terminate:ctrl_alt_bksp" "$output"
elif [[ "$i" =~ ^us-.* ]]; then
assert_in "X11 Layout: n/a" "$output"
assert_in "X11 Layout: .unset." "$output"
assert_not_in "X11 Model:" "$output"
assert_not_in "X11 Variant:" "$output"
assert_not_in "X11 Options:" "$output"
@ -262,7 +262,7 @@ test_vc_keymap() {
systemctl stop systemd-localed.service
wait_vconsole_setup
rm -f /etc/vconsole.conf
assert_in "VC Keymap: n/a" "$(localectl)"
assert_in "VC Keymap: .unset." "$(localectl)"
}
test_x11_keymap() {
@ -374,7 +374,7 @@ XKBMODEL=pc105+inet"
systemctl stop systemd-localed.service
rm -f /etc/X11/xorg.conf.d/00-keyboard.conf /etc/default/keyboard
output=$(localectl)
assert_in "X11 Layout: n/a" "$output"
assert_in "X11 Layout: .unset." "$output"
assert_not_in "X11 Model:" "$output"
assert_not_in "X11 Variant:" "$output"
assert_not_in "X11 Options:" "$output"