Commit graph

27 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
bd67ad0f70 merge mainline into net 2011-12-15 20:51:35 +01:00
Vladimir 'phcoder' Serbinenko
d1e293bbfa * grub-core/io/lzopio.c (test_header): Fix incorrect memcmp instead of
grub_memcmp usage.
2011-10-23 22:55:32 +02:00
Vladimir 'phcoder' Serbinenko
bd40efbf0b several net bugfixes and improvements and fix some memory leaks 2011-10-13 18:31:53 +02:00
Szymon Janc
bc4d3f4809 * grub-core/io/lzopio.c (calculate_uncompressed_size): Fix return code. 2011-10-04 21:10:21 +02:00
Szymon Janc
0e2b7e39f2 * grub-core/fs/btrfs.c: Include <minilzo.h> instead of "minilzo.h".
* grub-core/io/lzopio.c: Likewise.
2011-10-03 22:25:06 +02:00
Szymon Janc
c5ed9266fc * grub-core/io/lzopio.c: Improve crypt context alignment. 2011-10-03 22:06:10 +02:00
Szymon Janc
9c4f9ca010 * grub-core/io/lzopio.c (test_header): Some cleanups. 2011-09-06 21:21:13 +02:00
Szymon Janc
90b0a05579 Various bug fixes and improvements in lzopio. Should properly handle more
files now. Also added support for lzop checksums verification.
2011-08-21 18:48:19 +02:00
Szymon Janc
b3e9c48799 merge trunk 2011-08-20 12:02:35 +02:00
Szymon Janc
a5219af189 * grub-core/io/gzio.c (grub_gzio_open): Always return original io if
file type was not recognized correctly (not gzip or corrupted).
2011-08-20 11:48:46 +02:00
Szymon Janc
d6beefcfc9 Add initial support for lzop files decompression.
* grub-core/Makefile.core.def (lzopio): New module.
* grub-core/io/lzopio.c: New file.
* include/grub/file.h (grub_file_filter_id): New compression filter
GRUB_FILE_FILTER_LZOPIO.
2011-08-17 19:40:25 +02:00
Szymon Janc
40ea05dee4 * grub-core/io/xzio.c: Fix code style issues 2011-06-24 22:37:17 +02:00
Vladimir 'phcoder' Serbinenko
bf947d36e3 Use full 64-bit division.
* grub-core/kern/misc.c (grub_divmod64_full): Renamed to ...
	(grub_divmod64): ... this.
	* include/grub/misc.h (grub_divmod64): Removed. All users switch to full
	version.
2011-05-18 15:35:19 +02:00
Vladimir 'phcoder' Serbinenko
d4680a3556 Squashfs v4 support.
* Makefile.util.def (libgrubmods.a): Add squash4.
	* grub-core/Makefile.core.def (squash4): New module.
	* grub-core/fs/squash4.c: New file.
	* grub-core/io/gzio.c (grub_gzio): New members disk_input_off,
	disk_input_start, disk_input.
	(get_byte): Handle disk_input.
	(grub_zlib_disk_read): New function.
	* include/grub/deflate.h (grub_zlib_disk_read): New proto.
2011-05-15 11:58:22 +02:00
Vladimir 'phcoder' Serbinenko
fe6b2cbaa6 BtrFS support. Written by me (Vladimir) with important bugfixes and
even more important testing by Colin.

	* Makefile.util.def (libgrubmods.a): Add crc.c and gzio.c
	* grub-core/Makefile.core.def (btrfs): Add crc.c.
	* grub-core/fs/btrfs.c: Stub replaced with real implementation.
	* grub-core/io/gzio.c (grub_gzio): New fields mem_input_size,
	mem_input_off and mem_input. All users updated to accept in-RAM input.
	(gzio_seek): New function.
	(test_zlib_header): Likewise.
	(grub_gzio_read): Likewise.
	(grub_zlib_decompress): Likewise.
	* grub-core/kern/emu/getroot.c (grub_find_root_device_from_mountinfo):
	Accept partial and non-virtual mounts.
	(grub_guess_root_device): Do rescanning after device_from_mountinfo to
	avoid receiving /dev/dm-X as device.
	* grub-core/kern/emu/misc.c (grub_make_system_path_relative_to_its_root):
	Handle bind and partial mounts.
	* grub-core/lib/crc.c: New file.
	* include/grub/deflate.h: Likewise.
	* include/grub/emu/misc.h (grub_find_root_device_from_mountinfo): New
	proto.
	* include/grub/lib/crc.h: New file.
2011-04-11 23:26:41 +02:00
Vladimir 'phcoder' Serbinenko
e745cf0ca6 Implement automatic module license checking according to new GNU
guidelines.

	* grub-core/kern/dl.c (grub_dl_check_license): New function.
	(grub_dl_load_core): Use grub_dl_check_license.
	* include/grub/dl.h (GRUB_MOD_SECTION): New macro.
	(GRUB_MOD_LICENSE): Likewise.
	(GRUB_MOD_DUAL_LICENSE): Likewise.
	All modules updated.
2011-04-11 23:01:51 +02:00
Colin Watson
28f9509eb7 merge trunk 2011-02-17 14:51:11 +00:00
Colin Watson
7e735e4349 * include/grub/file.h (not_easly_seekable): Rename to ...
(not_easily_seekable): ... this.  Update all users.
2011-02-08 13:21:13 +00:00
Colin Watson
944404efb8 merge trunk 2011-01-04 15:41:07 +00:00
Vladimir 'phcoder' Serbinenko
0b2db94300 Handling of files of unknown size is currently limited. They can't be
used e.g. for initrd or modules. Moreover gzip handling of not
	easily seekable files is buggy. Disable unknown file size for now. May
	be inefficient but works.

	* grub-core/io/gzio.c (test_header): Always retrieve the file size.
	* grub-core/io/xzio.c (grub_xzio_open): Likewise.
2010-12-26 21:15:31 +01:00
Vladimir 'phcoder' Serbinenko
8eef1f8244 Compressed fragments and compressed data support 2010-12-09 20:41:41 +01:00
Vladimir 'phcoder' Serbinenko
3be8e5ea96 BtrFS zlib compression support 2010-12-03 21:42:13 +01:00
Szymon Janc
f0aff67c47 * grub-core/Makefile.core.def (xzio): New module.
* grub-core/io/xzio.c: New file.
	* grub-core/lib/xzembed/xz.h: New file (from xembed).
	* grub-core/lib/xzembed/xz_config.h: Likewise.
	* grub-core/lib/xzembed/xz_dec_bcj.c: Likewise.
	* grub-core/lib/xzembed/xz_dec_lzma2.c: Likewise.
	* grub-core/lib/xzembed/xz_dec_stream.c: Likewise.
	* grub-core/lib/xzembed/xz_lzma2.h: Likewise.
	* grub-core/lib/xzembed/xz_private.h: Likewise.
	* grub-core/lib/xzembed/xz_stream.h: Likewise.
	* include/grub/file.h (grub_file_filter_id): New compression filter
	GRUB_FILE_FILTER_XZIO.
2010-09-05 17:12:13 +02:00
Vladimir 'phcoder' Serbinenko
3579415d20 * 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 16:55:49 +02:00
Vladimir 'phcoder' Serbinenko
fc2ef1172c * grub-core/io/gzio.c (grub_gzio_open): Removed "transparent" parameter.
Made static.
	(grub_gzfile_open): Removed. All users updated.
	(GRUB_MOD_INIT): New function.
	(GRUB_MOD_FINI): Likewise.
	* grub-core/kern/file.c (grub_file_filters_all): New variable.
	(grub_file_filters_enabled): Likewise.
	(grub_file_open): Handle filters.
	* grub-core/loader/i386/bsd.c (GRUB_MOD_INIT): Load gzio.
	* grub-core/normal/main.c (GRUB_MOD_INIT): Likewise.
	* include/grub/file.h (grub_file_filter_id_t): New type.
	(grub_file_filter_t): Likewise.
	(grub_file_filters_all): New extern variable.
	(grub_file_filters_enabled): Likewise.
	(grub_file_filter_register): New inline function.
	(grub_file_filter_unregister): Likewise.
	(grub_file_filter_disable): Likewise.
	(grub_file_filter_disable_compression): Likewise.
	* include/grub/gzio.h: Removed.
2010-09-05 13:05:36 +02:00
Szymon Janc
3759a35f75 * include/grub/file.h (grub_file): New member not_easly_seekable.
(grub_file_seekable): New inline function.
	* grub-core/io/gzio.c (test_header): Don't test end magic if file isn't
	easily seekable.
	(grub_gzio_open): Set not_easly_seekable.
	* grub-core/fs/i386/pc/pxe.c (grub_pxefs_open): Set not_easily_seekable.
	* grub-core/io/bufio.c (grub_bufio_open): Propagate not_easily_seekable.
2010-09-04 18:28:42 +02:00
BVK Chaitanya
8c41176882 automake commit without merge history 2010-05-06 11:34:04 +05:30