diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-06-21 01:36:40 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-06-21 01:36:40 +0200 |
commit | 99b0c52f8dc9fa4e7e037cdd6d4c560b6dacc9d4 (patch) | |
tree | a1cd2301e6eaa312db9d01b2924fe2609b695d92 | |
parent | 2cf6216ac51488f8b143bcc2baf69b47f937b7be (diff) | |
download | neard-99b0c52f8dc9fa4e7e037cdd6d4c560b6dacc9d4.tar.gz neard-99b0c52f8dc9fa4e7e037cdd6d4c560b6dacc9d4.tar.bz2 neard-99b0c52f8dc9fa4e7e037cdd6d4c560b6dacc9d4.zip |
error: Add I/O error routine
-rw-r--r-- | src/error.c | 8 | ||||
-rw-r--r-- | src/near.h | 1 |
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"); +} @@ -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); |