Re: [systemd-devel] [PATCH] systemctl: fix and refactor wait_for_jobs

2013-12-07 Thread Thomas H.P. Andersen
On Sat, Dec 7, 2013 at 5:37 PM, Zbigniew Jędrzejewski-Szmek wrote: > On Sat, Dec 07, 2013 at 01:21:10PM +0100, Thomas H.P. Andersen wrote: >> I was a bit unsure what to do here. We can be waiting for multiple >> jobs that each can fail. We could return an error on the first failure >> but then we

Re: [systemd-devel] [PATCH] systemctl: fix and refactor wait_for_jobs

2013-12-07 Thread Zbigniew Jędrzejewski-Szmek
On Sat, Dec 07, 2013 at 01:21:10PM +0100, Thomas H.P. Andersen wrote: > I was a bit unsure what to do here. We can be waiting for multiple > jobs that each can fail. We could return an error on the first failure > but then we would not call log_error for the remaining issues. The > question is then

Re: [systemd-devel] [PATCH] systemctl: fix and refactor wait_for_jobs

2013-12-07 Thread Thomas H.P. Andersen
I was a bit unsure what to do here. We can be waiting for multiple jobs that each can fail. We could return an error on the first failure but then we would not call log_error for the remaining issues. The question is then what to return in the case of multiple errors? With this patch (and the behav

[systemd-devel] [PATCH] systemctl: fix and refactor wait_for_jobs

2013-12-07 Thread Thomas H.P. Andersen
From: Thomas Hindoe Paaboel Andersen wait_for_jobs was ignoring the errors from the jobs stored in r. It would only ever return whether the call to sd_bus_remove_filter went ok. This patch changes it to return the last job related error encountered. The result of the cleanup call to sd_bus_remove