This new macro can be used to conveniently report warnings, just like the existing virReportError() is used for errors. Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- src/util/virerror.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/virerror.h b/src/util/virerror.h index 6e089db0d0..308b49c604 100644 --- a/src/util/virerror.h +++ b/src/util/virerror.h @@ -189,6 +189,10 @@ void virReportOOMErrorFull(int domcode, virReportErrorHelper(VIR_FROM_THIS, code, VIR_ERR_ERROR, __FILE__, \ __FUNCTION__, __LINE__, __VA_ARGS__) +# define virReportWarning(code, ...) \ + virReportErrorHelper(VIR_FROM_THIS, code, VIR_ERR_WARNING, __FILE__, \ + __FUNCTION__, __LINE__, __VA_ARGS__) + # define virReportErrorObject(obj) \ virRaiseErrorObject(__FILE__, __FUNCTION__, __LINE__, obj) -- 2.17.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list