libsqsh v1.5.2
Loading...
Searching...
No Matches
sqsh_error.h
Go to the documentation of this file.
1/******************************************************************************
2 * *
3 * Copyright (c) 2023-2024, Enno Boland <g@s01.de> *
4 * *
5 * Redistribution and use in source and binary forms, with or without *
6 * modification, are permitted provided that the following conditions are *
7 * met: *
8 * *
9 * * Redistributions of source code must retain the above copyright notice, *
10 * this list of conditions and the following disclaimer. *
11 * * Redistributions in binary form must reproduce the above copyright *
12 * notice, this list of conditions and the following disclaimer in the *
13 * documentation and/or other materials provided with the distribution. *
14 * *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS *
16 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, *
17 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR *
18 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR *
19 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
23 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
24 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
26 * *
27 ******************************************************************************/
28
34#ifndef SQSH_ERROR_H
35#define SQSH_ERROR_H
36
37#include "sqsh_common.h"
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43/***************************************
44 * error.c
45 */
46
52 /* Avoid collisions with errno */
65 SQSH_ERROR_UNKOWN_FILE_TYPE __attribute__((deprecated(
66 "Since 1.1.0. Use SQSH_ERROR_UNKNOWN_FILE_TYPE instead."))) =
104};
105
112void sqsh_perror(int error_code, const char *msg);
113
123SQSH_NO_UNUSED const char *sqsh_error_str(int error_code);
124
125#ifdef __cplusplus
126}
127#endif
128#endif /* SQSH_ERROR_H */
#define SQSH_NO_UNUSED
Warn if return value is unused.
Definition sqsh_common.h:59
void sqsh_perror(int error_code, const char *msg)
Print the error message for the given error code.
SqshError
Error codes for sqsh.
Definition sqsh_error.h:50
@ SQSH_ERROR_UNKNOWN_FILE_TYPE
Definition sqsh_error.h:61
@ SQSH_ERROR_MUTEX_LOCK_FAILED
Definition sqsh_error.h:72
@ SQSH_SUCCESS
Definition sqsh_error.h:51
@ SQSH_ERROR_DIRECTORY_RECURSION
Definition sqsh_error.h:100
@ SQSH_ERROR_SUPERBLOCK_TOO_SMALL
Definition sqsh_error.h:54
@ SQSH_ERROR_NOT_A_FILE
Definition sqsh_error.h:69
@ SQSH_ERROR_MALLOC_FAILED
Definition sqsh_error.h:70
@ SQSH_ERROR_INVALID_ARGUMENT
Definition sqsh_error.h:87
@ SQSH_ERROR_CORRUPTED_DIRECTORY_ENTRY
Definition sqsh_error.h:91
@ SQSH_ERROR_NO_XATTR_TABLE
Definition sqsh_error.h:81
@ SQSH_ERROR_XATTR_SIZE_MISMATCH
Definition sqsh_error.h:94
@ SQSH_ERROR_WALKER_CANNOT_GO_UP
Definition sqsh_error.h:88
@ SQSH_ERROR_COMPRESSION_DECOMPRESS
Definition sqsh_error.h:60
@ SQSH_ERROR_NO_SUCH_FILE
Definition sqsh_error.h:76
@ SQSH_ERROR_INODE_PARENT_UNSET
Definition sqsh_error.h:102
@ SQSH_ERROR_WRONG_MAGIC
Definition sqsh_error.h:55
@ SQSH_ERROR_COMPRESSION_FINISHED
Definition sqsh_error.h:98
@ SQSH_ERROR_CORRUPTED_DIRECTORY_HEADER
Definition sqsh_error.h:97
@ SQSH_ERROR_INTEGER_OVERFLOW
Definition sqsh_error.h:75
@ SQSH_ERROR_INODE_MAP_IS_INCONSISTENT
Definition sqsh_error.h:93
@ SQSH_ERROR_OUT_OF_BOUNDS
Definition sqsh_error.h:74
@ SQSH_ERROR_MAPPER_MAP
Definition sqsh_error.h:84
@ SQSH_ERROR_NO_FRAGMENT_TABLE
Definition sqsh_error.h:78
@ SQSH_ERROR_NOT_A_SYMLINK
Definition sqsh_error.h:103
@ SQSH_ERROR_NO_EXTENDED_DIRECTORY
Definition sqsh_error.h:79
@ SQSH_ERROR_COMPRESSION_INIT
Definition sqsh_error.h:58
@ SQSH_ERROR_SECTION_START
Definition sqsh_error.h:53
@ SQSH_ERROR_COMPRESSION_UNSUPPORTED
Definition sqsh_error.h:59
@ SQSH_ERROR_NOT_A_DIRECTORY
Definition sqsh_error.h:68
@ SQSH_ERROR_NO_EXPORT_TABLE
Definition sqsh_error.h:80
@ SQSH_ERROR_TOO_MANY_SYMLINKS_FOLLOWED
Definition sqsh_error.h:96
@ SQSH_ERROR_WALKER_CANNOT_GO_DOWN
Definition sqsh_error.h:89
@ SQSH_ERROR_UNKOWN_FILE_TYPE
Definition sqsh_error.h:65
@ SQSH_ERROR_INTERNAL
Definition sqsh_error.h:92
@ SQSH_ERROR_CORRUPTED_INODE
Definition sqsh_error.h:90
@ SQSH_ERROR_BLOCKSIZE_MISMATCH
Definition sqsh_error.h:56
@ SQSH_ERROR_MAPPER_INIT
Definition sqsh_error.h:83
@ SQSH_ERROR_UNSUPPORTED_VERSION
Definition sqsh_error.h:95
@ SQSH_ERROR_MUTEX_DESTROY_FAILED
Definition sqsh_error.h:73
@ SQSH_ERROR_NO_SUCH_ELEMENT
Definition sqsh_error.h:99
@ SQSH_ERROR_NO_SUCH_XATTR
Definition sqsh_error.h:77
@ SQSH_ERROR_CURL_INVALID_RANGE_HEADER
Definition sqsh_error.h:85
@ SQSH_ERROR_INODE_PARENT_MISMATCH
Definition sqsh_error.h:101
@ SQSH_ERROR_SIZE_MISMATCH
Definition sqsh_error.h:57
@ SQSH_ERROR_NO_COMPRESSION_OPTIONS
Definition sqsh_error.h:82
@ SQSH_ERROR_MUTEX_INIT_FAILED
Definition sqsh_error.h:71
@ SQSL_ERROR_ELEMENT_NOT_FOUND
Definition sqsh_error.h:86
SQSH_NO_UNUSED const char * sqsh_error_str(int error_code)
Get the error message for the given error code.