Commit graph

701 commits

Author SHA1 Message Date
Manoel Rebelo Abranches
4d6374ba78 Implement file close in network tranference.
Stop receiving packets from card on error.
2011-05-10 09:32:38 -03:00
Manoel Rebelo Abranches
1893017d44 Mark file as not easily seekable on net open. 2011-05-10 09:30:26 -03:00
Manoel Rebelo Abranches
4f7386025b Correct expected argument numbers in del addr command. 2011-05-10 09:28:45 -03:00
Manoel Rebelo Abranches
90eb90e24c Merge mainline. 2011-05-05 12:12:22 -03:00
Vladimir 'phcoder' Serbinenko
072b5d315a * grub-core/loader/efi/appleloader.c (MAKE_PIWG_PATH): New macro.
(devpath_1): Use MAKE_PIWG_PATH.
	(devpath_2): Likewise.
	(devpath_3): Likewise.
	(devpath_4): Likewise.
	(devpath_5): Likewise.
	(devpath_6): Likewise.

	The appleldr.mod was checked that to be binary identical to previous
	version.
2011-05-05 13:34:03 +02:00
Zach
7fae005102 Support 2010 Macbooks.
* grub-core/loader/efi/appleloader.c (devpath_6): New variable.
	(devs): Add devpath_6.
2011-05-05 12:18:00 +02:00
Vladimir 'phcoder' Serbinenko
ee5614b7f8 * grub-core/lib/legacy_parse.c (grub_legacy_parse): Correctly handle
hexadecimal.
2011-05-05 01:27:54 +02:00
Vladimir 'phcoder' Serbinenko
664889a69c * grub-core/efiemu/main.c (grub_efiemu_load_file): Return grub_errno
and not 0 on failure.
2011-05-05 01:26:16 +02:00
Colin Watson
bd405bbc55 * grub-core/fs/i386/pc/pxe.c (grub_pxefs_dir): Return
GRUB_ERR_BAD_FS rather than GRUB_ERR_IO if the disk is not a pxe
disk; otherwise grub_fs_probe will not fall back to the next
filesystem.
(grub_pxefs_open): Likewise, for consistency.
Reported and tested by: Ezekiel Grave.
2011-05-03 18:03:05 +01:00
Vladimir 'phcoder' Serbinenko
3c62402d08 * grub-core/loader/i386/linux.c (grub_linux_boot): Supply target rather
than source address for efi mmap buffer.
2011-04-25 16:58:25 +02:00
Vladimir 'phcoder' Serbinenko
723f63f2f8 * grub-core/partmap/amiga.c (amiga_partition_map_iterate): Fix a
wrong action on non-detecting the magic.
2011-04-25 15:36:08 +02:00
Vladimir 'phcoder' Serbinenko
68797f9230 * grub-core/gnulib/regex.c: Remove GRUB_MOD_LICENSE since it's
already supplied by another part of the module (fixes compilation on
	FreeBSD).
2011-04-25 15:29:41 +02:00
Vladimir 'phcoder' Serbinenko
6be8715dfc * grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Make mdraid UUID
match the one used by mdadm.
2011-04-25 15:23:37 +02:00
Colin Watson
92051871b7 * grub-core/kern/emu/getroot.c
(grub_find_root_device_from_mountinfo): Remove non-virtual-device
test that was incorrectly reintroduced in r3214.
Reported by: Ian Dall.  Fixes Savannah bug #33133.
2011-04-21 10:26:29 +01:00
Colin Watson
b13f79a427 Fix stack pointer handling in 16-bit relocator.
* grub-core/lib/i386/relocator16.S (grub_relocator16_start): Move
grub_relocator16_sp to %esp rather than %ss, and zero-extend it.
Fixes Ubuntu bug #683904.
2011-04-21 00:07:22 +01:00
Vladimir 'phcoder' Serbinenko
d97e7b5935 * include/grub/dl.h [ASM_FILE]: Adapt for assembly.
* grub-core/lib/i386/setjmp.S: Add missing GRUB_MOD_LICENSE.
	* grub-core/lib/x86_64/setjmp.S: Likewise.
	* grub-core/lib/mips/setjmp.S: Likewise.
	* grub-core/lib/powerpc/setjmp.S: Likewise.
	* grub-core/lib/sparc64/setjmp.S: Likewise.
2011-04-20 01:37:48 +02:00
Vladimir 'phcoder' Serbinenko
0624551c22 * grub-core/lib/efi/datetime.c: Add missing GRUB_MOD_LICENSE.
* grub-core/lib/efi/datetime.c: Likewise.
2011-04-20 01:32:21 +02:00
Vladimir 'phcoder' Serbinenko
e8f28d4c0e * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_flush):
New function.
	(grub_util_biosdisk_close): Use grub_util_biosdisk_flush.
	* include/grub/emu/hostdisk.h (grub_util_biosdisk_flush): New proto.
	* util/grub-setup.c (setup): Use grub_util_biosdisk_flush.
2011-04-19 22:39:14 +02:00
Vladimir 'phcoder' Serbinenko
bba79a1502 * grub-core/term/gfxterm.c (grub_gfxterm_fullscreen): Preserve previous
bitmap.
	(grub_gfxterm_term_init): Likewise.
2011-04-19 22:31:50 +02:00
Vladimir 'phcoder' Serbinenko
abc474ef4b Take into account the decorations the computing menu entry width.
* grub-core/gfxmenu/widget-box.c (get_border_width): New function.
	(grub_gfxmenu_create_box): Register get_border_width.
	* grub-core/gfxmenu/gui_list.c (draw_menu): Use get_border_width
	if available.
	* include/grub/gfxwidgets.h (grub_gfxmenu_box): New member
	get_border_width.
2011-04-19 00:44:53 +02:00
Endres Puschner
e74b3947af * grub-core/gfxmenu/icon_manager.c (grub_gfxmenu_icon_manager_get_icon):
Don't skip first class.
2011-04-18 23:24:41 +02:00
Vladimir 'phcoder' Serbinenko
34faa5955a * grub-core/fs/btrfs.c (grub_btrfs_read_logical): Support huge
chunks.
	* include/grub/err.h (grub_err_t): New enum value GRUB_ERR_BUG.
2011-04-18 23:10:19 +02:00
Vladimir 'phcoder' Serbinenko
93a777e388 Complete 64-bit division support.
* grub-core/kern/misc.c (grub_divmod64): Rename to ...
	(grub_divmod64_full): ... this. Support 64-bit divisor and reminder.
	* include/grub/misc.h (grub_divmod64): Rename to ...
	(grub_divmod64_full): ... this.
	(grub_divmod64): New inline function.
2011-04-18 23:03:52 +02:00
Vladimir 'phcoder' Serbinenko
50d2cc5ae5 Identify RAID by its UUID rather than (guessed) name.
* grub-core/disk/raid.c (ascii2hex): New function.
	(grub_raid_open): Accept mduuid/%s specification.
	* grub-core/kern/emu/getroot.c (get_mdadm_name): Revamped into ...
	(get_mdadm_uuid): ... this.
	(grub_util_get_grub_dev): Use mduuid/%s if UUID is available.
2011-04-16 15:27:35 +02:00
Vladimir 'phcoder' Serbinenko
e03f7bea45 * grub-core/gfxmenu/gui_image.c (rescale_image): Don't attempt to scale
to negative size.
2011-04-16 09:16:44 +02:00
Colin Watson
78fa584f67 Rewrite /proc/self/mountinfo handling to cope with bind-mounts and
move-mounts appearing out of order.  Fixes Ubuntu bug #738345.

* grub-core/kern/emu/getroot.c (find_root_device_from_mountinfo):
Build a list of relevant visible mounts using the mnt_id and
parent_mnt_id fields, and then scan that list at the end.
2011-04-13 12:36:04 +01:00
Vladimir 'phcoder' Serbinenko
fe6b2cbaa6 BtrFS support. Written by me (Vladimir) with important bugfixes and
even more important testing by Colin.

	* Makefile.util.def (libgrubmods.a): Add crc.c and gzio.c
	* grub-core/Makefile.core.def (btrfs): Add crc.c.
	* grub-core/fs/btrfs.c: Stub replaced with real implementation.
	* grub-core/io/gzio.c (grub_gzio): New fields mem_input_size,
	mem_input_off and mem_input. All users updated to accept in-RAM input.
	(gzio_seek): New function.
	(test_zlib_header): Likewise.
	(grub_gzio_read): Likewise.
	(grub_zlib_decompress): Likewise.
	* grub-core/kern/emu/getroot.c (grub_find_root_device_from_mountinfo):
	Accept partial and non-virtual mounts.
	(grub_guess_root_device): Do rescanning after device_from_mountinfo to
	avoid receiving /dev/dm-X as device.
	* grub-core/kern/emu/misc.c (grub_make_system_path_relative_to_its_root):
	Handle bind and partial mounts.
	* grub-core/lib/crc.c: New file.
	* include/grub/deflate.h: Likewise.
	* include/grub/emu/misc.h (grub_find_root_device_from_mountinfo): New
	proto.
	* include/grub/lib/crc.h: New file.
2011-04-11 23:26:41 +02:00
Vladimir 'phcoder' Serbinenko
e745cf0ca6 Implement automatic module license checking according to new GNU
guidelines.

	* grub-core/kern/dl.c (grub_dl_check_license): New function.
	(grub_dl_load_core): Use grub_dl_check_license.
	* include/grub/dl.h (GRUB_MOD_SECTION): New macro.
	(GRUB_MOD_LICENSE): Likewise.
	(GRUB_MOD_DUAL_LICENSE): Likewise.
	All modules updated.
2011-04-11 23:01:51 +02:00
Colin Watson
2a9bc0169e * grub-core/fs/btrfs.c (grub_btrfs_fs) [GRUB_UTIL]: Set
reserved_first_sector to 1.  btrfs reserves plenty of space for boot
loaders.
Reported by: Gene Cumm.  Fixes Ubuntu bug #757446.
2011-04-11 16:06:37 +01:00
Vladimir 'phcoder' Serbinenko
c7ba1ba62e merge mainline into butter 2011-04-11 07:56:31 +02:00
Vladimir 'phcoder' Serbinenko
6a01f54aff use actually filled extent size if available 2011-04-11 07:53:21 +02:00
Vladimir 'phcoder' Serbinenko
565f076311 Take extent offset in account on uncompressed extents 2011-04-11 07:52:39 +02:00
Vladimir 'phcoder' Serbinenko
228f95a250 Fix filename comparison 2011-04-11 07:51:15 +02:00
Vladimir 'phcoder' Serbinenko
ec25b87d29 Add dprintfs to report chunk lookups 2011-04-11 07:50:22 +02:00
Vladimir 'phcoder' Serbinenko
e8980227e8 Remove stale comment about redundancy 2011-04-11 07:49:26 +02:00
Vladimir 'phcoder' Serbinenko
9ee8d94faa * grub-core/kern/file.c (grub_file_open): Don't take into account the
parenthesis in the middle of the filename.
2011-04-11 07:38:42 +02:00
Vladimir 'phcoder' Serbinenko
b01abe3e16 * grub-core/loader/mips/linux.c (grub_cmd_initrd): Use correct limits
rather than trying to put initrd way too high.
	Reported by: Ryan Lortie <desrt@desrt.ca>
2011-04-10 16:44:11 +02:00
Vladimir 'phcoder' Serbinenko
335bda1e57 * grub-core/boot/mips/yeeloong/fwstart.S (no_cs5536): Put back
improperly removed string.
2011-04-10 16:12:31 +02:00
Vladimir 'phcoder' Serbinenko
5ca1a64de6 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_data): New member
is_disk.
	(grub_util_biosdisk_open): Don't apply ioctl on non-disk devices.
	(open_device) Likewise.
	(grub_util_biosdisk_close): Likewise.
	Reported by: Mark Korenberger.
2011-04-10 16:08:58 +02:00
Colin Watson
088cdb65eb * grub-core/gnulib/argp-parse.c (__argp_input): Don't crash if pstate
is NULL.
2011-04-10 15:25:52 +02:00
Vladimir 'phcoder' Serbinenko
8b8a81fa6a Dynamically count the number of lines for the lower banner.
* grub-core/normal/menu_entry.c (per_term_screen): New member
	num_entries.
	(print_down): Use num_entries.
	(update_screen): Likewise.
	(grub_menu_entry_run): Set num_entries.
	* grub-core/normal/menu_text.c (menu_viewer_data): New member
	num_entries.
	(grub_print_message_indented): Move real part to ...
	(grub_print_message_indented_real): ... here. Additional argument
	dry_run.
	(draw_border): Additional argument num_entries.
	(print_message): Additional argument dry_run.
	(print_entries): Receive menu viewer data.
	(grub_menu_init_page): New argment num_entries.
	(menu_text_set_chosen_entry): Use num_entries.
	(grub_menu_try_text): Likewise.
	* grub-core/normal/term.c (print_ucs4_terminal): New argument dry_run.
	All users updated.
	(grub_ucs4_count_lines): New function.
	* include/grub/term.h (grub_term_cursor_x): Moved from here ..
	* grub-core/normal/menu_text.c (grub_term_cursor_x): ... to here.
	* include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): Removed.
	(grub_term_border_height): Likewise.
	(grub_term_num_entries): Likewise.
2011-04-10 13:56:23 +02:00
Vladimir 'phcoder' Serbinenko
277f955bf1 * grub-core/boot/mips/yeeloong/fwstart.S: Fix address to error message.
Remove now unused string.
2011-04-10 11:57:19 +02:00
Vladimir 'phcoder' Serbinenko
099821e9e4 Fix RAID1/duplicated chunk size calculation 2011-04-09 21:55:50 +02:00
Colin Watson
2c58372857 * docs/grub-dev.texi: Fix spelling of "developer" throughout.
* grub-core/fs/i386/pc/pxe.c (parse_dhcp_vendor): Fix spelling of
"development".
2011-04-08 14:01:51 +01:00
Vladimir 'phcoder' Serbinenko
d7a565e962 * grub-core/normal/menu_entry.c (run): Use grub_memcpy rather than
grub_strcpy since the lines aren't necessarily 0-terminated.
2011-04-08 14:37:13 +02:00
Vladimir 'phcoder' Serbinenko
7c2e4909c3 * grub-core/lib/legacy_parse.c (legacy_commands): Find doesn't set
root on legacy.
2011-04-08 14:32:41 +02:00
Vladimir 'phcoder' Serbinenko
34c09785b6 * grub-core/commands/probe.c (options): Argument to set isn't optional.
(GRUB_MOD_INIT): DEVICE isn't optional.
2011-04-08 14:28:19 +02:00
Vladimir 'phcoder' Serbinenko
6a6f80587b * grub-core/normal/term.c (print_ucs4_terminal): Don't try to put the
word on new line if it's too long anyway. Fixes a hang.
2011-04-08 14:25:44 +02:00
Vladimir 'phcoder' Serbinenko
4ed4ce5820 correct Changelog spelling 2011-04-08 13:59:07 +02:00
Vladimir 'phcoder' Serbinenko
cb180fdf06 revert last revision. It's ineffective 2011-04-08 13:18:27 +02:00