mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 10:25:37 +03:00
systemctl: suppress timeout display if unset in list-automounts
If the timeout is zero it's not set, let's suppress the output then.
This commit is contained in:
parent
f168919da8
commit
21ae8c17d4
@ -855,9 +855,18 @@ static int output_automounts_list(struct automount_info *infos, size_t n_infos)
|
||||
r = table_add_many(table,
|
||||
TABLE_STRING, info->what,
|
||||
TABLE_STRING, info->where,
|
||||
TABLE_BOOLEAN, info->mounted,
|
||||
TABLE_TIMESPAN_MSEC, info->timeout_idle_usec,
|
||||
TABLE_STRING, unit);
|
||||
TABLE_BOOLEAN, info->mounted);
|
||||
if (r < 0)
|
||||
return table_log_add_error(r);
|
||||
|
||||
if (timestamp_is_set(info->timeout_idle_usec))
|
||||
r = table_add_cell(table, NULL, TABLE_TIMESPAN_MSEC, &info->timeout_idle_usec);
|
||||
else
|
||||
r = table_add_cell(table, NULL, TABLE_EMPTY, NULL);
|
||||
if (r < 0)
|
||||
return table_log_add_error(r);
|
||||
|
||||
r = table_add_cell(table, NULL, TABLE_STRING, unit);
|
||||
if (r < 0)
|
||||
return table_log_add_error(r);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user