Commit graph

1987 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
ca46729091 2010-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/misc.h (grub_sprintf): Removed. All users switched to
	grub_xasprintf or grub_snprintf.
	(grub_vsprintf): Likewise.
	(grub_snprintf): New proto.
	(grub_vsnprintf): Likewise.
	(grub_xasprintf): Likewise.
	(grub_xvasprintf): Likewise.
	* kern/misc.c (grub_vprintf): Use grub_vsnprintf_real.
	(grub_sprintf): Removed.
	(grub_vsnprintf): New function.
	(grub_snprintf): Likewise.
	(grub_xvasprintf): Likewise.
	(grub_xasprintf): Likewise.
	(grub_vsprintf): Renamed to ...
	(grub_vsnprintf_real): ...this. New argument max_len.
2010-01-20 09:53:23 +01:00
BVK Chaitanya
aca655fd20 fix grub-script-check warnings 2010-01-20 12:48:35 +05:30
Vladimir 'phcoder' Serbinenko
7ee92c32e1 2010-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/font.h (grub_font_load): Fix prototype.
2010-01-20 08:04:39 +01:00
Vladimir 'phcoder' Serbinenko
f80927cadb 2010-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* conf/mips.rmk (kernel_img_HEADERS) [yeeloong]: Add pci.h.
2010-01-20 08:04:01 +01:00
Vladimir 'phcoder' Serbinenko
119c50eab3 2010-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/x86_64/at_keyboard.h: New file.
2010-01-20 08:02:45 +01:00
Vladimir 'phcoder' Serbinenko
47d5f3c1c2 2010-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* loader/mips/linux.c: Include missing grub/i18n.h.
2010-01-20 08:01:48 +01:00
Robert Millan
55ff526642 2009-12-20 Robert Millan <rmh.grub@aybabtu.com>
* normal/menu.c (notify_execution_failure): Clarify error message.
2010-01-20 02:50:36 +00:00
Robert Millan
c893cc87fc 2009-12-20 Robert Millan <rmh.grub@aybabtu.com>
* commands/loadenv.c (check_blocklists): Use `grub_err_t' as
	return value (and revert all return statements).  Update users.
2010-01-20 02:43:19 +00:00
Colin Watson
917dd37040 2010-01-20 Dan Merillat <debian@dan.merillat.org>
* kern/device.c (grub_device_iterate): Allocate new part_ent
	structure based on sizeof (*p) rather than sizeof (p->next), to
	account for structure padding.

	* util/grub-probe.c (probe_raid_level): Return -1 immediately if
	disk is NULL, which might happen for LVM physical volumes with no
	LVM signature.
2010-01-20 02:11:07 +00:00
Robert Millan
d4a4ee5765 Merge mips branch 2010-01-20 01:55:41 +00:00
Robert Millan
25c2b5b317 Merge kernel-font branch 2010-01-20 00:42:55 +00:00
Vladimir 'phcoder' Serbinenko
915fc1b8bf 2010-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* include/multiboot.h: Resynced with spec.
	* include/multiboot2.h: Likewise.
	* loader/i386/multiboot_mbi.c (grub_fill_multiboot_mmap): Handle
	GRUB_MACHINE_MEMORY_ACPI_RECLAIMABLE and GRUB_MACHINE_MEMORY_NVS.
2010-01-20 01:08:46 +01:00
Robert Millan
9444b678a1 2010-01-18 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/term.h (grub_term_register_input,
	grub_term_register_output): Check return of terminal init()
	routines, and abort if errors are raised.
	
	* commands/terminal.c: Update copyright year.
2010-01-18 19:43:39 +00:00
Robert Millan
cba98e8dbc 2010-01-18 Robert Millan <rmh.grub@aybabtu.com>
* commands/terminal.c (grub_cmd_terminal_input)
	(grub_cmd_terminal_output): Check return of terminal init()
	routines, and abort if errors are raised.
2010-01-18 19:31:10 +00:00
Vladimir 'phcoder' Serbinenko
6f7db5d676 2010-01-18 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/i386/bsd.h: Fix include pathes.
2010-01-18 19:25:20 +01:00
Vladimir 'phcoder' Serbinenko
262bff8d83 2010-01-18 Vladimir Serbinenko <phcoder@gmail.com>
Add missing *BSD copyright headers.

	* include/grub/aout.h: Add BSD licence.
	* include/grub/i386/bsd.h: Parts under different licences moved to ...
	* include/grub/i386/freebsd_linker.h: ... here,
	* include/grub/i386/freebsd_reboot.h: ... here,
	* include/grub/i386/netbsd_bootinfo.h: ... here,
	* include/grub/i386/netbsd_reboot.h: ... here,
	* include/grub/i386/openbsd_bootarg.h: ... here,
	* include/grub/i386/openbsd_reboot.h: ... and here. Added appropriate
	licence to each file.
2010-01-18 17:40:23 +01:00
Robert Millan
b2cab84877 2010-01-18 Robert Millan <rmh.grub@aybabtu.com>
* acinclude.m4: Remove `nop' assembly instruction; it's not
	implemented by all architectures.
2010-01-18 16:22:03 +00:00
Robert Millan
2cb6be4bc2 2010-01-18 Robert Millan <rmh.grub@aybabtu.com>
* loader/i386/efi/linux.c (grub_cmd_linux): Stop pretending we're
	ELILO.  This is no longer necessary.
2010-01-18 16:08:25 +00:00
BVK Chaitanya
a2eaee157c Add missing ChangeLog entry for -r2078 2010-01-18 19:49:19 +05:30
Robert Millan
88d170128f 2010-01-18 Robert Millan <rmh.grub@aybabtu.com>
Fix annoying UI bug in rescue mode.  Thanks to Tristan Gingold for
	spotting it back in 2008.  Shame on me for forgetting he did.
	
	* kern/rescue_reader.c (grub_rescue_run): Skip zero-length lines.
2010-01-18 13:45:40 +00:00
Robert Millan
8040619d88 2010-01-18 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): Rename to ...
	(GRUB_VIDEO_LINUX_TYPE_TEXT): ... this.  Update all users.
	(GRUB_VIDEO_TYPE_VLFB): Rename to ...
	(GRUB_VIDEO_LINUX_TYPE_VESA): ... this.  Update all users.
	(GRUB_VIDEO_TYPE_EFI): Rename to ...
	(GRUB_VIDEO_LINUX_TYPE_SIMPLE): ... this.  Update all users.
2010-01-18 07:49:50 +00:00
Robert Millan
a0c2a0f6ff 2010-01-17 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/test.h: Add license header.
	* tests/example_functional_test.c: Likewise.
	* tests/example_unit_test.c: Likewise.
	* tests/lib/functional_test.c: Likewise.
	* tests/lib/test.c: Likewise.
	* tests/lib/unit_test.c: Likewise.
2010-01-17 17:29:57 +00:00
Vladimir 'phcoder' Serbinenko
b0b139075e 2010-01-17 Vladimir Serbinenko <phcoder@gmail.com>
Use flag-based instead of hook-based video mode selection and "auto"
	keyword.

	* include/grub/video.h (grub_video_adapter): Changed 'setup' member.
	(grub_video_set_mode): Changed prototype. All users updated.
	(grub_video_check_mode_flag): New inline function.
	* video/video.c (parse_modespec): New function.
	(grub_video_set_mode): Parse flags and keywords.
2010-01-17 17:52:01 +01:00
carles
ea379330f9 2010-01-17 Carles Pina i Estany <carles@pina.cat>
* util/misc.c (grub_util_info): Fix the order of the parameters in a
	fprintf call.
2010-01-17 14:42:19 +00:00
Felix Zielcke
e15c215ebd 2010-01-16 Grégoire Sutre <gregoire.sutre@gmail.com>
* genmk.rb (class SCRIPT): Replace option -i of sed by a pipe.
2010-01-16 11:57:47 +01:00
carles
409ae1c92a 2010-01-16 Carles Pina i Estany <carles@pina.cat>
* util/grub-editenv.c (usage): Use `program_name' instead of hardcoded
	string.
	* util/grub-emu.c (usage): Likewise.
	* util/grub-mkpasswd-pbkdf2.c (usage): Likewise.
	* util/i386/efi/grub-mkimage.c (usage): Likewise.
	* util/i386/pc/grub-mkimage.c (usage): Likewise.
	* util/i386/pc/grub-setup.c (usage): Likewise.
2010-01-16 00:39:14 +00:00
carles
70a14d3d49 2010-01-16 Carles Pina i Estany <carles@pina.cat>
* util/misc.c (grub_util_warn): Gettextizze, print full stop after
	the message.
	(grub_util_info): Likewise.
	(grub_util_error): Likewise.
	* util/elf/grub-mkimage.c: Fix capitalisation, quotes, full stops
	and/or new lines in `grub_util_warna', `grub_util_info',
	`grub_util_error' calls.
	* util/getroot.c: Likewise.
	* util/grub-editenv.c: Likewise.
	* util/grub-emu.c: Likewise.
	* util/grub-fstest.c: Likewise.
	* util/grub-mkdevicemap.c: Likewise.
	* util/grub-mkfont.c: Likewise.
	* util/grub-mkpasswd-pbkdf2.c: Likewise.
	* util/grub-mkrelpath.c: Likewise.
	* util/grub-pe2elf.c: Likewise.
	* util/grub-probe.c: Likewise.
	* util/hostdisk.c: Likewise.
	* util/i386/efi/grub-mkimage.c: Likewise.
	* util/i386/pc/grub-mkimage.c: Likewise.
	* util/i386/pc/grub-setup.c: Likewise.
	* util/ieee1275/ofpath.c: Likewise.
	* util/mkisofs/eltorito.c: Likewise.
	* util/mkisofs/rock.c: Likewise.
	* util/mkisofs/write.c: Likewise.
	* util/raid.c: Likewise.
	* util/sparc64/ieee1275/grub-mkimage.c: Likewise.
	* util/sparc64/ieee1275/grub-setup.c: Likewise.
2010-01-16 00:26:52 +00:00
Vladimir 'phcoder' Serbinenko
a0b766fc9b 2010-01-15 Vladimir Serbinenko <phcoder@gmail.com>
Enable multiboot on non-pc.

	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (pkglib_MODULES): Move
	multiboot.mod and multiboot2.mod to ...
	* conf/i386.rmk (pkglib_MODULES): ... here.
	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (multiboot_mod_SOURCES):
	Moved to ...
	* conf/i386.rmk (multiboot_mod_SOURCES): .. here.
	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (multiboot_mod_CFLAGS):
	Moved to ...
	* conf/i386.rmk (multiboot_mod_CFLAGS): .. here.
	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (multiboot_mod_ASFLAGS):
	Moved to ...
	* conf/i386.rmk (multiboot_mod_ASFLAGS): .. here.
	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (multiboot_mod_LDFLAGS):
	Moved to ...
	* conf/i386.rmk (multiboot_mod_LDFLAGS): .. here.
	* conf/x86_64-efi.rmk (pkglib_MODULES): Remove ata.mod and
	relocator.mod.
	(ata_mod_SOURCES): Removed.
	(ata_mod_CFLAGS): Likewise.
	(ata_mod_LDFLAGS): Likewise.
	(relocator_mod_SOURCES): Removed.
	(relocator_mod_CFLAGS): Likewise.
	(relocator_mod_ASFLAGS): Likewise.
	(relocator_mod_LDFLAGS): Likewise.
	Include i386.mk.
	* include/grub/x86_64/multiboot.h: New file.
	* loader/i386/multiboot.c (grub_multiboot_boot) [GRUB_MACHINE_EFI]:
	Terminate EFI.
2010-01-15 21:11:51 +01:00
Vladimir 'phcoder' Serbinenko
884ade5654 2010-01-15 Vladimir Serbinenko <phcoder@gmail.com>
Video multiboot support.

	* include/grub/multiboot.h (grub_multiboot_set_accepts_video):
	New prototype.
	* include/multiboot.h: Resynced with multiboot specification.
	* include/multiboot2.h: Likewise.
	* loader/i386/multiboot.c (UNSUPPORTED_FLAGS): Support video flags.
	(grub_multiboot): Parse MULTIBOOT_VIDEO_MODE fields.
	* loader/i386/multiboot_mbi.c (DEFAULT_VIDEO_MODE): New constant.
	(HAS_VGA_TEXT): Likewise.
	(accepts_video): New variable.
	(grub_multiboot_set_accepts_video): New function.
	(grub_multiboot_get_mbi_size): Account for video structures.
	(set_video_mode): New function.
	(retrieve_video_parameters): Likewise.
	(grub_multiboot_make_mbi): Fill video fields.
2010-01-15 16:30:57 +01:00
Vladimir 'phcoder' Serbinenko
0d90e8a6fb 2010-01-15 Vladimir Serbinenko <phcoder@gmail.com>
Video driver ids.

	* include/grub/video.h (grub_video_driver_id): New type.
	(grub_video_adapter): New member 'id'. All users updated.
	(grub_video_get_driver_id): New proto.
	* video/video.c (grub_video_get_driver_id): New function.
2010-01-15 16:11:18 +01:00
carles
5c71db1b9b 2010-01-14 Carles Pina i Estany <carles@pina.cat>
* util/grub.d/30_os-prober.in: Use `set var=val' rather than plain
	`var=val'.
2010-01-14 23:20:13 +00:00
carles
cca15b52c1 2010-01-14 Carles Pina i Estany <carles@pina.cat>
* normal/cmdline.c (print_completion): Gettextizze.
2010-01-14 23:07:44 +00:00
carles
c586fbb206 2001-01-14 Carles Pina i Estany <carles@pina.cat>
* loader/i386/pc/chainloader.c: Include `<grub/mm.h>'.
2010-01-14 23:04:49 +00:00
carles
ba2f6848e0 2010-01-14 Carles Pina i Estany <carles@pina.cat>
* gettext/gettext.c (grub_gettext_translate): Push and pop
	grub_errno.
	(grub_gettext_delete_list): Change comment style.
	* kern/err.c (grub_error): Gettextizze.
	(grub_fatal): Gettextizze.
2010-01-14 22:31:06 +00:00
Robert Millan
0a46429a55 2010-01-14 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/i386/loader.h (grub_linux16_boot): Renamed to ...
	(grub_linux16_real_boot): ... this.
	* kern/i386/loader.S: Likewise.
	* loader/i386/pc/linux.c: Include `<grub/video.h>' and `<grub/mm.h>'.
	(grub_linux16_boot): New function.  Switches to text mode and calls
	grub_linux16_real_boot().
	
	* loader/i386/bsd.c: Include `<grub/video.h>'.
	(grub_freebsd_boot, grub_openbsd_boot, grub_netbsd_boot): Switch to
	text mode before calling grub_unix_real_boot().
	
	* loader/i386/multiboot.c: Include `<grub/video.h>'.
	(grub_multiboot_boot): Switch to text mode before calling
	grub_relocator32_boot().
	
	* loader/i386/pc/chainloader.c: Include `<grub/video.h>'.
	(grub_chainloader_boot): Switch to text mode before calling
	grub_chainloader_real_boot().
2010-01-14 21:08:31 +00:00
Robert Millan
d6f93a661c 2010-01-05 Jordan Uggla <jordan.uggla@gmail.com>
2010-01-05  Colin Watson  <cjwatson@ubuntu.com>
	
	* util/grub-reboot.in: Make sure prev_saved_entry always gets a
	non-empty value.
2010-01-14 18:52:39 +00:00
BVK Chaitanya
0934d18466 2010-01-14 BVK Chaitanya <bvk.groups@gmail.com>
Unit testing framework for GRUB.

	* Makefile.in: Test framework build rules for 'make check'.
	* conf/tests.rmk: Build rules for individual tests and framework.

	* include/grub/test.h: Header file for whitebox tests.
	* tests/lib/functional_test.c: Framework support for whitebox
	functional tests.
	* tests/lib/test.c: Common whitebox testing code for unit and
	functional tests.
	* tests/lib/unit_test.c: Framework support for whitebox unit
	tests.

	* tests/util/grub-shell-tester.in: Support utility for grub-script
	tests.
	* tests/util/grub-shell.in: Utility to execute grub-script
	commands in a Qemu instance.

	* tests/example_functional_test.c: Example whitebox functional
	test.
	* tests/example_grub_script_test.in: Example grub-script test.
	* tests/example_scripted_test.in: Example scripted test.
	* tests/example_unit_test.c: Example whitebox unit test.
2010-01-14 19:15:21 +05:30
Vladimir 'phcoder' Serbinenko
9c4ffeebf5 2010-01-14 Vladimir Serbinenko <phcoder@gmail.com>
* conf/i386-coreboot.rmk (multiboot_mod_SOURCES):
	Add loader/i386/multiboot_mbi.c.
	(multiboot2_mod_SOURCES): Likewise.
	* conf/i386-pc.rmk (multiboot_mod_SOURCES): Likewise.
	(multiboot2_mod_SOURCES): Likewise.
	* include/grub/multiboot.h (grub_multiboot_get_mbi_size): New proto.
	(grub_multiboot_make_mbi): Likewise.
	(grub_multiboot_free_mbi): Likewise.
	(grub_multiboot_init_mbi): Likewise.
	(grub_multiboot_add_module): Likewise.
	(grub_multiboot_set_bootdev): Likewise.
	* loader/i386/multiboot.c (mbi): Removed.
	(mbi_dest): Likewise.
	(alloc_mbi): New variable.
	(grub_multiboot_payload_size): Removed. All users updated.
	(grub_multiboot_pure_size): New variable.
	(grub_multiboot_boot): Use grub_multiboot_make_mbi.
	(grub_multiboot_unload): Use grub_multiboot_free_mbi.
	(grub_get_multiboot_mmap_len): Moved to loader/i386/multiboot_mbi.c.
	(grub_fill_multiboot_mmap): Likewise.
	(grub_multiboot_get_bootdev): Likewise.
	(grub_multiboot): Use multiboot_mbi functions.
	* loader/i386/multiboot_mbi.c: New file.
2010-01-14 12:40:55 +01:00
Vladimir 'phcoder' Serbinenko
17383dfe96 2010-01-13 Vladimir Serbinenko <phcoder@gmail.com>
* kern/efi/init.c (grub_efi_fini): Don't call grub_efi_mm_fini as
	it would result in module crash.
2010-01-13 22:53:12 +01:00
Vladimir 'phcoder' Serbinenko
c1f2882010 2010-01-13 Vladimir Serbinenko <phcoder@gmail.com>
* term/ieee1275/ofconsole.c (grub_ofconsole_putchar): Handle '\r'.
	(grub_ofconsole_getwh): Split to ...
	(grub_ofconsole_getwh): ... this.
	(grub_ofconsole_dimensions): ...and this.
	(grub_ofconsole_init_output): Call grub_ofconsole_dimensions.
2010-01-13 20:43:48 +01:00
Robert Millan
58655a160b 2010-01-13 Robert Millan <rmh.grub@aybabtu.com>
* util/mkisofs/rock.c (generate_rock_ridge_attributes): Fix a typo.
2010-01-13 19:10:57 +00:00
Vladimir 'phcoder' Serbinenko
10891398fd 2010-01-12 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/pc/multiboot2.c: Removed stalled file.
2010-01-12 17:56:05 +01:00
Vladimir 'phcoder' Serbinenko
0b8a223cb1 2010-01-12 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkpasswd-pbkdf2.c (main): Use grub_util_init_nls.
	Reported by: Grégoire Sutre
2010-01-12 13:36:44 +01:00
Robert Millan
92ab12b092 2010-01-11 Robert Millan <rmh.grub@aybabtu.com>
* util/misc.c (canonicalize_file_name): New function.
	(make_system_path_relative_to_its_root): Use canonicalize_file_name()
	instead of realpath().
2010-01-11 14:55:20 +00:00
Colin Watson
a788afb626 2010-01-11 Colin Watson <cjwatson@ubuntu.com>
* util/grub-install.in (usage): Clarify meaning of --root-directory,
	and make it clearer that it's optional.  Based on confusion
	witnessed on IRC.
2010-01-11 12:00:57 +00:00
Vladimir 'phcoder' Serbinenko
ffa8e3d277 2010-01-10 Vladimir Serbinenko <phcoder@gmail.com>
* term/i386/pc/vga_text.c (inc_y): Fix off-by-one error which resulted
	in premature implicit newline.
2010-01-10 22:35:46 +01:00
Vladimir 'phcoder' Serbinenko
e9060a9d3b 2010-01-10 Vladimir Serbinenko <phcoder@gmail.com>
* normal/cmdline.c (grub_cmdline_get): Fix off-by-one error
	which resulted in garbled command line at the end of screen.
2010-01-10 22:34:25 +01:00
Robert Millan
f0d0c0b726 2010-01-10 Robert Millan <rmh.grub@aybabtu.com>
* loader/i386/ieee1275/linux.c (grub_linux_boot): Rework video position
	initialization with similar approach as with other Linux loaders.
2010-01-10 01:43:42 +00:00
Robert Millan
0e60bae74e 2010-01-10 Robert Millan <rmh.grub@aybabtu.com>
Fix i386-ieee1275 build.
	
	* loader/i386/ieee1275/linux.c (grub_linux_boot): Use grub_term_width()
	and grub_term_height() for video_{width,height} initialization.
2010-01-10 01:10:39 +00:00
Robert Millan
cdec4d3193 2010-01-09 Robert Millan <rmh.grub@aybabtu.com>
Fix grub-emu build.
	
	* conf/any-emu.rmk (grub_emu_SOURCES): Remove `kern/reader.c'.
2010-01-10 00:47:19 +00:00