c029da8a89
* Makefile.util.def (libgrubmods.a): Add xzembed directory to cppflags. Add xzembed source files. * grub-core/Makefile.core.def (squash4): Add xzembed and minilzo flags. * grub-core/fs/squash4.c (grub_squash_super): New field compression. (grub_squash_inode): New subtype long_dir. (SQUASH_TYPE_LONG_DIR): New inode type. (COMPRESSION): New enum. (XZBUFSIZ): New const. (grub_squash_data): New fields blksz, decompress, xzdec, xzbuf. (read_chunk): Use data->decompress. (zlib_decompress): New function. (lzo_decompress): Likewise. (xz_decompress): Likewise. (squash_mount): Set new data fields. (grub_squash_iterate_dir): Handle long dir. (squash_unmount): Free xzdec and xzbuf. (grub_squash_open): Check ino type. (direct_read): Stylistic fixes. Use data->decompress. (grub_squash_read_data): Likewise. * grub-core/io/gzio.c (grub_gzio): Remove disk_input. (get_byte): Likewise. (grub_zlib_disk_read): Removed. * grub-core/lib/posix_wrap/sys/types.h (ssize_t): New type. (GRUB_POSIX_BOOL_DEFINED): New define. * grub-core/lib/posix_wrap/unistd.h: Include sys/types.h. * grub-core/lib/xzembed/xz.h: Addmissing includes. [!GRUB_POSIX_BOOL_DEFINED]: Define bool. * include/grub/deflate.h (grub_zlib_disk_read): Removed.
26 lines
931 B
C
26 lines
931 B
C
/*
|
|
* GRUB -- GRand Unified Bootloader
|
|
* Copyright (C) 2010 Free Software Foundation, Inc.
|
|
*
|
|
* GRUB is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* GRUB is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef GRUB_DEFLATE_HEADER
|
|
#define GRUB_DEFLATE_HEADER 1
|
|
|
|
grub_ssize_t
|
|
grub_zlib_decompress (char *inbuf, grub_size_t insize, grub_off_t off,
|
|
char *outbuf, grub_size_t outsize);
|
|
|
|
#endif
|