libsquashfs 1.3.0
A new set of tools and libraries for working with SquashFS images
Loading...
Searching...
No Matches
error.h File Reference

Contains the SQFS_ERROR enumerator. More...

Go to the source code of this file.

Enumerations

enum  SQFS_ERROR {
  SQFS_ERROR_ALLOC = -1 , SQFS_ERROR_IO = -2 , SQFS_ERROR_COMPRESSOR = -3 , SQFS_ERROR_INTERNAL = -4 ,
  SQFS_ERROR_CORRUPTED = -5 , SQFS_ERROR_UNSUPPORTED = -6 , SQFS_ERROR_OVERFLOW = -7 , SQFS_ERROR_OUT_OF_BOUNDS = -8 ,
  SFQS_ERROR_SUPER_MAGIC = -9 , SFQS_ERROR_SUPER_VERSION = -10 , SQFS_ERROR_SUPER_BLOCK_SIZE = -11 , SQFS_ERROR_NOT_DIR = -12 ,
  SQFS_ERROR_NO_ENTRY = -13 , SQFS_ERROR_LINK_LOOP = -14 , SQFS_ERROR_NOT_FILE = -15 , SQFS_ERROR_ARG_INVALID = -16 ,
  SQFS_ERROR_SEQUENCE = -17
}
 Error codes that can be returned by various libsquashfs functions. More...
 

Detailed Description

Contains the SQFS_ERROR enumerator.

Definition in file error.h.

Enumeration Type Documentation

◆ SQFS_ERROR

enum SQFS_ERROR

Error codes that can be returned by various libsquashfs functions.

Enumerator
SQFS_ERROR_ALLOC 

Allocation using malloc or calloc failed (returned NULL).

SQFS_ERROR_IO 

Generic I/O error if a file read or write operation failed.

SQFS_ERROR_COMPRESSOR 

Generic compressor error returned if compressing data failed (some kind of internal error) or extracting failed (typically means the data is corrupted).

SQFS_ERROR_INTERNAL 

An internal error of the "this wasn't supposed to happen" kind that cannot easily be mapped to something usefull.

SQFS_ERROR_CORRUPTED 

Attempted to read an on-disk data structure that appears to be corrupted, i.e. contains obvious non-sense values.

SQFS_ERROR_UNSUPPORTED 

Attempted to use an unsupported feature (e.g. an unknown compressor or xattr type).

SQFS_ERROR_OVERFLOW 

Attempted to read a data structure into memory would overflow the addressable memory. Usually indicates a corrupted or maliciously manipulated SquashFS filesystem.

SQFS_ERROR_OUT_OF_BOUNDS 

Attempted to perform an out-of-bounds read. If this happens when following a reference stored in a data structure, it usually indicates a corrupted or maliciously manipulated SquashFS filesystem.

SFQS_ERROR_SUPER_MAGIC 

Specific error when reading the super block.

Could not find the magic.

SFQS_ERROR_SUPER_VERSION 

Specific error when reading the super block.

The version indicated be the filesystem is not supported.

SQFS_ERROR_SUPER_BLOCK_SIZE 

Specific error when reading or initializing the super block.

The block size specified is either not a power of 2, or outside the legal range (4k to 1M).

SQFS_ERROR_NOT_DIR 

Expected a directory (inode), found something else instead.

Generated when trying to resolve a path but a part of the the path turned out to not be a directory. Also generated when trying to read directory entries from something that isn't a directory.

SQFS_ERROR_NO_ENTRY 

A specified path, or a part of it, does not exist.

SQFS_ERROR_LINK_LOOP 

Detected a hard link loop while walking a filesystem tree.

SQFS_ERROR_NOT_FILE 

Tried to perform an file operation on something that isn't a regular file or a regular file inode.

SQFS_ERROR_ARG_INVALID 

An invalid argument was passed to a library function.

SQFS_ERROR_SEQUENCE 

Library functions were called an a nonsensical order.

Some libsquashfs functions operate on an object with an internal state. Depending on the state, calling a function might not make sense at all (e.g. calling foo_end before foo_begin). In that case, this error is returned, signifying to the caller that the sequence makes not sense, but the object itself is unchanged, no action was performed and the object can still be used.

Definition at line 34 of file error.h.