Commit graph

506 commits

Author SHA1 Message Date
Vladimir Serbinenko
bed78ef4e6 Revert "Attempts at ZFS options"
It was accidently committed to wrong branch

This reverts commit 0ee5cdfe9f.
2013-11-03 16:52:33 +01:00
Vladimir Serbinenko
0ee5cdfe9f Attempts at ZFS options 2013-11-03 16:40:32 +01:00
Vladimir Serbinenko
1397f0b520 * grub-core/fs/fshelp.c (find_file): Save ctx->next when calling
find_file recursively for symlink.
2013-11-02 20:29:02 +01:00
Vladimir Serbinenko
f169f65e75 * grub-core/fs/hfspluscomp.c (hfsplus_read_compressed_real): Call
file_progress_read_hook.
	* grub-core/fs/ntfscomp.c (hfsplus_read_compressed_real): Likewise.
2013-11-02 16:30:53 +01:00
Vladimir Serbinenko
bf0f3a8c3e * grub-core/fs/tar.c (grub_cpio_read): Add read_hook. 2013-11-01 23:33:59 +01:00
Vladimir Serbinenko
cb72aa1809 Rewrite blocklist functions in order to get progress when
reading large extents and decrease amount of blocklist hook calls.
2013-11-01 23:28:03 +01:00
Vladimir Serbinenko
eb03ede014 * grub-core/fs/ext2.c (grub_ext2_read_symlink): Use memcpy rather
strncpy.
	* grub-core/fs/jfs.c (grub_jfs_lookup_symlink): Likewise.
	* grub-core/kern/misc.c (grub_strncpy): Move from here ...
	* include/grub/misc.h (grub_strncpy): ... to here. Make inline.
	* grub-core/net/net.c (grub_net_addr_to_str): Use COMPILE_TIME_ASSERT
	+ strcpy rather than strncpy.
2013-11-01 18:44:46 +01:00
Vladimir Serbinenko
8fbe5c7df7 * grub-core/fs/zfs/zfs.c (nvpair_name): Use correct type for size.
(check_pool_label): Likewise. Fixes overflow.
	(nvlist_find_value): Fix comparison.
2013-11-01 18:41:52 +01:00
Vladimir Serbinenko
e54b8f536b * include/grub/misc.h (grub_strcat): Removed. All users changed to
more appropriate functions.
2013-11-01 16:27:37 +01:00
Vladimir Serbinenko
82591fa6e7 Make / in btrfs refer to real root, not the default volume.
Modify mkrelpath to work even if device is mounted with subvolid option.
2013-10-28 01:37:19 +01:00
Vladimir Serbinenko
2a8a75855c * grub-core/fs/iso9660.c: Replace strncat with memcpy.
* include/grub/misc.h: Remove strncat.
	* grub-core/lib/posix_wrap/string.h: Likewise.
2013-10-26 12:49:51 +02:00
Vladimir Serbinenko
fb56391ee3 * grub-core/fs/zfs/zfs.c (xor_out): Use unsigned modular arithmetics
rather than signed one.
	(recovery): Likewise.
2013-10-25 20:31:04 +02:00
Vladimir Serbinenko
6673d8e7b6 * grub-core/fs/ext2.c (EXT2_BLOCK_SIZE): Make unsigned. 2013-10-25 18:03:36 +02:00
Paulo Flabiano Smorigo
84a0e9699f Add progress module to display load progress of files.
* grub-core/lib/progress.c: New file.
	* grub-core/Makefile.core.def (progress): New module.
	* grub-core/kern/file.c (grub_file_open): File name added.
	* (grub_file_read): Progress hook added.
	* grub-core/fs/cbfs.c (grub_cbfs_read): Likewise.
	* grub-core/fs/cpio_common.c (grub_cpio_read): Likewise.
	* grub-core/net/net.c (grub_net_fs_read_real): Likewise.
	* include/grub/file.h (struct grub_file): Add progress module
	* members.
	* include/grub/term.h (struct grub_term_output): Likewise.
	* grub-core/osdep/unix/emuconsole.c (grub_console_term_output):
	Terminal velocity added.
	* grub-core/osdep/windows/emuconsole.c (grub_console_term_output):
	* Likewise.
	* grub-core/term/arc/console.c (grub_console_term_output): Likewise.
	* grub-core/term/efi/console.c (grub_console_term_output): Likewise.
	* grub-core/term/gfxterm.c (grub_video_term): Likewise.
	* grub-core/term/i386/coreboot/cbmemc.c (grub_cbmemc_term_output):
	* Likewise.
	* grub-core/term/i386/pc/console.c (grub_console_term_output):
	* Likewise.
	* grub-core/term/i386/pc/vga_text.c (grub_vga_text_term): Likewise.
	* grub-core/term/ieee1275/console.c (grub_console_term_output):
	* Likewise.
	* grub-core/term/morse.c (grub_audio_term_output): Likewise.
	* grub-core/term/serial.c (grub_serial_term_output): Likewise.
	* grub-core/term/spkmodem.c (grub_spkmodem_term_output): Likewise.
	* grub-core/term/uboot/console.c (uboot_console_term_output):
	* Likewise.
2013-10-22 16:42:20 -02:00
Vladimir 'phcoder' Serbinenko
067e6ae74d * grub-core/fs/ntfs.c (grub_ntfs_mount): Remove redundant check.
Saves 5 bytes on compressed image.
2013-10-21 13:14:38 +02:00
Vladimir 'phcoder' Serbinenko
64a6c791e1 * grub-core/fs/ntfs.c: Move common UTF-16 handling to a separate
function get_utf8.

	Saves 379 bytes on compressed image.
2013-10-21 13:04:41 +02:00
Vladimir 'phcoder' Serbinenko
979d9f521d * grub-core/fs/ntfs.c: Handle 48-bit MFT no. 2013-10-21 12:58:38 +02:00
Vladimir 'phcoder' Serbinenko
1437da5440 * grub-core/fs/ntfs.c (read_run_data): Rewrite using bitfields.
Saves 40 bytes on compressed image.
2013-10-21 04:05:23 +02:00
Vladimir 'phcoder' Serbinenko
d9ee2269c8 * grub-core/fs/ntfs.c (grub_ntfs_iterate_dir): Use grub_uint8_t for
mask rather than 64-bit type.

	Saves 20 bytes on compressed image.
2013-10-21 03:23:57 +02:00
Vladimir 'phcoder' Serbinenko
63efa602ff * grub-core/fs/ntfs.c (read_data): Move code for compressed data to ...
* grub-core/fs/ntfscomp.c (ntfscomp): ... here.
2013-10-21 02:48:19 +02:00
Vladimir 'phcoder' Serbinenko
2a40badf82 * grub-core/fs/ufs.c: Remove variable length arrays. 2013-10-20 23:07:50 +02:00
Vladimir 'phcoder' Serbinenko
1ba6b9b96f * grub-core/fs/ntfs.c: Add comment about fixed allocation size. 2013-10-20 18:48:06 +02:00
Vladimir 'phcoder' Serbinenko
f3e393411b * grub-core/fs/zfs.c: Remove variable length arrays.
Reduces zfs.mod by 160 bytes (208 compressed).
2013-10-20 18:42:40 +02:00
Vladimir 'phcoder' Serbinenko
7152393503 * grub-core/fs/zfs/zfs.c (check_pool_label): Fix memory leak. 2013-10-20 17:57:28 +02:00
Vladimir 'phcoder' Serbinenko
88ce4cd7f6 * grub-core/fs/ntfs.c: Remove variable length arrays.
Increases ntfs.mod by 64 bytes (but decreases by 3 when
	compressed).
2013-10-20 17:35:17 +02:00
Vladimir 'phcoder' Serbinenko
66123940c7 * grub-core/fs/hfs.c: Remove variable length arrays.
Reduces hfs.mod by 8 bytes (52 compressed).
2013-10-20 17:24:19 +02:00
Vladimir 'phcoder' Serbinenko
0927e5bdc8 * grub-core/fs/udf.c: Remove variable length arrays.
Increases udf.mod by 128 bytes (but decreases by 13 compressed when
	compressed).
2013-10-20 16:33:12 +02:00
Vladimir 'phcoder' Serbinenko
9c12ac9773 * grub-core/fs/iso9660.c: Remove variable length arrays.
Increases iso9660.mod by 200 bytes (but decreases by 79 compressed when
	compressed).
2013-10-20 16:21:02 +02:00
Vladimir 'phcoder' Serbinenko
97ec2d71d0 * grub-core/fs/nilfs2.c: Remove variable length arrays.
Increases xfs.mod by 24 bytes (but decreases by 115 compressed when
	compressed).
2013-10-20 16:17:41 +02:00
Vladimir 'phcoder' Serbinenko
156e4ea071 * grub-core/fs/xfs.c: Remove variable length arrays.
Reduces xfs.mod by 40 bytes (43 compressed).
2013-10-20 15:52:27 +02:00
Vladimir 'phcoder' Serbinenko
3b502c29a1 * grub-core/fs/fshelp.c: Remove variable length arrays.
Reduces fshelp.mod by 116 bytes (23 compressed).
2013-10-20 15:38:37 +02:00
Vladimir 'phcoder' Serbinenko
a07e6ad010 * grub-core/fs/minix.c: Remove variable length arrays. Reduces jfs.mod
by 356 bytes (158 compressed).
2013-10-20 13:26:37 +02:00
Vladimir 'phcoder' Serbinenko
2359bf887c * grub-core/fs/jfs.c: Remove variable length arrays. Reduces jfs.mod
by 364 bytes (169 compressed).
2013-10-20 13:20:12 +02:00
Vladimir 'phcoder' Serbinenko
d28e1163c3 * grub-core/fs/bfs.c: Remove variable length arrays. Reduces afs.mod and
bfs.mod size by 556 resp 740 bytes (288 resp 334 compressed).
	* include/grub/types.h (grub_unaligned_uint64_t): New type.
2013-10-20 13:11:40 +02:00
Vladimir 'phcoder' Serbinenko
97dfe7e46b * grub-core/fs/zfs/zfs_lz4.c: Check that __INTEL_COMPILER is
defined before trying to use it.
2013-10-18 16:49:17 +02:00
Vladimir 'phcoder' Serbinenko
bf919aa977 * grub-core/fs/affs.c (grub_affs_create_node): Fix uninited value
warning.
2013-10-18 16:47:30 +02:00
Vladimir 'phcoder' Serbinenko
5a869940de Split out blocklist retrieving from setup.c to
grub-core/osdep/blocklist.c and add windows implementation since
	generic version doesn't work on NTFS on Windows due to aggressive
	unflushable cache.
2013-10-15 17:02:26 +02:00
Vladimir 'phcoder' Serbinenko
60d4f0bb45 * grub-core/fs/fat.c: Fix handling of exfat contiguous files. 2013-10-11 16:13:52 +02:00
Vladimir 'phcoder' Serbinenko
c4cf25eef7 * grub-core/fs/zfs/zfs_lz4.c: Switch from ad-hoc endiannes and width
macros to GRUB ones.
2013-10-08 16:55:39 +02:00
Vladimir 'phcoder' Serbinenko
b726be7653 * grub-core/fs/ufs.c (grub_ufs_get_file_block): Give GRUB_ERR_BAD_FS
for quadruple indirect rather than GRUB_ERR_NOT_IMPLEMENTED_YET as
	it's FS and not GRUB limitation.
2013-10-07 20:07:19 +02:00
Massimo Maggi
890bdabe96 * grub-core/fs/zfs/zfs.c (check_pool_label): Check nvlist. 2013-09-23 18:50:07 +02:00
Vladimir 'phcoder' Serbinenko
bdb5ba47d8 * include/grub/zfs/spa.h (zio_cksum): Add explicit members for mac.
* grub-core/fs/zfs/zfs.c (zio_read): Don't use casts to retrieve mac.
2013-08-22 16:20:32 +02:00
Vladimir 'phcoder' Serbinenko
459b1d9171 * grub-core/fs/zfs/zfs.c (check_feature): Cleanup and remove
inappropriate printf.
2013-08-02 22:45:41 +02:00
Vladimir 'phcoder' Serbinenko
286fe4b379 * grub-core/fs/zfs/zfs.c: Stylistic fixes. 2013-07-14 22:48:23 +02:00
Vladimir 'phcoder' Serbinenko
1bd57aa343 * grub-core/fs/zfs/zfs.c: Run emacs indent on file. 2013-07-14 22:45:51 +02:00
Vladimir 'phcoder' Serbinenko
b2182299a7 * grub-core/fs/zfs/zfs.c: Remove brackets around return value. 2013-07-14 22:33:39 +02:00
Vladimir 'phcoder' Serbinenko
795b3dc094 * grub-core/fs/zfs/zfs_lz4.c: Add missing packed attribute. 2013-07-14 16:29:33 +02:00
Vladimir 'phcoder' Serbinenko
68714c4392 * grub-core/fs/zfs/zfs.c (nvlist_next_nvpair): Fix improper cast. 2013-07-14 16:24:18 +02:00
Vladimir 'phcoder' Serbinenko
af211babd8 * grub-core/fs/zfs/zfs_lz4.c: Remove restrict keyword. 2013-07-14 16:05:14 +02:00
Massimo Maggi
0036f02d7b * grub-core/fs/zfs/zfs.c (nvlist_next_nvpair): Error is encode_size
<= 0.
2013-07-14 14:22:02 +02:00