@@ -44,6 +44,10 @@ const QErrorStringTable qerror_table[] = {
.error_fmt = QERR_DEVICE_NOT_FOUND,
.desc = "The %(device) device has not been found",
},
+ {
+ .error_fmt = QERR_DEVICE_NOT_ACTIVE,
+ .desc = "The %(device) device has not been activated by the guest",
+ },
{}
};
@@ -41,4 +41,7 @@ QError *qobject_to_qerror(const QObject *obj);
#define QERR_DEVICE_NOT_FOUND \
"{ 'class': 'DeviceNotFound', 'data': { 'device': %s } }"
+#define QERR_DEVICE_NOT_ACTIVE \
+ "{ 'class': 'DeviceNotActive', 'data': { 'device': %s } }"
+
#endif /* QERROR_H */
New class for device not active errors. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- qerror.c | 4 ++++ qerror.h | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-)