Commit graph

2636 commits

Author SHA1 Message Date
Vladimir Serbinenko
f690f8b030 * grub-core/video/readers/png.c (grub_png_convert_image): Use
unsigned arithmetics.
	Add missing break.
2013-10-25 20:36:39 +02:00
Vladimir Serbinenko
74ff2c0501 * grub-core/video/readers/jpeg.c: Use unsigned where appropriate. 2013-10-25 20:35:02 +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
40f290606d * grub-core/net/dns.c (hash): Use unsigned arithmetic. 2013-10-25 20:26:27 +02:00
Vladimir Serbinenko
c64577a554 * grub-core/io/gzio.c (test_zlib_header): Use undigned modulo rather
than signed.
2013-10-25 20:18:30 +02:00
Vladimir Serbinenko
6673d8e7b6 * grub-core/fs/ext2.c (EXT2_BLOCK_SIZE): Make unsigned. 2013-10-25 18:03:36 +02:00
Vladimir Serbinenko
a105d3755b * grub-core/commands/gptsync.c (lba_to_chs): Use proper types rather
than int.
2013-10-25 18:02:40 +02:00
Vladimir Serbinenko
af81ed880d * conf/Makefile.common (CPPFLAGS_KERNEL): Add -DGRUB_KERNEL=1.
* include/grub/dl.h (GRUB_MOD_INIT), (GRUB_MOD_FINI): Define
	functions when compiling for kernel.
2013-10-25 16:07:01 +02:00
Vladimir Serbinenko
ea899a5760 * grub-core/lib/progress.c (grub_file_progress_hook_real): Cast to
unsigned long long when using %llu.
2013-10-25 15:22:30 +02:00
Vladimir Serbinenko
c6dc6fa175 * grub-core/lib/progress.c (grub_file_progress_hook_real): Refresh
terminal after updating progress.
2013-10-25 11:57:36 +02:00
Vladimir Serbinenko
ad2dc00309 * grub-core/boot/i386/pc/startup_raw.S (grub_gate_a20): Remove
argument. We don't disable Gate A20 in this code.
2013-10-25 11:03:39 +02:00
Vladimir Serbinenko
b46684ae53 * grub-core/boot/i386/qemu/boot.S: Ensure that A20 is enabled.
Conceptually based on change in branch "vbe-on-coreboot".
2013-10-25 10:51:58 +02:00
Robert Millan
f70d5c0701 * grub-core/video/i386/pc/vbe.c (grub_video_vbe_setup): Replace
numeric constants with their symbolic equivalent.
	Taken from branch "vbe-on-coreboot".
2013-10-24 08:53:04 +02:00
Vladimir Serbinenko
238f048987 * grub-core/lib/progress.c (grub_file_progress_hook_real): Use
divmod64 for offset division.
2013-10-23 17:34:49 +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
0d711431c7 Verify signatures of signatures unless --skip-sig is specified. 2013-10-22 00:24:19 +02:00
Vladimir 'phcoder' Serbinenko
f8401f760c * grub-core/kern/misc.c (grub_vsnprintf_real): Remove needless explicit
\0 checking.

	Saves 70 bytes on compressed image.
2013-10-21 14:02:24 +02:00
Vladimir 'phcoder' Serbinenko
ac1feb61d2 * grub-core/kern/misc.c (grub_strtoull): Remove needless *ptr != 0
check.

	Saves 10 bytes on compressed image.
2013-10-21 13:40:05 +02:00
Vladimir 'phcoder' Serbinenko
00f72e890b * grub-core/kern/misc.c (grub_isprint): Move to ...
* include/grub/misc.h (grub_isprint): ... here. Make inline.

	Saves 20 bytes on compressed image due to remving exporting.
2013-10-21 13:25:56 +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
2cc679adae * grub-core/kern/disk.c (grub_disk_write): Use malloc/free instead of
variable length arrays.

	Saves 50 bytes on compressed image.
2013-10-21 00:10:34 +02:00
Vladimir 'phcoder' Serbinenko
2e4659b810 * grub-core/loader/i386/bsd.c: Remove variable length arrays. 2013-10-20 23:45:43 +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
28153eb87a * grub-core/net/arp.c: Remove variable length arrays.
* grub-core/net/bootp.c: Likewise.
	* grub-core/net/dns.c: Likewise.
	* grub-core/net/icmp6.c: Likewise.
	* grub-core/net/net.c: Likewise.
2013-10-20 17:40:21 +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
c7037f1d0f * grub-core/normal/completion.c: Remove variable length arrays.
* grub-core/normal/menu_entry.c: Likewise.

	Reduces normal.mod by 496 bytes.
2013-10-20 13:55:35 +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
e89c2d48a9 Lift 255x255 erminal sie restriction to 65535x65535. Also change from
bitmasks to small structures of size chosen to fit in registers.
2013-10-19 23:59:32 +02:00
Vladimir 'phcoder' Serbinenko
518864c05b * grub-core/osdep/unix/exec.c: Fix compilation error on emu. 2013-10-19 23:53:48 +02:00
Vladimir 'phcoder' Serbinenko
bbd2b5396b * grub-core/kern/misc.c (grub_vsnprintf_real): Fix formatting of
"(null)" string.
	Simplify expressions to save around 256 bytes in kernel.img.
	* tests/printf_unit_test.c (printf_test): Add "(null)" tests.
2013-10-19 23:52:09 +02:00
Vladimir 'phcoder' Serbinenko
99519c154c * grub-core/tests/video_checksum.c (grub_video_capture_write_bmp):
Use GRUB_UTIL_FD_O_* rather than O_*.
2013-10-19 23:48:24 +02:00
Vladimir 'phcoder' Serbinenko
2028576504 Add haiku-specific functions. 2013-10-19 16:39:38 +02:00
Vladimir 'phcoder' Serbinenko
887c0bb61a * grub-core/kern/emu/hostdisk.c: Remove few leftover includes. 2013-10-19 16:32:28 +02:00
Vladimir 'phcoder' Serbinenko
cd78a56fb2 Move stat () and device mode checking into OS-dependent files as
long as performance doesn't suffer.
2013-10-19 16:29:20 +02:00