Commit graph

1703 commits

Author SHA1 Message Date
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
c36e5cd162 Remove any awareness of *.c util files about target.
* Makefile.util.def (grub-setup): Split to ...
	(grub-bios-setup): ... and this.
	(grub-sparc64-setup): ... and this.
	* configure.ac: Don't add machine_CPPFLAGS into HOST_CPPFLAGS.
	* docs/man/grub-setup.h2m: Split into ...
	* docs/man/grub-sparc64-setup.h2m: ... this.
	* docs/man/grub-bios-setup.h2m: ... and this.
	* include/grub/dl.h (grub_dl) [GRUB_UTIL]: Remove struct.
	* include/grub/elf.h (Elf_*) [GRUB_UTIL]: Remove types.
	(GRUB_TARGET_WORDSIZE) [GRUB_UTIL]: Remove.
	(grub_target_addr_t): Remove.
	(grub_target_size_t): Remove.
	(grub_target_ssize_t): Remove.
	* util/grub-install.in: Use new grub-*-setup.
	* util/grub-mkimagexx.c (Elf_Word): New define.
	(Elf_Half): Likewise.
	(Elf_Section): Likewise.
	(ELF_ST_TYPE): Likewise.
	* util/grub-setup.c: Switch from GRUB_MACHINE_SPARC64 to
	GRUB_SETUP_SPARC64 and from GRUB_MACHINE_PCBIOS to GRUB_SETUP_BIOS.
2012-02-27 14:24:22 +01:00
Vladimir 'phcoder' Serbinenko
5a0dc6fb2a * include/grub/efi/api.h (grub_efi_runtime_services): Add missing
const qualifier for vendor_guid.
2012-02-27 14:09:09 +01:00
Vladimir 'phcoder' Serbinenko
49017b1719 Fix missing console prototype on qemu-mips.
* include/grub/mips/qemu_mips/console.h: New file.
2012-02-27 14:06:33 +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
Matthew Garrett
e33f8d692f * include/grub/efi/pci.h: New file to define EFI PCI protocols. 2012-02-27 11:42:23 +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
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
d87893d5dc * include/grub/dl.h (grub_dl_load_file): Don't export. 2012-02-26 23:44:39 +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
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
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
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
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
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
463dcadca3 * include/grub/acpi.h (GRUB_ASCII_OPCODE): Add
GRUB_ACPI_OPCODE_STRING_CONST, GRUB_ACPI_OPCODE_BUFFER,
	GRUB_ACPI_OPCODE_CREATE_WORD_FIELD
	and GRUB_ACPI_OPCODE_CREATE_BYTE_FIELD.
	* grub-core/commands/acpihalt.c [GRUB_DSDT_TEST]: Replace include of
	i18n with gettext no-op.
	(skip_data_ref_object): Support GRUB_ACPI_OPCODE_BUFFER and
	GRUB_ACPI_OPCODE_STRING_CONST.
	(get_sleep_type): Support GRUB_ACPI_OPCODE_CREATE_WORD_FIELD and
	GRUB_ACPI_OPCODE_CREATE_BYTE_FIELD. Add handling of unknown opcodes.
2012-02-22 16:02:03 +01:00
Vladimir 'phcoder' Serbinenko
b00d7fb6c5 Make list_push and list_remove functions rather than inline functions
to decrease size and avoid aliasing violations.

	* include/grub/list.h (grub_list_push): Move to ...
	* grub-core/kern/list.c (grub_list_push): ... here. Don't inline.
	* include/grub/list.h (grub_list_remove): Move to ...
	* grub-core/kern/list.c (grub_list_remove): ... here. Don't inline.
2012-02-22 05:01:20 +01:00
Vladimir 'phcoder' Serbinenko
515e8007fc merge mainline into gdb 2012-02-18 21:00:13 +01:00
Vladimir 'phcoder' Serbinenko
fc400bfd74 merge backtrace into gdb 2012-02-18 20:59:42 +01:00
Vladimir 'phcoder' Serbinenko
a8f16eab1a Replace grub_checkkey with grub_getkey_noblock.
* grub-core/kern/term.c (grub_checkkey): Replaced with ...
	(grub_getkey_noblock): ... this. All users updated.
2012-02-18 19:59:01 +01:00
Vladimir 'phcoder' Serbinenko
e51b56667a * include/grub/test.h (grub_unit_test_init): Add missing prototype.
(grub_unit_test_fini): Likewise.
	* tests/lib/unit_test.c (main): Remove extra nested external prototype.
2012-02-12 22:04:55 +01:00
Vladimir 'phcoder' Serbinenko
0331e102c9 Efiemu stylistic fixes and gettext.
* grub-core/efiemu/i386/loadcore32.c
	(grub_arch_efiemu_relocate_symbols32): Avoid set in if.
	* grub-core/efiemu/i386/loadcore64.c
	(grub_arch_efiemu_relocate_symbols64): Likewise.
	* grub-core/efiemu/i386/pc/cfgtables.c
	(grub_machine_efiemu_init_tables): Likewise.
	* grub-core/efiemu/loadcore.c (grub_efiemu_resolve_symbols): Likewise.
	(grub_efiemu_loadcore_initXX): Add a filename argument.
	All users updated.
	Improved error message.
	* grub-core/efiemu/loadcore_common.c (grub_efiemu_loadcore_init):
	Add a filename argument.
	All users updated.
	* grub-core/efiemu/symbols.c (grub_efiemu_set_virtual_address_map):
	Reclassify double relocation as GRUB_ERR_BUG.
2012-02-12 18:43:39 +01:00
Vladimir 'phcoder' Serbinenko
f991dd3c32 * include/grub/misc.h (grub_error_save): Fix cleaning grub_errno. 2012-02-12 17:21:09 +01:00
Vladimir 'phcoder' Serbinenko
d61386e21d Improve string. Gettextize. 2012-02-12 15:25:25 +01:00
Vladimir 'phcoder' Serbinenko
ead2a8822b Remove prio_list 2012-02-12 03:52:17 +01:00
Vladimir 'phcoder' Serbinenko
4786a90fee * grub-core/disk/diskfilter.c (grub_diskfilter_print_partmap)
[GRUB_UTIL]: New function.
	(insert_array) [GRUB_UTIL]: Store partmaps.
	* include/grub/diskfilter.h (grub_diskfilter_pv) [GRUB_UTIL]: New member
	partmaps.
	(grub_diskfilter_print_partmap) [GRUB_UTIL]: New proto.
	* util/grub-probe.c (probe_partmap): Call grub_diskfilter_print_partmap.
	(probe_abstraction): Print diskfilter and not raid.
	Reported by: Lennart Sorensen
2012-02-11 11:57:47 +01:00
Vladimir 'phcoder' Serbinenko
dfdffd0d94 * include/grub/emu/misc.h (grub_util_warn): Add missing format
attribute.
	(grub_util_info): Likewise.
	(grub_util_error): Likewise.
2012-02-10 14:15:14 +01:00
Vladimir 'phcoder' Serbinenko
164ebb480d * include/grub/symbol.h (EXT_C) [GRUB_UTIL]: Removed.
(FUNCTION) [GRUB_UTIL]: Likewise.
	(VARIABLE) [GRUB_UTIL]: Likewise.
2012-02-10 12:47:42 +01:00
Vladimir 'phcoder' Serbinenko
44318d6168 * include/grub/misc.h: Avoid evaluationg NEED_ENABLE_EXECUTE_STACK and
NEED_REGISTER_FRAME_INFO in GRUB_UTIL.
2012-02-10 12:45:32 +01:00
Vladimir 'phcoder' Serbinenko
ccc3b1b898 * grub-core/kern/emu/full.c (grub_emu_post_init): Remove raid reinit.
* include/grub/disk.h [GRUB_MACHINE_EMU]: Remove now useless LVM/RAID
	declarations.
2012-02-09 23:15:27 +01:00
Vladimir 'phcoder' Serbinenko
b2c0c4a6c6 * include/grub/net.h: Remove double declarations. 2012-02-09 22:44:28 +01:00
Vladimir 'phcoder' Serbinenko
e4e37e8dfa Fix `help' with unloaded modules.
* include/grub/normal.h (grub_dyncmd_get_cmd): New proto.
	* grub-core/normal/dyncmd.c (grub_dyncmd_get_cmd): New function.
	(grub_dyncmd_dispatcher): Small stylistic fix.
	* grub-core/commands/help.c (grub_cmd_help): Load missing modules when
	explicit help is requested.
2012-02-09 14:38:34 +01:00
Vladimir 'phcoder' Serbinenko
9c4b5c13e6 Improve gettext support. Stylistic fixes and error handling fixes while
on it.
2012-02-08 19:26:01 +01:00
Vladimir 'phcoder' Serbinenko
215c90cb82 * grub-core/lib/i386/relocator16.S: Revert moving A20 code into PM
part. Instead setup the correct stack in RM.
	* grub-core/lib/i386/relocator.c (grub_relocator16_boot): Reserve place
	for stack.
	* include/grub/i386/relocator_private.h: New file.
2012-02-07 22:31:14 +01:00
Vladimir 'phcoder' Serbinenko
0ae70393ba Improve and unify messages.
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Add argument
	name. All users updated.
	Print filename in error.
	(read_device_map): Print filename in error.
	* util/getroot.c (grub_guess_root_devices): Print filename in error.
	(grub_util_get_os_disk): Likewise.
	(grub_util_biosdisk_get_grub_dev): Likewise.
	(grub_util_check_block_device): Likewise.
	(grub_util_check_char_device): Likewise.
	(grub_make_system_path_relative_to_its_root): Likewise.
	* util/grub-editenv.c (create_envblk_file): Likewise.
	(open_envblk_file): Likewise.
	(write_envblk): Likewise.
	* util/grub-fstest.c (cmd_cp): Likewise.
	(cmd_cat): Likewise.
	(cmd_cmp): Likewise.
	* util/grub-menulst2cfg.c (main): Likewise.
	* util/grub-mkfont.c (write_font_ascii_bitmap): Likewise.
	(write_font_width_spec): Likewise.
	(write_font_pf2): Likewise.
	* util/grub-mkimage.c (generate_image): New argument outname.
	All users updated.
	Remove unreacheable message.
	(options): Unify messages.
	(help_filter): Likewise.
	* util/grub-mklayout.c (usage): Removed (unused).
	(main): Print filename in error.
	* util/grub-mkrescue.in: Fix wrong quoting.
	* util/grub-setup.c (setup): Print filename in error.
	* util/ieee1275/ofpath.c (vendor_is_ATA): Likewise.
	(check_sas): Likewise.
	* util/misc.c (grub_util_get_fp_size): Removed.
	(grub_util_get_image_size): Print filename in error.
	(grub_util_read_at): Removed.
	(grub_util_read_image): Print filename in error.
	(grub_util_load_image): Likewise.
	(grub_util_write_image_at): New argument filename. All users updated.
	Print filename in error.
	(grub_util_write_image): New argument filename. All users updated.
	Print filename in error.
	* util/raid.c (grub_util_raid_getmembers): Print filename in error.
	* util/resolve.c (grub_util_resolve_dependencies): Likewise.
2012-02-05 11:07:33 +01:00
Vladimir 'phcoder' Serbinenko
0a96117de7 * grub-core/Makefile.core.def (pxechain): New module.
* grub-core/loader/i386/pc/pxechainloader.c: New file.
	* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_get_cached): New
	function.
	(grub_pc_net_config_real): Use grub_pxe_get_cached.
	* include/grub/i386/pc/pxe.h (grub_pxe_get_cached): New proto.
2012-02-05 10:33:52 +01:00
Vladimir 'phcoder' Serbinenko
aca002f7e4 * grub-core/kern/err.c (GRUB_MAX_ERRMSG): Move to ...
* include/grub/err.h (GRUB_MAX_ERRMSG): ... here.
	* include/grub/err.h (grub_error_saved): New struct.
	(grub_errmsg): Make array size explicit.
	* include/grub/misc.h (grub_error_save): New function.
	(grub_error_load): Likewise.
	* grub-core/kern/err.c (grub_error_stack_items): Use grub_error_saved.
	(grub_error_push): Update `errno' member name.
	(grub_error_pop): Likewise
	* grub-core/net/tftp.c (tftp_data): New member save_err.
	(tftp_receive): Save error.
	(tftp_open): Restore error.
2012-02-05 10:24:53 +01:00
Vladimir 'phcoder' Serbinenko
db606889a9 * grub-core/kern/ieee1275/openfw.c (grub_claimmap): Change to
grub_error framework. All users updated.
2012-02-04 14:00:23 +01:00
Vladimir 'phcoder' Serbinenko
8be63f2ef6 * Makefile.util.def (grub-mkdevicemap): Removed.
* include/grub/emu/hostdisk.h (grub_util_get_os_disk): New proto.
	* include/grub/util/deviceiter.h: Removed.
	* util/deviceiter.c: Likewise.
	* util/getroot.c (grub_util_get_os_disk): New function.
	* util/grub-install.in: Remove grub-mkdevicemap. Use -t disk as
	replacement for EFI.
	* util/grub-mkdevicemap.c: Removed.
	* util/grub-probe.c (probe): Handle PRINT_DISK.
	(argp_parser): Handle -t disk.
2012-02-03 22:36:51 +01:00
Vladimir 'phcoder' Serbinenko
cf5f7ee788 Support install on multi-device filesystems.
* include/grub/emu/getroot.h (grub_guess_root_device): Renamed to ...
	(grub_guess_root_devices): ...this. Return char **. All users updated.
	* include/grub/emu/misc.h (grub_find_root_device_from_mountinfo):
	Removed.
	* util/getroot.c (find_root_device_from_libzfs): Moved pool logic to ...
	(find_root_devices_from_poolname): ... here.
	(grub_find_root_devices_from_mountinfo): Return char **. Make static.
	Support zfs-fuse.
	(grub_guess_root_device): Rename to ...
	(grub_guess_root_devices): ... this. Return char **. All users updated.
	* util/grub-install.in: Handle multi-device filesystems.
	* util/grub-probe.c (probe). Make device_names a char **. Add delim
	argument. All users updated.
	Handle multi-device filesystems.
	Use 'delim' as separator.
	Remove device check to allow filesystems on file.
	(main): Support -0 argument. Handle multi-device.
	* util/grub-setup.c (setup): Remove root argument. Handle multi-device.
	Fix a cross-device check while on it.
	(arguments): Remove root_dev.
	(argp_parser): Remove -r.
	(main): Remove root_dev.
2012-02-03 10:35:28 +01:00
Vladimir 'phcoder' Serbinenko
d68538e928 merge mainline into cbi 2012-02-01 14:30:40 +01:00
Vladimir 'phcoder' Serbinenko
cefa01261b merge mainline into ehci 2012-02-01 13:19:42 +01:00
Vladimir 'phcoder' Serbinenko
9c08ad8707 * grub-core/disk/scsi.c (grub_scsi_read_capacity): Renamed to ...
(grub_scsi_read_capacity10): ... this.
	(grub_scsi_read_capacity16): New function.
	(grub_scsi_open): Use read_capacity16 if read_capacity10 returned
	0xffffffff.
	Fix off-by-one error.
	* include/grub/scsi.h (grub_scsi): Rename size to last_block and make it
	64-bit unsigned.
	* include/grub/scsicmd.h (grub_scsi_read_capacity): Rename to ...
	(grub_scsi_read_capacity10): ... this.
	(grub_scsi_read_capacity_data): Rename to ...
	(grub_scsi_read_capacity10_data): ... this. Rename size to last_block.
	(grub_scsi_read_capacity16): New struct.
	(grub_scsi_read_capacity16_data): Likewise.
	(grub_scsi_cmd_t): Rename grub_scsi_cmd_read_capacity to
	grub_scsi_cmd_read_capacity10.
	New command grub_scsi_cmd_read_capacity16.
2012-01-30 18:33:11 +01:00
Vladimir 'phcoder' Serbinenko
bc8d0f45a5 SCSI >2TiB support.
* grub-core/disk/scsi.c (grub_scsi_read16): New function.
	(grub_scsi_write16): Likewise.
	(grub_scsi_read): Use read16 when necessary.
	(grub_scsi_write): Likewise.
	* include/grub/scsicmd.h (grub_scsi_read16): New struct.
	(grub_scsi_write16): Likewise.
	(grub_scsi_cmd_t): Add READ16 and WRITE16.
2012-01-30 12:47:26 +01:00
Vladimir 'phcoder' Serbinenko
cc774926f1 SCSI write support (for usbms mainly).
* grub-core/disk/scsi.c (grub_scsi_write10): Uncomment. Make buffer
	a const pointer.
	(grub_scsi_write): Implement.
	* include/grub/scsi.h (grub_scsi_dev): Make write buffer a const pointer
2012-01-30 12:26:11 +01:00
Vladimir 'phcoder' Serbinenko
0b3b3b38bd * grub-core/lib/posix_wrap/limits.h (SHRT_MAX): New define.
(INT_MAX): Likewise.
	* grub-core/lib/posix_wrap/stdio.h (snprintf): New function.
	* grub-core/lib/posix_wrap/stdlib.h (abs): Likewise.
	* grub-core/lib/posix_wrap/string.h (memcmp): Likewise.
	(strcpy): Likewise.
	(strstr): Likewise.
	(strchr): Likewise.
	(strncpy): Likewise.
	(strcat): Likewise.
	(strncat): Likewise.
	(strcoll): Likewise.
	* include/grub/types.h (GRUB_SHRT_MAX): New define.
	(GRUB_INT_MAX): Likewise.
2012-01-29 23:27:31 +01:00