Commit graph

418 commits

Author SHA1 Message Date
Giuseppe Caizzone
cb0229c587 Properly handle deleted files on UDF.
* grub-core/fs/udf.c (grub_udf_iterate_dir): Skip directory entries
	whose "characteristics" field has the bit GRUB_UDF_FID_CHAR_DELETED
	set.
2010-11-14 16:51:45 +01:00
Giuseppe Caizzone
406858a8a9 Support reading files larger than 2 GiB.
* grub-core/fs/udf.c (grub_udf_iterate_dir): Change type of variable
	"offset" to grub_off_t.
	(grub_udf_read_file): Likewise for parameter "pos".
2010-11-14 16:48:17 +01:00
Vladimir 'phcoder' Serbinenko
1fd08bf111 * grub-core/disk/lvm.c (GRUB_MOD_FINI): Reset the vg_list. Fixes
LVM on RAID support.
2010-11-14 14:13:11 +01:00
Vladimir 'phcoder' Serbinenko
de1a024fff Properly define WORDS_BIGENDIAN in wrapped environments.
* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (WORDS_BIGENDIAN): New
	definition.
	* grub-core/lib/posix_wrap/sys/types.h (WORDS_BIGENDIAN): Likewise.

	Reported by: Manoel Rebelo Abranches.
	Tested by: Manoel Rebelo Abranches.
2010-11-14 13:37:59 +01:00
Vladimir 'phcoder' Serbinenko
58c184be7b Support big ext2 files.
* grub-core/fs/ext2.c (grub_ext2_inode): Rename dir_acl to size_high.
	(grub_ext2_read_block): Support triple indirect blocks.
	(grub_ext2_read_file): Use 64-bit types and read size_high.
	(grub_ext2_open): Read size_high.
	Reported by: Ximin Luo.
	Tested by: Manoel Rebelo Abranches.
2010-11-13 16:11:24 +01:00
Vladimir 'phcoder' Serbinenko
10001ac54b * grub-core/kern/i386/pc/startup.S (multiboot_trampoline): Add missing
jump.
2010-11-12 08:45:16 +01:00
Manoel Rebelo Abranches
9c4cf53bfe 2010-11-08 Manoel Rebelo Abranches <mrabran@br.ibm.com>
* include/grub/elfload.h (grub_elf32_size): New parameter. All users updated.
        Return maximum segments alignment.
        (grub_elf64_size): Likewise.
        * kern/elf.c (grub_elf32_size): New parameter. All users updated.
        Return maximum segments alignment.
        (grub_elf64_size): Likewise.
        * grub-core/loader/powerpc/ieee1275/linux.c:
        (grub_linux_claimmap_iterate): New function. Uses the "available"property
        in the "memory" node for memory allocation for kernel in the PowerPC loader.
        (grub_linux_load32): Correctly find linux entry point offset.
        (grub_linux_load64): Likewise.
2010-11-08 11:14:54 -02:00
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