unlzma: add "lzma -d" alias, add -t support, rename lzmacat->lzcat

Also coalesce some common strings

   text    data     bss     dec     hex filename
 844110     453    6812  851375   cfdaf busybox_old
 844061     453    6812  851326   cfd7e busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2010-05-27 02:22:54 +02:00
parent c5f30c0df8
commit ccb88a689e
6 changed files with 59 additions and 36 deletions

View File

@@ -738,12 +738,12 @@ static NOINLINE smallint lzo_decompress(const header_t *h)
bb_error_msg_and_die("this file is a split lzop file");
if (dst_len > MAX_BLOCK_SIZE)
bb_error_msg_and_die("lzop file corrupted");
bb_error_msg_and_die("corrupted data");
/* read compressed block size */
src_len = read32();
if (src_len <= 0 || src_len > dst_len)
bb_error_msg_and_die("lzop file corrupted");
bb_error_msg_and_die("corrupted data");
if (dst_len > block_size) {
if (b2) {
@@ -797,7 +797,7 @@ static NOINLINE smallint lzo_decompress(const header_t *h)
r = lzo1x_decompress_safe(b1, src_len, b2, &d, NULL);
if (r != 0 /*LZO_E_OK*/ || dst_len != d) {
bb_error_msg_and_die("corrupted compressed data");
bb_error_msg_and_die("corrupted data");
}
dst = b2;
} else {