===================================================================
@@ -96,6 +96,14 @@ static const QErrorStringTable qerror_ta
.error_fmt = QERR_DEVICE_NOT_REMOVABLE,
.desc = "Device '%(device)' is not removable",
},
+ {
+ .error_fmt = QERR_DEVICE_NOT_INSERTED,
+ .desc = "Device '%(device)' has not been inserted",
+ },
+ {
+ .error_fmt = QERR_REOPEN_FILE_FAILED,
+ .desc = "Could not reopen '%(filename)'",
+ },
{
.error_fmt = QERR_DEVICE_NO_BUS,
.desc = "Device '%(device)' has no child bus",
===================================================================
@@ -85,6 +85,9 @@ QError *qobject_to_qerror(const QObject
#define QERR_DEVICE_NOT_FOUND \
"{ 'class': 'DeviceNotFound', 'data': { 'device': %s } }"
+#define QERR_DEVICE_NOT_INSERTED \
+ "{ 'class': 'DeviceNotInserted', 'data': { 'device': %s } }"
+
#define QERR_DEVICE_NOT_REMOVABLE \
"{ 'class': 'DeviceNotRemovable', 'data': { 'device': %s } }"
@@ -139,6 +142,9 @@ QError *qobject_to_qerror(const QObject
#define QERR_OPEN_FILE_FAILED \
"{ 'class': 'OpenFileFailed', 'data': { 'filename': %s } }"
+#define QERR_REOPEN_FILE_FAILED \
+ "{ 'class': 'ReopenFileFailed', 'data': { 'filename': %s } }"
+
#define QERR_PROPERTY_NOT_FOUND \
"{ 'class': 'PropertyNotFound', 'data': { 'device': %s, 'property': %s } }"
New error classes defined for cases where device not inserted and file reopen failed. Signed-off-by: Supriya Kannery <supriyak@in.ibm.com> --- qerror.c | 8 ++++++++ qerror.h | 6 ++++++ 2 files changed, 14 insertions(+)