summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2013-06-21 01:36:40 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2013-06-21 01:36:40 +0200
commit99b0c52f8dc9fa4e7e037cdd6d4c560b6dacc9d4 (patch)
treea1cd2301e6eaa312db9d01b2924fe2609b695d92
parent2cf6216ac51488f8b143bcc2baf69b47f937b7be (diff)
downloadneard-99b0c52f8dc9fa4e7e037cdd6d4c560b6dacc9d4.tar.gz
neard-99b0c52f8dc9fa4e7e037cdd6d4c560b6dacc9d4.tar.bz2
neard-99b0c52f8dc9fa4e7e037cdd6d4c560b6dacc9d4.zip
error: Add I/O error routine
-rw-r--r--src/error.c8
-rw-r--r--src/near.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/error.c b/src/error.c
index 4012b5b..6f59598 100644
--- a/src/error.c
+++ b/src/error.c
@@ -45,6 +45,8 @@ DBusMessage *__near_error_failed(DBusMessage *msg, int errnum)
return __near_error_already_exists(msg);
case EINVAL:
return __near_error_invalid_arguments(msg);
+ case EIO:
+ return __near_error_io_error(msg);
case ENOSYS:
return __near_error_not_implemented(msg);
case ENOLINK:
@@ -189,3 +191,9 @@ DBusMessage *__near_error_invalid_property(DBusMessage *msg)
return g_dbus_create_error(msg, NFC_ERROR_INTERFACE
".InvalidProperty", "Invalid property");
}
+
+DBusMessage *__near_error_io_error(DBusMessage *msg)
+{
+ return g_dbus_create_error(msg, NFC_ERROR_INTERFACE
+ ".IOError", "I/O Error");
+}
diff --git a/src/near.h b/src/near.h
index 4b2edb9..e8ae152 100644
--- a/src/near.h
+++ b/src/near.h
@@ -63,6 +63,7 @@ DBusMessage *__near_error_operation_aborted(DBusMessage *msg);
DBusMessage *__near_error_operation_timeout(DBusMessage *msg);
DBusMessage *__near_error_invalid_service(DBusMessage *msg);
DBusMessage *__near_error_invalid_property(DBusMessage *msg);
+DBusMessage *__near_error_io_error(DBusMessage *msg);
int __near_manager_adapter_add(uint32_t idx, const char *name,
uint32_t protocols, near_bool_t powered);