Error Codes
Negative error codes indicating some failure, returned by minipaxtar API functions.
Defines
| Name | |
|---|---|
| MPTAR_ERR_INVALID_ARG NULL context pointers or zero-length arguments passed to an API function. |
|
| MPTAR_ERR_ALLOC Memory allocation failed or returned an invalid pointer. |
|
| MPTAR_ERR_IO_READ Read callback failed to return the requested number of bytes (unexpected end of stream). |
|
| MPTAR_ERR_IO_WRITE Write callback failed to write the complete chunk to storage. |
|
| MPTAR_ERR_CHECKSUM Header checksum verification failed; record is corrupted or misaligned. |
|
| MPTAR_ERR_UNSUPPORTED_TYPE Encountered a special file type flag (FIFO, Block, Char device). |
|
| MPTAR_ERR_RESERVED_LEGACY_1 Reserved / Legacy. |
|
| MPTAR_ERR_INCOMPLETE_PAYLOAD Called mptar_write_finalize() or attempted to start a new header while bytes_left > 0 on the current file payload. |
|
| MPTAR_ERR_MALFORMED Archive structural corruption or malformed header formatting detected (e.g., invalid octal fields, mangled PAX key-value pairs). |
|
| MPTAR_ERR_OVERFLOW An arithmetic wrap-around or internal buffer write boundary violation detected. |
|
| MPTAR_ERR_RESERVED_LEGACY_2 Reserved / Legacy. |
|
| MPTAR_ERR_NS_CONVERSION_FAILED Conversion of sub-second nanoseconds to string failed (nanosecond value exceeded 999,999,999). |
|
| MPTAR_ERR_BUFFER_TOO_SMALL Output or destination buffer lacked sufficient capacity to hold some data. |
Macros Documentation
define MPTAR_ERR_INVALID_ARG
#define MPTAR_ERR_INVALID_ARG -1
NULL context pointers or zero-length arguments passed to an API function.
define MPTAR_ERR_ALLOC
#define MPTAR_ERR_ALLOC -2
Memory allocation failed or returned an invalid pointer.
define MPTAR_ERR_IO_READ
#define MPTAR_ERR_IO_READ -3
Read callback failed to return the requested number of bytes (unexpected end of stream).
define MPTAR_ERR_IO_WRITE
#define MPTAR_ERR_IO_WRITE -4
Write callback failed to write the complete chunk to storage.
define MPTAR_ERR_CHECKSUM
#define MPTAR_ERR_CHECKSUM -5
Header checksum verification failed; record is corrupted or misaligned.
define MPTAR_ERR_UNSUPPORTED_TYPE
#define MPTAR_ERR_UNSUPPORTED_TYPE -6
Encountered a special file type flag (FIFO, Block, Char device).
Note: Returning this error code usually indicates that special file support was disabled at compile time via MPTAR_SUPPORT_SPECIAL.
define MPTAR_ERR_RESERVED_LEGACY_1
#define MPTAR_ERR_RESERVED_LEGACY_1 -7
Reserved / Legacy.
Formerly used for write overflow prior to automatic payload clamping.
define MPTAR_ERR_INCOMPLETE_PAYLOAD
#define MPTAR_ERR_INCOMPLETE_PAYLOAD -8
Called mptar_write_finalize() or attempted to start a new header while bytes_left > 0 on the current file payload.
define MPTAR_ERR_MALFORMED
#define MPTAR_ERR_MALFORMED -9
Archive structural corruption or malformed header formatting detected (e.g., invalid octal fields, mangled PAX key-value pairs).
define MPTAR_ERR_OVERFLOW
#define MPTAR_ERR_OVERFLOW -10
An arithmetic wrap-around or internal buffer write boundary violation detected.
define MPTAR_ERR_RESERVED_LEGACY_2
#define MPTAR_ERR_RESERVED_LEGACY_2 -11
Reserved / Legacy.
Formerly used to signal PAX requirement due to a long path.
define MPTAR_ERR_NS_CONVERSION_FAILED
#define MPTAR_ERR_NS_CONVERSION_FAILED -12
Conversion of sub-second nanoseconds to string failed (nanosecond value exceeded 999,999,999).
define MPTAR_ERR_BUFFER_TOO_SMALL
#define MPTAR_ERR_BUFFER_TOO_SMALL -13
Output or destination buffer lacked sufficient capacity to hold some data.
Updated on 2026-07-23 at 20:07:34 +0000