mirror of
https://github.com/systemd/systemd.git
synced 2024-11-08 11:27:32 +03:00
machinectl: don't show ".host" pseudo-machine in list by default
Let's hide all machines whose name begins with "." by default, thus hiding the ".host" pseudo-machine, unless --all is specified. This takes inspiration from the ".host" image handling in "machinectl list-images" which also hides all images whose name starts with ".".
This commit is contained in:
parent
fbe550738d
commit
fee6d013d8
@ -158,6 +158,9 @@ static int list_machines(int argc, char *argv[], void *userdata) {
|
|||||||
while ((r = sd_bus_message_read(reply, "(ssso)", &name, &class, &service, &object)) > 0) {
|
while ((r = sd_bus_message_read(reply, "(ssso)", &name, &class, &service, &object)) > 0) {
|
||||||
size_t l;
|
size_t l;
|
||||||
|
|
||||||
|
if (name[0] == '.' && !arg_all)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!GREEDY_REALLOC(machines, n_allocated, n_machines + 1))
|
if (!GREEDY_REALLOC(machines, n_allocated, n_machines + 1))
|
||||||
return log_oom();
|
return log_oom();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user