Commit graph

461 commits

Author SHA1 Message Date
BVK Chaitanya
87220a6881 merge with mainline 2010-11-07 18:31:41 +05:30
BVK Chaitanya
a8152fedab suppress shell expansion inside quoted strings 2010-11-07 16:13:14 +05:30
Vladimir 'phcoder' Serbinenko
80c6d25eef * grub-core/kern/emu/hostdisk.c
(convert_system_partition_to_system_disk): Handle devices like "sdaa1".
2010-11-07 00:10:49 +01:00
Vladimir 'phcoder' Serbinenko
34706ddc06 * grub-core/fs/ntfs.c (grub_ntfs_uuid): Make uppercase. 2010-11-06 21:54:24 +01:00
Vladimir 'phcoder' Serbinenko
9c693bd66a Properly register serial terminfo.
Reported by: Jordan Uggla

	* grub-core/term/serial.c (grub_serial_terminfo_input_template): New
	const.
	(grub_serial_terminfo_output_template): Likewise.
	(grub_cmd_serial): Register "serial" with terminfo.
	(GRUB_MOD_INIT(serial)): Fill grub_serial_terminfo_input and
	grub_serial_terminfo_output.
2010-11-06 20:40:08 +01:00
Robert Millan
b9b3839f6d 2010-11-05 Robert Millan <rmh@gnu.org>
On Yeeloong, pass machine type information to Linux.
	
	* grub-core/loader/mips/linux.c [GRUB_MACHINE_MIPS_YEELOONG]
	(LOONGSON_MACHTYPE): New macro, set to
	"machtype=lemote-yeeloong-2f-8.9inches".
	[LOONGSON_MACHTYPE] (grub_cmd_linux): Pass LOONGSON_MACHTYPE as
	additional argument to Linux.
2010-11-05 19:48:55 +01:00
Grégoire Sutre
33b4b0c61a Fix an integer overflow. 2010-11-01 23:42:53 +01:00
Vladimir 'phcoder' Serbinenko
2b36fbf493 * grub-core/loader/i386/linux.c (grub_cmd_linux): Autoload vbe.mod if
vga= option is supplied.
2010-11-01 13:10:51 +01:00
Vladimir 'phcoder' Serbinenko
6428dec358 * grub-core/lib/arg.c (grub_arg_parse): Avoid interpreting direct
argument as an argument to no-argument option.
2010-11-01 12:45:51 +01:00
Vladimir 'phcoder' Serbinenko
3a1197cdb0 * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Do not put
elements with invlid index.
	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
	* grub-core/disk/raid.c (insert_array): Automatically reallocate
	members.
	* include/grub/raid.h (grub_raid_member): New struct.
	(grub_raid_array): Transform devices and start_sector into usage of
	grub_raid_member. All users updated
	(allocated_devs): New member.
2010-11-01 10:20:58 +01:00
Vladimir 'phcoder' Serbinenko
4f6a2e2175 * grub-core/kern/emu/misc.c
(grub_make_system_path_relative_to_its_root)
	[HAVE_LIBZFS && HAVE_LIBNVPAIR]: Fix mountpoint return on ZFS.
2010-10-23 20:39:08 +02:00
Vladimir 'phcoder' Serbinenko
5c81f8b349 * grub-core/kern/emu/misc.c
(grub_make_system_path_relative_to_its_root): Revert r2882.
2010-10-23 20:34:50 +02:00
Vladimir 'phcoder' Serbinenko
e138c45836 * grub-core/lib/relocator.c (grub_relocator_subchunk): Remove now
useless field head. All users updated.
	(free_subchunk): Correct handling of IN_REGION subchunk.
2010-10-22 22:49:36 +02:00
Grégoire Sutre
b65ea15514 Make mktemp invocations portable. 2010-10-18 22:50:01 +02:00
Szymon Janc
800e6a9be5 * grub-core/normal/auth.c (grub_auth_check_authentication):
Set-but-not-used variable removed.
2010-10-17 15:41:54 +02:00
Vladimir 'phcoder' Serbinenko
7bced4583e * grub-core/kern/i386/pc/startup.S (grub_console_setcursor): Check
cursor shape for sanity.
2010-10-17 01:49:06 +02:00
Szymon Janc
6bdda8f877 * grub-core/commands/legacycfg.c (grub_cmd_legacy_kernel):
Set-but-not-used variable ifdef'ed.
	* grub-core/lib/legacy_parse.c (grub_legacy_parse): Likewise.
	* grub-core/bus/usb/ohci.c (grub_ohci_pci_iter): Set-but-not-used
	variable removed.
	* grub-core/disk/lvm.c (grub_lvm_scan_device): Likewise.
	* grub-core/fs/jfs.c (grub_jfs_find_file): Likewise.
	* grub-core/fs/minix.c (grub_minix_dir): Likewise.
	* grub-core/fs/sfs.c (grub_sfs_read_extent): Likewise.
	* grub-core/fs/ufs.c (grub_ufs_dir): Likewise.
	* grub-core/gfxmenu/gui_list.c (grub_gui_list_new): Likewise.
	* grub-core/gfxmenu/view.c (redraw_menu_visit): Likewise.
	* grub-core/gfxmenu/widget-box.c (draw): Likewise.
	* grub-core/lib/relocator.c (malloc_in_range): Likewise.
	* grub-core/loader/i386/bsdXX.c (grub_netbsd_load_elf_meta): Likewise.
	* grub-core/loader/i386/bsd_pagetable.c (fill_bsd64_pagetable):
	Likewise.
2010-10-16 22:16:52 +02:00
Vladimir 'phcoder' Serbinenko
e19b016b30 * grub-core/commands/acpihalt.c (skip_ext_op): Skip index field op.
* include/grub/acpi.h (GRUB_ACPI_EXTOPCODE_INDEX_FIELD_OP): New
	enum value.
2010-10-16 20:01:30 +02:00
Vladimir 'phcoder' Serbinenko
6c8d300275 * grub-core/commands/acpihalt.c (get_sleep_type): Accept \_S5_ as
synonym to _S5_. Needed for some DSDTs.
2010-10-16 19:12:18 +02:00
Vladimir 'phcoder' Serbinenko
c32b51c9f9 Userspace ACPI parser debugging.
* grub-core/commands/acpihalt.c [GRUB_DSDT_TEST]: Include userspace
	headers and add relevant defines. Don't include standard headers.
	(main) [GRUB_DSDT_TEST]: New function.
	* include/grub/acpi.h [GRUB_DSDT_TEST]: Don't include standard headers.
	Don't declare functions.
2010-10-16 19:06:55 +02:00
Vladimir 'phcoder' Serbinenko
fbfbeb394f Remove dead grub_efi_mm_fini.
* grub-core/kern/efi/mm.c (allocated_page): Removed.
	(ALLOCATED_PAGES_SIZE): Likewise.
	(MAX_ALLOCATED_PAGES): Likewise.
	(allocated_pages): Likewise.
	(grub_efi_allocate_pages): Don't record allocated pages.
	(grub_efi_free_pages): Likewise.
	(grub_efi_mm_init): Likewise.
	(grub_efi_mm_fini): Removed.
2010-10-16 17:50:48 +02:00
Vladimir 'phcoder' Serbinenko
65f7ed7c9a * grub-core/kern/efi/mm.c (BYTES_TO_PAGES): Round up instead of down.
(grub_efi_mm_init): Take into account the memory map size increase.
2010-10-16 17:44:35 +02:00
Vladimir 'phcoder' Serbinenko
24977b4451 * grub-core/term/ns8250.c (do_real_config): Set port->broken to 0.
(serial_hw_put): Wait based on real time rather than port reads. Don't
	roken ports.
	* include/grub/serial.h (grub_serial_port): New field broken.
2010-10-16 17:29:12 +02:00
Robert Millan
1eb01cd276 2010-10-16 Robert Millan <rmh@gnu.org>
* grub-core/kern/emu/misc.c
	(grub_make_system_path_relative_to_its_root): Fix premature return
	when processing non-root ZFS filesystems.
2010-10-16 02:30:14 +02:00
Vladimir 'phcoder' Serbinenko
d0f4c1ea0f * grub-core/efiemu/main.c (grub_efiemu_prepare): Handle errors from
grub_efiemu_autocore.
2010-10-14 15:44:04 +02:00
Vladimir 'phcoder' Serbinenko
d87c681fd4 * grub-core/kern/i386/pc/startup.S (bypass_table): Use 0x1b explicitly
rather than 0x1b.
	(grub_console_getkey): Use correct jae opcode rather than ja.
2010-10-14 15:35:55 +02:00
Vladimir 'phcoder' Serbinenko
20c6bb7e9e Correctly distinguish mdraid flavours.
* grub-core/disk/raid.c (grub_raid_getname) [GRUB_UTIL]: New function.
	(insert_array): New argument raid.
	* include/grub/disk.h (grub_disk_dev) [GRUB_UTIL]: New member raidname.
	* include/grub/raid.h (grub_raid_array) [GRUB_UTIL]: New member driver.
	* util/grub-probe.c (probe): PRint raidname instead of plainly "mdraid".
2010-10-08 23:27:27 +02:00
Vladimir 'phcoder' Serbinenko
74baff844e * grub-core/kern/i386/pc/startup.S (grub_console_getkey): Fix incorrect
handling of special keys.
2010-10-06 19:46:20 +02:00
starous
a94551944e usbtrans.c - wrong max packet size for bulk transfer 2010-10-02 20:49:05 +02:00
Vladimir 'phcoder' Serbinenko
441cfe65c0 Clear out 0x80 color bit on EFI.
Tested by: decoder
	Reported by: decoder and meta tech.

	* grub-core/term/efi/console.c (grub_console_standard_color): Removed.
	(grub_console_setcolorstate): Clear out 0x80 bit.
	Use GRUB_TERM_DEFAULT_STANDARD_COLOR.
	(grub_console_output): Use GRUB_TERM_DEFAULT_NORMAL_COLOR.
	Use GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR.
2010-10-01 16:54:38 +02:00
Vladimir 'phcoder' Serbinenko
bf26bcc435 * grub-core/loader/i386/linux.c (DEFAULT_VIDEO_MODE) [GRUB_MACHINE_EFI]:
Set to "auto".
2010-10-01 16:24:43 +02:00
Vladimir 'phcoder' Serbinenko
6e3c515d5b * grub-core/gettext/gettext.c (grub_gettext_init_ext): Avoid using
mo_file after freeing.
2010-09-30 21:07:51 +02:00
Vladimir 'phcoder' Serbinenko
e6d983ba6d * grub-core/normal/term.c (read_terminal_list): Free in a right order. 2010-09-30 21:04:09 +02:00
Vladimir 'phcoder' Serbinenko
74ccb5b5e2 * grub-core/script/execute.c (grub_script_execute_sourcecode): Set
flags.
2010-09-30 20:59:20 +02:00
Vladimir 'phcoder' Serbinenko
ee74fa4822 Put terminfo into core on ieee1275 and yeeloong (needed for console).
* gentpl.py: New groups terminfoinkernel and terminfomodule.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Include extcmd.h, arg.h
	and terminfo.h when needed.
	* grub-core/Makefile.core.def (kernel): Include term/terminfo.c,
	term/tparm.c, commands/extcmd.c, lib/arg.c on terminfokernel.
	(terminfo): Enable only on terminfokernel.
	(extcmd): Likewise.
	* include/grub/extcmd.h: Add missing EXPORT_FUNC.
	* include/grub/lib/arg.h: Likewise.
	* grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_dimensions): Fix
	incorrect usage of ->.
2010-09-30 17:50:01 +02:00
Vladimir 'phcoder' Serbinenko
aa438e6818 * grub-core/loader/multiboot_mbi2.c (grub_multiboot_make_mbi]
[GRUB_MACHINE_EFI && __i386__]: Fix typo.
2010-09-29 23:58:43 +02:00
Vladimir 'phcoder' Serbinenko
579940128b Fix coreboot compilation.
* grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_get_mbi_size):
	Take VBE info into account even if only text is supported.
	(fill_vbe_info): Take into account the case when only VGA text
	is supported.
	* include/grub/multiboot.h (GRUB_MACHINE_HAS_VBE): Set to zero
	on coreboot, multiboot and qemu.
2010-09-29 23:51:12 +02:00
Vladimir 'phcoder' Serbinenko
2a4066114d * grub-core/lib/relocator.c (malloc_in_range): Trim too verbose
debug messages.
	(grub_relocator_prepare_relocs): Set movers_chunk.srcv.
2010-09-29 23:19:21 +02:00
Vladimir 'phcoder' Serbinenko
d33613fcf3 * grub-core/loader/i386/bsd.c (grub_cmd_netbsd): Provide default serial
parameters.
2010-09-29 22:51:12 +02:00
Vladimir 'phcoder' Serbinenko
44a1b4327a * grub-core/lib/arg.c (grub_arg_parse): Fix treating of all commands as
if they were BSD-style.
2010-09-29 22:48:38 +02:00
Vladimir 'phcoder' Serbinenko
edde54e656 * grub-core/boot/i386/pc/lnxboot.S: Replace
GRUB_KERNEL_I386_PC_MULTIBOOT_SIGNATURE with
	GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART.
2010-09-29 22:45:57 +02:00
Vladimir 'phcoder' Serbinenko
b65830fae1 Write embedding zone using Reed-Solomon.
* Makefile.util.def (grub-setup): Add grub-core/lib/reed_solomon.c.
	* grub-core/Makefile.am (rs_decoder.S): New target.
	(kern/i386/pc/startup.S): Depend on rs_decoder.S.
	* grub-core/kern/i386/pc/startup.S (reed_solomon_redundancy): New field.
	(multiboot): Move to RS part.
	(post_reed_solomon): New label.
	(grub_boot_drive): Move to non-RS part since it's modified in memory
	on boot.
	Include rs_decoder.S.
	* grub-core/lib/reed_solomon.c: New file.
	* include/grub/offsets.h (GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY):
	New definition.
	(GRUB_KERNEL_I386_PC_MULTIBOOT_SIGNATURE): Removed.
	(GRUB_KERNEL_I386_PC_RAW_SIZE): Updated.
	(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART): New definition.
	* include/grub/partition.h (grub_partition_map): Change prototype of
	embed to allow returning additional sectors.
	* include/grub/reed_solomon.h: New file.
	* util/grub-setup.c (setup): Handle Reed-Solomon.
2010-09-29 21:33:38 +02:00
Colin Watson
0b4b227fae * grub-core/loader/multiboot_mbi2.c (grub_multiboot_make_mbi): Fix
i386 and x86-64 definedness tests.
2010-09-28 17:38:34 +01:00
Yves Blusseau
f772623bc0 Fix generation of kernel_syms.lst
* grub-core/Makefile.am (kernel_syms.lst): Fix value and position of
    ASM_PREFIX
2010-09-27 11:11:38 +02:00
Robert Millan
8e57a6ca44 2010-09-26 Robert Millan <rmh@gnu.org>
Support degraded ZFS arrays in "grub-probe -t device" resolution.
	
	* grub-core/kern/emu/getroot.c (find_root_device_from_libzfs): When
	the pool is an array of devices, iterate through it and return the
	first device that passes a stat() test (instead of blindly returning
	the first one).
2010-09-26 16:11:33 +02:00
Robert Millan
f913083640 2010-09-26 Robert Millan <rmh@gnu.org>
Build fixes for GNU/kFreeBSD.
	
	* Makefile.util.def: Add `$(LIBZFS) $(LIBNVPAIR)' library dependencies
	to programs that require ZFS conversion.
	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): Support
	kernels that don't have FLOPPY_MAJOR.
2010-09-26 15:53:05 +02:00
Vladimir 'phcoder' Serbinenko
4e2b20a79a Add missing dependency on rs_Decoder.S 2010-09-26 13:37:08 +02:00
Vladimir 'phcoder' Serbinenko
40ca6b29fd Fix missing mreparm=3 2010-09-25 21:43:04 +02:00
Vladimir 'phcoder' Serbinenko
53c9e7798c Remove debug printf 2010-09-25 21:42:36 +02:00
Vladimir 'phcoder' Serbinenko
25e09515ad Make mb header to protected part 2010-09-25 21:42:13 +02:00
Vladimir 'phcoder' Serbinenko
3ac9e79207 Multiple bugs correction for Reed-Solomon 2010-09-25 20:40:26 +02:00
Vladimir 'phcoder' Serbinenko
419cbeb06d hook Reed-Solomon into startup.S 2010-09-25 19:33:05 +02:00
BVK Chaitanya
96510fafd2 fix typo 2010-09-25 10:48:48 +05:30
BVK Chaitanya
449333eb7d Fix grub-emu build.
* grub-core/kern/emu/main.c: Remove #include <getopt.h>.
	* grub-core/kern/emu/full.c: Split grub_mdraid_{init,fini} into
	mdraid09 and mdraid1x.
2010-09-25 10:43:09 +05:30
Vladimir 'phcoder' Serbinenko
4f0de6881c C part of Reed-Solomon 2010-09-24 14:05:47 +02:00
Colin Watson
e1fd193905 Re-enable grub-extras.
* autogen.sh: Create symlinks to ${GRUB_CONTRIB} if necessary to
avoid confusing Automake.  Run autogen only twice, once for the top
level and once for grub-core.  Add Makefile.util.def and
Makefile.core.def from extra modules to the appropriate autogen
invocations.  If Makefile.common exists in an extra module, include
it in both Makefile.util.am and grub-core/Makefile.core.am;
similarly, include any Makefile.util.common file in Makefile.util.am
and any Makefile.core.common file in grub-core/Makefile.core.am.
* conf/Makefile.common ($(top_srcdir)/grub-core/Makefile.core.am):
Depend on $(top_srcdir)/grub-core/Makefile.gcry.def.
($(top_srcdir)/grub-core/Makefile.gcry.def): Remove.
* grub-core/Makefile.am: Remove inclusion of Makefile.gcry.am.
* gentpl.py (gvar_add): Turn GVARS into a set.
(global_variable_initializers): Sort global variables on output.
(vars_init): New function.
(first_time): Likewise.
(library): Ensure that non-global variable initialisations are
emitted before the first time we emit code for a library block.
Append to variables rather than setting them.  Only emit
noinst_LIBRARIES, BUILT_SOURCES, and CLEANFILES the first time for
each conditional path.
(program): installdir() emits an Autogen macro, so must be passed to
var_add rather than gvar_add.
(data): Likewise.
(script): Likewise.
(rules): New function, centralising handling for different target
types.  Set up Guile association lists for first_time and vars_init,
and send most output to a diversion so that variable initialisations
can be emitted first.
(module_rules): Use new rules function.
(kernel_rules): Likewise.
(image_rules): Likewise.
(library_rules): Likewise.
(program_rules): Likewise.
(script_rules): Likewise.
(data_rules): Likewise.
* configure.ac: Add AC_PROG_LN_S, for the benefit of ntldr-img.
* .bzrignore: Add contrib and grub-core/contrib.  Remove
grub-core/Makefile.gcry.am.
2010-09-24 09:48:27 +01:00
Yves Blusseau
1d12cf2947 * grub-core/lib/LzFind.c: Add missing include.
* grub-core/lib/LzmaEnc.c: Likewise.
    * grub-core/script/lexer.c: Likewise.
    * grub-core/script/yylex.l: Likewise.
    * util/grub-macho2img.c: Likewise.
    * util/grub-menulst2cfg.c: Likewise.
    * util/grub-mklayout.c: Likewise.
    * util/grub-mkpasswd-pbkdf2.c
    * util/grub-mkrelpath.c: Likewise.
    * util/resolve.c: Likewise.
2010-09-24 09:19:57 +02:00
Grégoire Sutre
f5a109e277 Variable initialization. 2010-09-24 01:13:50 +02:00
Vladimir 'phcoder' Serbinenko
6d0fa83c79 Support xz compression on yeeloong.
* Makefile.util.def (grub-mkimage): Add $(LIBLZMA).
	* configure.ac: Check for LZMA.
	* grub-core/Makefile.core.def (xz_decompress): New target.
	(none_decompress): Likewise.
	* grub-core/boot/decompressor/minilib.c: New file.
	* grub-core/boot/decompressor/none.c: Likewise.
	* grub-core/boot/decompressor/xz.c: Likewise.
	* grub-core/kern/mips/cache.S: Change to noreorder nomacro.
	* grub-core/kern/mips/cache_flush.S: Likewise.
	* grub-core/kern/i386/pc/lzma_decode.S: Remove dead code.
	* grub-core/kern/mips/startup.S: Move first stage to ...
	* grub-core/boot/mips/startup_raw.S: ...here. Change to noreorder
	nomacro.
	* grub-core/kern/mips/startup.S: Change to noreorder nomacro.
	* grub-core/lib/mips/relocator_asm.S: Change to noreorder nomacro.
	* grub-core/lib/xzembed/xz_dec_bcj.c [GRUB_EMBED_DECOMPRESSOR]:
	Allocate statically.
	* grub-core/lib/xzembed/xz_dec_lzma2.c [GRUB_EMBED_DECOMPRESSOR]:
	Allocate statically or use scratch. Don't check CRC32.
	* grub-core/lib/xzembed/xz_dec_stream.c [GRUB_EMBED_DECOMPRESSOR]:
	Allocate statically. Don't check CRC32.
	* include/grub/decompressor.h: New file.
	* include/grub/offsets.h (GRUB_KERNEL_MIPS_YEELOONG_RAW_SIZE):
	Removed.
	(GRUB_KERNEL_MIPS_YEELOONG_UNCOMPRESSED_SIZE): New field.
	(GRUB_KERNEL_MIPS_YEELOONG_TOTAL_MODULE_SIZE): Adjusted.
	(GRUB_KERNEL_MIPS_YEELOONG_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_YEELOONG_PREFIX_END): Likewise.
	(GRUB_KERNEL_MACHINE_UNCOMPRESSED_SIZE): New define.
	* util/grub-mkimage.c (grub_compression_t): New type.
	(PLATFORM_FLAGS_DECOMPRESSORS): New flag.
	(image_target_desc): New field default_compression.
	(image_targets): Adjust yeeloong targets.
	(compress_kernel_xz) [HAVE_LIBLZMA]: New function.
	(compress_kernel): New parameter comp.
	(generate_image): Likewise. Handle new compression case.
	(options): New option --compression
	(help): Likewise.
	(main): Handle new option.
2010-09-23 02:10:44 +02:00
Grégoire Sutre
1b655af685 Define FLOPPY_MAJOR on NetBSD. 2010-09-22 23:32:58 +02:00
Colin Watson
8f03f0b580 * grub-core/loader/multiboot_mbi2.c (grub_multiboot_make_mbi): Fix
typo in __i386__ conditional.
2010-09-22 16:57:49 +01:00
Vladimir 'phcoder' Serbinenko
7835dfd3e8 * grub-core/loader/multiboot_mbi2.c (GRUB_MACHINE_EFI): Add missing
include.
2010-09-22 17:13:21 +02:00
Vladimir 'phcoder' Serbinenko
e255597e51 Implement EFI and ACPI multiboot2 extensions.
* grub-core/loader/multiboot_mbi2.c (grub_multiboot_load): Declare
	new tags as supported.
	(acpiv2_size): New function.
	(grub_multiboot_get_mbi_size): Take new tags into account.
	(grub_multiboot_make_mbi): Add new tags.
	* include/grub/multiboot.h (GRUB_MACHINE_HAS_ACPI): New definition.
2010-09-22 14:51:49 +02:00
Vladimir 'phcoder' Serbinenko
9a0e5c815e Fix bugs in asm code 2010-09-22 00:53:34 +02:00
Vladimir 'phcoder' Serbinenko
67c4bb722d Align scratch 2010-09-22 00:52:33 +02:00
starous
6cc1405144 .../serial/common.c - added missing configuration 2010-09-21 21:57:57 +02:00
Vladimir 'phcoder' Serbinenko
758194b076 Allow compression algorithm specification 2010-09-21 20:30:28 +02:00
Colin Watson
df7769d8dc * grub-core/normal/menu_entry.c (run): Make sure we always return
a value.
2010-09-21 19:03:11 +01:00
Vladimir 'phcoder' Serbinenko
e0a8ef26e4 MAke a separate scratch for decompressor 2010-09-21 19:39:51 +02:00
Colin Watson
b031012d70 * grub-core/commands/efi/lsefimmap.c (grub_cmd_lsefimmap):
NumberOfPages is UINT64 according to the UEFI specification, not
UINTN.  Fix printf format.
2010-09-21 16:58:08 +01:00
Colin Watson
174de8f340 * grub-core/bus/usb/usbhub.c (poll_nonroot_hub): Change type of
`err' to grub_usb_err_t.
Reported and tested by: KESHAV P.R.
2010-09-21 16:13:04 +01:00
Colin Watson
d7dbe92395 * grub-core/disk/efi/efidisk.c (grub_efidisk_get_device_name): Make
tpart non-const, so that we can assign to it.  (Since this is a
typedef, the constness refers to the pointer rather than what it
points to.)
2010-09-21 13:41:23 +01:00
Colin Watson
d309a16e26 * grub-core/commands/hashsum.c (GRUB_MOD_INIT): Make "Compute or
check hash checksum." consistently translatable.
2010-09-21 11:14:06 +01:00
Colin Watson
c4fe27a827 * grub-core/commands/hashsum.c (aliases): Add sha1sum alias.
(GRUB_MOD_INIT): Register sha1sum command.
(GRUB_MOD_FINI): Unregister sha1sum command.
2010-09-21 10:56:16 +01:00
Colin Watson
4eff79d2f9 * grub-core/kern/emu/hostdisk.c (find_system_device): Only try to
convert partition names to disk names if the new `convert' parameter
is set.
(grub_util_biosdisk_get_grub_dev): If opening the disk device
returns GRUB_ERR_UNKNOWN_DEVICE, treat the partition device as a
disk in its own right.  This can happen with Xen disk images.
2010-09-21 10:36:44 +01:00
Vladimir 'phcoder' Serbinenko
f8926c32b4 C part of decompressor 2010-09-21 11:22:52 +02:00
Vladimir 'phcoder' Serbinenko
c5b4cd370e asm part for mips decompressor 2010-09-21 10:14:08 +02:00
Vladimir 'phcoder' Serbinenko
3197c86ba8 Remove dead code in decompressor 2010-09-21 10:07:12 +02:00
Vladimir 'phcoder' Serbinenko
4519e259a1 Implementation of ACPI parts 2010-09-21 08:37:50 +02:00
Vladimir 'phcoder' Serbinenko
9dbbe5e858 Impletment EST multiboot passing 2010-09-21 02:19:29 +02:00
Vladimir 'phcoder' Serbinenko
77a94e9810 * grub-core/loader/i386/multiboot_mbi.c (grub_fill_multiboot_mmap):
Add BADRAM.
	* grub-core/loader/multiboot_mbi2.c (grub_fill_multiboot_mmap):
	Likewise.
	* include/multiboot.h: Resynced with specification.
	* include/multiboot2.h: Likewise.
2010-09-21 02:06:14 +02:00
Colin Watson
269004c158 Fix po directory handling.
* configure.ac: Create po/Makefile.in rather than po/Makefile.
* grub-core/gnulib/Makefile.am: Import gettext module.
* m4/gnulib-cache.m4: Likewise.
* m4/gnulib-comp.m4: Likewise.
* m4/gettext.m4: New file, from gnulib.
* m4/glibc2.m4: Likewise.
* m4/iconv.m4: Likewise.
* m4/intdiv0.m4: Likewise.
* m4/intl.m4: Likewise.
* m4/intldir.m4: Likewise.
* m4/intlmacosx.m4: Likewise.
* m4/intmax.m4: Likewise.
* m4/inttypes-pri.m4: Likewise.
* m4/lcmessage.m4: Likewise.
* m4/lib-ld.m4: Likewise.
* m4/lib-link.m4: Likewise.
* m4/lib-prefix.m4: Likewise.
* m4/lock.m4: Likewise.
* m4/nls.m4: Likewise.
* m4/po.m4: Likewise.
* m4/printf-posix.m4: Likewise.
* m4/progtest.m4: Likewise.
* m4/threadlib.m4: Likewise.
* m4/uintmax_t.m4: Likewise.
* m4/visibility.m4: Likewise.
* po/Makefile.am: Remove.
* po/Makefile.in.in: New file, from gettext.
($(DOMAIN).pot-update): Support POTFILES-shell.
* po/Makevars: New file.
* po/POTFILES-shell: Rename to ...
* po/POTFILES-shell.in: ... this.  Update.
* po/POTFILES: Rename to ...
* po/POTFILES.in: ... this.  Update.
* po/Rules-quot: New file, from gettext.
* po/boldquot.sed: Likewise.
* po/en@boldquot.header: Likewise.
* po/en@quot.header: Likewise.
* po/insert-header.sin: Likewise.
* po/quot.sed: Likewise.
* po/remove-potcdate.sin: Likewise.
2010-09-21 00:09:23 +01:00
Vladimir 'phcoder' Serbinenko
fc55cc4c27 Support submenus.
* grub-core/commands/menuentry.c (grub_normal_add_menu_entry): New
	parameter submenu. All users updated.
	* grub-core/normal/main.c (free_menu): Rename to ...
	(grub_normal_free_menu): ... this. Made global.
	* grub-core/normal/menu.c (grub_menu_execute_entry): Open new context
	if requested.
	* grub-core/normal/menu_entry.c (screen): New field submenu.
	(make_screen): Set submenu.
	(run): Open new context if requested.
	* include/grub/menu.h (grub_menu_entry): New field submenu.
	* include/grub/normal.h (grub_normal_free_menu): New proto.
2010-09-21 00:47:49 +02:00
Vladimir 'phcoder' Serbinenko
57f20e67a0 Support extraction of legacy entries 2010-09-20 23:10:29 +02:00
Vladimir 'phcoder' Serbinenko
a38b701cbf Rename jail to extractor 2010-09-20 23:01:34 +02:00
Vladimir 'phcoder' Serbinenko
1b71d7500b merge mainline into jail 2010-09-20 22:41:59 +02:00
Vladimir 'phcoder' Serbinenko
7bda3a87af Make cutmem accept a region specification.
Suggested by: Samuel Thibault

	* grub-core/mmap/mmap.c (parsemem): New function.
	(grub_cmd_cutmem): Handle new arguments.
2010-09-20 22:24:30 +02:00
Vladimir 'phcoder' Serbinenko
2ea57f8844 * grub-core/mmap/mmap.c (grub_cmd_cutmem): New function.
(GRUB_MOD_INIT): Register new command.
	(GRUB_MOD_FINI): Unregister new command.
2010-09-20 22:11:52 +02:00
Vladimir 'phcoder' Serbinenko
74342e312f Support some annoying BSD and Minix subpartitions.
* Makefile.util.def (libgrub.a): Add grub-core/partmap/bsdlabel.c.
	* grub-core/disk/efi/efidisk.c (grub_efidisk_get_device_name):
	Properly handle concatenation.
	* grub-core/kern/device.c (grub_device_iterate): Likewise.
	* grub-core/normal/completion.c (iterate_partition): Likewise.
	* grub-core/kern/disk.c (grub_disk_open): Make disk->name not
	contain partition. All users updated.
	* grub-core/partmap/bsdlabel.c (grub_netbsdlabel_partition_map): New
	struct.
	(grub_openbsdlabel_partition_map): Likewise.
	(bsdlabel_partition_map_iterate): Rename to ..
	(iterate_real): ... this. New arguments sector, freebsd and pmap.
	(bsdlabel_partition_map_iterate): New function.
	(netopenbsdlabel_partition_map_iterate): Likewise.
	(netbsdlabel_partition_map_iterate): Likewise.
	(openbsdlabel_partition_map_iterate): Likewise.
	(GRUB_MOD_INIT): Register new partmaps.
	(GRUB_MOD_FINI): Unregister new partmaps.
	* grub-core/partmap/msdos.c (pc_partition_map_iterate): Rename to ...
	(grub_partition_msdos_iterate): ... this. All users updated.
	Don't support embedding other than in a minix partition.
	* include/grub/msdos_partition.h (grub_partition_msdos_iterate): New
	proto.
	* include/grub/partition.h (grub_partition): New field msdostype.
	* util/grub-install.in: Handle openbsd and netbsd types being in
	part_bsd module.
2010-09-20 21:45:06 +02:00
Vladimir 'phcoder' Serbinenko
65d973de1c Add the comment about net-/openbsdlabel 2010-09-20 21:34:20 +02:00
Vladimir 'phcoder' Serbinenko
4b98e0d7c7 Support net-/openbsd labels inside logical partitions 2010-09-20 21:30:11 +02:00
Vladimir 'phcoder' Serbinenko
1e8d555b7d Split mdraid.mod into mdraid09.mod and mdraid1x.mod.
* Makefile.util.def (libgrub.a): Add grub-core/disk/mdraid1x_linux.c.
	* grub-core/Makefile.core.def (mdraid): Renamed to ...
	(mdraid09): ... this.
	(mdraid1x): New module.
	* grub-core/disk/mdraid_linux.c: Move 1.x parts ...
	* grub-core/disk/mdraid1x_linux.c: ...here. All users updated.
2010-09-20 20:09:31 +02:00
Vladimir 'phcoder' Serbinenko
899d8af498 * grub-core/kern/emu/misc.c (asprintf): Use vsnprintf instead of
vsprintf.
2010-09-20 19:14:29 +02:00
Colin Watson
40901acd76 * grub-core/commands/efi/lsefimmap.c: Correct header.
* NEWS: Update.
2010-09-20 17:59:09 +01:00
Tristan Gingold
3dccbe4bbb * grub-core/commands/efi/lsefimmap.c: New file.
* grub-core/Makefile.core.def (lsefimmap): New module.
	* include/grub/efi/api.h (PRIxGRUB_EFI_UINTN_T): New definition.

	Also-By: Robert Millan <rmh.grub@aybabtu.com>

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2010-09-20 17:59:25 +02:00
Vladimir 'phcoder' Serbinenko
38c259a76a Pause the execution (10s max) if any errors are displayed so the user
has a chance to see them.

	* grub-core/kern/err.c (grub_err_printed_errors): New variable.
	(grub_print_error): Increment grub_err_printed_errors.
	* grub-core/normal/menu.c (grub_menu_execute_entry): Pause the
	execution if any errors were displayed.
	(show_menu): Remove old code for pause.
	* grub-core/normal/menu_entry.c (run): Likewise.
	* grub-core/normal/term.c (grub_normal_char_counter): Removed. All
	users updated.
	(grub_normal_get_char_counter): Likewise.
	* include/grub/err.h (grub_err_printed_errors): New external variable.
	* include/grub/normal.h (grub_normal_get_char_counter): Removed.
2010-09-20 17:46:35 +02:00
Vladimir 'phcoder' Serbinenko
f218b09c99 Support multiboot VBE info.
* grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_get_mbi_size):
	Take VBE info into account.
	(fill_vbe_info) [GRUB_MACHINE_HAS_VBE]: New function.
	(retrieve_video_parameters) [GRUB_MACHINE_HAS_VBE]:
	Call fill_vbe_info when appropriate.
	(grub_multiboot_make_mbi): Account for the size occupied by VBE info.
	* grub-core/loader/multiboot_mbi2.c (grub_multiboot_load): Declare tags
	as supported.
	(grub_multiboot_get_mbi_size): Take new tags into account.
	(fill_vbe_tag) [GRUB_MACHINE_HAS_VBE]: New function.
	(retrieve_video_parameters) [GRUB_MACHINE_HAS_VBE]:
	Call fill_vbe_tag when appropriate.
	(grub_multiboot_make_mbi): Properly align tags.
	* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_get_pm_interface): New
	function.
	* include/grub/i386/pc/vbe.h (grub_vbe_bios_get_pm_interface): New
	proto.
	* include/grub/multiboot.h (GRUB_MACHINE_HAS_VBE): New definition.
2010-09-20 17:01:28 +02:00
Vladimir 'phcoder' Serbinenko
a9cc5438a5 Suport manual terminal geometry specification.
* grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_dimensions):
	Save state in grub_ofconsole_terminfo_output.
	(grub_ofconsole_term): Use grub_terminfo_getwh.
	(grub_ofconsole_getwh): Removed.
	* grub-core/term/serial.c (grub_serial_getwh): Removed.
	(grub_serial_term): Use grub_terminfo_getwh.
	* grub-core/term/terminfo.c (grub_terminfo_getwh): New function.
	(options): New struct.
	(OPTION_*): New enum.
	(grub_cmd_terminfo): Transform into extcmd and handle new parameters.
	* include/grub/terminfo.h (grub_terminfo_output_state): New fields
	width and height.
	(grub_terminfo_getwh): New proto.
	* grub-core/lib/legacy_parse.c (grub_legacy_parse): Handle --lines.
2010-09-20 16:27:33 +02:00
Vladimir 'phcoder' Serbinenko
1a8fed20ad Handle legacy "terminal" command.
* grub-core/lib/legacy_parse.c (legacy_command): New flags FLAG_TITLE
	and FLAG_TERMINAL.
	(legacy_commands): Add terminal and title.
	(grub_legacy_parse): Handle terminal. Simplify title handling.
2010-09-20 16:15:50 +02:00
Vladimir 'phcoder' Serbinenko
41e9c57d89 * grub-core/lib/arg.c (grub_arg_show_help): Correctly handle
parameters overflow.
2010-09-20 16:12:15 +02:00