summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2020-02-11 11:06:51 +0100
committerBastien Nocera <hadess@hadess.net>2020-02-11 11:07:18 +0100
commit9a9a0bb473132a9143e4597db3508bfd2ee355cc (patch)
tree4696333001e8a51dbdc4d8526d8cd50509c218dc /daemon
parent4c7af079f65a0d4da0a41cd18be0c8ace2c64725 (diff)
downloadgvfs-9a9a0bb473132a9143e4597db3508bfd2ee355cc.tar.gz
afc: Remove unused error code conversion
We're doing it manually now.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gvfsbackendafc.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c
index 3169b792..942deae5 100644
--- a/daemon/gvfsbackendafc.c
+++ b/daemon/gvfsbackendafc.c
@@ -90,70 +90,6 @@ struct _GVfsBackendAfc {
GMutex apps_lock;
};
-struct afc_error_mapping {
- afc_error_t from;
- GIOErrorEnum to;
-};
-
-static struct afc_error_mapping afc_error_to_g_io_error[] = {
- { AFC_E_UNKNOWN_ERROR , G_IO_ERROR_FAILED },
- { AFC_E_OP_HEADER_INVALID , G_IO_ERROR_FAILED },
- { AFC_E_NO_RESOURCES , G_IO_ERROR_TOO_MANY_OPEN_FILES },
- { AFC_E_READ_ERROR , G_IO_ERROR_NOT_DIRECTORY },
- { AFC_E_WRITE_ERROR , G_IO_ERROR_FAILED },
- { AFC_E_UNKNOWN_PACKET_TYPE , G_IO_ERROR_FAILED },
- { AFC_E_INVALID_ARG , G_IO_ERROR_INVALID_ARGUMENT },
- { AFC_E_OBJECT_NOT_FOUND , G_IO_ERROR_NOT_FOUND },
- { AFC_E_OBJECT_IS_DIR , G_IO_ERROR_IS_DIRECTORY },
- { AFC_E_DIR_NOT_EMPTY , G_IO_ERROR_NOT_EMPTY },
- { AFC_E_PERM_DENIED , G_IO_ERROR_PERMISSION_DENIED },
- { AFC_E_SERVICE_NOT_CONNECTED , G_IO_ERROR_HOST_NOT_FOUND },
- { AFC_E_OP_TIMEOUT , G_IO_ERROR_TIMED_OUT },
- { AFC_E_TOO_MUCH_DATA , G_IO_ERROR_FAILED },
- { AFC_E_END_OF_DATA , G_IO_ERROR_FAILED },
- { AFC_E_OP_NOT_SUPPORTED , G_IO_ERROR_NOT_SUPPORTED },
- { AFC_E_OBJECT_EXISTS , G_IO_ERROR_EXISTS },
- { AFC_E_OBJECT_BUSY , G_IO_ERROR_BUSY },
- { AFC_E_NO_SPACE_LEFT , G_IO_ERROR_NO_SPACE },
- { AFC_E_OP_WOULD_BLOCK , G_IO_ERROR_WOULD_BLOCK },
- { AFC_E_IO_ERROR , G_IO_ERROR_FAILED },
- { AFC_E_OP_INTERRUPTED , G_IO_ERROR_CANCELLED },
- { AFC_E_OP_IN_PROGRESS , G_IO_ERROR_PENDING },
- { AFC_E_INTERNAL_ERROR , G_IO_ERROR_FAILED },
- { AFC_E_NOT_ENOUGH_DATA , G_IO_ERROR_CLOSED },
- { AFC_E_MUX_ERROR , G_IO_ERROR_FAILED },
- { -1 }
-};
-
-/**
- * Tries to convert the AFC error value into a GIOError.
- *
- * @param client AFC client to retrieve status value from.
- *
- * @return errno value.
- */
-static GIOErrorEnum
-g_io_error_from_afc_error (afc_error_t error)
-{
- GIOErrorEnum res = G_IO_ERROR_FAILED;
- int i = 0; gboolean found = FALSE;
-
- while (afc_error_to_g_io_error[i++].from != -1)
- {
- if (afc_error_to_g_io_error[i].from == error)
- {
- res = afc_error_to_g_io_error[i++].to;
- found = TRUE;
- break;
- }
- }
-
- if (!found)
- g_message ("Unknown AFC error (%d).\n", error);
-
- return res;
-}
-
G_DEFINE_TYPE(GVfsBackendAfc, g_vfs_backend_afc, G_VFS_TYPE_BACKEND)
static void