[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/14] qerror: add new errors
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 02/14] qerror: add new errors |
Date: |
Wed, 30 May 2012 11:14:49 -0300 |
New errors for write() and open() failures. Will be used by the
next commits.
Signed-off-by: Luiz Capitulino <address@hidden>
---
qerror.c | 28 ++++++++++++++++++++++++++++
qerror.h | 21 +++++++++++++++++++++
2 files changed, 49 insertions(+)
diff --git a/qerror.c b/qerror.c
index 6c78759..97670a3 100644
--- a/qerror.c
+++ b/qerror.c
@@ -152,6 +152,14 @@ static const QErrorStringTable qerror_table[] = {
.desc = "The feature '%(name)' is not enabled",
},
{
+ .error_fmt = QERR_FILE_TOO_BIG,
+ .desc = "File exceeds maxium file size limit",
+ },
+ {
+ .error_fmt = QERR_INVALID_ACCESS,
+ .desc = "The access is invalid",
+ },
+ {
.error_fmt = QERR_INVALID_BLOCK_FORMAT,
.desc = "Invalid block format '%(name)'",
},
@@ -213,10 +221,22 @@ static const QErrorStringTable qerror_table[] = {
.desc = "Parameter '%(name)' is missing",
},
{
+ .error_fmt = QERR_NAME_TOO_LONG,
+ .desc = "Name is too long",
+ },
+ {
.error_fmt = QERR_NO_BUS_FOR_DEVICE,
.desc = "No '%(bus)' bus found for device '%(device)'",
},
{
+ .error_fmt = QERR_NO_SPACE,
+ .desc = "No space left in device",
+ },
+ {
+ .error_fmt = QERR_NO_FILE_DIR,
+ .desc = "No such file or directory",
+ },
+ {
.error_fmt = QERR_NOT_SUPPORTED,
.desc = "Not supported",
},
@@ -275,6 +295,10 @@ static const QErrorStringTable qerror_table[] = {
.desc = "QMP input object member '%(member)' is unexpected",
},
{
+ .error_fmt = QERR_READ_ONLY_FS,
+ .desc = "File System is read-only",
+ },
+ {
.error_fmt = QERR_RESET_REQUIRED,
.desc = "Resetting the Virtual Machine is required",
},
@@ -283,6 +307,10 @@ static const QErrorStringTable qerror_table[] = {
.desc = "Could not set password",
},
{
+ .error_fmt = QERR_TOO_MANY_FILES_PROC,
+ .desc = "Too many open files by process",
+ },
+ {
.error_fmt = QERR_TOO_MANY_FILES_SYS,
.desc = "Too many open files in system",
},
diff --git a/qerror.h b/qerror.h
index fb7c642..d157e68 100644
--- a/qerror.h
+++ b/qerror.h
@@ -136,6 +136,12 @@ QError *qobject_to_qerror(const QObject *obj);
#define QERR_FEATURE_DISABLED \
"{ 'class': 'FeatureDisabled', 'data': { 'name': %s } }"
+#define QERR_FILE_TOO_BIG \
+ "{ 'class': 'FileTooBig', 'data': {} }"
+
+#define QERR_INVALID_ACCESS \
+ "{ 'class': 'InvalidAccess', 'data': {} }"
+
#define QERR_INVALID_BLOCK_FORMAT \
"{ 'class': 'InvalidBlockFormat', 'data': { 'name': %s } }"
@@ -181,9 +187,18 @@ QError *qobject_to_qerror(const QObject *obj);
#define QERR_MISSING_PARAMETER \
"{ 'class': 'MissingParameter', 'data': { 'name': %s } }"
+#define QERR_NAME_TOO_LONG \
+ "{ 'class': 'NameTooLong', 'data': {} }"
+
#define QERR_NO_BUS_FOR_DEVICE \
"{ 'class': 'NoBusForDevice', 'data': { 'device': %s, 'bus': %s } }"
+#define QERR_NO_SPACE \
+ "{ 'class': 'NoSpace', 'data': {} }"
+
+#define QERR_NO_FILE_DIR \
+ "{ 'class': 'NoSuchFileOrDirectory', 'data': {} }"
+
#define QERR_NOT_SUPPORTED \
"{ 'class': 'NotSupported', 'data': {} }"
@@ -227,12 +242,18 @@ QError *qobject_to_qerror(const QObject *obj);
#define QERR_QMP_EXTRA_MEMBER \
"{ 'class': 'QMPExtraInputObjectMember', 'data': { 'member': %s } }"
+#define QERR_READ_ONLY_FS \
+ "{ 'class': 'ReadOnlyFileSystem', 'data': {} }"
+
#define QERR_RESET_REQUIRED \
"{ 'class': 'ResetRequired', 'data': {} }"
#define QERR_SET_PASSWD_FAILED \
"{ 'class': 'SetPasswdFailed', 'data': {} }"
+#define QERR_TOO_MANY_FILES_PROC \
+ "{ 'class': 'TooManyFilesByProcess', 'data': {} }"
+
#define QERR_TOO_MANY_FILES_SYS \
"{ 'class': 'TooManyFilesInSystem', 'data': {} }"
--
1.7.10.2.565.gbd578b5
- [Qemu-devel] [PATCH qmp-next v2 00/14]: qapi: convert screendump, Luiz Capitulino, 2012/05/30
- [Qemu-devel] [PATCH 04/14] cutils: introduce qemu_fprintf_err(), Luiz Capitulino, 2012/05/30
- [Qemu-devel] [PATCH 03/14] cutils: introduce qemu_fopen_err(), Luiz Capitulino, 2012/05/30
- [Qemu-devel] [PATCH 08/14] console: vga_hw_screen_dump_ptr: take an Error argument, Luiz Capitulino, 2012/05/30
- [Qemu-devel] [PATCH 02/14] qerror: add new errors,
Luiz Capitulino <=
- Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors, Paolo Bonzini, 2012/05/31
- Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors, Luiz Capitulino, 2012/05/31
- Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors, Paolo Bonzini, 2012/05/31
- Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors, Luiz Capitulino, 2012/05/31
- Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors, Paolo Bonzini, 2012/05/31
- Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors, Luiz Capitulino, 2012/05/31
- Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors, Paolo Bonzini, 2012/05/31
- Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors, Luiz Capitulino, 2012/05/31
- Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors, Paolo Bonzini, 2012/05/31
- Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors, Kevin Wolf, 2012/05/31