=== modified file 'io/xzio.c' --- io/xzio.c 2010-04-10 22:47:20 +0000 +++ io/xzio.c 2010-04-15 18:35:28 +0000 @@ -243,7 +243,7 @@ enum xz_ret xzret; grub_xzio_t xzio = file->data; int offset_lock; - grub_uint8_t current_offset; + grub_off_t current_offset; /* If seek backward need to reset decoder and start from beginning of file. TODO Possible improvement by jumping blocks. */ @@ -257,13 +257,13 @@ grub_file_seek (xzio->file, 0); } + offset_lock = (file->offset == xzio->saved_offset) ? 1 : 0; + current_offset = xzio->saved_offset; + while (len > 0) { xzio->buf.out_size = len >= XZBUFSIZ ? XZBUFSIZ : len; - offset_lock = (file->offset == xzio->saved_offset) ? 1 : 0; - current_offset = xzio->saved_offset; - /* Feed input. */ if (xzio->buf.in_pos == xzio->buf.in_size) { @@ -298,7 +298,7 @@ } else { - grub_uint8_t new_offset = current_offset + xzio->buf.out_pos; + grub_off_t new_offset = current_offset + xzio->buf.out_pos; if (file->offset > new_offset) current_offset = new_offset;