Commit graph

2675 commits

Author SHA1 Message Date
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
fa9b3dcae2 * grub-core/kern/efi/efi.c (grub_efi_get_filename): Avoid inefficient
realloc.
2013-11-01 16:06:51 +01:00
Vladimir Serbinenko
80e8b13ac4 * grub-core/kern/dl.c: Unify section-finding algorithm. Saves 30 bytes
on core size.
2013-11-01 15:20:14 +01:00
Vladimir Serbinenko
b61599aca4 * grub-core/kern/mm.c (grub_realloc): Don't copy more data than we have. 2013-11-01 14:39:33 +01:00
Vladimir Serbinenko
a602dc5425 * grub-core/io/gzio.c (huft_build): Use zalloc for safety.
(initialize_tables): reset tl and td to NULL after freeing.
2013-10-30 11:58:00 +01:00
Vladimir Serbinenko
93c120754a * grub-core/loader/multiboot_mbi2.c: Implement network tag. 2013-10-28 15:53:39 +01:00
Vladimir Serbinenko
1ca4b75ec2 * grub-core/loader/multiboot_mbi2.c: Add EFI memory map to the list
of supported tags.
2013-10-28 15:40:34 +01:00
Vladimir Serbinenko
329550c4a9 * grub-core/loader/multiboot_mbi2.c: Implement EFI memory map. 2013-10-28 15:37:00 +01:00
Vladimir Serbinenko
00bfa988fc * grub-core/loader/multiboot.c: Add support for multiboot kernels
quirks.
2013-10-28 15:23:46 +01:00
Vladimir Serbinenko
81afc5cce6 * grub-core/loader/i386/linux.c (allocate_pages): Allocate at least
a page in protected space.
2013-10-28 14:30:29 +01:00
Vladimir Serbinenko
cb3c4a4722 * grub-core/loader/multiboot.c (grub_cmd_module): Don't attempt to
allocate space for zero-sized modules.
2013-10-28 14:27:19 +01:00
Vladimir Serbinenko
954f7bf5ec * grub-core/loader/xnu_resume.c (grub_xnu_resume): Reject empty images. 2013-10-28 14:25:22 +01:00
Francesco Lavra
526d3d25e2 * grub-core/lib/fdt.c: Fix miscellaneous bugs. 2013-10-28 13:52:32 +01:00
Vladimir Serbinenko
74124c344c * grub-core/lib/progress.c (grub_file_progress_hook_real): Add missing
safeguards. Fixes a crash with i386/pc/console.c.
2013-10-28 13:37:40 +01:00
Vladimir Serbinenko
5177391ebe * include/grub/emu/hostdisk.h: Add proper declaration for grub_host_init
and grub_hostfs_init.
2013-10-28 13:33:12 +01:00
Vladimir Serbinenko
64db14b0cb * grub-core/kern/emu/hostdisk.c (grub_util_check_file_presence): Use
windows method on other platforms without good stat as well.
2013-10-28 02:17:56 +01:00
Vladimir Serbinenko
effe203677 * grub-core/osdep/linux/getroot.c: Add new btrfs defines. 2013-10-28 01:45:06 +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
Andrey Borzenkov
e11cb7268e Add grub-core/kern/disk_common.c to extra_dist 2013-10-27 22:55:11 +04:00
Vladimir Serbinenko
c430e00b80 * grub-core/net/tftp.c: Retransmit ack when rereceiving old packet.
Try to handle more than 0xFFFF packets.
	Reported by: Bernhard Übelacker <bernhardu>.
	He also spotted few overflows in first version of this patch.
2013-10-27 19:15:57 +01:00
Vladimir Serbinenko
cf8d6bbd9e * grub-core/net/tftp.c: Retransmit ack when rereceiving old packet.
Try to handle more than 0xFFFF packets.
2013-10-27 19:15:37 +01:00
Vladimir Serbinenko
8b46b0ea36 * grub-core/loader/i386/bsd.c (grub_cmd_openbsd): Accept "sd", "cd",
"vnd", "rd" and "fd" disks.
2013-10-27 18:59:27 +01:00
Vladimir Serbinenko
442b86de32 Move grub_disk_write out of kernel into disk.mod. 2013-10-27 15:44:55 +01:00
Vladimir Serbinenko
04dea7e6c2 * grub-core/kern/misc.c (grub_vsnprintf_real): Unify int and wchar
handling.
2013-10-27 14:47:04 +01:00
Vladimir Serbinenko
a8f15bceea * grub-core/kern/misc.c (grub_abort): Make static 2013-10-27 14:13:39 +01:00
Vladimir Serbinenko
a60dae7e4e * grub-core/kern/misc.c (grub_vsnprintf_real): Don't attempt to
transform invalid unicode codepoints.
2013-10-27 13:34:46 +01:00
Vladimir Serbinenko
891b713be3 * grub-core/kern/misc.c (grub_vsnprintf_real): Remove needless explicit
\0 checking.
2013-10-27 13:20:50 +01:00
Vladimir Serbinenko
03dcac7f76 * grub-core/lib/legacy_parse.c: Add support for "nd" disk. 2013-10-27 02:50:31 +02:00
Vladimir Serbinenko
c81acb7ff3 Consolidate cpuid code. 2013-10-27 00:02:01 +02:00
Vladimir Serbinenko
c1bee64676 Move cpuid code to cpuid.h and TSC code to tsc.c. 2013-10-26 23:39:10 +02: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
10bafa1c38 * grub-core/normal/datetime.c (grub_unixtime2datetime): Fix mishandling
of first three years after start of validity of unixtime.
2013-10-26 02:47:40 +02:00
Vladimir Serbinenko
b1c6d03760 * grub-core/normal/menu_entry.c (get_logical_num_lines): Use unsigned
division as the one making more sense.
	(update_screen): Likewise.
	(complete): Likewise.
2013-10-26 01:01:06 +02:00
Vladimir Serbinenko
5f4028d4a5 * grub-core/normal/menu_entry.c (complete): Make sure that width is >0. 2013-10-26 00:07:59 +02:00
Vladimir Serbinenko
a28567364a Make char and string width grub_size_t rather than grub_ssize_t. 2013-10-25 23:58:24 +02:00
Vladimir Serbinenko
0a7e52b2ed * grub-core/normal/cmdline.c (grub_history_get): Make argument into
unsigned.
	(grub_history_replace): Likewise.
2013-10-25 22:58:19 +02:00
Vladimir Serbinenko
428295739e * grub-core/disk/raid6_recover.c: Use unsigned arithmetics when
appropriate.
2013-10-25 22:51:03 +02:00
Vladimir Serbinenko
3523b8d8a7 * grub-core/video/bitmap_scale.c: Use unsigned arithmetics when
appropriate.
2013-10-25 21:39:00 +02:00
Vladimir Serbinenko
d43c64899d * grub-core/video/fb/fbblit.c: Use (255 ^ x) rather than (255 - x).
Use unsigned divisions rather than signed variants.
2013-10-25 21:35:44 +02:00
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