]> xenbits.xensource.com Git - libvirt.git/commit
lib: Don't use virReportSystemError() if virCommandRun() fails
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 1 Apr 2019 12:56:23 +0000 (14:56 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 12 Apr 2019 13:56:28 +0000 (15:56 +0200)
commit51f17c98f6648935e96b0127d2912f4146a2a2e5
tree6f92c2235aad46e4b57bf4d128f53d19f3917081
parent5aefd1362ff647a9dbc71fe6548d291a345ee5fd
lib: Don't use virReportSystemError() if virCommandRun() fails

Firstly, virCommandRun() does report an error on failure (which
in most cases is more accurate than what we overwrite it with).
Secondly, usually errno is not set (or gets overwritten in the
cleanup code) which makes virReportSystemError() report useless
error messages. Drop all virReportSystemError() calls in cases
like this (I've found three occurrences).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/storage/storage_backend_fs.c
src/util/virdnsmasq.c