libsqsh v1.5.1
Loading...
Searching...
No Matches
sqsh_error.h File Reference
#include "sqsh_common.h"
Include dependency graph for sqsh_error.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  SqshError {
  SQSH_SUCCESS = 0 , SQSH_ERROR_SECTION_START = (1 << 8) , SQSH_ERROR_SUPERBLOCK_TOO_SMALL , SQSH_ERROR_WRONG_MAGIC ,
  SQSH_ERROR_BLOCKSIZE_MISMATCH , SQSH_ERROR_SIZE_MISMATCH , SQSH_ERROR_COMPRESSION_INIT , SQSH_ERROR_COMPRESSION_UNSUPPORTED ,
  SQSH_ERROR_COMPRESSION_DECOMPRESS , SQSH_ERROR_UNKNOWN_FILE_TYPE , SQSH_ERROR_UNKOWN_FILE_TYPE , SQSH_ERROR_NOT_A_DIRECTORY ,
  SQSH_ERROR_NOT_A_FILE , SQSH_ERROR_MALLOC_FAILED , SQSH_ERROR_MUTEX_INIT_FAILED , SQSH_ERROR_MUTEX_LOCK_FAILED ,
  SQSH_ERROR_MUTEX_DESTROY_FAILED , SQSH_ERROR_OUT_OF_BOUNDS , SQSH_ERROR_INTEGER_OVERFLOW , SQSH_ERROR_NO_SUCH_FILE ,
  SQSH_ERROR_NO_SUCH_XATTR , SQSH_ERROR_NO_FRAGMENT_TABLE , SQSH_ERROR_NO_EXTENDED_DIRECTORY , SQSH_ERROR_NO_EXPORT_TABLE ,
  SQSH_ERROR_NO_XATTR_TABLE , SQSH_ERROR_NO_COMPRESSION_OPTIONS , SQSH_ERROR_MAPPER_INIT , SQSH_ERROR_MAPPER_MAP ,
  SQSH_ERROR_CURL_INVALID_RANGE_HEADER , SQSL_ERROR_ELEMENT_NOT_FOUND , SQSH_ERROR_INVALID_ARGUMENT , SQSH_ERROR_WALKER_CANNOT_GO_UP ,
  SQSH_ERROR_WALKER_CANNOT_GO_DOWN , SQSH_ERROR_CORRUPTED_INODE , SQSH_ERROR_CORRUPTED_DIRECTORY_ENTRY , SQSH_ERROR_INTERNAL ,
  SQSH_ERROR_INODE_MAP_IS_INCONSISTENT , SQSH_ERROR_XATTR_SIZE_MISMATCH , SQSH_ERROR_UNSUPPORTED_VERSION , SQSH_ERROR_TOO_MANY_SYMLINKS_FOLLOWED ,
  SQSH_ERROR_CORRUPTED_DIRECTORY_HEADER , SQSH_ERROR_COMPRESSION_FINISHED , SQSH_ERROR_NO_SUCH_ELEMENT , SQSH_ERROR_DIRECTORY_RECURSION ,
  SQSH_ERROR_INODE_PARENT_MISMATCH , SQSH_ERROR_INODE_PARENT_UNSET , SQSH_ERROR_NOT_A_SYMLINK
}
 Error codes for sqsh. More...
 

Functions

void sqsh_perror (int error_code, const char *msg)
 Print the error message for the given error code.
 
SQSH_NO_UNUSED const char * sqsh_error_str (int error_code)
 Get the error message for the given error code.
 

Detailed Description

Author
Enno Boland (mail@.nosp@m.ebol.nosp@m.and.d.nosp@m.e)

Definition in file sqsh_error.h.

Enumeration Type Documentation

◆ SqshError

enum SqshError

Error codes for sqsh.

Enumerator
SQSH_SUCCESS 
SQSH_ERROR_SECTION_START 
SQSH_ERROR_SUPERBLOCK_TOO_SMALL 
SQSH_ERROR_WRONG_MAGIC 
SQSH_ERROR_BLOCKSIZE_MISMATCH 
SQSH_ERROR_SIZE_MISMATCH 
SQSH_ERROR_COMPRESSION_INIT 
SQSH_ERROR_COMPRESSION_UNSUPPORTED 
SQSH_ERROR_COMPRESSION_DECOMPRESS 
SQSH_ERROR_UNKNOWN_FILE_TYPE 
SQSH_ERROR_UNKOWN_FILE_TYPE 
Deprecated
Since 1.1.0. Use SQSH_ERROR_UNKNOWN_FILE_TYPE instead.
SQSH_ERROR_NOT_A_DIRECTORY 
SQSH_ERROR_NOT_A_FILE 
SQSH_ERROR_MALLOC_FAILED 
SQSH_ERROR_MUTEX_INIT_FAILED 
SQSH_ERROR_MUTEX_LOCK_FAILED 
SQSH_ERROR_MUTEX_DESTROY_FAILED 
SQSH_ERROR_OUT_OF_BOUNDS 
SQSH_ERROR_INTEGER_OVERFLOW 
SQSH_ERROR_NO_SUCH_FILE 
SQSH_ERROR_NO_SUCH_XATTR 
SQSH_ERROR_NO_FRAGMENT_TABLE 
SQSH_ERROR_NO_EXTENDED_DIRECTORY 
SQSH_ERROR_NO_EXPORT_TABLE 
SQSH_ERROR_NO_XATTR_TABLE 
SQSH_ERROR_NO_COMPRESSION_OPTIONS 
SQSH_ERROR_MAPPER_INIT 
SQSH_ERROR_MAPPER_MAP 
SQSH_ERROR_CURL_INVALID_RANGE_HEADER 
SQSL_ERROR_ELEMENT_NOT_FOUND 
SQSH_ERROR_INVALID_ARGUMENT 
SQSH_ERROR_WALKER_CANNOT_GO_UP 
SQSH_ERROR_WALKER_CANNOT_GO_DOWN 
SQSH_ERROR_CORRUPTED_INODE 
SQSH_ERROR_CORRUPTED_DIRECTORY_ENTRY 
SQSH_ERROR_INTERNAL 
SQSH_ERROR_INODE_MAP_IS_INCONSISTENT 
SQSH_ERROR_XATTR_SIZE_MISMATCH 
SQSH_ERROR_UNSUPPORTED_VERSION 
SQSH_ERROR_TOO_MANY_SYMLINKS_FOLLOWED 
SQSH_ERROR_CORRUPTED_DIRECTORY_HEADER 
SQSH_ERROR_COMPRESSION_FINISHED 
SQSH_ERROR_NO_SUCH_ELEMENT 
SQSH_ERROR_DIRECTORY_RECURSION 
SQSH_ERROR_INODE_PARENT_MISMATCH 
SQSH_ERROR_INODE_PARENT_UNSET 
SQSH_ERROR_NOT_A_SYMLINK 

Definition at line 50 of file sqsh_error.h.

Function Documentation

◆ sqsh_error_str()

SQSH_NO_UNUSED const char * sqsh_error_str ( int error_code)

Get the error message for the given error code.

This function is thread safe, but the returned string may be overwritten by the next call to this function on this thread.

Parameters
error_codeThe error code.
Returns
The error message.

◆ sqsh_perror()

void sqsh_perror ( int error_code,
const char * msg )

Print the error message for the given error code.

Parameters
error_codeThe error code.
msgThe message to print before the error message.