X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fsystemctl%2Fsystemctl.c;h=3d939f050b707722eb20a0017ec6a85522b9bba0;hp=a6c7e91f5422404dd976fd717f274a514b341c63;hb=aba843317d8acc4634417becebaedcfe5805d49d;hpb=d8f52ed25a9edce75fda5251c977b7898e33887e diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index a6c7e91f5..3d939f050 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -2966,7 +2966,7 @@ static int start_special(sd_bus *bus, char **args) { a == ACTION_HIBERNATE || a == ACTION_HYBRID_SLEEP)) { r = reboot_with_logind(bus, a); - if (r >= 0) + if (r >= 0 || IN_SET(r, -ENOTSUP, -EINPROGRESS)) return r; } @@ -5188,8 +5188,10 @@ static int enable_sysv_units(const char *verb, char **args) { return -EPROTO; /* Remove this entry, so that we don't try enabling it as native unit */ - assert(f > 0 && streq(args[f-1], name)); - assert_se(strv_remove(args + f - 1, name)); + assert(f > 0); + f--; + assert(args[f] == name); + strv_remove(args, name); } #endif