Commit graph

558 commits

Author SHA1 Message Date
Colin Watson
2414872538 * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Remove stale
comment.
2011-03-28 15:17:22 +01:00
Colin Watson
f329eda79e * grub-core/disk/raid.c (grub_raid_register): Adjust debug message
to be specific about what kind of RAID device we're scanning for.
2011-03-28 13:23:54 +01:00
Seth Goldberg
c482ad98b3 * grub-core/kern/emu/getroot.c (find_root_device_from_libzfs): Don't return freed string. 2011-03-26 23:22:59 +01:00
Vladimir 'phcoder' Serbinenko
5ee04984d1 * grub-core/fs/iso9660.c (grub_iso9660_label): Rtrim the label. 2011-03-26 14:14:59 +01:00
Vladimir 'phcoder' Serbinenko
f4727da93f Use libgeom on FreeBSD to detect partitions.
* Makefile.util.def (grub-mkimage): Add LIBGEOM to ldadd.
	(grub-mkrelpath): Likewise.
	(grub-script-check): Likewise.
	(grub-editenv): Likewise.
	(grub-mkpasswd-pbkdf2): Likewise.
	(grub-fstest): Likewise.
	(grub-mkfont): Likewise.
	(grub-mkdevicemap): Likewise.
	(grub-probe): Likewise.
	(grub-setup): Likewise.
	(grub-ofpathname): Likewise.
	(grub-mklayout): Likewise.
	(example_unit_test): Likewise.
	(grub-menulst2cfg): Likewise.
	* grub-core/Makefile.core.def (grub-emu): Likewise.
	(grub-emu-lite): Likewise.
	* configure.ac: Check for -lgeom on FreeBSD and set LIBGEOM.
	* grub-core/kern/emu/hostdisk.c [FreeBSD]: Include libgeom.h. Don't
	define HAVE_DIOCGDINFO.
	(follow_geom_up) [FreeBSD]: New function.
	(find_partition_start) [FreeBSD]: Rewritten using follow_geom_up.
	(convert_system_partition_to_system_disk) [FreeBSD]: Likewise.
	(grub_util_biosdisk_get_grub_dev) [FreeBSD]: Use FreeBSD path
	unconditionally of HAVE_DIOCGDINFO.
2011-03-26 12:59:02 +01:00
Vladimir 'phcoder' Serbinenko
82fe6c751b Fix FreeBSD compilation problem.
* grub-core/kern/emu/hostdisk.c (MAJOR) [FreeBSD]: New definition.
	(FLOPPY_MAJOR) [FreeBSD]: Likewise.
2011-03-26 12:49:34 +01:00
Colin Watson
4c6c9431d2 * grub-core/video/fb/video_fb.c (grub_video_fb_get_info_and_fini):
Switch back to page zero before loading a kernel, since some kernel
drivers expect that.
Thanks to: Felix Kuehling.
2011-03-25 00:03:54 +00:00
Vladimir 'phcoder' Serbinenko
c7064d9425 * grub-core/lib/relocator.c (grub_relocator_alloc_chunk_addr)
[DEBUG_RELOCATOR]: Reuse grub_mm_check.
	(grub_relocator_alloc_chunk_align) [DEBUG_RELOCATOR]: Likewise.
2011-03-24 12:45:51 +01:00
Vladimir 'phcoder' Serbinenko
ef6de21af4 * grub-core/lib/relocator.c (allocate_inreg): Avoid dprintf unless
DEBUG_RELOCATOR is defined since gfxterm can't cope with output when
	malloc is disabled.
2011-03-24 12:39:48 +01:00
Vladimir 'phcoder' Serbinenko
8bc66a2ce6 * grub-core/loader/i386/bsdXX.c (grub_freebsd_load_elfmodule): Account
for modules headers when counting the needed allocation size.
2011-03-24 12:28:22 +01:00
Vladimir 'phcoder' Serbinenko
5657722c3c * grub-core/term/gfxterm.c (calculate_normal_character_width): Return 8
if no ASCII character is found to prevent crash.
2011-03-23 20:29:17 +01:00
Alexander Kurtz
41a85f5508 * grub-core/video/bitmap.c (match_extension): Ignore case. 2011-03-23 17:08:56 +01:00
Vladimir 'phcoder' Serbinenko
59e1e5f17b * grub-core/normal/menu_entry.c (init_line): Fix off-by-one error. 2011-03-23 14:18:56 +01:00
Vladimir 'phcoder' Serbinenko
bd4d051a95 * grub-core/script/parser.y: Declare "time" as valid argument. 2011-03-23 13:23:50 +01:00
Vladimir 'phcoder' Serbinenko
537dc9bec6 * grub-core/normal/main.c (GRUB_MOD_INIT): Export pager variable. 2011-03-23 12:40:15 +01:00
Vladimir 'phcoder' Serbinenko
fa3e01bfb5 * grub-core/lib/i386/pc/biosnum.c: Add missing include. 2011-03-23 12:23:42 +01:00
Vladimir 'phcoder' Serbinenko
b1d2840445 * grub-core/disk/usbms.c (grub_usbms_reset): Transform USB-style error
into GRUB-style one.
2011-03-23 12:21:15 +01:00
Vladimir 'phcoder' Serbinenko
e804e7b099 missing file in last change 2011-03-23 12:18:21 +01:00
Vladimir 'phcoder' Serbinenko
2e3e2e0908 * grub-core/bus/usb/usbtrans.c (grub_usb_control_msg): Return usb-style
error and not grub_errno.
	* grub-core/bus/usb/usbhub.c (grub_usb_add_hub): Likewise.
2011-03-23 12:17:05 +01:00
Vladimir 'phcoder' Serbinenko
ed57e55702 * grub-core/bus/usb/uhci.c (grub_uhci_detect_dev): Return
GRUB_USB_SPEED_NONE in case of failure and not the error code.
2011-03-23 12:13:39 +01:00
Vladimir 'phcoder' Serbinenko
d1611f0163 * grub-core/efiemu/i386/pc/cfgtables.c
(grub_machine_efiemu_init_tables): Make declaration a prototype.
	* grub-core/loader/xnu.c (grub_xnu_lock): Likewise.
	(grub_xnu_unlock): Likewise.
	* grub-core/normal/cmdline.c (grub_cmdline_get/cl_set_pos_all): Likewise.
2011-03-23 12:08:33 +01:00
Vladimir 'phcoder' Serbinenko
7d4e39d65a * grub-core/bus/usb/usb.c (attach_hooks): Make static.
* grub-core/bus/usb/usbhub.c (hubs): Likewise.
	* grub-core/commands/hashsum.c (aliases): Likewise.
	* grub-core/commands/setpci.c (pci_registers): Likewise.
	* grub-core/disk/usbms.c (attach_hook): Likewise.
	* grub-core/fs/zfs/zfs.c (decomp_table): Likewise.
	(zio_checksum_table): Likewise.
	* grub-core/gettext/gettext.c (grub_gettext_msg_list): Likewise.
	* grub-core/gfxmenu/gfxmenu.c (cached_view): Likewise.
	* grub-core/lib/legacy_parse.c (legacy_commands): Likewise.
	* grub-core/lib/relocator.c (leftovers): Likewise.
	(extra_blocks): Likewise.
	* grub-core/loader/i386/bsd.c (relocator): Likewise.
	* grub-core/loader/i386/multiboot_mbi.c (modules): Likewise.
	(modules_last): Likewise.
	* grub-core/loader/i386/xnu.c (table_aliases): Likewise.
	(devices): Likewise.
	* grub-core/loader/multiboot_mbi2.c (modules): Likewise.
	(modules_last): Likewise.
	* grub-core/normal/auth.c (users): Likewise.
	* grub-core/normal/context.c (initial_menu): Likewise.
	(current_menu): Likewise.
	* grub-core/normal/crypto.c (crypto_specs): Likewise.
	* grub-core/term/serial.c (grub_serial_ports): Likewise.
	(grub_serial_terminfo_input_template): Likewise.
	(grub_serial_terminfo_output_template): Likewise.
	(grub_serial_terminfo_input): Likewise.
	(grub_serial_terminfo_output): Likewise.
	(registered): Likewise.
	* grub-core/term/usb_keyboard.c (attach_hook): Likewise.
2011-03-23 12:05:13 +01:00
Vladimir 'phcoder' Serbinenko
40fc46599d * grub-core/video/bochs.c (grub_video_bochs_setup): Use
grub_video_mode_type_t.
	* grub-core/video/cirrus.c (grub_video_cirrus_setup): Likewise.
	* grub-core/video/i386/pc/vbe.c (grub_video_vbe_setup): Likewise.
	* grub-core/video/i386/pc/vga.c (grub_video_vga_setup): Likewise.
2011-03-23 11:54:58 +01:00
Colin Watson
9b43bf396a * grub-core/boot/i386/pc/lnxboot.S (real_code_2): Ensure that the
initial chunk read from the kernel always includes GRUB's multiboot
header, which is now outside the first sector.
2011-03-11 11:51:10 +00:00
Colin Watson
be1a7ce0cf * grub-core/loader/i386/linux.c (find_efi_mmap_size): Page-align
cached mmap_size, so that this works correctly when called multiple
times.
Reported by: Daniel Kahn Gillmor.  Should fix Debian bug #616638.
2011-03-09 17:38:31 +00:00
Szymon Janc
57d75699d6 2011-03-07 Szymon Janc <szymon@janc.net.pl>
* grub-core/fs/zfs/zfs.c (zap_leaf_lookup):
	Set-but-not-used variable removed.
2011-03-07 22:23:06 +01:00
Vladimir 'phcoder' Serbinenko
028501a0e0 Workaround yet another IEEE1275 bug.
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New enum value
	GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS.
	* grub-core/kern/ieee1275/mmap.c (grub_machine_mmap_iterate): Ignore
	adress_cells and size:cells if GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS
	is set.
	* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
	GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS on powermacs.
2011-02-12 10:22:55 +03:00
Vladimir 'phcoder' Serbinenko
d998657dcf * grub-core/partmap/msdos.c (pc_partition_map_embed): Fix off by one
error.
2011-02-12 09:59:04 +03:00
Colin Watson
7e735e4349 * include/grub/file.h (not_easly_seekable): Rename to ...
(not_easily_seekable): ... this.  Update all users.
2011-02-08 13:21:13 +00:00
Vladimir 'phcoder' Serbinenko
3533413cd5 * grub-core/kern/emu/getroot.c: Include config-util.h explicitly. 2011-01-22 15:37:05 +01:00
Anthony DeRobertis
5d4c5f8914 * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Check
super_offset field.
2011-01-22 15:20:08 +01:00
Vladimir 'phcoder' Serbinenko
03a4ccb513 * grub-core/bus/bonito.c (write_bases): Fix direction of the shift. 2011-01-22 14:26:18 +01:00
Vladimir 'phcoder' Serbinenko
ffc8f4d8bc * grub-core/partmap/bsdlabel.c: Include grub/emu/misc.h and not grub/util/misc.h.
(iterate_real): Don't rely on partition being non-NULL.
2011-01-22 14:15:17 +01:00
Vladimir 'phcoder' Serbinenko
80f23be71f * grub-core/script/argv.c (round_up_exp): unsigned is 32-bit on all
supported platforms. Put a compile time assert for this rather than
	generate a warning with 32-bit shift.
2011-01-22 14:11:19 +01:00
Vladimir 'phcoder' Serbinenko
5d4f4dd51b * grub-core/disk/scsi.c (grub_scsi_read): Fix binary and check and make
logical expression more readable.
2011-01-22 13:22:46 +01:00
Vladimir 'phcoder' Serbinenko
e489601ad0 * grub-core/disk/raid.c (insert_array): Ensure uniqueness of p->number
even if some elements have a name.
	Reported by: Alexander GQ Gerasiov.
2011-01-22 13:18:05 +01:00
Vladimir 'phcoder' Serbinenko
46c9db88cd * grub-core/kern/mips/yeeloong/init.c (grub_machine_init): Init boot
module.
2011-01-14 19:23:34 +01:00
Vladimir 'phcoder' Serbinenko
1d955d0098 * grub-core/Makefile.core.def (fwstart): Add lost LDFLAGS. 2011-01-14 19:21:06 +01:00
Vladimir 'phcoder' Serbinenko
4fbf185232 * grub-core/fs/zfs/zfsinfo.c (grub_cmd_zfs_bootfs): Quote bootpath and
diskdevid.
2011-01-13 22:25:56 +01:00
Vladimir 'phcoder' Serbinenko
f1632d4dd0 Fix compilation on cygwin.
* conf/Makefile.common (STRIPFLAGS_KERNEL): Add -F elf32-i386 and
	-R .drectve on cygwin.
	* conf/i386-pc-cygwin-img-ld.sc: Merge rdata and pdata into data.
	* configure.ac: Use $(top_builddir) in TARGET_OBJ2ELF.
	(COND_CYGWIN): New condition.
	* grub-core/Makefile.am (%.mod): Set TARGET_OBJ2ELF.
	* grub-core/genmod.sh.in: Use ${TARGET_OBJ2ELF} and
	not @TARGET_OBJ2ELF@.
	* util/grub-pe2elf.c (write_symbol_table): Use pe_symtab->type and not
	type to determine whether aux is to be used.
2011-01-13 22:23:49 +01:00
Vladimir 'phcoder' Serbinenko
8fc0a24576 * grub-core/Makefile.core.def (ieee1275_fb): Disable on sparc.
It doesn't work well there.
2011-01-12 11:55:52 +01:00
Vladimir 'phcoder' Serbinenko
b8494fbe5c * grub-core/normal/context.c (grub_env_context_close): Silence spurious
warning.
	* grub-core/normal/menu.c (grub_menu_execute_entry): Likewise.
	* grub-core/partmap/msdos.c (pc_partition_map_embed): Use unsigned
	counter.
2011-01-12 11:52:51 +01:00
Vladimir 'phcoder' Serbinenko
b44a558c9a Use alias->path rather than buggy "canon".
* grub-core/disk/ieee1275/ofdisk.c (ofdisk_hash_add_real): New function.
	(ofdisk_hash_add): New argument curcan. All users updated.
2011-01-12 11:26:28 +01:00
Vladimir 'phcoder' Serbinenko
9da068a5dc * grub-core/loader/powerpc/ieee1275/linux.c (grub_linux_load32): Apply
loadmask before doing any calculations. Use correct type for offset.
	(grub_linux_load64): Likewise.
2011-01-11 23:01:07 +01:00
Vladimir 'phcoder' Serbinenko
4531a206a1 * grub-core/fs/i386/pc/pxe.c (set_mac_env): Export variable.
(set_env_limn_ro): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* grub-core/hook/datehook.c (GRUB_MOD_INIT): Likewise. Change to
	ARRAY_SIZE while on it.
	(GRUB_MOD_FINI): Change to ARRAY_SIZE.
	* grub-core/normal/context.c (grub_env_export): Move from here ...
	* grub-core/kern/env.c (grub_env_export): ... here.
	* grub-core/normal/context.c (grub_cmd_export): Skip exporting root and
	prefix.
	* grub-core/kern/main.c (grub_main): Export root and prefix.
	* include/grub/env.h (grub_env_export): Export.
	Reported by: Seth Goldberg.
2011-01-11 11:51:05 +01:00
Vladimir 'phcoder' Serbinenko
4514605726 * grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_make_mbi):
Take into account space used by ELF sections and multiboot palette.
	Reported by: Grégoire Sutre.
2011-01-11 00:44:56 +01:00
Vladimir 'phcoder' Serbinenko
3395fe5230 Pass more appropriate video id to Linux.
* grub-core/loader/i386/linux.c (grub_linux_setup_video): Use
	grub_video_get_driver_id and variable gfxpayloadforcelfb to
	fill have_vga.
	(grub_linux_boot): Rely on grub_linux_setup_video to fill have_vga and
	shift params->lfb_size.
	* include/grub/i386/linux.h: Make an enume out of have_vga values.
2011-01-11 00:02:01 +01:00
Vladimir 'phcoder' Serbinenko
b3ff6ff056 * grub-core/fs/zfs/zfsinfo.c (grub_cmd_zfs_bootfs): Use comma as
separator and pass bootpath/devid even if only one of them is available.
	Reported by: Seth Goldberg.
2011-01-10 23:56:11 +01:00
Vladimir 'phcoder' Serbinenko
ae67942e78 Don't use post-4G memory on EFI even if 64-bit since some non-compliant
implementations bug on them.

	* grub-core/kern/efi/mm.c (grub_efi_allocate_pages): Skip post-4G
	memory.
	(filter_memory_map): Likewise.
2011-01-10 23:51:10 +01:00
Vladimir 'phcoder' Serbinenko
dcb883b162 Submenu default support.
* grub-core/normal/menu.c (grub_menu_execute_entry): New parameter
	auto_boot. All users updated.
	Declared static.
	Handle chosen and default with submenus.
	(grub_menu_execute_with_fallback): Declared static.
	Don't notify failure if autobooted. Upper level does it.
	(menuentry_eq): New function.
	(get_entry_number): Use menuentry_eq.
	(show_menu): New parameter "autobooted". All users updated.
	(grub_show_menu): Likewise.
	* include/grub/normal.h (grub_show_menu): Likewise.
	* include/grub/menu.h (grub_menu_execute_entry): Removed.
	(grub_menu_execute_with_fallback): Likewise.
2011-01-10 23:27:58 +01:00