* include/grub/err.h (grub_err_t): Replace GRUB_ERR_BAD_GZIP_DATA with

GRUB_ERR_BAD_COMPRESSED_DATA. All users updated.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-09-05 16:55:49 +02:00
parent 5124ae6d4f
commit 3579415d20
3 changed files with 20 additions and 15 deletions

View file

@ -1,3 +1,8 @@
2010-09-05 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/err.h (grub_err_t): Replace GRUB_ERR_BAD_GZIP_DATA with
GRUB_ERR_BAD_COMPRESSED_DATA. All users updated.
2010-09-05 Vladimir Serbinenko <phcoder@gmail.com> 2010-09-05 Vladimir Serbinenko <phcoder@gmail.com>
Uncompressed checksum support. Uncompressed checksum support.

View file

@ -206,7 +206,7 @@ test_header (grub_file_t file)
|| ((hdr.flags & ORIG_NAME) && eat_field (gzio->file, -1)) || ((hdr.flags & ORIG_NAME) && eat_field (gzio->file, -1))
|| ((hdr.flags & COMMENT) && eat_field (gzio->file, -1))) || ((hdr.flags & COMMENT) && eat_field (gzio->file, -1)))
{ {
grub_error (GRUB_ERR_BAD_GZIP_DATA, "unsupported gzip format"); grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "unsupported gzip format");
return 0; return 0;
} }
@ -646,7 +646,7 @@ inflate_codes_in_window (grub_file_t file)
{ {
if (e == 99) if (e == 99)
{ {
grub_error (GRUB_ERR_BAD_GZIP_DATA, grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
"an unused code found"); "an unused code found");
return 1; return 1;
} }
@ -685,7 +685,7 @@ inflate_codes_in_window (grub_file_t file)
{ {
if (e == 99) if (e == 99)
{ {
grub_error (GRUB_ERR_BAD_GZIP_DATA, grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
"an unused code found"); "an unused code found");
return 1; return 1;
} }
@ -771,7 +771,7 @@ init_stored_block (grub_file_t file)
DUMPBITS (16); DUMPBITS (16);
NEEDBITS (16); NEEDBITS (16);
if (gzio->block_len != (int) ((~b) & 0xffff)) if (gzio->block_len != (int) ((~b) & 0xffff))
grub_error (GRUB_ERR_BAD_GZIP_DATA, grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
"the length of a stored block does not match"); "the length of a stored block does not match");
DUMPBITS (16); DUMPBITS (16);
@ -805,7 +805,7 @@ init_fixed_block (grub_file_t file)
if (huft_build (l, 288, 257, cplens, cplext, &gzio->tl, &gzio->bl) != 0) if (huft_build (l, 288, 257, cplens, cplext, &gzio->tl, &gzio->bl) != 0)
{ {
if (grub_errno == GRUB_ERR_NONE) if (grub_errno == GRUB_ERR_NONE)
grub_error (GRUB_ERR_BAD_GZIP_DATA, grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
"failed in building a Huffman code table"); "failed in building a Huffman code table");
return; return;
} }
@ -817,7 +817,7 @@ init_fixed_block (grub_file_t file)
if (huft_build (l, 30, 0, cpdist, cpdext, &gzio->td, &gzio->bd) > 1) if (huft_build (l, 30, 0, cpdist, cpdext, &gzio->td, &gzio->bd) > 1)
{ {
if (grub_errno == GRUB_ERR_NONE) if (grub_errno == GRUB_ERR_NONE)
grub_error (GRUB_ERR_BAD_GZIP_DATA, grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
"failed in building a Huffman code table"); "failed in building a Huffman code table");
huft_free (gzio->tl); huft_free (gzio->tl);
gzio->tl = 0; gzio->tl = 0;
@ -864,7 +864,7 @@ init_dynamic_block (grub_file_t file)
DUMPBITS (4); DUMPBITS (4);
if (nl > 286 || nd > 30) if (nl > 286 || nd > 30)
{ {
grub_error (GRUB_ERR_BAD_GZIP_DATA, "too much data"); grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "too much data");
return; return;
} }
@ -882,7 +882,7 @@ init_dynamic_block (grub_file_t file)
gzio->bl = 7; gzio->bl = 7;
if (huft_build (ll, 19, 19, NULL, NULL, &gzio->tl, &gzio->bl) != 0) if (huft_build (ll, 19, 19, NULL, NULL, &gzio->tl, &gzio->bl) != 0)
{ {
grub_error (GRUB_ERR_BAD_GZIP_DATA, grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
"failed in building a Huffman code table"); "failed in building a Huffman code table");
return; return;
} }
@ -906,7 +906,7 @@ init_dynamic_block (grub_file_t file)
DUMPBITS (2); DUMPBITS (2);
if ((unsigned) i + j > n) if ((unsigned) i + j > n)
{ {
grub_error (GRUB_ERR_BAD_GZIP_DATA, "too many codes found"); grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "too many codes found");
return; return;
} }
while (j--) while (j--)
@ -919,7 +919,7 @@ init_dynamic_block (grub_file_t file)
DUMPBITS (3); DUMPBITS (3);
if ((unsigned) i + j > n) if ((unsigned) i + j > n)
{ {
grub_error (GRUB_ERR_BAD_GZIP_DATA, "too many codes found"); grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "too many codes found");
return; return;
} }
while (j--) while (j--)
@ -934,7 +934,7 @@ init_dynamic_block (grub_file_t file)
DUMPBITS (7); DUMPBITS (7);
if ((unsigned) i + j > n) if ((unsigned) i + j > n)
{ {
grub_error (GRUB_ERR_BAD_GZIP_DATA, "too many codes found"); grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "too many codes found");
return; return;
} }
while (j--) while (j--)
@ -956,7 +956,7 @@ init_dynamic_block (grub_file_t file)
gzio->bl = lbits; gzio->bl = lbits;
if (huft_build (ll, nl, 257, cplens, cplext, &gzio->tl, &gzio->bl) != 0) if (huft_build (ll, nl, 257, cplens, cplext, &gzio->tl, &gzio->bl) != 0)
{ {
grub_error (GRUB_ERR_BAD_GZIP_DATA, grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
"failed in building a Huffman code table"); "failed in building a Huffman code table");
return; return;
} }
@ -965,7 +965,7 @@ init_dynamic_block (grub_file_t file)
{ {
huft_free (gzio->tl); huft_free (gzio->tl);
gzio->tl = 0; gzio->tl = 0;
grub_error (GRUB_ERR_BAD_GZIP_DATA, grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
"failed in building a Huffman code table"); "failed in building a Huffman code table");
return; return;
} }
@ -1041,7 +1041,7 @@ inflate_window (grub_file_t file)
} }
if (gzio->block_type > INFLATE_DYNAMIC) if (gzio->block_type > INFLATE_DYNAMIC)
grub_error (GRUB_ERR_BAD_GZIP_DATA, grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
"unknown block type %d", gzio->block_type); "unknown block type %d", gzio->block_type);
if (grub_errno != GRUB_ERR_NONE) if (grub_errno != GRUB_ERR_NONE)

View file

@ -50,7 +50,7 @@ typedef enum
GRUB_ERR_BAD_FONT, GRUB_ERR_BAD_FONT,
GRUB_ERR_NOT_IMPLEMENTED_YET, GRUB_ERR_NOT_IMPLEMENTED_YET,
GRUB_ERR_SYMLINK_LOOP, GRUB_ERR_SYMLINK_LOOP,
GRUB_ERR_BAD_GZIP_DATA, GRUB_ERR_BAD_COMPRESSED_DATA,
GRUB_ERR_MENU, GRUB_ERR_MENU,
GRUB_ERR_TIMEOUT, GRUB_ERR_TIMEOUT,
GRUB_ERR_IO, GRUB_ERR_IO,