Commit graph

1810 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
e3282399ad * grub-core/kern/emu/hostdisk.c (read_device_map): Reject non-standard
disk names.
	* docs/grub.texi: Update device.map parts.
2012-05-01 15:02:34 +02:00
Vladimir 'phcoder' Serbinenko
ee618bd491 Don't scan into non-diskfilter devices having diskfilter names.
* grub-core/disk/diskfilter.c (is_valid_diskfilter_name): New function.
	(scan_disk): New argument accept_diskfilter. Fix recursion depth
	handling.
	(scan_disk_hook): New function.
2012-05-01 14:59:30 +02:00
Bean
bdf8886428 * grub-core/net/drivers/efi/efinet.c (get_card_packet): Fix buffer
allocation.
2012-04-29 18:43:22 +02:00
Vladimir 'phcoder' Serbinenko
bc95c8c0e1 * grub-core/term/ieee1275/console.c (grub_console_dimensions): Use 80x24
geometry on serial consoles.
2012-04-26 20:51:06 +02:00
Vladimir 'phcoder' Serbinenko
147fbcab72 * grub-core/term/terminfo.c (grub_terminfo_readkey): Increase timeout
because of network consoles.
2012-04-26 18:57:22 +02:00
Vladimir 'phcoder' Serbinenko
0f42c8898f * grub-core/term/terminfo.c (grub_terminfo_getkey): Fix incorrect queue
handling.
2012-04-26 18:55:39 +02:00
Vladimir 'phcoder' Serbinenko
4a3594c9b1 * grub-core/disk/diskfilter.c (read_segment): Fix the case when disknr
falls on Q syndrom.
2012-04-26 12:51:03 +02:00
Vladimir 'phcoder' Serbinenko
5cb5387977 * grub-core/fs/nilfs2.c (grub_nilfs2_palloc_entry_offset_log):
Fix argument to grub_nilfs2_palloc_bitmap_block_offset.
2012-04-26 12:49:35 +02:00
Vladimir 'phcoder' Serbinenko
b282dfe5ac * grub-core/fs/squash4.c (lzo_decompress): Set grub_errno on error.
Allocate at lest 8192 for temporary buffer as required for lzo.
2012-04-26 01:16:25 +02:00
Vladimir 'phcoder' Serbinenko
daa59f47f6 * grub-core/fs/fat.c (grub_fat_mount): Don't add logical_sector_bits
to cluster_bits, since it's already added in.
	(grub_fat_read_data): Likewise.
2012-04-25 16:28:06 +02:00
Vladimir 'phcoder' Serbinenko
986748ce79 * grub-core/fs/ntfs.c (grub_ntfs_mount): Support 256-byte sectors,
as long as cluster size is multiple of 512 bytes.
2012-04-25 11:56:24 +02:00
Vladimir 'phcoder' Serbinenko
385f9abbe3 * grub-core/kern/emu/hostdisk.c (map): Make static. 2012-04-23 17:14:48 +02:00
Samuel Thibault
524b5d3a7c Fix hurd build.
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_size) [__GNU__]: Do
not define nr variable.
2012-04-22 18:44:19 +02:00
Vladimir 'phcoder' Serbinenko
9a06490c07 Fix kfreebsd compile and behaviour.
* grub-core/kern/emu/hostdisk.c (grub_util_follow_gpart_up): Fix
	format-security.
	* util/getroot.c: Fix wait.h include.
	(grub_guess_root_devices): Error if grub_find_device fails.
	(grub_util_get_geom_abstraction): Fix shadowing and format-security.
	(grub_util_get_dev_abstraction): Likewise.
	(grub_util_pull_device): Likewise.
	(grub_util_get_grub_dev): Likewise.
	* util/lvm.c (grub_util_lvm_isvolume): Likewise.
2012-04-21 16:49:56 +02:00
Vladimir 'phcoder' Serbinenko
ebbd24f3eb * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_write): Fix opening
mode.
2012-04-19 20:35:06 +02:00
Vladimir 'phcoder' Serbinenko
9c815e0120 * grub-core/commands/search_wrap.c (grub_cmd_search): Handle old
--fs-uuid --set UUID syntax.
2012-04-19 11:32:59 +02:00
Vladimir 'phcoder' Serbinenko
59e2651a06 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_write): Fix message
disunification.
2012-04-18 23:48:52 +02:00
Bean
1501ac21b0 * grub-core/disk/ata.c (grub_ata_strncpy): Put terminating zero at right
place.
2012-04-18 23:21:38 +02:00
Vladimir 'phcoder' Serbinenko
cb7f944e44 * grub-core/kern/emu/hostdisk.c (open_device): New argument max. All
users updated.
	(grub_util_biosdisk_read): Handle Linux partitions not exactly
	corresponding to GRUB partitions.
	(grub_util_biosdisk_write): Likewise.
2012-04-18 23:18:51 +02:00
Vladimir 'phcoder' Serbinenko
b72d44a11a Scan mdraid before LVM.
* include/grub/diskfilter.h (grub_diskfilter_register): Renamed to ..
	(grub_diskfilter_register_front): ... this.
	(grub_diskfilter_register_back): New function.
	All users of grub_diskfilter_register updated.
2012-04-18 23:11:33 +02:00
Vladimir 'phcoder' Serbinenko
b41be5623a * grub-core/loader/i386/linux.c (allocate_pages): Overwrite low memory
boot services if we have no other choice.
2012-04-17 13:00:06 +02:00
Vladimir 'phcoder' Serbinenko
e0595a73b2 * grub-core/fs/zfs/zfs.c: Disable -Wstrict-aliasing. 2012-04-13 19:26:36 +02:00
Vladimir 'phcoder' Serbinenko
4ed80652d2 * grub-core/fs/minix.c (grub_minix_data): Fix ino type.
(grub_minix_read_file): Likewise.
	(grub_minix_read_inode): Likewise.
	(grub_minix_find_file): Likewise.
	(grub_minix_dir): Likewise.
2012-04-13 17:08:38 +02:00
Vladimir 'phcoder' Serbinenko
ee5207750f * grub-core/lib/relocator.c (grub_relocator_alloc_chunk_align): Remove
redundant buggy overlap check.
2012-04-13 16:55:20 +02:00
Vladimir 'phcoder' Serbinenko
9bab65c49d * grub-core/loader/i386/linux.c (grub_cmd_linux): Avoid accessing
kh.loadflags on pre-2.00 kernels.
2012-04-11 22:40:20 +02:00
Vladimir 'phcoder' Serbinenko
3c491b479c Terminate UNDI and PXE before launching the payload to avoid problems
with DMA.

	* grub-core/commands/boot.c (grub_loader_noreturn): Rename to ...
	(grub_loader_flags): ... this. All users updated.
	(grub_loader_boot): Check for GRUB_LOADER_FLAG_NORETURN.
	* grub-core/loader/i386/pc/pxechainloader.c (grub_cmd_pxechain): Mark
	loader as GRUB_LOADER_FLAG_PXE_NOT_UNLOAD.
	* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_shutdown): New
	function.
	(grub_pxe_restore): Likewise.
	(fini_hnd): New var.
	(GRUB_MOD_INIT): Register shutdown hook.
	(GRUB_MOD_FINI): Shutdown and unregister shutdown hook.
	* include/grub/loader.h (GRUB_LOADER_FLAG_NORETURN): New const.
	(GRUB_LOADER_FLAG_PXE_NOT_UNLOAD): Likewise.
	(grub_loader_set): Rename second argument to flags.
2012-04-11 22:32:31 +02:00
Vladimir 'phcoder' Serbinenko
851ffadac2 * grub-core/normal/charset.c (grub_ucs4_to_utf8): Return number of
written bytes.
	(grub_get_num_of_utf8_bytes): New function.
	(grub_ucs4_to_utf8_alloc): Use grub_get_num_of_utf8_bytes.
	* grub-core/normal/menu_entry.c (run): Convert entry to UTF-8 before
	executing it.
	* include/grub/charset.h (grub_get_num_of_utf8_bytes): New proto.
	(grub_ucs4_to_utf8): Change return type.
2012-04-07 20:11:04 +02:00
Vladimir 'phcoder' Serbinenko
491c57a815 * grub-core/commands/usbtest.c (usb_print_str): Silence spurious
warning.
2012-04-07 20:03:38 +02:00
Vladimir 'phcoder' Serbinenko
756773df7c * grub-core/lib/adler32.c: Recode due to license unclearness. 2012-04-07 19:58:39 +02:00
Vladimir 'phcoder' Serbinenko
fd556a962e * grub-core/io/lzopio.c (read_block_header): Fix incorrect byte swapping
(test_header): Likewise.
2012-04-07 19:54:51 +02:00
Vladimir 'phcoder' Serbinenko
d61357cec2 * grub-core/gettext/gettext.c (grub_gettext_pread): Fix the case when
len = 0.
	(grub_gettext_translate_real): Handle 0th string.
	(grub_gettext_translate): Ensure that "" isn't translated.
2012-04-04 14:41:55 +02:00
Vladimir 'phcoder' Serbinenko
505e41dc36 * grub-core/disk/diskfilter.c (grub_diskfilter_memberlist): Add
TRANSLATORS comment.
	(grub_diskfilter_print_partmap): Propagate changing of error into
	warning.
2012-04-04 14:33:38 +02:00
Vladimir 'phcoder' Serbinenko
ac66b453df Handle big-endian minixfs (fixes minixfs tests on bigendian).
* grub-core/fs/minix.c: Replace le with minix. Add necessary defines,
	modify names. Introduce MODE_BIGENDIAN.
	* grub-core/fs/minix_be.c: New file.
	* grub-core/fs/minix2_be.c: Likewise
	* grub-core/fs/minix3_be.c: Likewise.
	* Makefile.util.def (libgrubmods): Add minix_be, minix2_be and
	minix3_be.
	* grub-core/Makefile.core.def (minix_be): New module.
	(minix2_be): Likewise.
	(minix3_be): Likewise.
2012-04-01 21:35:18 +02:00
Felix
f65a829e41 * grub-core/loader/efi/appleloader.c (devpath_7): New var.
(devs): Add MBP 2011.
2012-04-01 21:30:24 +02:00
Vladimir 'phcoder' Serbinenko
0a2d5a8275 * grub-core/font/font.c (blit_comb): Handle dagesh somewhat. 2012-04-01 21:27:17 +02:00
Vladimir 'phcoder' Serbinenko
d162588970 * grub-core/normal/cmdline.c (print_completion): New field
prompt_len.
	(grub_cmdline_get): Handle width properly.
2012-04-01 21:25:17 +02:00
Vladimir 'phcoder' Serbinenko
6d36a236d2 * grub-core/commands/lsacpi.c (options): Add missing terminator. 2012-04-01 21:22:48 +02:00
Vladimir 'phcoder' Serbinenko
d73ff15de4 Fix exfat endianness handling.
* grub-core/fs/fat.c (grub_fat_data): Make fat_sector 32-bit.
	(grub_fat_mount) [MODE_EXFAT]: Fix bpb.num_reserved_sectors byte-swap.
	(grub_fat_iterate_dir) [MODE_EXFAT]: Fix attr byte-swap.
	Byte-swap utf16 when necessary.
	(grub_fat_label) [MODE_EXFAT]: Byte-swap utf16 when necessary.
2012-03-31 19:04:13 +02:00
Anton Blanchard
bbb39a458b Fix btrfs endianness handling.
* grub-core/fs/btrfs.c (key_cmp): Use grub_le_to_cpu for clarity.
	(lower_bound): Make root uint64_t. Use root in le.
	(grub_btrfs_read_logical): Fix template key init. Fix address byteswap.
	(find_path): Fix template key init.
	(grub_btrfs_dir): Fix mtime byteswap.
	* include/grub/types.h (grub_cpu_to_le64_compile_time): New macro.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-03-31 18:45:13 +02:00
Vladimir 'phcoder' Serbinenko
354e0af7d3 * grub-core/fs/btrfs.c (grub_btrfs_read_logical): New argument
recursion_depth. Break infinite resursions. All users updated.
2012-03-31 18:38:29 +02:00
Anton Blanchard
255818026e * grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Do not byteswap
8 bit values.
2012-03-31 12:08:50 +02:00
Vladimir 'phcoder' Serbinenko
5d1182a66b * grub-core/disk/diskfilter.c (grub_diskfilter_memberlist): Degrade
the error when some elements are missing into a warning.
2012-03-28 17:56:45 +02:00
Vladimir 'phcoder' Serbinenko
3f8cdd9052 * grub-core/normal/charset.c (bidi_line_wrap): Fix out-of-range swap. 2012-03-28 17:54:54 +02:00
Vladimir 'phcoder' Serbinenko
e1bd676b4e Fix tab and wide character handling in editor and menu.
* grub-core/normal/charset.c (grub_unicode_aglomerate_comb): Don't
	agglomerate control characters with combining marks.
	(bidi_line_wrap): Allow break on tab.
	(grub_unicode_get_comb_start): New function.
	* grub-core/normal/menu_entry.c: Restructure to handle wide characters
	and tab correctly.
	* grub-core/normal/menu_text.c (print_entry): Replace \n, \r, \b and \e
	with a space.
	* grub-core/normal/term.c (print_ucs4_terminal): New argument
	fixed_tab_size. All users updated.
	* include/grub/term.h (GRUB_TERM_TAB_WIDTH): New const.
	(grub_term_getcharwidth): Handle \t.
	* include/grub/unicode.h (grub_unicode_glyph_dup): Fix allocation
	and copy.
2012-03-27 17:07:26 +02:00
Vladimir 'phcoder' Serbinenko
22e6a774f9 Handle big-endian mdraid.
* Makefile.util.def (libgrubkern): Add mdraid_linux_be.c.
	* grub-core/Makefile.core.def (mdraid09_be): New module.
	* grub-core/disk/mdraid_linux.c: Use grub_md_to_cpu* and grub_cpu_to_md*
	rather than grub_le_to_cpu* and grub_cpu_to_le*.
	* grub-core/disk/mdraid_linux_be.c: New file.
2012-03-26 16:10:40 +02:00
Vladimir 'phcoder' Serbinenko
3c0eae66fa * grub-core/gettext/gettext.c (GRUB_MOD_INIT): Handle errors. 2012-03-26 16:07:42 +02:00
Vladimir 'phcoder' Serbinenko
ac6fd21803 * grub-core/script/argv.c (grub_script_argv_split_append): Skip leading
spaces.
	* tests/grub_script_leading_whitespace.in: New file.
	* Makefile.util.def (grub_script_leading_whitespace): New test.
2012-03-19 13:29:43 +01:00
Vladimir 'phcoder' Serbinenko
ba287dd8e0 * grub-core/kern/dl.c (grub_dl_add): Make global in order for gdb_grub
to work.
2012-03-19 11:10:11 +01:00
Vladimir 'phcoder' Serbinenko
d2d58d0ab4 * grub-core/fs/jfs.c (grub_jfs_label): Use first label if second one
starts with control character.
2012-03-19 11:07:28 +01:00
Vladimir 'phcoder' Serbinenko
0382d9bb22 * grub-core/gdb/cstub.c (grub_gdb_inbuf): Increase the size to avoid
overflow.
	(grub_gdb_outbuf): Likewise.
2012-03-19 10:59:16 +01:00