summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b90b025)
This got lost in the refactoring in
f74294c1dabb4.
Also make sure that the return code corresponds to the *first* failure,
not the last.
https://lists.fedoraproject.org/pipermail/devel/2014-May/199080.html
_cleanup_free_ UnitInfo *unit_infos = NULL;
const UnitInfo *u;
unsigned c;
_cleanup_free_ UnitInfo *unit_infos = NULL;
const UnitInfo *u;
unsigned c;
r = get_unit_list(bus, NULL, NULL, &unit_infos, 0, &reply);
if (r < 0)
r = get_unit_list(bus, NULL, NULL, &unit_infos, 0, &reply);
if (r < 0)
r = show_one(verb, bus, p, show_properties, new_line, ellipsized);
if (r < 0)
return r;
r = show_one(verb, bus, p, show_properties, new_line, ellipsized);
if (r < 0)
return r;
+ else if (r > 0 && ret == 0)
+ ret = r;
}
static int show_system_status(sd_bus *bus) {
}
static int show_system_status(sd_bus *bus) {
- show_one(args[0], bus, unit, show_properties, &new_line, &ellipsized);
+ r = show_one(args[0], bus, unit, show_properties,
+ &new_line, &ellipsized);
+ if (r < 0)
+ return r;
+ else if (r > 0 && ret == 0)
+ ret = r;
}
if (!strv_isempty(patterns)) {
}
if (!strv_isempty(patterns)) {
if (!unit)
return log_oom();
if (!unit)
return log_oom();
- show_one(args[0], bus, unit, show_properties, &new_line, &ellipsized);
+ r = show_one(args[0], bus, unit, show_properties,
+ &new_line, &ellipsized);
+ if (r < 0)
+ return r;
+ else if (r > 0 && ret == 0)
+ ret = r;