#include "terminal-util.h"
const struct bus_properties_map machine_info_property_map[] = {
- { "SystemState", "s", NULL, offsetof(struct machine_info, state) },
- { "NJobs", "u", NULL, offsetof(struct machine_info, n_jobs) },
+ /* Might good to keep same order here as in bus_manager_vtable[], server side */
+ { "Version", "s", NULL, offsetof(struct machine_info, version) },
+ { "Tainted", "s", NULL, offsetof(struct machine_info, tainted) },
+ { "UserspaceTimestamp", "t", NULL, offsetof(struct machine_info, timestamp) },
+ { "NNames", "u", NULL, offsetof(struct machine_info, n_names) },
{ "NFailedUnits", "u", NULL, offsetof(struct machine_info, n_failed_units) },
+ { "NJobs", "u", NULL, offsetof(struct machine_info, n_jobs) },
{ "ControlGroup", "s", NULL, offsetof(struct machine_info, control_group) },
- { "UserspaceTimestamp", "t", NULL, offsetof(struct machine_info, timestamp) },
+ { "SystemState", "s", NULL, offsetof(struct machine_info, state) },
{}
};
assert(info);
free(info->name);
- free(info->state);
+ free(info->version);
+ free(info->tainted);
free(info->control_group);
+ free(info->state);
zero(*info);
}
printf(" State: %s%s%s\n",
on, strna(mi.state), off);
+ printf(" Units: %" PRIu32 " loaded (incl. loaded aliases)\n", mi.n_names);
printf(" Jobs: %" PRIu32 " queued\n", mi.n_jobs);
printf(" Failed: %" PRIu32 " units\n", mi.n_failed_units);
FORMAT_TIMESTAMP_STYLE(mi.timestamp, arg_timestamp_style),
FORMAT_TIMESTAMP_RELATIVE(mi.timestamp));
+ printf(" systemd: %s\n", mi.version);
+
+ if (!isempty(mi.tainted))
+ printf(" Tainted: %s%s%s\n", ansi_highlight_yellow(), mi.tainted, ansi_normal());
+
printf(" CGroup: %s\n", empty_to_root(mi.control_group));
c = LESS_BY(columns(), strlen(prefix));