[RFC 2/7] util: Introduce virReportWarning()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux