Skip to content

Commit

Permalink
Reorder errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tobozo committed Jan 18, 2021
1 parent f543e02 commit e595bf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/ESP32-targz-lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ static uint16_t blockmod = GZIP_BUFF_SIZE / TAR_BLOCK_SIZE;
static struct GZ::TINF_DATA uzLibDecompressor;
static uint16_t gzTarBlockPos = 0;
static size_t tarReadGzStreamBytes = 0;
#ifdef ESP8266
size_t min_output_buffer_size = 512;
#endif

static bool halt_on_error()
{
Expand Down
4 changes: 2 additions & 2 deletions src/ESP32-targz-lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ typedef enum tarGzErrorCode /* int8_t */
ESP32_TARGZ_FS_READSIZE_ERROR = -102, // no space left on device
ESP32_TARGZ_HEAP_TOO_LOW = -103, // not enough heap
ESP32_TARGZ_NEEDS_DICT = -104, // gzip dictionnary needs to be enabled
ESP32_TARGZ_UZLIB_PARSE_HEADER_FAILED = -105, // Gz Error when parsing header
ESP32_TARGZ_UZLIB_MALLOC_FAIL = -106, // Gz Error when allocating memory

// UZLIB: keeping error values from uzlib.h as is (no offset)
ESP32_TARGZ_UZLIB_INVALID_FILE = -2, // Not a valid gzip file
ESP32_TARGZ_UZLIB_DATA_ERROR = -3, // Gz Error TINF_DATA_ERROR
ESP32_TARGZ_UZLIB_CHKSUM_ERROR = -4, // Gz Error TINF_CHKSUM_ERROR
ESP32_TARGZ_UZLIB_DICT_ERROR = -5, // Gz Error TINF_DICT_ERROR
ESP32_TARGZ_UZLIB_PARSE_HEADER_FAILED = -105, // Gz Error when parsing header
ESP32_TARGZ_UZLIB_MALLOC_FAIL = -106, // Gz Error when allocating memory

// UPDATE: adding -20 offset to actual error values from Update.h
ESP32_TARGZ_UPDATE_ERROR_ABORT = -8, // Updater Error UPDATE_ERROR_ABORT -20 // (12-20) = -8
Expand Down

0 comments on commit e595bf1

Please sign in to comment.