cake
/
libp7
Archived
1
0
Fork 1
This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
libp7/src/core/strerror.c

78 lines
2.4 KiB
C

/* ************************************************************************** */
/* _____ _ */
/* core/strerror.c |_ _|__ _ _| |__ ___ _ _ */
/* | Project: libp7 | |/ _ \| | | | '_ \ / _ \ | | | */
/* | | (_) | |_| | | | | __/ |_| | */
/* By: thomas <thomas@touhey.fr> |_|\___/ \__,_|_| |_|\___|\__, |.fr */
/* Last updated: 2016/10/13 07:33:17 |___/ */
/* */
/* ************************************************************************** */
#include <libp7/internals.h>
/**
* p7_error_strings:
* String descriptions of libp7 errors.
*
* This list MUST evolve whenever the p7_error_t enumeration
* is updated. Could cause invalid error strings otherwise,
* or segfaults!
*/
/* error strings */
const char *p7_error_strings[] = {
[p7_noerror] =
"no error have been encountered",
/* basic communication errors */
[p7_error_uninitialized] =
"handle is uninitialized",
[p7_error_nocalc] =
"device was disconnected",
[p7_error_noaccess] =
"could not get access to device",
[p7_error_timeout] =
"transmission timed out",
[p7_error_checksum] =
"checksum was invalid",
[p7_error_irrecoverable] =
"irrecoverable (bad luck), try again",
/* streams */
[p7_error_nostream] =
"provided filestream was NULL or virtual",
[p7_error_noread] =
"provided filestream was not readable",
[p7_error_nowrite] =
"provided filestream was not writable",
[p7_error_noseek] =
"provided filestream was not seekable",
/* user interface */
[p7_error_active] =
"wrong mode (was active when passive is required, or the other way round)",
[p7_error_doubleshift] =
"could not shift, we're already shifted",
[p7_error_empty] =
"filestream musn't be empty",
[p7_error_filename] =
"filename is missing or too long (12 chars max)",
[p7_error_dirname] =
"directory name is too long (8 chars max)",
[p7_error_fullmem] =
"not enough space left",
[p7_error_notfound] =
"file not found",
[p7_error_denied_overwrite] =
"we denied overwrite",
/* others */
[p7_error_unsupported] =
"unsupported command",
[p7_error_unsupported_device] =
"unsupported device",
[p7_error_alloc] =
"an allocation has failed",
[p7_error_unknown] =
"an unknown error has occurred",
};