On 05.08.2016 18:04, Marc Hartmayer wrote: > Commit b3e4401dc620 introduced a check to ignore an error if the guest > is already terminated. However the check accidentally compared > error.code with VIR_ERR_ERROR, which is an error level, not an error > code. Because of this, almost every error got silently ignored. > > Fixes: b3e4401dc620 ("systemd: don't report an error if the guest is > already terminated") > > Signed-off-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxxxxxxx> > Reviewed-by: Sascha Silbe <silbe@xxxxxxxxxxxxxxxxxx> > Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx> > --- > src/util/virsystemd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c > index 7d6985b..604dcdd 100644 > --- a/src/util/virsystemd.c > +++ b/src/util/virsystemd.c > @@ -468,7 +468,7 @@ int virSystemdTerminateMachine(const char *name) > name) < 0) > goto cleanup; > > - if (error.code == VIR_ERR_ERROR && > + if (error.level == VIR_ERR_ERROR && > STRNEQ_NULLABLE("org.freedesktop.machine1.NoSuchMachine", > error.str1)) { > virReportErrorObject(&error); > Very nice catch! ACKed and pushed. Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list