[libvirt] [PATCH go] go: Add ERR_DEVICE_MISSING constants

Chen Hanxiao chen_han_xiao at 126.com
Thu Feb 1 03:39:14 UTC 2018


From: Chen Hanxiao <chenhanxiao at gmail.com>

Signed-off-by: Chen Hanxiao <chenhanxiao at gmail.com>
---
 error.go       | 3 +++
 error_compat.h | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/error.go b/error.go
index fb218f7..9de277c 100644
--- a/error.go
+++ b/error.go
@@ -353,6 +353,9 @@ const (
 
 	// error in libssh transport driver
 	ERR_LIBSSH = ErrorNumber(C.VIR_ERR_LIBSSH)
+
+	// libvirt fail to find the desired device
+	ERR_DEVICE_MISSING = ErrorNumber(C.VIR_ERR_DEVICE_MISSING)
 )
 
 type ErrorDomain int
diff --git a/error_compat.h b/error_compat.h
index f26dc09..64ed991 100644
--- a/error_compat.h
+++ b/error_compat.h
@@ -147,4 +147,10 @@
 #define VIR_FROM_RESCTRL 67
 #endif
 
+/* 4.1.0 */
+
+#ifndef VIR_ERR_DEVICE_MISSING
+#define VIR_ERR_DEVICE_MISSING 99
+#endif
+
 #endif /* LIBVIRT_GO_ERROR_COMPAT_H__ */
-- 
2.14.3




More information about the libvir-list mailing list