summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2012-07-26 21:30:40 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2012-08-13 14:17:46 -0300
commita8cb2d302ea20d7ba1be184973fef29d7cab9407 (patch)
treee20fab4f8494921b9ae6feb47cff7c3a909e2e42 /error.c
parentab878ddfeee722db8e7f78a9c6e9882864c2fd66 (diff)
downloadqemu-a8cb2d302ea20d7ba1be184973fef29d7cab9407.tar.gz
qemu-a8cb2d302ea20d7ba1be184973fef29d7cab9407.tar.bz2
qemu-a8cb2d302ea20d7ba1be184973fef29d7cab9407.zip
error: drop unused functions
Besides being unused, they operate on the current error format, which is going to be replaced soon. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'error.c')
-rw-r--r--error.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/error.c b/error.c
index 2d34cde654..b1d5131470 100644
--- a/error.c
+++ b/error.c
@@ -74,29 +74,6 @@ const char *error_get_pretty(Error *err)
return err->msg;
}
-const char *error_get_field(Error *err, const char *field)
-{
- if (strcmp(field, "class") == 0) {
- return qdict_get_str(err->obj, field);
- } else {
- QDict *dict = qdict_get_qdict(err->obj, "data");
- return qdict_get_str(dict, field);
- }
-}
-
-QDict *error_get_data(Error *err)
-{
- QDict *data = qdict_get_qdict(err->obj, "data");
- QINCREF(data);
- return data;
-}
-
-void error_set_field(Error *err, const char *field, const char *value)
-{
- QDict *dict = qdict_get_qdict(err->obj, "data");
- qdict_put(dict, field, qstring_from_str(value));
-}
-
void error_free(Error *err)
{
if (err) {
@@ -106,31 +83,6 @@ void error_free(Error *err)
}
}
-bool error_is_type(Error *err, ErrorClass err_class, const char *fmt)
-{
- const char *error_class;
- char *ptr;
- char *end;
-
- if (!err) {
- return false;
- }
-
- ptr = strstr(fmt, "'class': '");
- assert(ptr != NULL);
- ptr += strlen("'class': '");
-
- end = strchr(ptr, '\'');
- assert(end != NULL);
-
- error_class = error_get_field(err, "class");
- if (strlen(error_class) != end - ptr) {
- return false;
- }
-
- return strncmp(ptr, error_class, end - ptr) == 0;
-}
-
void error_propagate(Error **dst_err, Error *local_err)
{
if (dst_err && !*dst_err) {