[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: |
Fri, 25 May 2012 16:41:07 -0300 |
New errors for write() and open() failures. Will be used by the
next commits.
Signed-off-by: Luiz Capitulino <address@hidden>
---
qerror.c | 24 ++++++++++++++++++++++++
qerror.h | 18 ++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/qerror.c b/qerror.c
index 2c97382..58e4570 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)'",
},
@@ -209,10 +217,18 @@ static const QErrorStringTable qerror_table[] = {
.desc = "Parameter '%(name)' is missing",
},
{
+ .error_fmt = QERR_NAME_TOO_LONG,
+ .desc = "Name is too longe",
+ },
+ {
.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_NOT_SUPPORTED,
.desc = "Not supported",
},
@@ -271,6 +287,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",
},
@@ -279,6 +299,10 @@ static const QErrorStringTable qerror_table[] = {
.desc = "Could not set password",
},
{
+ .error_fmt = QERR_TOO_MANY_FILES_PROC,
+ .desc = "Too many opened files by the process",
+ },
+ {
.error_fmt = QERR_TOO_MANY_FILES_SYS,
.desc = "Too many opened files in the system",
},
diff --git a/qerror.h b/qerror.h
index 9ddf09c..e8dc9e7 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 } }"
@@ -178,9 +184,15 @@ 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_NOT_SUPPORTED \
"{ 'class': 'NotSupported', 'data': {} }"
@@ -224,12 +236,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 00/14]: qapi: convert screendump, Luiz Capitulino, 2012/05/25
- [Qemu-devel] [PATCH 01/14] qerror: extend QERR_TOO_MANY_FILES, Luiz Capitulino, 2012/05/25
- [Qemu-devel] [PATCH 02/14] qerror: add new errors,
Luiz Capitulino <=
- [Qemu-devel] [PATCH 03/14] cutils: introduce qemu_fopen_err(), Luiz Capitulino, 2012/05/25
- [Qemu-devel] [PATCH 04/14] cutils: introduce qemu_fprintf_err(), Luiz Capitulino, 2012/05/25
- [Qemu-devel] [PATCH 05/14] cutils: introduce qemu_fputc_err(), Luiz Capitulino, 2012/05/25
- [Qemu-devel] [PATCH 06/14] cutils: introduce qemu_fwrite_err(), Luiz Capitulino, 2012/05/25
- [Qemu-devel] [PATCH 07/14] omap_lcdc: rename ppm_save() to omap_ppm_save(), Luiz Capitulino, 2012/05/25
- [Qemu-devel] [PATCH 08/14] console: vga_hw_screen_dump_ptr: take an Error argument, Luiz Capitulino, 2012/05/25
- [Qemu-devel] [PATCH 09/14] vga: ppm_save(): add error handling, Luiz Capitulino, 2012/05/25
- [Qemu-devel] [PATCH 12/14] tcx: tcx24_screen_dump(): add error handling, Luiz Capitulino, 2012/05/25
- [Qemu-devel] [PATCH 13/14] tcx: tcx_screen_dump(): add error handling, Luiz Capitulino, 2012/05/25
- [Qemu-devel] [PATCH 10/14] omap_lcdc: omap_ppm_save(): add error handling, Luiz Capitulino, 2012/05/25