Commit graph

1881 commits

Author SHA1 Message Date
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
Vladimir 'phcoder' Serbinenko
d83ff9f955 * grub-core/commands/menuentry.c (grub_normal_add_menu_entry): Add
zero terminator. Fixes a crash.
2012-03-19 10:56:43 +01:00
Vladimir 'phcoder' Serbinenko
2282da4a93 * grub-core/loader/i386/linux.c (allocate_pages): Don't allocate
beyond 4 GiB.
	(grub_cmd_linux): Use GRUB_LINUX_BZIMAGE_ADDR for non-relocatable
	images independently of preffered adderss field.
2012-03-11 23:41:29 +01:00
Vladimir 'phcoder' Serbinenko
0ae4f0bddb * grub-core/commands/i386/pc/play.c: Improve TRANSLATORS comments.
* grub-core/commands/regexp.c: Likewise.
	* grub-core/loader/i386/linux.c: Likewise.
	* grub-core/partmap/msdos.c: Likewise.
	* grub-core/script/execute.c: Likewise.
	* grub-core/term/gfxterm.c: Likewise.
2012-03-11 23:36:35 +01:00
Vladimir 'phcoder' Serbinenko
546fbe9b5a Add variable parsing in $"..." and fix several mismatches with bash.
* Makefile.util.def (grub_script_gettext): New test.
	* grub-core/script/execute.c (parse_string): New function.
	(gettext_append): Likewise.
	(grub_script_arglist_to_argv): Use gettext_append.
	* grub-core/script/yylex.l: Fix slash and newline handling in $"...".
	* tests/grub_script_gettext.in: New file.
2012-03-11 14:46:48 +01:00
Vladimir 'phcoder' Serbinenko
9fdb2d7b11 Fix handling of leading spaces in scripts.
* grub-core/normal/cmdline.c (grub_cmdline_get): Don't strip leading
	spaces.
	* grub-core/normal/main.c (grub_file_getline): Remove all preprocessing
	other than skipping \r. All users updated.
	* tests/grub_script_echo1.in: Add space-related tests.
	* util/grub-menulst2cfg.c (main): Remove useless space skipping.
2012-03-11 14:43:18 +01:00
Vladimir 'phcoder' Serbinenko
1a1ac4f6cb * grub-core/commands/cat.c (grub_cmd_cat): Fix termination key check. 2012-03-11 14:36:02 +01:00
Vladimir 'phcoder' Serbinenko
17f38c0f8c Fix gettext reload bugs (e.g. inability to disable gettext
once enabled).

	* grub-core/gettext/gettext.c: Encapsulate all static variables in
	main_context and secondary_context. All functions updated.
	(grub_gettext_translate): Rename to ...
	(grub_gettext_translate_real): ... this. Return NULL on failed
	translate.
	(grub_gettext_translate): Handle secondary context.
	(grub_gettext_delete_list): Close file and zero-out the context.
	(grub_mofile_open): Don't call grub_gettext_delete_list.
	Don't close file.
	(grub_gettext_init_ext): Call grub_gettext_init_ext. Skip loading
	if locale="" to avoid pointless error message.
	(grub_gettext_env_write_lang): Update lang even if load fails.
	Handle secondary context.
	(grub_gettext_reread_prefix): New function.
	(read_main): Likewise.
	(read_secondary): Likewise.
	(GRUB_MOD_INIT): Handle secondary context. Hook and export variables.
	(GRUB_MOD_FINI): Handle secondary context. Don't close file.
	* grub-core/normal/main.c (read_lists): Call grub_gettext_reread_prefix.
	* include/grub/normal.h (grub_gettext_reread_prefix): New proto.
2012-03-10 23:25:34 +01:00
Vladimir 'phcoder' Serbinenko
1ecd61a47a Fix efi chainloader on network root.
* grub-core/loader/efi/chainloader.c (grub_cmd_chainloader): Handle
	network devices.
	* grub-core/net/drivers/efi/efinet.c (grub_efinet_get_device_handle):
	New function.
2012-03-10 20:41:28 +01:00
Vladimir 'phcoder' Serbinenko
14361ee8aa * grub-core/gfxmenu/gui_progress_bar.c (grub_gui_progress_bar): Remove
unused show_text member.
	* docs/grub.texi: Document "text" property.
2012-03-10 19:46:46 +01:00
Vladimir 'phcoder' Serbinenko
922aabf34b * grub-core/loader/efi/chainloader.c (grub_cmd_chainloader): Fix format
in dprintf.
2012-03-10 18:02:53 +01:00
Vladimir 'phcoder' Serbinenko
0f021838c4 * Makefile.am: Strip gold section.
* conf/Makefile.common: Likewise.
	* gentpl.py: Likewise.
	* grub-core/Makefile.core.def: Likewise.
	* grub-core/genmod.sh.in: Likewise.
2012-03-10 16:55:48 +01:00
Vladimir 'phcoder' Serbinenko
e8e0566b0c * grub-core/commands/videoinfo.c: Add TRANSLATORS comments.
* grub-core/commands/xnu_uuid.c: Likewise.
	* grub-core/loader/efi/appleloader.c: Likewise.
	* grub-core/script/execute.c: Likewise.
	* grub-core/script/main.c: Likewise.
	* util/grub-mkfont.c: Likewise.
2012-03-10 13:19:46 +01:00
Vladimir 'phcoder' Serbinenko
c9eb96b508 * grub-core/loader/efi/chainloader.c (grub_cmd_chainloader): Use
"out of memory" error messagge.
2012-03-10 13:10:07 +01:00
Vladimir 'phcoder' Serbinenko
1f49313672 * grub-core/disk/diskfilter.c (grub_diskfilter_memberlist): Add scanning
of diskfilter for diskfilter on diskfilter support.
2012-03-10 13:07:39 +01:00
Vladimir 'phcoder' Serbinenko
c8f778a044 * grub-core/gnulib/regcomp.c (regerror): Fix out-of-range array lookup. 2012-03-10 12:31:42 +01:00
Vladimir 'phcoder' Serbinenko
de1e64eb43 * grub-core/gdb/i386/idt.c (grub_gdb_breakpoint): Remove old debug code. 2012-03-10 12:27:00 +01:00
Vladimir 'phcoder' Serbinenko
c6d542119d * grub-core/commands/hashsum.c (grub_cmd_hashsum): Remove dot at the end
of error message.
2012-03-10 12:23:47 +01:00
Vladimir 'phcoder' Serbinenko
5fd1c522d4 * grub-core/commands/i386/pc/sendkey.c (GRUB_MOD_INIT): Fix confusing
message.
	* util/grub-install.in: Fix anf gettextize error message.
2012-03-09 00:56:22 +01:00
Vladimir 'phcoder' Serbinenko
292fdaff95 * grub-core/commands/probe.c (options): Replace VAR with VARNAME and
gettextize.
	* grub-core/commands/search_wrap.c (options): Likewise.
2012-03-08 19:07:23 +01:00
Vladimir 'phcoder' Serbinenko
ecdbae77ca * grub-core/normal/charset.c (bidi_line_wrap): Fix a spurious warning. 2012-03-08 19:05:43 +01:00
Vladimir 'phcoder' Serbinenko
52bfedfa39 * grub-core/boot/i386/pc/startup_raw.S (multiboot_trampoline): Fix
size calculation.
	* grub-core/kern/i386/realmode.S (realidt): Assume default BIOS IDT if
	none is known.
2012-03-08 18:54:25 +01:00
Vladimir 'phcoder' Serbinenko
55b20e588c * grub-core/net/net.c (grub_net_addr_to_str): Don't translate
"temporary" since it's used in identifier and is limited in space.
2012-03-08 18:51:39 +01:00
Vladimir 'phcoder' Serbinenko
6a0295e205 * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Add missing
byte-swap on big-endian.
	Reported by: Lennart Sorensen
2012-03-08 18:42:03 +01:00
Vladimir 'phcoder' Serbinenko
807fb77c16 * grub-core/loader/i386/linux.c (prot_init_space): New variable.
(allocate_pages): Improve dprintf.
	(grub_cmd_linux): Fill prot_init_space. Fix improper usage of
	code32_start. Fill code32_start and kernel_alignment in params.
	(grub_cmd_initrd): Use prot_init_space.
2012-03-07 23:45:20 +01:00
Vladimir 'phcoder' Serbinenko
6e69da9ccb * grub-core/commands/videoinfo.c: Add TRANSLATORS comments.
* grub-core/commands/videotest.c: Likewise.
	* grub-core/loader/i386/linux.c: Likewise.
2012-03-06 15:04:33 +01:00
Vladimir 'phcoder' Serbinenko
4a92934301 * grub-core/commands/acpi.c (options): Fix a dot in the middle of the
sentence.
	Reported by: Milo Casagrande.
2012-03-06 15:03:33 +01:00
Vladimir 'phcoder' Serbinenko
bb51c6c647 * grub-core/commands/acpi.c: Add TRANSLATORS comments.
* grub-core/commands/gptsync.c: Likewise.
	* grub-core/commands/hashsum.c: Likewise.
	* grub-core/commands/i386/pc/sendkey.c: Likewise.
	* grub-core/commands/legacycfg.c: Likewise.
	* grub-core/io/gzio.c: Likewise.
	* grub-core/net/net.c: Likewise.
	* grub-core/term/gfxterm.c: Likewise.
	* grub-core/term/terminfo.c: Likewise.
	* grub-core/tests/test_blockarg.c: Likewise.
	* grub-core/video/video.c: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-mkfont.c: Likewise.
2012-03-06 14:11:10 +01:00
Vladimir 'phcoder' Serbinenko
c7c080ad02 * grub-core/commands/search_wrap.c (options): Fix a typo. 2012-03-06 14:07:00 +01:00
Vladimir 'phcoder' Serbinenko
4650daec9c * grub-core/commands/search_wrap.c (options): Fix wrong copy-paste in
messages.
2012-03-06 11:59:39 +01:00
Vladimir 'phcoder' Serbinenko
ef292a8775 * grub-core/net/http.c: Add TRANSLATORS comments.
* grub-core/normal/cmdline.c: Likewise.
	* grub-core/normal/misc.c: Likewise.
	* grub-core/partmap/msdos.c: Likewise.
	* grub-core/parttool/msdospart.c: Likewise.
	* grub-core/script/execute.c: Likewise.
	* grub-core/script/main.c: Likewise.
	* grub-core/term/terminfo.c: Likewise.
	* grub-core/video/bitmap.c: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-mkimage.c: Likewise.
	* util/grub-mklayout.c: Likewise.
	* util/grub-setup.c: Likewise.
2012-03-05 16:42:26 +01:00
Vladimir 'phcoder' Serbinenko
1a11761f7d * grub-core/loader/i386/linux.c (allocate_pages): Fix handling of the
case when min_align = 0.
2012-03-05 01:35:58 +01:00
Vladimir 'phcoder' Serbinenko
24539abdb1 * grub-core/normal/charset.c (bidi_line_wrap): Fix a spurious warning
and fix a case when line_start overflows.
2012-03-05 01:26:29 +01:00
Vladimir 'phcoder' Serbinenko
1a2fd1e674 * include/grub/misc.h (ALIGN_UP_OVERHEAD): New define.
* grub-core/loader/i386/linux.c (grub_cmd_initrd): Align initrds at 4.
	* grub-core/loader/i386/pc/linux.c (grub_cmd_initrd): Likewise.
	* grub-core/loader/ia64/efi/linux.c (grub_cmd_initrd): Likewise.
	* grub-core/loader/mips/linux.c (grub_cmd_initrd): Likewise.
	* grub-core/loader/powerpc/ieee1275/linux.c (grub_cmd_initrd): Likewise.
	* grub-core/loader/sparc64/ieee1275/linux.c (grub_cmd_initrd): Likewise.
2012-03-05 01:17:55 +01:00
Vladimir 'phcoder' Serbinenko
90eeab76b0 * grub-core/commands/menuentry.c (options): Remove
GRUB_ARG_OPTION_REPEATABLE.
	Reported by: Andreas Vogel
2012-03-05 01:00:09 +01:00
Andreas Vogel
5ad1be828f * grub-core/normal/main.c (grub_normal_free_menu): Fix memory leak. 2012-03-05 00:41:37 +01:00
Hideki EIRAKU
cb05528616 * grub-core/normal/menu_entry.c (kill_line): Fix a crash and off-by-one
error.
2012-03-05 00:02:17 +01:00
Vladimir 'phcoder' Serbinenko
d9bef9bc43 Fix menu title instability bug.
* grub-core/commands/menuentry.c (options): New option --id.
	(grub_normal_add_menu_entry): New argument id. All users updated.
	(grub_cmd_menuentry): Handle --id.
	(grub_menu_init): Accept unknown arguments.
	* grub-core/normal/main.c (features): Add feature_menuentry_id and
	feature_menuentry_options.
	* grub-core/normal/menu.c (grub_menu_execute_entry): Use id for
	saved_entry.
	(get_entry_number): Match with id as well.
	* include/grub/menu.h (grub_menu_entry): New member id.
	* util/grub-mkconfig_lib.in (grub_get_device_id): New function.
	* util/grub.d/00_header.in: Define menuentry_id_option.
	* util/grub.d/10_hurd.in: Define id.
	* util/grub.d/10_illumos.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
2012-03-04 14:55:13 +01:00
Vladimir 'phcoder' Serbinenko
0d31b7df86 * grub-core/script/execute.c (grub_script_return): Replace ambiguous
"scope" with "body".
2012-03-04 12:14:33 +01:00
Vladimir 'phcoder' Serbinenko
7c8d0ce7f4 * include/grub/i386/linux.h (linux_kernel_header): Fix init_size type.
* grub-core/loader/i386/linux.c (grub_cmd_linux): Differentiate between
	prot_size and prot_file_size.
2012-03-04 12:13:05 +01:00
Vladimir 'phcoder' Serbinenko
49de079bbe * grub-core/disk/diskfilter.c (is_lv_readable): New argument "easily".
All users updated. If easily=1 require raid-5/-6 to be full.
	(is_node_readable): Likewise.
	(scan_devices): Scan incomplete but readable LVs at the end.
	(grub_diskfilter_memberlist): Pull missing devices.
	(insert_array): Skip scanning until device is complete or scan is
	done otherwise.
	* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Fix wrong
	check.
	* include/grub/diskfilter.h (grub_diskfilter_lv): New member scanned.
	* util/raid.c (grub_util_raid_getmembers): Handle "removed" disks.
2012-03-04 01:33:09 +01:00
Matthew Garrett
aff05d45f9 Avoid EFI boot services when loading Linux.
* grub-core/lib/i386/relocator.c (grub_relocator32_boot): New argument
	avoid_efi_bootservices. All users updated.
	* grub-core/lib/relocator.c (grub_relocator_alloc_chunk_align): New
	argument avoid_efi_bootservices. All users updated.
	Use grub_efi_mmap_iterate on EFI, grub_mmap_iterate if available.
	* grub-core/loader/i386/linux.c (allocate_pages): New arguments
	align, min_align, relocatable, prefered_address. All users updated.
	Allocate avoiding boot services if kernel is relocatable.
	(grub_cmd_linux): Check if kernel is relocatable.
	* grub-core/mmap/efi/mmap.c (grub_machine_mmap_iterate): Move most to ..
	(grub_efi_mmap_iterate): ... here. New argument avoid_efi_boot_services.
	Skip GRUB_EFI_BOOT_SERVICES_DATA and GRUB_EFI_BOOT_SERVICES_CODE if
	avoid_efi_boot_services.
	(grub_machine_mmap_iterate): Wrap grub_efi_mmap_iterate.
	* include/grub/i386/linux.h (linux_kernel_header): Update to 2.10.
	(linux_kernel_params): Likewise.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-03-04 01:10:55 +01:00
Matthew Garrett
3935dde2f2 Use EDID on EFI.
* grub-core/kern/efi/efi.c (grub_efi_get_variable): New argument
	datasize_out.
	* grub-core/video/efi_gop.c (check_protocol): Check that GOP has usable
	modes. Set gop_handle.
	(grub_video_gop_get_edid): New function.
	(grub_gop_get_preferred_mode): Likewise.
	(grub_video_gop_setup): Use grub_gop_get_preferred_mode.
	(grub_video_efi_gop_adapter): Set .get_edid.
	* include/grub/efi/edid.h: New file.
	* include/grub/efi/efi.h (grub_efi_get_variable): Update proto.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-03-04 00:48:21 +01:00
Vladimir 'phcoder' Serbinenko
123f9c50eb Fix FTBFS on mips and ppc 2012-03-03 20:53:54 +01:00
Vladimir 'phcoder' Serbinenko
1e95b56e59 Fix compile error 2012-03-03 20:12:03 +01:00
Vladimir 'phcoder' Serbinenko
9be4c45dbe boot services avoid code based on the patch by Matthew Garrett 2012-03-03 20:06:41 +01:00
Vladimir 'phcoder' Serbinenko
8f95d002fe * grub-core/commands/date.c (GRUB_MOD_INIT): Remove non-uniform
"Command for ...".
	* grub-core/commands/hdparm.c (options): Use "Display" rather than
	"Check" since we don't check anything.
	* grub-core/commands/i386/cpuid.c (options): Clarify that long mode
	is 64-bit one.
	* grub-core/commands/search_wrap.c (options): Clarify the conditions.
	* grub-core/disk/geli.c (grub_md_sha256_real): Fix typo.
	(grub_md_sha512_real): Likewise.
2012-03-03 13:09:14 +01:00
Vladimir 'phcoder' Serbinenko
805a8dccc8 * grub-core/commands/gptsync.c: Fix typographic quoting.
* grub-core/commands/ieee1275/suspend.c: Likewise.
	* grub-core/commands/parttool.c: Likewise.
	* grub-core/commands/search_wrap.c: Likewise.
	* grub-core/commands/videoinfo.c: Likewise.
	* grub-core/gfxmenu/gui_label.c: Likewise.
	* grub-core/hello/hello.c: Likewise.
	* grub-core/kern/emu/main.c: Likewise.
	* grub-core/net/net.c: Likewise.
	* grub-core/normal/menu.c: Likewise.
	* grub-core/normal/menu_text.c: Likewise.
	* grub-core/normal/misc.c: Likewise.
	* util/grub-editenv.c: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-kbdcomp.in: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub-reboot.in: Likewise.
	* util/grub-set-default.in: Likewise.
	* util/grub-setup.c: Likewise.
	* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2012-03-03 13:05:08 +01:00
Vladimir 'phcoder' Serbinenko
40211ab884 * grub-core/commands/acpihalt.c: Add TRANSLATORS comments.
* grub-core/commands/keystatus.c: Likewise.
	* grub-core/commands/loadenv.c: Likewise.
	* grub-core/commands/probe.c: Likewise.
	* grub-core/commands/regexp.c: Likewise.
	* grub-core/commands/true.c: Likewise.
	* grub-core/commands/videoinfo.c: Likewise.
	* grub-core/disk/cryptodisk.c: Likewise.
	* grub-core/disk/ldm.c: Likewise.
	* grub-core/disk/loopback.c: Likewise.
	* grub-core/disk/luks.c: Likewise.
	* grub-core/fs/zfs/zfsinfo.c: Likewise.
	* grub-core/kern/disk.c: Likewise.
	* grub-core/kern/emu/hostdisk.c: Likewise.
2012-03-03 12:59:28 +01:00
Vladimir 'phcoder' Serbinenko
0c7d99c7c2 * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add TRANSLATORS comment.
* util/grub-install.in: Add missing quote in the comment.
2012-03-02 21:08:38 +01:00
Vladimir 'phcoder' Serbinenko
e7d2559bc1 * grub-core/commands/i386/pc/drivemap.c: Add TRANSLATORS comments.
* grub-core/commands/lsmmap.c: Likewise.
	* grub-core/commands/minicmd.c: Likewise.
	* grub-core/commands/mips/loongson/lsspd.c: Likewise.
	* grub-core/commands/regexp.c: Likewise.
	* grub-core/gdb/gdb.c: Likewise.
	* grub-core/term/gfxterm.c: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mkfont.c: Likewise.
	* util/grub-mklayout.c: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
2012-03-02 15:09:10 +01:00
Vladimir 'phcoder' Serbinenko
49ce9e50eb * grub-core/commands/videoinfo.c (hook): Replace "Direct"
with "Direct color" and "Packed" with "Packed pixel".
	(grub_cmd_videoinfo): Simplify legend.
2012-03-02 15:05:30 +01:00
Vladimir 'phcoder' Serbinenko
8822a8a02b * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add TRANSLATORS
comments.
	* grub-core/gdb/gdb.c (grub_cmd_gdbstub): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* grub-core/loader/i386/linux.c (grub_cmd_linux): Clarify that it's
	VGA mode.
	* grub-core/net/net.c (grub_net_route_address): Add TRANSLATORS
	comments.
	* util/grub-install.in (usage): Likewise.
	Spell ID in whole letters.
	Add missing ending dot.
	Quote variables.
	* util/grub-reboot.in: Fix capitalisation.
	* util/grub-set-default.in: Likewise.
2012-03-02 11:53:50 +01:00
Vladimir 'phcoder' Serbinenko
ef023e42a2 * grub-core/boot/i386/pc/startup_raw.S: Move decompressor_end to .bss
to ensure that it's after the last byte of .text.
2012-03-02 11:24:24 +01:00
Vladimir 'phcoder' Serbinenko
88d51eff35 * util/resolve.c (read_dep_list): Use grub_isspace instead of isspace.
* grub-core/kern/emu/hostdisk.c (read_device_map): Likewise.
2012-03-02 11:18:11 +01:00
Vladimir 'phcoder' Serbinenko
17edc2ba56 * grub-core/kern/i386/pc/startup.S: Define __start. 2012-03-02 11:15:42 +01:00
Andreas Vogel
3809cb41bc * grub-core/kern/misc.c (grub_xvasprintf): Fix an exit path which
resulted in leak of arguments.
2012-02-29 19:35:19 +01:00
Vladimir 'phcoder' Serbinenko
fa6ec5734f * grub-core/boot/i386/pc/startup_raw.S: Use separate
reed_solomon_size const definition instead of computing it since
	Apple assembler doesn't support the later.
2012-02-29 19:12:16 +01:00
Vladimir 'phcoder' Serbinenko
c4c48c541c * grub-core/Makefile.core.def (lzma_decompress): Use
TARGET_IMG_BASE_LDOPT rather than hardcoding -Wl,-Ttext.
2012-02-29 16:28:26 +01:00
Vladimir 'phcoder' Serbinenko
31a12124a0 * grub-core/genmod.sh.in: Rewrite the Apple part. 2012-02-29 16:00:27 +01:00
Vladimir 'phcoder' Serbinenko
4f3aa1af70 * grub-core/loader/machoXX.c (grub_macho_load): Fix signed vs unsigned
comparison.
2012-02-29 15:48:57 +01:00
Vladimir 'phcoder' Serbinenko
fb88381212 * grub-core/boot/i386/pc/diskboot.S (firstlist): Rename to ...
(LOCAL(firstlist)): ... this. Move it before the firstlist and not
	after. All users updated.
2012-02-29 15:26:42 +01:00
Vladimir 'phcoder' Serbinenko
a121c9648e Use the common size routine in hostfs so we can read disks as well.
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Rename to ..
	(grub_util_get_fd_size): ... this. Return size in bytes.
	All users updated.
	* grub-core/kern/emu/hostfs.c (grub_hostfs_open): Use
	grub_util_get_fd_size.
2012-02-29 15:23:31 +01:00
Vladimir 'phcoder' Serbinenko
c66d641020 * grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors) [__APPLE__]:
Add blocksize retrieval.
2012-02-29 15:17:59 +01:00
Vladimir 'phcoder' Serbinenko
382775d1ac * grub-core/Makefile.am (MACHO2IMG): Add missing variable. 2012-02-29 15:08:08 +01:00
Vladimir 'phcoder' Serbinenko
6fd4e6e4d0 * grub-core/commands/i386/pc/halt.c (grub_halt): Add noreturn attribute.
(grub_cmd_halt): Likewise.
2012-02-29 15:06:39 +01:00
Vladimir 'phcoder' Serbinenko
bea359d657 * grub-core/lib/i386/relocator16.S: Declare LOCAL(relocator16_end)
for local arithmetics.
	Break %sp init into 2 instructions.
	Add 0 byte at the end.
2012-02-29 15:00:54 +01:00
Vladimir 'phcoder' Serbinenko
32eb6ee157 * grub-core/disk/diskfilter.c (read_segment): Initialise err
before loops.
2012-02-29 14:57:59 +01:00
Vladimir 'phcoder' Serbinenko
e837738991 * grub-core/lib/xzembed/xz_dec_stream.c (hash_validate): Use void *
for context.
2012-02-29 14:56:51 +01:00
Vladimir 'phcoder' Serbinenko
8cb17de77b * grub-core/disk/ldm.c (make_vg): Init part.name.
(grub_ldm_detect): Silence spurious warning.
	(grub_util_is_ldm): Likewise.
2012-02-29 14:55:09 +01:00
Vladimir 'phcoder' Serbinenko
595717e6d4 * grub-core/loader/i386/xnu.c (grub_xnu_boot): Init fsbfreq to
sane value to avoid a spurious warning.
2012-02-29 14:53:41 +01:00
Vladimir 'phcoder' Serbinenko
c4b7e58882 * include/grub/dl.h: Switch from APPLE_CC to __APPLE__.
(GRUB_MOD_LICENSE) [ASM_FILE]: Make into macro. All users updated.
2012-02-29 14:51:09 +01:00
Vladimir 'phcoder' Serbinenko
5982495738 * include/grub/symbol.h (EXT_C) [!ASM_FILE]: Redefine with strings.
* grub-core/lib/i386/backtrace.c (grub_backtrace): Use EXT_C.
2012-02-29 14:48:58 +01:00
Vladimir 'phcoder' Serbinenko
70115b995d * grub-core/gdb/i386/machdep.S: Use VARIABLE and EXT_C instead of
hardcoding the relevant info.
2012-02-29 14:44:52 +01:00
Vladimir 'phcoder' Serbinenko
56733740ed * grub-core/gnulib/argp-fmtstream.c (__argp_get_display_len): Add
missing const qualifiers.
	* grub-core/gnulib/argp-fmtstream.h (__argp_get_display_len): Likewise.
2012-02-29 14:42:20 +01:00
Vladimir 'phcoder' Serbinenko
99ce1597a4 Add LZSS Mach-O support (needed for new xnu kernelcache).
* grub-core/Makefile.core.def (xnu): Add file lzss.c
	* grub-core/loader/lzss.c: New file.
	* grub-core/loader/xnu.c (grub_xnu_load_driver): Close binaryfile
	on Mach-O open failure.
	* grub-core/loader/macho.c (grub_macho_close): Free uncompressedXX.
	Don't free cmdsXX in uncompressedXX is set.
	(grub_macho_file): Init new fields.
	New argument is_64bit. All users updated.
	Handle compressed. Error out if no suitable architecture is found.
	Don't close file.
	(grub_macho_open): New argument is_64bit. All users updated.
	* grub-core/loader/macho32.c: Add defines for new fields.
	* grub-core/loader/macho64.c: Likewise.
	* grub-core/loader/machoXX.c (grub_macho_contains_macho): Make static.
	(grub_macho_parse): Handle compressed.
	Defer actual processing if compressed.
	(grub_macho_cmds_iterate): Decompress if compressed. New argument
	"filename". All users updated.
	(grub_macho_size): New argument "filename". All users updated.
	(grub_macho_get_entry_point): Likewise.
	(grub_macho_load): Handle compressed.
	* include/grub/macho.h (grub_macho_lzss_header): New struct.
	(GRUB_MACHO_LZSS_OFFSET): New define.
	(grub_decompress_lzss): New proto.
	* include/grub/machoload.h (grub_macho_file): New fields to handle
	compressed.
	(grub_macho_contains_macho64): Remove proto.
	(grub_macho_contains_macho32): Likewise.
	* util/grub.d/30_os-prober.in: Use kernel cache if available.
2012-02-29 13:26:13 +01:00
Vladimir 'phcoder' Serbinenko
ebd17d6f51 * grub-core/disk/pata.c (grub_pata_readwrite): Fix ATAPI protocol error. 2012-02-29 12:45:32 +01:00
Vladimir 'phcoder' Serbinenko
2702b4e4f7 Fix make dist.
* Makefile.am (starfield_theme_files): New var.
	(starfield_DATA): Use starfield_theme_files.
	(EXTRA_DIST): Add starfield_theme_files. Add starfield source files.
	Add bootcheck-related files.
	* conf/Makefile.extra-dist (EXTRA_DIST): Add several missing files.
	* docs/Makefile.am (EXTRA_DIST): Add font_char_metrics.png
	and font_char_metrics.txt.
	* grub-core/Makefile.core.def (kernel): Update extra_dist.
	(setjmp): Add lib/ia64/longjmp.S.
	* po/Makefile.in.in (DISTFILES): Add POTFILES-shell.in and grub.d.sed.
	* po/POTFILES.in: Regenerate.
	* po/Rules-swiss: use DISTFILES.common.extra2 and not
	DISTFILES.common.extra1.
	* util/devicemap.c: Removed.
	* grub-core/lib/i386/relocator_backward.S: Likewise.
	* util/import_gcry.py: Remove unused files. Add extra_dist for
	ChangeLog.
2012-02-28 12:58:57 +01:00
Vladimir 'phcoder' Serbinenko
cf1adfdff5 * grub-core/gettext/gettext.c (grub_mofile_open): Call
grub_gettext_delete_list before changing grub_gettext_max to avoid
	running out of array bounds.
2012-02-28 11:50:53 +01:00
Vladimir 'phcoder' Serbinenko
7acd2ae1fb * grub-core/term/i386/pc/vga_text.c: Add GRUB_MACHINE_MULTIBOOT to
grub_vga_text_init/grub_vga_text_fini.
2012-02-28 11:12:32 +01:00
Vladimir 'phcoder' Serbinenko
629e6a3363 * grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix format specification. 2012-02-28 11:02:19 +01:00
Vladimir 'phcoder' Serbinenko
f1b16fa3e3 * grub-core/partmap/msdos.c (message_warn): Clarify messages. 2012-02-28 04:23:58 +01:00
Vladimir 'phcoder' Serbinenko
83ddae2333 Support v2 xnu boot arguments.
* grub-core/loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree):
	New argument fsbfreq_out.
	(grub_xnu_set_video): Receive an argument grub_xnu_boot_params_common.
	(grub_xnu_boot): Support v2 arguments. Disable PIC so that APIC can
	be used.
	* grub-core/loader/machoXX.c (grub_macho_load): New argument
	darwin_version.
	* grub-core/loader/xnu.c (grub_xnu_darwin_version): New variable.
	* include/grub/i386/xnu.h (grub_xnu_boot_params_common): New struct.
	(grub_xnu_boot_params): Rename to ...
	(grub_xnu_boot_params_v1): ...this. Use grub_xnu_boot_params_common.
	(grub_xnu_boot_params_v2): New struct.
2012-02-28 04:04:19 +01:00
Vladimir 'phcoder' Serbinenko
dc693fe67c * grub-core/efiemu/prepare.c (grub_efiemu_crc): Add missing
zeroing of CRC field before computing CRC.
2012-02-28 03:59:08 +01:00
Vladimir 'phcoder' Serbinenko
5a6e39c28f * grub-core/lib/relocator.c (malloc_in_range): Fix memory leak.
Change order of allocations to decrease fragmentation.
2012-02-28 01:32:38 +01:00
Colin Watson
cfe456dc03 Use write-combining MTRR to speed up video with buggy BIOSes.
* grub-core/video/i386/pc/vbe.c (framebuffer): New member mtrr.
	(cpuid): New define.
	(rdmsr): Likewise.
	(wrmsr): Likewise.
	(mtrr_base): Likewise.
	(mtrr_mask): Likewise.
	(grub_vbe_enable_mtrr_entry): New function.
	(grub_vbe_enable_mtrr): Likewise.
	(grub_vbe_disable_mtrr): Likewise.
	(grub_vbe_bios_set_display_start): Disable mtrr when handing the
	control off to BIOS.
	(grub_video_vbe_init): Fill mtrr.
	(grub_video_vbe_fini): Disable mtrr.
	(grub_video_vbe_get_info_and_fini): Likewise.
	(grub_video_vbe_setup): Enable mtrr.
2012-02-27 22:31:51 +01:00
Colin Watson
e3c78337c3 * include/grub/partition.h (grub_partition_map): Change prototype of
embed to take a maximum value for nsectors.
	* include/grub/emu/hostdisk.h (grub_util_ldm_embed): Likewise.
	* include/grub/fs.h (grub_fs): Likewise.
	* grub-core/partmap/msdos.c (embed_signatures): New array.
	(pc_partition_map_embed): Check for and avoid sectors matching any
	of the signatures in embed_signatures, up to max_nsectors.
	* grub-core/partmap/gpt.c (gpt_partition_map_embed): Restrict
	returned sector map to max_nsectors.
	* grub-core/disk/ldm.c (grub_util_ldm_embed): Likewise.
	* grub-core/fs/btrfs.c (grub_btrfs_embed): Likewise.
	* grub-core/fs/zfs/zfs.c (grub_zfs_embed): Likewise.
	* util/grub-setup.c (setup): Allow for the embedding area being
	split into multiple blocklists.  Tell dest_partmap->embed the
	maximum number of sectors we care about.
2012-02-27 22:25:39 +01:00
Vladimir 'phcoder' Serbinenko
e1e49678b9 * util/grub-install.in: Clarify strings.
Fix source dir check.
2012-02-27 21:36:58 +01:00
Vladimir 'phcoder' Serbinenko
584b2f8a22 Replace grub_target_addr with more appropriate types.
* grub-core/commands/efi/fixvideo.c (scan_card): Replace
	grub_target_addr with grub_addr.
	* grub-core/commands/iorw.c (grub_cmd_read): Replace
	grub_target_addr with grub_port.
	(grub_cmd_write): Likewise.
	* grub-core/commands/memrw.c (grub_cmd_read): Replace
	grub_target_addr with grub_addr.
	(grub_cmd_write): Likewise.
	* grub-core/video/efi_uga.c (find_line_len): Likewise.
2012-02-27 14:13:24 +01:00
Vladimir 'phcoder' Serbinenko
786aff6e55 * grub-core/efiemu/runtime/efiemu.c (efiemu_get_variable): Add missing
const qualifier.
	(efiemu_memequal): Likewise.
	(find_variable): Likewise.
2012-02-27 14:07:53 +01:00
Matthew Garrett
c598862958 * grub-core/kern/efi/efi.c (grub_efi_get_variable): Add new function.
* include/grub/efi/efi.h: Likewise.
	* include/grub/efi/api.h: Add guid for EFI-specified variables.
	* include/grub/charset.h (GRUB_MAX_UTF16_PER_UTF8): New definition.
	* grub-core/normal/charset.c (grub_utf8_process): Move from here ...
	* include/grub/charset.h (grub_utf8_process): ... to here. Inline.
	* grub-core/normal/charset.c (grub_utf8_to_utf16): Move from here ...
	* include/grub/charset.h (grub_utf8_to_utf16): ... to here. Inline.
2012-02-27 12:02:57 +01:00
Vladimir 'phcoder' Serbinenko
fb312cd9da * grub-core/disk/diskfilter.c (grub_diskfilter_iterate): Fix off-by-one
error.
2012-02-27 11:39:15 +01:00
Vladimir 'phcoder' Serbinenko
b4a6a53310 * grub-core/normal/menu_text.c (grub_print_message_indented_real): Fix a
warning.
2012-02-27 10:31:46 +01:00
Navdeep Parhar
665f2341f7 * grub-core/loader/i386/bsd.c (freebsd_zfsguid): New variable.
(freebsd_get_zfs): New function.
	(grub_freebsd_boot): Pass zfs UUID.
	(grub_cmd_freebsd): Set zfs UUID.
2012-02-27 02:02:16 +01:00
Vladimir 'phcoder' Serbinenko
1e9a9a3faf * grub-core/disk/diskfilter.c (insert_array): Choose the smallest
device.
	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Reject too
	small devices.
2012-02-27 00:46:08 +01:00
Vladimir 'phcoder' Serbinenko
036985b8ce Remove grub_{modname}_init and grub_{modname}_fini. They should never
be used directly if it's really a module and GRUB_MOD_INIT shouldn't
	be used on non-modules.

	* grub-core/commands/boot.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]:
	Rename to grub_boot_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_boot_fini.
	* grub-core/commands/keylayouts.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_fini.
	* grub-core/font/font_cmd.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_font_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_font_fini.
	* grub-core/kern/mips/loongson/init.c: Replace explicit protos with
	includes.
	(grub_machine_init): Remove empty inits.
	* grub-core/kern/mips/qemu_mips/init.c: Replace explicit protos with
	includes.
	(grub_machine_init): Remove empty inits.
	* grub-core/term/arc/console.c: Remove explicit proto.
	* grub-core/term/at_keyboard.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_at_keyboard_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
	grub_at_keyboard_fini.
	* grub-core/term/gfxterm.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_gfxterm_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
	grub_gfxterm_fini.
	* grub-core/term/i386/pc/vga_text.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_vgatext_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
	grub_vgatext_fini.
	* grub-core/term/ieee1275/console.c: Remove explicit proto.
	* grub-core/term/serial.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_serial_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
	grub_serial_fini.
	* grub-core/term/terminfo.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_terminfo_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
	grub_terminfo_fini.
	* grub-core/video/bitmap.c (GRUB_MOD_INIT): Removed.
	(GRUB_MOD_FINI): Likewise.
	* grub-core/video/radeon_fuloong2e.c (GRUB_MOD_INIT)
	[LOONGSON]: Rename to grub_video_radeon_fuloong2e_init.
	(GRUB_MOD_FINI) [LOONGSON]: Rename to
	grub_video_radeon_fuloong2e_fini.
	* grub-core/video/sis315pro.c (GRUB_MOD_INIT)
	[LOONGSON]: Rename to grub_video_sis315pro_init.
	(GRUB_MOD_FINI) [LOONGSON]: Rename to
	grub_video_sis315pro_fini.
	* grub-core/video/sm712.c (GRUB_MOD_INIT)
	[LOONGSON]: Rename to grub_video_sm712_init.
	(GRUB_MOD_FINI) [LOONGSON]: Rename to
	grub_video_sm712_fini.
	* include/grub/at_keyboard.h (grub_at_keyboard_init): New proto.
	(grub_at_keyboard_fini): Likewise.
	* include/grub/dl.h (GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]:
	Don't declare grub_{modname}_init.
	(GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]: Don't declare grub_{modname}_fini.
	* include/grub/keyboard_layouts.h (grub_keylayouts_init) [!EMU]:
	New proto.
	(grub_keylayouts_fini) [!EMU]: Likewise.
	* include/grub/serial.h (grub_serial_init) [!EMU]:
	New proto.
	(grub_serial_fini) [!EMU]: Likewise.
	* include/grub/terminfo.h (grub_terminfo_init) [!EMU]:
	New proto.
	(grub_terminfo_fini) [!EMU]: Likewise.
	* include/grub/video.h (grub_font_init) [!EMU]:
	New proto.
	(grub_font_fini) [!EMU]: Likewise.
	(grub_gfxterm_init) [!EMU]: Likewise.
	(grub_gfxterm_fini) [!EMU]: Likewise.
	(grub_video_sm712_init) [!EMU]: Likewise.
	(grub_video_sm712_fini) [!EMU]: Likewise.
	(grub_video_sis315pro_init) [!EMU]: Likewise.
	(grub_video_sis315pro_fini) [!EMU]: Likewise.
	(grub_video_radeon_fuloong2e_init) [!EMU]: Likewise.
	(grub_video_radeon_fuloong2e_fini) [!EMU]: Likewise.
2012-02-27 00:28:45 +01:00
Vladimir 'phcoder' Serbinenko
d5534665ff Make nand a prefix for nand devices.
* grub-core/disk/ieee1275/nand.c (grub_nand_open): Use prefix nand.
2012-02-26 23:59:00 +01:00
Vladimir 'phcoder' Serbinenko
10133b5ff3 * grub-core/kern/misc.c (grub_stpcpy): Move from here ...
* include/grub/misc.h (grub_stpcpy): ... to here. Inlined.
2012-02-26 23:55:18 +01:00
Vladimir 'phcoder' Serbinenko
8e307a625d * include/grub/env.h (grub_env_find): Remove prototype.
* grub-core/kern/env.c (grub_env_find): Make static.
	(grub_env_set): Remove useless set.
2012-02-26 23:53:21 +01:00
Vladimir 'phcoder' Serbinenko
a4c65f3441 * grub-core/kern/i386/realmode.S: Remove useless align. 2012-02-26 23:46:34 +01:00
Vladimir 'phcoder' Serbinenko
50159add1e * grub-core/disk/diskfilter.c (grub_diskfilter_open): Remove useless
grub_dprintf.
2012-02-26 23:39:21 +01:00
Vladimir 'phcoder' Serbinenko
b2582b84f2 * grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Remove useless
grub_errors.
	* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Simplify by
	not reloading whole superblock but only the part which is really needed.
	Remove useless grub_errors.
	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Remove useless
	grub_errors.
2012-02-26 23:36:12 +01:00
Vladimir 'phcoder' Serbinenko
e2a833958e Don't export grub_get_rtc.
* include/grub/i386/pc/time.h (grub_get_rtc): Don't export.
	* grub-core/commands/i386/pc/play.c (play): Use grub_get_time_ms.
2012-02-26 23:25:47 +01:00
Vladimir 'phcoder' Serbinenko
e7d2a906b0 * grub-core/genmod.sh.in: Add -R .note.GNU-stack to strip. 2012-02-26 22:57:26 +01:00
Vladimir 'phcoder' Serbinenko
6cf1363b8f * grub-core/disk/diskfilter.c (insert_array): Remove scanner_name
argument since it can be deduced from diskfilter. All users updated.
2012-02-26 22:53:21 +01:00
Vladimir 'phcoder' Serbinenko
eece3349ea Remove prio_list.
* include/grub/list.h (grub_prio_list): Removed.
	(GRUB_PRIO_LIST_PRIO_MASK): Removed. All users switched to
	GRUB_COMMAND_PRIO_MASK.
	(GRUB_PRIO_LIST_FLAG_ACTIVE): Removed. All users switched to
	GRUB_COMMAND_FLAG_ACTIVE.
	(grub_prio_list_insert): Removed.
	(grub_prio_list_remove): Likewise.
	(GRUB_AS_PRIO_LIST): Likewise.
	(GRUB_AS_PRIO_LIST_P): Likewise.
	* include/grub/command.h (GRUB_COMMAND_PRIO_MASK): New define.
	(GRUB_COMMAND_FLAG_ACTIVE): Likewise.
	* grub-core/kern/list.c (grub_prio_list_insert): Remove.
	* grub-core/kern/command.c (grub_register_command_prio): Inline
	the prio_list code.
	(grub_unregister_command): Likewise.
2012-02-26 22:49:24 +01:00
Vladimir 'phcoder' Serbinenko
94f064b4c9 Fix interrupt mixup from previous commit.
* include/grub/i386/pc/int.h (grub_i386_idt): New struct.
	(grub_realidt): New var.
	* grub-core/lib/i386/relocator16.S (grub_relocator16_idt): New variable
	Load idt.
	* grub-core/lib/i386/relocator.c (grub_relocator16_idt):
	New declaration.
	(grub_relocator16_boot): Set grub_relocator16_idt.
	* grub-core/kern/i386/realmode.S (realidt): Renamed to ...
	(LOCAL(realidt)): ... this.
	* grub-core/boot/i386/pc/startup_raw.S: Pass pointer to realidt in eax.
	* grub-core/kern/i386/pc/startup.S: Save pointer to realidt.
	(grub_realidt): New variable.
2012-02-26 22:10:13 +01:00
Vladimir 'phcoder' Serbinenko
27317084c6 * grub-core/lib/i386/backtrace.c (grub_cmd_backtrace): Move from ...
* grub-core/lib/backtrace.c (grub_cmd_backtrace): ... to here.
	* grub-core/lib/i386/backtrace.c (GRUB_MOD_INIT): Move from ...
	* grub-core/lib/backtrace.c (GRUB_MOD_INIT): ... to here.
	Gettextize.
	* grub-core/lib/i386/backtrace.c (GRUB_MOD_FINI): Move from ...
	* grub-core/lib/backtrace.c (GRUB_MOD_FINI): ... to here.
	* po/POTFILES.in: Regenerate.
2012-02-26 21:04:45 +01:00
Vladimir 'phcoder' Serbinenko
47b40053e0 * grub-core/commands/probe.c (grub_cmd_probe): Gettextise UUID and label
errors.
2012-02-26 20:36:09 +01:00
Vladimir 'phcoder' Serbinenko
2b3431017d * grub-core/gnulib/argp-fmtstream.c (__argp_get_display_len): Stop on
\0.
	(add_length): Likewise.
2012-02-26 20:32:37 +01:00
Vladimir 'phcoder' Serbinenko
4cebfa1a87 GDB serial and backtrace support.
* grub-core/kern/i386/realmode.S (real_to_prot): Reload IDT.
	(prot_to_real): Likewise.
	* grub-core/kern/i386/int.S (grub_bios_interrupt): Remove IDT reload.
	* grub-core/Makefile.core.def (backtrace): New module.
	(gdb): Likewise.
	* grub-core/gdb/cstub.c: New file.
	* grub-core/gdb/gdb.c: Likewise.
	* grub-core/gdb/i386/idt.c: Likewise.
	* grub-core/gdb/i386/machdep.S: Likewise.
	* grub-core/gdb/i386/signal.c: Likewise.
	* grub-core/lib/i386/backtrace.c: Likewise.
	* grub-core/lib/backtrace.c: Likewise.
	* include/grub/backtrace.h: Likewise.
	* include/grub/gdb.h: Likewise.
	* include/grub/i386/gdb.h: Likewise.
2012-02-26 20:31:03 +01:00
Lubomir Kundrak
ff27c3dd5d GDB serial and backtrace support.
* grub-core/kern/i386/realmode.S (real_to_prot): Reload IDT.
	(prot_to_real): Likewise.
	* grub-core/kern/i386/int.S (grub_bios_interrupt): Remove IDT reload.
	* grub-core/Makefile.core.def (backtrace): New module.
	(gdb): Likewise.
	* grub-core/gdb/cstub.c: New file.
	* grub-core/gdb/gdb.c: Likewise.
	* grub-core/gdb/i386/idt.c: Likewise.
	* grub-core/gdb/i386/machdep.S: Likewise.
	* grub-core/gdb/i386/signal.c: Likewise.
	* grub-core/lib/i386/backtrace.c: Likewise.
	* include/grub/backtrace.h: Likewise.
	* include/grub/gdb.h: Likewise.
	* include/grub/i386/gdb.h: Likewise.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-02-26 19:17:37 +01:00
Vladimir 'phcoder' Serbinenko
1948a3b714 Several cleanups 2012-02-26 19:10:52 +01:00
Vladimir 'phcoder' Serbinenko
585031cb92 * grub-core/gnulib/argp-fmtstream.c (__argp_get_display_len):
New function.
	(add_length): Likewise.
	(__argp_fmtstream_update): Handle strings with non-ASCII chars.
	* grub-core/gnulib/argp-fmtstream.h (__argp_get_display_len): New
	proto.
	* grub-core/gnulib/argp-help.c (argp_args_usage): Use
	__argp_get_display_len.
2012-02-26 19:07:59 +01:00
Vladimir 'phcoder' Serbinenko
7e8fac16ad $"..." support in scripts.
* grub-core/script/execute.c (grub_script_arglist_to_argv): Handle
	GRUB_SCRIPT_ARG_TYPE_GETTEXT.
	* grub-core/script/yylex.l: Likewise.
	* include/grub/script_sh.h (GRUB_SCRIPT_ARG_TYPE_GETTEXT): New enum
	value.
2012-02-26 19:02:46 +01:00
Vladimir 'phcoder' Serbinenko
22c7ce85fe Add new all_video module.
* grub-core/Makefile.am (moddep.lst): Make dependent on video.lst.
	* grub-core/Makefile.core.def (all_video): New module.
	* grub-core/genmoddep.awk: Generate dependency of all_video from
	video.lst.
	* grub-core/lib/fake_module.c: New file.
	* grub-core/normal/main.c (features): Add feature_all_video_module.
	* util/grub.d/00_header.in: Define locale_dir based on $prefix and
	don't do explicit search again.
	insmod all_video in load_video if available.
2012-02-26 18:09:07 +01:00
Vladimir 'phcoder' Serbinenko
67093bc0ed Another round of string clarification and adding TRANSLATORS comments. 2012-02-26 17:28:05 +01:00
Vladimir 'phcoder' Serbinenko
8b282ad222 * grub-core/normal/charset.c (grub_utf8_to_ucs4_alloc): Fix return type
to grub_ssize_t.
	* grub-core/normal/main.c (grub_normal_init_page): Fix msg_len type.
	* include/grub/charset.h (grub_utf8_to_ucs4_alloc): Fix prototype.
2012-02-26 17:20:30 +01:00
Vladimir 'phcoder' Serbinenko
d43ad75467 * grub-core/normal/menu_text.c (grub_print_message_indented_real): Add
trailing newline implicitly. All users updated.
2012-02-26 17:16:05 +01:00
Vladimir 'phcoder' Serbinenko
a9c7fd1c6c Implement serial on IEEE1275 and EFI.
* docs/grub.texi (Platform-specific limitations): Fix the columen video
	on emu. Mention arc and emu as the only platforms without serial
	support.
	* grub-core/Makefile.core.def (serial): Enable on all terminfomodule and
	ieee1275 platforms.
	* grub-core/term/efi/serial.c: New file.
	* grub-core/term/ieee1275/serial.c: Likewise.
	* grub-core/term/serial.c (grub_serial_find): Disable direct port
	specification if no ns8250 driver is available.
	(grub_cmd_serial): Likewise.
	(GRUB_MOD_INIT) [GRUB_MACHINE_IEEE1275]: Init ofserial.
	(GRUB_MOD_INIT) [GRUB_MACHINE_EFI]: Init efiserial.
	* include/grub/efi/api.h (GRUB_EFI_SERIAL_IO_GUID): New define.
	(grub_efi_parity_type_t): New type.
	(grub_efi_stop_bits_t): Likewise.
	(grub_efi_serial_io_interface): New struct.
	* include/grub/serial.h (grub_serial_port): Make 'broken' field
	available for all interfaces.
	Add EFI and IEEE1275 fields.
	(grub_ofserial_init): New proto.
	(grub_efiserial_init): Likeiwse.
	* util/grub.d/00_header.in: Don't check for the presence of serial
	module.
2012-02-26 17:08:11 +01:00
Vladimir 'phcoder' Serbinenko
0ec820904e * grub-core/disk/ieee1275/ofdisk.c (scan): Fix improper use of device
name as if it was an alias.
2012-02-26 16:51:25 +01:00
Vladimir 'phcoder' Serbinenko
114076ef63 * grub-core/commands/lsacpi.c (options): Fix typo. 2012-02-25 23:04:30 +01:00
Vladimir 'phcoder' Serbinenko
6a656b0ea5 Convert grub-emu to argp.
* grub-core/Makefile.core.def (kernel): Add kern/emu/argp_common.c on
	emu.
	* util/argp_common.c: Rename to ...
	* grub-core/kern/emu/argp_common.c: ... this. All users updated.
	Add missing includes.
	* grub-core/kern/emu/main.c: Convert to argp.
	* po/POTFILES.in: Regenerate.
	* util/grub-install.in (usage): Make first letter lowcase in messages
	for uniformity.
	* util/grub-setup.c (options): Likewise.
2012-02-25 01:15:29 +01:00
Vladimir 'phcoder' Serbinenko
1e3f8ae86f * grub-core/gfxmenu/gui_progress_bar.c (progress_bar_set_property):
Put back accidently commented-out code.
2012-02-24 22:40:05 +01:00
Vladimir 'phcoder' Serbinenko
ed167a8027 * grub-core/fs/hfsplus.c (grub_hfsplus_btree_iterate_node): Add btree
loop check using Brent algorithm.
	(grub_hfsplus_btree_search): Likewise.
2012-02-24 22:28:45 +01:00
Vladimir 'phcoder' Serbinenko
4e27343fb0 * conf/Makefile.common (CFLAGS_GNULIB): Add
-Wno-unsafe-loop-optimizations.
	* configure.ac: Remove -Wmissing-declarations and -Wmissing-prototypes
	on tools.
	* grub-core/commands/legacycfg.c: Add pragma to skip
	-Wunsafe-loop-optimizations.
	(check_password_md5_real): Fix loop counter type.
	* grub-core/commands/testload.c (grub_cmd_testload): Fix over the EOF
	reading.
	* grub-core/disk/ldm.c (grub_util_get_ldm): Fix logic error.
	* grub-core/fs/zfs/zfs_sha256.c (zio_checksum_SHA256): Add safety
	loop condition.
	* grub-core/io/gzio.c: Add pragma to skip -Wunsafe-loop-optimizations.
	* grub-core/lib/LzmaEnc.c (GetOptimum): Avoid possible infinite loop.
	* grub-core/net/net.c (grub_net_route_address): Add safety loop
	condition.
	* grub-core/normal/charset.c (bidi_line_wrap): Likewise.
	* grub-core/normal/cmdline.c (grub_set_history): Fix loop types and
	avoid possible infinite loops.
	* grub-core/script/parser.y: Add pragma to skip -Wmissing-declarations
	and -Wunsafe-loop-optimizations.
	* grub-core/script/yylex.l: Likewise.
	* util/grub-mkfont.c: Add pragma to skip -Wunsafe-loop-optimizations.
	(print_glyphs): Avoid infinite loops.
	* util/grub-mkimage.c (compress_kernel_xz): Fix format security.
2012-02-24 12:30:32 +01:00
Grégoire Sutre
697f18b067 * grub-core/commands/lsacpi.c (disp_acpi_xsdt_table): Fix loop condition
to avoid infinite loop.
	(disp_acpi_rsdt_table): Likewise.
2012-02-24 11:48:07 +01:00
Vladimir 'phcoder' Serbinenko
274416e82f * grub-core/font/font.c (grub_font_load): Add support for default
path for fonts ($prefix/fonts).
	* grub-core/kern/corecmd.c (grub_core_cmd_insmod): Unify condition
	for checking if string is a path.
	* grub-core/normal/main.c (features): Add feature_default_font_path.
	* util/grub-mkconfig.in: Skip mangling of GRUB_FONT into GRUB_FONT_PATH.
	* util/grub.d/00_header.in: Use default directory if possible.
	* util/grub-install.in: Install unicode.pf2.
2012-02-24 11:18:06 +01:00
Vladimir 'phcoder' Serbinenko
fe42ce0924 * grub-core/fs/btrfs.c (find_device): Fix typos.
* grub-core/fs/zfs/zfs.c (read_device): Likewise.
	* util/grub-mkrelpath.c (argp_parser): Likewise.
	Reported by: Yuri Chornoivan.
2012-02-23 22:27:25 +01:00
Dalet Omega
72f1d06552 * grub-core/gfxmenu/gui_label.c (label_set_property): Add template
for usual informative messages.
2012-02-23 17:30:19 +01:00