Commit graph

500 commits

Author SHA1 Message Date
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
Vladimir 'phcoder' Serbinenko
5ee21c970b Add terminal support in legacy_parser 2010-09-20 14:48:17 +02:00
Colin Watson
6d3d698d13 * grub-core/commands/efi/lsefisystab.c: Correct header.
* grub-core/commands/efi/lssal.c: Likewise.
* grub-core/commands/testload.c: Likewise.
2010-09-20 13:18:41 +01:00
Colin Watson
a63c31b62d * kern/emu/hostdisk.c: Include <sys/ioctl.h> and <sys/disklabel.h>
on FreeBSD.  Define HAVE_DIOCGDINFO on NetBSD and FreeBSD to reduce
the verbosity of later #ifs.
(find_partition_start): Define this function on FreeBSD too.
(device_is_wholedisk) [__FreeBSD__ || __FreeBSD_kernel__]: New
function.
(grub_util_biosdisk_get_grub_dev): Use partition-start-sector logic
on FreeBSD.
2010-09-20 12:12:33 +01:00
Yves Blusseau
15c6926126 Use gnulib-tool to create gnulib source files.
* Add gnulib files generated by gnulib-tool in build-aux, m4 and
    grub-core/gnulib directories
    * .bzignore: Add **/.deps and autogenerated gnulib files
    * configure.ac: Assign auxiliary directory to build-aux, add invocation
    of gnulib macros, add grub-core/gnulib/Makefile
    * Makefile.am: Add gnulib directory in SUBDIRS (removing unnecessary .),
    include m4 directory to aclocal.
    * Makefile.util.def: Remove direct compilation of gnulib source files
    and use the new grub-core/gnulib/libgnu.a.
    * build-aux/config.rpath: move config.rpath from top directory to
    build-aux
    * conf/Makefile.common: Remove the macro _GL_UNUSED already defined
    in gnulib headers
    * conf/Makefile.extra-dist: Add m4/gnulib-cache.m4
    * grub-core/Makefile.core.def: Remove unnecessary extra_dist
    * grub-core/lib/posix_wrap/localcharset.h (locale_charset): Update
    header.
    * grub-core/lib/posix_wrap/langinfo.h (nl_langinfo): Return static
    string.
2010-09-20 12:35:33 +02:00
Vladimir 'phcoder' Serbinenko
774b7ca021 merge mainline into gingold3 2010-09-20 12:23:10 +02:00
Szymon Janc
c55f50180d Remove crc.mod and move crc command to hashsum.mod.
Remove lib/crc.c - users updated to use gcrypt implementation.

	* grub-core/commands/crc.c: Removed.
	* grub-core/Makefile.core.def (crc): Module removed.
	* grub-core/commands/hashsum.c (aliases[]): Add crc alias.
	* grub-core/commands/hashsum.c (GRUB_MOD_INIT): Register crc command.
	* grub-core/commands/hashsum.c (GRUB_MOD_FINI): Unregister crc command.
	* grub-core/lib/crc.c: Removed.
	* include/grub/lib/crc.h: Removed.
	* Makefile.util.def (crc): Remove lib/crc.c
	* grub-core/Makefile.core.def (libgrub.a): Remove grub-core/lib/crc.c.
	* util/grub-fstest.c (cmd_crd): Use libgcrypt crc implementation.
	* Makefile.util.def (libgrub.a): Add grub-core/lib/libgcrypt-grub/cipher/crc.c.
	* Makefile.util.def (grub-fstest): Add CFLAGS_GCRY to cflags.
	* Makefile.util.def (grub-fstest): Add CPPFLAGS_GCRY to cppflags.
	* grub-core/efiemu/prepare.c (grub_efiemu_crc): Use libgcrypt crc implementation.
2010-09-20 01:40:58 +02:00
Vladimir 'phcoder' Serbinenko
e0337366d1 * grub-core/boot/i386/pc/boot.S: Ignore %dl if it's not in a sane range. 2010-09-20 00:06:45 +02:00
Vladimir 'phcoder' Serbinenko
742f9232e3 Split config.h for util and core.
* acinclude.m4 (HAVE_ASM_USCORE): Transformed into a variable.
	(ADDR32): Likewise.
	(DATA32): Likewise.
	(BSS_START_SYMBOL): Likewise.
	(END_SYMBOL): Likewise.
	(NEED_ENABLE_EXECUTE_STACK): Likewise. All users updated.
	(grub_I386_ASM_ABSOLUTE_WITHOUT_ASTERISK): Removed.
	* config.h.in: New file.
	* configure.ac: Use config-util.h as config define file.
	Rename MACHINE into GRUB_MACHINE. All users updated.
	(NEED_REGISTER_FRAME_INFO): Transformed into a variable. All users
	updated.
	(NESTED_FUNC_ATTR): Likewise.
	Substitue new variables.
	(COND_HAVE_ASM_USCORE): New conditional.
	* grub-core/Makefile.am (ASM_PREFIX): New variable.
	(kernel_syms.lst): Use ASM_PREFIX.
	* grub-core/kern/emu/console.c: Include config-util.h.
	* grub-core/kern/emu/misc.c: Likewise.
	* grub-core/kern/emu/mm.c: Likewise.
	* include/grub/emu/misc.h: Likewise.
	* include/grub/libgcc.h: Likewise.
2010-09-19 22:22:43 +02:00
Vladimir 'phcoder' Serbinenko
5d6015ddf6 Add lost part of GRUB_TERM_KEY_* commit 2010-09-19 22:12:25 +02:00
Vladimir 'phcoder' Serbinenko
39feb0e8f9 * grub-core/term/efi/console.c (efi_codes): Fix GRUB_TERM_KEY_*
constants usage.
	* grub-core/kern/emu/console.c (grub_ncurses_getkey):
	Fix GRUB_TERM_KEY_* constants usage.
	* grub-core/kern/emu/misc.c (asprintf): Fix vasprintf usage.
2010-09-19 22:09:05 +02:00
Vladimir 'phcoder' Serbinenko
9af6dac30d * grub-core/bus/usb/ohci.c (grub_ohci_cancel_transfer): Use %p to
print pointer.
	* grub-core/bus/usb/uhci.c: Remove empty define.
	(grub_uhci_check_transfer): Add missing cast.
	* grub-core/bus/usb/usbhub.c (poll_nonroot_hub): Use %p to
	print pointer.
	* grub-core/term/usb_keyboard.c (grub_usb_keyboard_getkey): Use
	PRIuGRUB_SIZE.
	* include/grub/types.h (PRIuGRUB_SIZE): New definition.
2010-09-19 22:05:48 +02:00
Vladimir 'phcoder' Serbinenko
d6d94820b5 * grub-core/Makefile.core.def (legacycfg): Add
lib/i386/pc/vesa_modes_table.c on emu.
2010-09-19 22:03:16 +02:00
BVK Chaitanya
3572f2b65a Reduce number of temporary files generated by build system.
* grub-core/gencmdlist.sh: Removed.
	* grub-core/genfslist.sh: Removed.
	* grub-core/genhandlerlist.sh: Removed.
	* grub-core/genmodsrc.sh: Removed.
	* grub-core/genpartmaplist.sh: Removed.
	* grub-core/genparttoollist.sh: Removed.
	* grub-core/gentermiinallist.sh: Removed.
	* grub-core/genvideolist.sh: Removed.

	* grub-core/genmod.sh.in: New file.
	* grub-core/gensyminfo.sh.in: New file.

	* conf/Makefile.common (CPPFLAGS_*_LIST): New marker flags.
	* conf/Makefile.extra-dist: Update with new files.
	* gentpl.py: Remove rules related to unnecessary temporary files.
	* grub-core/Makefile.am (syminfo.lst): New replacement for def-*
	and und-* files.
	* grub-core/Makefile.core.def: New rules for gensyminfo.sh and
	genmod.sh scripts.
	* grub-core/bus/usb/uhci.c: Remove empty #define.
	* grub-core/genmoddep.awk: Updated with new syminfo format.
	* util/bash-completion.d/Makefile.am: Add config.log to
	CLEANFILES.
2010-09-19 19:29:36 +05:30
BVK Chaitanya
b524259bec merge with mainline 2010-09-19 18:54:45 +05:30
Vladimir 'phcoder' Serbinenko
eaf41b2592 * grub-core/commands/i386/cmostest.c (+parse_args): New function.
(grub_cmd_cmosclean): Likewise.
	(GRUB_MOD_INIT): Register command cmosclean.
	* util/grub-mkconfig.in: Export GRUB_BUTTON_CMOS_CLEAN.
	* util/grub.d/00_header.in: Handle GRUB_BUTTON_CMOS_CLEAN.
2010-09-19 01:15:44 +02:00
Carles Pina i Estany
1a9130dd3f Add keyboard layouts support.
* Makefile.util.def (grub-mklayout): New file.
	(grub-kbdcomp): New script.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES) [COND_mips_yeeloong]:
	Add keyboard_layouts.h.
	* grub-core/Makefile.core.def (kernel): Add commands/keylayouts.c and
	commands/boot.c on yeeloong.
	(keylayouts): New module.
	* grub-core/bus/usb/ohci.c
	* grub-core/bus/usb/uhci.c
	* grub-core/bus/usb/usbhub.c (rescan): New variable.
	(grub_usb_add_hub): Poll interrupt pipe for device handling.
	(attach_root_port): Likewise.
	(poll_nonroot_hub): Likewise.
	(grub_usb_poll_devices): Likewise.
	(detach_device): Close transfer.
	* grub-core/bus/usb/usbtrans.c (grub_usb_execute_and_wait_transfer): New
	function.
	(grub_usb_bulk_setup_readwrite): Likewise.
	(grub_usb_bulk_finish_readwrite): Likewise.
	* grub-core/commands/keylayouts.c: New file.
	* grub-core/commands/keystatus.c (grub_getkeystatus): New function.
	* grub-core/commands/menuentry.c (hotkey_aliases): All several new
	aliases.
	* grub-core/term/at_keyboard.c: Restructured to use keylayouts and
	support scancode 2.
	* grub-core/term/usb_keyboard.c: Restructured to use keylayouts.
	* include/grub/keyboard_layouts.h: New file.
	* util/grub-mklayout.c: New file.
	* util/grub-kbdcomp.in: Likewise.

	Also-By: Aleš Nesrsta <starous@volny.cz>

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2010-09-19 01:01:35 +02:00
Aleš Nesrsta
ab629d0c5d Fix incorrect usb report interpretation 2010-09-19 00:34:25 +02:00
Vladimir 'phcoder' Serbinenko
a1d84a5e5e Unify memory types.
* grub-core/Makefile.am (KERNEL_HEADER_FILES): Include memory.h.
	* grub-core/commands/lsmmap.c (grub_cmd_lsmmap): Output user-readable
	types.
	* grub-core/kern/i386/multiboot_mmap.c (grub_lower_mem): Removed.
	(grub_upper_mem): Likewise.
	* grub-core/kern/ieee1275/init.c (grub_upper_mem): Likewise.
	* include/grub/memory.h (grub_memory_type_t): New enum.
	All users updated.
2010-09-19 00:04:31 +02:00
Vladimir 'phcoder' Serbinenko
9696382e79 GRUB-legacy configuration file support.
* Makefile.util.def (grub-menulst2cfg): New util.
	* docs/man/grub-menulst2cfg.h2m: New file.
	* grub-core/Makefile.core.def (legacycfg): New module.
	* grub-core/commands/legacycfg.c: New file.
	* grub-core/commands/menuentry.c (append_menu_entry): Rename to ...
	(grub_normal_add_menu_entry): ... this.
	* grub-core/commands/password.c (grub_cmd_password): Split main part to ...
	(grub_normal_set_password): ...this.
	* grub-core/commands/videoinfo.c (grub_cmd_videoinfo): Support MODE.
	* grub-core/loader/i386/linux.c (linux_vesafb_res): Move to ..,
	* grub-core/lib/i386/pc/vesa_modes_table.c: ... here.
	* grub-core/lib/legacy_parse.c: New file.
	* grub-core/normal/auth.c (grub_cmd_authenticate): New command.
	* include/grub/i386/pc/vesa_modes_table.h: New file.
	* include/grub/legacy_parse.h: Likewise.
	* include/grub/normal.h (grub_normal_add_menu_entry): New proto.
	* util/grub-menulst2cfg.c: New file.

	* grub-core/Makefile.core.def (lsapm): New module.
	* grub-core/commands/i386/pc/lsapm.c: New file.
	* grub-core/loader/i386/multiboot_mbi.c (make_mbi) [GRUB_MACHINE_PCBIOS]: Pass APM info.
	* grub-core/loader/multiboot_mbi2.c (make_mbi) [GRUB_MACHINE_PCBIOS]:
	Likewise.
	* include/grub/i386/pc/apm.h: New file.
	* include/multiboot.h (multiboot_apm_info): New struct.
2010-09-18 16:21:57 +02:00
Vladimir 'phcoder' Serbinenko
685475e596 Fix yeeloong compilation 2010-09-18 13:49:39 +02:00
Aleš Nesrsta
e70a1b9535 Fix multiple USB issues 2010-09-18 13:49:15 +02:00
Aleš Nesrsta
b9c7e9d400 Set UHCI low-speed flag 2010-09-18 10:56:52 +02:00
Colin Watson
bf8d13388d (convert_system_partition_to_system_disk): Initialise node.
* grub-core/kern/emu/hostdisk.c
2010-09-17 23:41:06 +01:00
Colin Watson
9c0bad2e15 * grub-core/kern/emu/hostdisk.c
(convert_system_partition_to_system_disk): Fix devmapper memory pool
leak.
Reported and based on patch by: Modestas Vainius.
2010-09-17 11:43:46 +01:00
Colin Watson
a939d135ec Fix DM-RAID probing with recent versions of device-mapper udev
rules.
* grub-core/kern/emu/hostdisk.c (read_device_map): Don't
canonicalise device paths under /dev/mapper/.
(convert_system_partition_to_system_disk): Compare the
uncanonicalised path to /dev/mapper/ rather than the canonicalised
path, since device nodes under /dev/mapper/ are often symlinks.
2010-09-17 11:00:37 +01:00
Vladimir 'phcoder' Serbinenko
7756d44436 Basic menuentry-retrieveing jail 2010-09-16 23:48:32 +02:00
Colin Watson
108538d8ff Support RAID on virtio devices, and others.
* grub-core/kern/emu/getroot.c [__MINGW32__] (find_root_device):
Rename to ...
[__MINGW32__] (grub_find_device): ... this.
[! __MINGW32__ && ! __CYGWIN__] (find_root_device): Rename to ...
[! __MINGW32__ && ! __CYGWIN__] (grub_find_device): ... this.  Use a
reasonable default if dir is NULL.
[! __MINGW32__ && __CYGWIN__] (find_cygwin_root_device): Rename to
...
[! __MINGW32__ && __CYGWIN__] (grub_find_device): ... this.
(grub_guess_root_device): Update callers.
* include/grub/emu/getroot.h (grub_find_device): Add prototype.
* util/raid.c (grub_util_getdiskname): Remove.
(grub_util_raid_getmembers): Use grub_find_device rather than
grub_util_getdiskname.
2010-09-16 14:55:28 +01:00
Colin Watson
e5bfc130a4 * docs/grub.texi (serial): Remove obsolete comment about GRUB
needing to be compiled with serial support.
(ls): Indicate that multiple files are accepted.
* grub-core/commands/ls.c (GRUB_MOD_INIT): Update help text to
indicate that multiple files are accepted.
2010-09-16 14:13:48 +01:00
Vladimir 'phcoder' Serbinenko
f0eee6b26a implement multiboot2 vbe specification 2010-09-16 00:54:21 +02:00
Vladimir 'phcoder' Serbinenko
0b37526a5a Add VBE PM interface 2010-09-16 00:37:30 +02:00
Vladimir 'phcoder' Serbinenko
b09cf083a0 Fix compilation issue 2010-09-16 00:30:47 +02:00
Vladimir 'phcoder' Serbinenko
9ba27423f5 Merge mainline into mbivid 2010-09-16 00:22:49 +02:00
Vladimir 'phcoder' Serbinenko
35139e8a55 * grub-core/commands/parttool.c (grub_cmd_parttool): Fix a variable
misusage.
	Reported by: J. Nick Terry
2010-09-15 21:48:24 +02:00
Vladimir 'phcoder' Serbinenko
e50fca4a4c Move embedding routines to partmap sources files.
* grub-core/partmap/gpt.c (grub_gpt_partition_type_bios_boot)
	[GRUB_UTIL]: New variable.
	(gpt_partition_map_iterate): Set part.parent.
	(gpt_partition_map_embed) [GRUB_UTIL]: New function.
	(grub_gpt_partition_map) [GRUB_UTIL]: Set .embed.
	* grub-core/partmap/msdos.c (pc_partition_map_embed) [GRUB_UTIL]:
	New function.
	(grub_msdos_partition_map) [GRUB_UTIL]: Set .embed.
	* include/grub/partition.h (grub_embed_type_t) [GRUB_UTIL]: New type.
	(grub_partition_map) [GRUB_UTIL]: New field embed.
	* util/grub-setup.c (grub_gpt_partition_type_bios_boot): Removed.
	(setup): Use ->embed.
2010-09-15 21:36:57 +02:00
Vladimir 'phcoder' Serbinenko
f00478b719 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): New
function.
	* include/grub/emu/hostdisk.h (grub_util_biosdisk_is_floppy): New proto.
	* util/grub-setup.c (setup): Use grub_util_biosdisk_is_floppy.
2010-09-15 15:30:43 +02:00
Vladimir 'phcoder' Serbinenko
3f8fcb6a24 Support vbeprobe MODE 2010-09-15 14:37:28 +02:00
Vladimir 'phcoder' Serbinenko
c99dead654 Support geometry 2010-09-15 14:11:08 +02:00
Vladimir 'phcoder' Serbinenko
e2830452f0 Support legacy_check_password 2010-09-15 13:51:02 +02:00
Vladimir 'phcoder' Serbinenko
0cb2f2813f merge mainline into legacy_parser 2010-09-15 11:43:59 +02:00
Vladimir 'phcoder' Serbinenko
890c9fa5f2 Implement APM 2010-09-15 11:42:18 +02:00
Vladimir 'phcoder' Serbinenko
e31bb61911 Transform legacy mode numbers into resolution specification 2010-09-15 11:39:53 +02:00
Vladimir 'phcoder' Serbinenko
2e04a00685 * grub-core/gnulib/basename-lgpl.c: Imported.
* grub-core/gnulib/basename.c: Likewise.
	* grub-core/gnulib/dirname-lgpl.c: Likewise.
	* grub-core/gnulib/dirname.c: Likewise.
	* grub-core/gnulib/dirname.h: Likewise.
	* grub-core/gnulib/stripslash.c: Likewise.
2010-09-15 11:34:29 +02:00
Vladimir 'phcoder' Serbinenko
5dcdf93ad6 * grub-core/gnulib/error.c: Resynced.
* grub-core/gnulib/getopt.c: Likewise.
	* grub-core/gnulib/getopt_int.h: Likewise.
	* grub-core/gnulib/regex.h: Likewise.
	* grub-core/gnulib/regex_internal.c: Likewise.
	* grub-core/gnulib/regex_internal.h: Likewise.
2010-09-15 11:31:02 +02:00
Vladimir 'phcoder' Serbinenko
44224d3948 Fix UUID command. Reported by: Jordan Uggla 2010-09-15 02:16:12 +02:00
Szymon Janc
014f47b74f * grub-core/lib/xzembed/xz_dec_stream.c (dec_main): Fix index and block
CRC calculations and validity checks.
	* grub-core/lib/xzembed/xz_dec_stream.c (dec_index): Fix index CRC
	calculations.
2010-09-15 00:39:49 +02:00
Szymon Janc
dd521a4afb * grub-core/lib/xzembed/xz_dec_stream.c (xz_dec_end): Fix memory leak. 2010-09-15 00:13:09 +02:00
Vladimir 'phcoder' Serbinenko
79c4eeb919 Fix incorrect echo options handling.
Reported by: Yves Blusseau.

	* include/grub/command.h (grub_command_flags_t): New flags
	GRUB_COMMAND_ACCEPT_DASH and GRUB_COMMAND_OPTIONS_AT_START.
	* grub-core/lib/arg.c (grub_arg_parse): Handle new flags.
	* grub-core/commands/echo.c (GRUB_MOD_INIT): Use new flags.
2010-09-14 23:30:06 +02:00
Vladimir 'phcoder' Serbinenko
ed80f7d586 * include/grub/command.h (GRUB_COMMAND_FLAG_CMDLINE): Removed. All
users updated.
	(GRUB_COMMAND_FLAG_MENU): Likewise.
	(GRUB_COMMAND_FLAG_BOTH): Likewise.
	(GRUB_COMMAND_FLAG_TITLE): Removed.
	(GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
	(GRUB_COMMAND_FLAG_EXTCMD): Moved into enum.
	(GRUB_COMMAND_FLAG_DYNCMD): Likewise.
	(GRUB_COMMAND_FLAG_BLOCKS): Likewise.
	(grub_command_flags_t): New enum. All users updated.
2010-09-14 23:06:01 +02:00
Seth Goldberg
5fe7620a4e Fix solaris compilation.
* grub-core/Makefile.core.def (kernel): Include gnulib/error.c on emu.
	(grub-emu): Add LIBZFS and LIBNVPAIR to ldadd.
	(grub-emu-list): Likewise.
2010-09-14 22:32:33 +02:00
Vladimir 'phcoder' Serbinenko
545b752f88 Remove deprecated root command.
* grub-core/commands/minicmd.c (grub_mini_cmd_root): Removed. All users
	updated.
2010-09-14 22:21:35 +02:00
Vladimir 'phcoder' Serbinenko
d2ea455141 * grub-core/partmap/sun.c (sun_partition_map_iterate): Don't needlesly
allocate p.
2010-09-14 21:07:39 +02:00
Vladimir 'phcoder' Serbinenko
b71c3faedb * grub-core/kern/sparc64/ieee1275/crt0.S: Align stack. 2010-09-14 20:59:00 +02:00
Vladimir 'phcoder' Serbinenko
275433e642 Don't export grub_gate_a20.
* grub-core/kern/i386/pc/init.c: Remove leftovers.
	* grub-core/kern/i386/pc/startup.S (FUNCTION(grub_gate_a20)): Rename
	to ...
	(grub_gate_a20): ... this. All users updated.
	* include/grub/i386/pc/init.h: Removed. All users updated.
2010-09-14 01:08:24 +02:00
Vladimir 'phcoder' Serbinenko
608e43b102 Disable usbserial on grub-emu since our libusb code isn't good enough
yet.

	* grub-core/Makefile.core.def (usbserial_common): Disable on emu.
	(usbserial_pl2303): Likewise.
	(usbserial_ftdi): Likewise.
2010-09-14 00:08:07 +02:00
Vladimir 'phcoder' Serbinenko
94564f81a8 * include/grub/disk.h (grub_disk): Remove has_partitions.
All users updated.
	* disk/loopback.c (grub_loopback): Remove has_partitions.
	All users updated.
	(options): Remove partitions. All users updated.
	* util/grub-fstest.c (fstest): Don't pass "-p" to loopback.
	* util/i386/pc/grub-setup.c (setup): copy partition table only when
	actual partition table is found.
2010-09-13 23:59:22 +02:00
Vladimir 'phcoder' Serbinenko
2419f17a09 Enable acpi shutdown on all ACPI platforms.
* grub-core/Makefile.core.def (halt): Inlude commands/acpihalt.c
	on coreboo, multiboot and EFI.
	* grub-core/commands/acpihalt.c (get_sleep_type): Add missing casts.
	(grub_acpi_halt): Likewise.
	* grub-core/commands/i386/pc/halt.c (grub_halt): Call grub_acpi_halt.
	(grub_cmd_halt): Don't call grub_acpi_halt directly.
	* grub-core/lib/efi/halt.c (grub_halt): Call grub_acpi_halt.
	* grub-core/lib/i386/halt.c (grub_halt)
	[GRUB_MACHINE_COREBOOT || GRUB_MACHINE_MULTIBOOT]: Likewise.
2010-09-13 20:29:15 +02:00
Vladimir 'phcoder' Serbinenko
0575c7c3ec * grub-core/commands/iorw.c (grub_cmd_read): Declare buf in smallest
context.
2010-09-13 20:16:51 +02:00
Vladimir 'phcoder' Serbinenko
54ac3cd189 * grub-core/video/efi_gop.c: Fix over-80-chars line.
* grub-core/video/efi_uga.c: Likewise.
2010-09-13 20:10:41 +02:00
Vladimir 'phcoder' Serbinenko
b2a30ac5e4 Filter devaliases and never open same device twice.
* grub-core/disk/ieee1275/ofdisk.c (last_devpath): New variable.
	(last_ihandle): Likewise.
	(ofdisk_hash_ent): New member shortest.
	(ofdisk_hash_add): Add canonical path too.
	(scan): New function.
	(grub_ofdisk_iterate): Iterate over hashed entries.
	(compute_dev_path): Don't add :0.
	(grub_ofdisk_open): Don't really open the disk.
	(grub_ofdisk_close): Avoid closing unrelated disk.
	(grub_ofdisk_read): Implement reopen logic.
	* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_canonicalise_devname):
	New function.
	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_canonicalise_devname):
	New proto.
2010-09-13 19:17:29 +02:00
Vladimir 'phcoder' Serbinenko
fb53b340aa Fix sparc64.
* configure.ac (GRUB_KERNEL_MACHINE_LINK_ADDR): Removed.
	* grub-core/Makefile.core.def (kernel): Make ldflags just use the
	right address. Add sparc64_ieee1275_ldflags.
	* grub-core/loader/sparc64/ieee1275/linux.c: Remove leftover include.
	* util/grub-mkimagexx.c (locate_sections): Correct grub_host_to_target32
	to grub_host_to_target_addr
	(load_image): Likewise.
2010-09-13 16:49:50 +02:00
Vladimir 'phcoder' Serbinenko
f452b04048 * grub-core/normal/completion.c (complete_file): Handle device
containing slash.
	Fix based on patch by Doug Nazar.
2010-09-13 14:26:55 +02:00
Vladimir 'phcoder' Serbinenko
9d2be652d4 videoinfo on non-vbe.
* grub-core/Makefile.core.def (vbeinfo): Removed.
	(vbetest): Removed.
	(videoinfo): New module.
	* grub-core/commands/i386/pc/vbeinfo.c: Removed.
	* grub-core/commands/i386/pc/vbetest.c: Removed.
	* grub-core/commands/videoinfo.c: New file.
	* grub-core/commands/videotest.c (grub_cmd_videotest): Support mode
	specification.
	(grub_cmd_videotest) [GRUB_MACHINE_PCBIOS]: Load vbe.mod when invoked
	as vbetest.
	(GRUB_MOD_INIT) [GRUB_MACHINE_PCBIOS]: New command vbetest.
	(GRUB_MOD_FINI) [GRUB_MACHINE_PCBIOS]: Unregister vbetest.
	* grub-core/video/efi_gop.c (grub_video_gop_fill_mode_info): Fill
	mode_number. New parameter mode. All users updated.
	(grub_video_gop_iterate): New function.
	(grub_video_efi_gop): New member iterate.
	* grub-core/video/i386/pc/vbe.c (framebuffer): Removed leftover fields.
	(grub_vbe_set_video_mode): Remove setting useless fields.
	(vbe2videoinfo): New function.
	(grub_video_vbe_iterate): Likewise.
	(grub_video_vbe_setup): Use vbe2videoinfo.
	(grub_video_vbe_print_adapter_specific_info): New function.
	(grub_video_vbe_adapter): New fields iterate and
	print_adapter_specific_info.
	* include/grub/video.h (GRUB_VIDEO_MODE_*): Transform into enum.
	All users updated.
	(grub_video_mode_info): New field mode_number.
	(grub_video_adapter): New fields iterate and
	print_adapter_specific_info.
2010-09-13 13:38:13 +02:00
Tristan Gingold
179503f524 * grub-core/commands/efi/lsefisystab.c: New file.
* grub-core/commands/efi/lssal.c: Likewise.
	* grub-core/Makefile.core.def (lsacpi): New module.
	(lsefisystab): Likewise.
	* include/grub/efi/api.h (GRUB_EFI_SAL_TABLE_GUID): New definition.
	(GRUB_EFI_HCDP_TABLE_GUID): Likewise.
	(grub_efi_sal_system_table): New struct.
	(grub_efi_sal_system_table_entrypoint_descriptor): Likewise.
	(grub_efi_sal_system_table_memory_descriptor): Likewise.
	(grub_efi_sal_system_table_platform_features): Likewise.
	(grub_efi_sal_system_table_translation_register_descriptor): Likewise.
	(grub_efi_sal_system_table_purge_translation_coherence): Likewise.
	(grub_efi_sal_system_table_ap_wakeup): Likewise.
	* include/grub/types.h (PRIuGRUB_UINT64_T): New definition.

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

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2010-09-13 13:14:44 +02:00
Vladimir 'phcoder' Serbinenko
cf9827de73 Support explicit user claim that a device is BIOS-visible.
* grub-core/kern/emu/getroot.c (grub_util_get_dev_abstraction):
	Return GRUB_DEV_ABSTRACTION_NONE if device is in device.map.
	* grub-core/kern/emu/hostdisk.c
	(convert_system_partition_to_system_disk): Support mdX.
	(find_system_device): New parameter add. All users updated.
	(grub_util_biosdisk_is_present): New function.
	* include/grub/emu/hostdisk.h (grub_util_biosdisk_is_present): New
	proto.
2010-09-13 13:09:58 +02:00
Vladimir 'phcoder' Serbinenko
53f0eb1f64 Search hints support.
* commands/search.c (FUNC_NAME): New arguments hints and nhints.
	All users updated.
2010-09-13 13:01:41 +02:00
Vladimir 'phcoder' Serbinenko
1f1dd48a17 support subpartition hints 2010-09-13 12:16:22 +02:00
Vladimir 'phcoder' Serbinenko
53d4ca1afc Change from direct arguments to --hint 2010-09-13 11:48:01 +02:00
Vladimir 'phcoder' Serbinenko
a848c54e34 merge mainline into hints 2010-09-13 02:22:10 +02:00
Vladimir 'phcoder' Serbinenko
d547dc281c * grub-core/normal/term.c (put_glyphs_terminal): Correct sign.
(print_backlog): set backlog_ucs4 and backlog_glyphs.
	Reported by: Yves Blusseau.
2010-09-12 22:05:27 +02:00
Vladimir 'phcoder' Serbinenko
2fc8ccb97f * grub-core/normal/misc.c (grub_normal_print_device_info): Show
partition size and offset.
2010-09-12 20:18:50 +02:00
Vladimir 'phcoder' Serbinenko
d8a84076ea * grub-core/commands/wildcard.c (make_regex): Escape brackets. 2010-09-12 20:15:30 +02:00
Vladimir 'phcoder' Serbinenko
84fb3b3d73 * grub-core/commands/ls.c (grub_cmd_ls): Accept multiple files. 2010-09-12 20:12:16 +02:00
Vladimir 'phcoder' Serbinenko
898330b097 MArk setup as not to be implemented 2010-09-12 16:15:40 +02:00
Vladimir 'phcoder' Serbinenko
df8957929d lock support (not tested) 2010-09-12 16:11:41 +02:00
Vladimir 'phcoder' Serbinenko
6492c85a42 Support config file reloading (not tested) 2010-09-12 15:54:39 +02:00
Vladimir 'phcoder' Serbinenko
e64334df29 Support mixed inline and suffix commands 2010-09-12 15:50:52 +02:00
Vladimir 'phcoder' Serbinenko
281d690594 Add no-argument version of commands and remove legacy_color 2010-09-12 15:26:38 +02:00
Vladimir 'phcoder' Serbinenko
21d7be6612 Support (hd0,1,a legacy partition specification 2010-09-12 14:18:39 +02:00
Vladimir 'phcoder' Serbinenko
b2b260b9eb REmove obsolete FIXME 2010-09-12 14:04:10 +02:00
Vladimir 'phcoder' Serbinenko
2d06d22b0c Merge mainline into legacy_parser 2010-09-12 14:01:25 +02:00
Vladimir 'phcoder' Serbinenko
64ad6157ae Fix bunch of memory problems and implement hdbias 2010-09-12 14:01:02 +02:00
Vladimir 'phcoder' Serbinenko
768ec2e2ad * grub-core/kern/misc.c (grub_vprintf): Use va_copy when necessary.
(grub_xvasprintf): Likewise.
2010-09-12 14:00:44 +02:00
Vladimir 'phcoder' Serbinenko
abda0cade5 Enable legacy_parser on emu 2010-09-12 13:58:18 +02:00
Vladimir 'phcoder' Serbinenko
4870900f8f * grub-core/kern/emu/main.c (main): Call hostfs_init only after init_all. 2010-09-12 13:55:52 +02:00
Vladimir 'phcoder' Serbinenko
faca6bec3b * grub-core/commands/menuentry.c (append_menu_entry): Don't rely on
args ending with NULL.
2010-09-12 13:53:12 +02:00
Vladimir 'phcoder' Serbinenko
788f1f3a85 * grub-core/lib/xzembed/xz_dec_stream.c (xz_dec_reset): Preserve context
pointer.
2010-09-12 13:50:24 +02:00
Vladimir 'phcoder' Serbinenko
9664465892 Add missing newlines 2010-09-12 11:09:01 +02:00
Vladimir 'phcoder' Serbinenko
43cce9e095 Fix uninitialised usage of curarg 2010-09-12 11:01:21 +02:00
Vladimir 'phcoder' Serbinenko
07473cf917 Support pause 2010-09-12 03:05:19 +02:00
Vladimir 'phcoder' Serbinenko
6c6850ae13 Implement hiddenmenu (not tested) 2010-09-12 02:55:24 +02:00
Vladimir 'phcoder' Serbinenko
237a43b1c1 Support few more legacy commands 2010-09-12 02:30:48 +02:00
Vladimir 'phcoder' Serbinenko
b062152c2a Allow specifying video mode 2010-09-12 02:18:14 +02:00
Vladimir 'phcoder' Serbinenko
4dd58a6edd Change video_mode_type to an enum, fix collisions and add a bit more info 2010-09-12 02:09:09 +02:00
Vladimir 'phcoder' Serbinenko
d2467d2361 Add Hercules, Planar and YUV to videoinfo (not tested) 2010-09-12 01:45:58 +02:00
Vladimir 'phcoder' Serbinenko
a37376e72a legacy_password implementation 2010-09-12 01:07:41 +02:00
Vladimir 'phcoder' Serbinenko
8bc402fbda Remove obsolete FIXME comments 2010-09-11 22:47:49 +02:00
Vladimir 'phcoder' Serbinenko
bd9603071a Merge mainline into legacy_parser 2010-09-11 22:39:55 +02:00
Vladimir 'phcoder' Serbinenko
9fb175ed9a Implement multiboot filename duplication in legacy parser 2010-09-11 22:18:41 +02:00
Szymon Janc
3c70f225b2 * grub-core/commands/lsacpi.c (grub_cmd_lsacpi): Fix prototype. 2010-09-11 20:08:37 +02:00
Vladimir 'phcoder' Serbinenko
4ce9a74332 merge mainline into gingold2 2010-09-11 18:03:47 +02:00
Vladimir 'phcoder' Serbinenko
4df7996d87 Shutdown using ACPI.
* grub-core/Makefile.core.def (halt): Add commands/acpihalt.c on i386-pc.
	* grub-core/commands/acpihalt.c: New file.
	* grub-core/commands/i386/pc/halt.c (grub_cmd_halt): Call grub_acpi_halt.
	* include/grub/acpi.h (grub_acpi_fadt): New member pm1a.
	(grub_acpi_halt): New proto.
	(GRUB_ACPI_SLP_EN): New const.
	(GRUB_ACPI_SLP_TYP_OFFSET): Likewise.
	(GRUB_ACPI_OPCODE_*): New enum.
	(GRUB_ACPI_EXTOPCODE_*): Likewise.
2010-09-11 17:59:14 +02:00
Tristan Gingold
126b4c32ab * commands/lsacpi.c: New file.
* grub-core/Makefile.core.def (lsacpi): New module.
	* include/grub/acpi.h (GRUB_ACPI_FADT_SIGNATURE): New definition.
	(GRUB_ACPI_MADT_SIGNATURE): Likewise.
	(grub_acpi_madt_entry_header): New struct.
	(grub_acpi_madt): Likewise.
	(grub_acpi_madt_entry_interrupt_override): Likewise.
	(grub_acpi_madt_entry_sapic): Likewise.
	(grub_acpi_madt_entry_lsapic): Likewise.
	(grub_acpi_madt_entry_platform_int_source): Likewise.
	* include/grub/types.h (PRIxGRUB_UINT32_T): New definition.
	(PRIuGRUB_UINT32_T): Likewise.
	(PRIxGRUB_UINT64_T): Likewise.

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

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2010-09-11 17:48:54 +02:00
Vladimir 'phcoder' Serbinenko
1aa4fe8822 Implement loading palette on ieee1275_fb.
* grub-core/video/ieee1275.c (stdout_ihandle): New variable.
	(have_setcolors): Likewise.
	(grub_video_ieee1275_init): Fill stdout_ihandle and have_setcolors.
	(grub_video_ieee1275_setup): Use grub_video_ieee1275_set_palette.
	(grub_video_ieee1275_set_palette): Implement.
2010-09-11 17:41:56 +02:00
Vladimir 'phcoder' Serbinenko
050abaeaa8 Fix emu on mipsel.
* conf/Makefile.common (CFLAGS_PLATFORM): Add -mflush-func
	=grub_cpu_flush_cache on all mips and not only yeeloong.
	* configure.ac (COND_mips): New conditional.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add libgcc on all
	platforms.
	* grub-core/kern/emu/cache.S (__mips__): Use _flush_cache.
	* grub-core/kern/emu/full.c (grub_arch_dl_init_linker)
	[GRUB_LINKER_HAVE_INIT]: New function.
	(grub_emu_post_init): Likewise.
	* grub-core/kern/emu/lite.c (grub_emu_post_init): Likewise.
	* grub-core/kern/emu/main.c: Use grub_emu_post_init.
	* include/grub/cache.h (_mips): Include mips/cache.h.
	* include/grub/disk.h [GRUB_UTIL || GRUB_MACHINE_EMU]: Add missing
	LVM and RAID prototypes.
	* include/grub/emu/misc.h (grub_emu_post_init): New proto.
	* include/grub/mips/time.h (grub_cpu_idle) [GRUB_MACHINE_EMU]: New
	function.
2010-09-11 16:58:06 +02:00
Robert Millan
c38fe9f48e 2010-09-10 Robert Millan <rmh@gnu.org>
Solaris support in grub_find_zpool_from_dir().  Thanks
	Seth Goldberg for referring to getextmntent() facility.
	
	* configure.ac: Check for getextmntent(), `sys/mnttab.h' and
	`sys/mkdev.h'.
	* grub-core/kern/emu/misc.c [HAVE_SYS_MNTTAB_H]: Include
	`<sys/mnttab.h>'.
	[HAVE_SYS_MKDEV_H]: Include `<sys/mkdev.h>'.
	[HAVE_GETEXTMNTENT] (grub_find_zpool_from_dir): Add getextmntent()
	method for finding zpool name.
2010-09-10 14:32:28 +02:00
Robert Millan
fb90b54648 2010-09-10 Robert Millan <rmh@gnu.org>
* configure.ac: Check for `struct statfs.f_fstypename' and
	`struct statfs.f_mntfromname'.
	
	* grub-core/kern/emu/misc.c (grub_find_zpool_from_dir): Conditionalize
	kFreeBSD-specific code.
2010-09-10 14:02:54 +02:00
Robert Millan
4dfbc57428 2010-09-09 Robert Millan <rmh@gnu.org>
Basic Btrfs support (detection and UUID).
	
	* grub-core/fs/btrfs.c: New file.
	* Makefile.util.def (library): Register btrfs.c.
	* grub-core/Makefile.core.def: Likewise.
2010-09-09 01:12:10 +02:00
Vladimir 'phcoder' Serbinenko
43de930c20 Change to disk->name being raw name. It makes less hidden issues 2010-09-08 21:22:41 +02:00
Vladimir 'phcoder' Serbinenko
f256469360 Fix minix issue 2010-09-08 21:03:23 +02:00
Vladimir 'phcoder' Serbinenko
7051df3609 Fix an issue with new interface for device names 2010-09-08 21:02:51 +02:00
Vladimir 'phcoder' Serbinenko
dedb5f9be2 merge mainline into nested 2010-09-08 20:40:27 +02:00
Vladimir 'phcoder' Serbinenko
3fcb410549 Fix a double device name 2010-09-08 20:39:57 +02:00
Vladimir 'phcoder' Serbinenko
b4a0c9154b Split minix.mod into minix.mod and minix2.mod.
* Makefile.util.def (libgrub.a): Add grub-core/fs/minix2.c.
	* grub-core/Makefile.core.def (minix2): New module.
	* grub-core/fs/minix.c: Use definitions instead of runtime version
	checking.
	* grub-core/fs/minix2.c: New file.
2010-09-08 19:13:48 +02:00
Vladimir 'phcoder' Serbinenko
5f7a44bf92 Missing part of r2705 2010-09-08 19:09:07 +02:00
Vladimir 'phcoder' Serbinenko
e55e8495e1 * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
GRUB_IEEE1275_FLAG_HAS_CURSORONOFF when appropriate.
	* grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_setcursor):
	Use terminfo and don't use cursor-on/cursor-off unless it's known
	to work.
	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New element
	GRUB_IEEE1275_FLAG_HAS_CURSORONOFF.
2010-09-08 16:15:57 +02:00
Colin Watson
6fa6d6751d * grub-core/kern/efi/init.c (grub_efi_set_prefix): If the prefix
starts with "(,", fill the drive containing the loaded image in
between those two characters, but expect that a full partition
specification including partition map names will follow.
2010-09-08 13:53:47 +01:00
bvk.groups@gmail.com
058e30ac09 Not command (!) support to GRUB script.
* tests/grub_script_not.in: New test.
	* Makefile.util.def: Rules for new test.

	* grub-core/script/execute.c (grub_script_execute_cmdline): Handle
	! command as a special case.
	* grub-core/script/yylex.l (GRUB_PARSER_TOKEN_NOT): Removed.
2010-09-08 09:21:02 +05:30
bvk.groups@gmail.com
a0b5f6bcb1 update grub_errno as per the return value 2010-09-07 21:46:04 +05:30
bvk.groups@gmail.com
dc0fae73f8 merge with mainline 2010-09-07 21:45:34 +05:30
bvk.groups@gmail.com
b61d05ed19 * grub-core/commands/wildcard.c (wildcard_expand): Fix wrong
grub_free.
2010-09-07 17:16:03 +05:30
Vladimir 'phcoder' Serbinenko
db0f7e3d20 Rename CD-ROM to cd on BIOS.
* grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_get_drive): Recognise
	"cd".
	(grub_biosdisk_call_hook): Call with "cd" instead of arbitrary hdX.
2010-09-06 09:35:35 +02:00
Vladimir 'phcoder' Serbinenko
88b87c9313 * grub-core/kern/emu/main.c (main): Reinit LVM and RAID.
* util/grub-probe.c (main): Likewise.
	* util/i386/pc/grub-setup.c (main): Likewise.
	* util/sparc64/ieee1275/grub-setup.c (main): Likewise.
	Reported and debugged by: alexxy
2010-09-05 23:24:57 +02:00
Vladimir 'phcoder' Serbinenko
294f324d89 * grub-core/disk/lvm.c (grub_lvm_scan_device) [GRUB_UTIL]: Output more
diagnostic info.
2010-09-05 23:20:13 +02:00
Vladimir 'phcoder' Serbinenko
122a9b2cd9 Merge mainline into legacy_parser 2010-09-05 20:44:42 +02:00
Vladimir 'phcoder' Serbinenko
5cd837bd47 Add testload 2010-09-05 20:43:43 +02:00
Szymon Janc
f0aff67c47 * grub-core/Makefile.core.def (xzio): New module.
* grub-core/io/xzio.c: New file.
	* grub-core/lib/xzembed/xz.h: New file (from xembed).
	* grub-core/lib/xzembed/xz_config.h: Likewise.
	* grub-core/lib/xzembed/xz_dec_bcj.c: Likewise.
	* grub-core/lib/xzembed/xz_dec_lzma2.c: Likewise.
	* grub-core/lib/xzembed/xz_dec_stream.c: Likewise.
	* grub-core/lib/xzembed/xz_lzma2.h: Likewise.
	* grub-core/lib/xzembed/xz_private.h: Likewise.
	* grub-core/lib/xzembed/xz_stream.h: Likewise.
	* include/grub/file.h (grub_file_filter_id): New compression filter
	GRUB_FILE_FILTER_XZIO.
2010-09-05 17:12:13 +02:00
Vladimir 'phcoder' Serbinenko
82a8506214 * include/grub/file.h (GRUB_FILE_SIZE_UNKNOWN): New definition.
* grub-core/disk/loopback.c (grub_loopback_open): Handle unknown file
	size.
2010-09-05 17:01:16 +02:00
Vladimir 'phcoder' Serbinenko
3579415d20 * include/grub/err.h (grub_err_t): Replace GRUB_ERR_BAD_GZIP_DATA with
GRUB_ERR_BAD_COMPRESSED_DATA. All users updated.
2010-09-05 16:55:49 +02:00
Vladimir 'phcoder' Serbinenko
5124ae6d4f Uncompressed checksum support.
* grub-core/commands/hashsum.c (options): Add option --uncompress.
	(check_list): New parameter uncompress.
	(grub_cmd_hashsum): Handle --uncompress.
2010-09-05 16:48:54 +02:00
Vladimir 'phcoder' Serbinenko
06f7011716 Reintroduce testload.
* grub-core/commands/minicmd.c (grub_rescue_cmd_testload) [0]: Moved
	from here ...
	* grub-core/commands/testload.c (grub_cmd_testload): ... here.
	(GRUB_MOD_INIT): New function.
	(GRUB_MOD_FINI): Likewise.
	* grub-core/Makefile.core.def (testload): New module.
2010-09-05 16:40:41 +02:00
Szymon Janc
a17792c324 * grub-core/lib/posix_wrap/sys/types.h (bool): Transform into an enum.
(uint8_t): New type.
	(uint16_t): Likewise.
	(uint32_t): Likewise.
	(uint64_t): Likewise.
2010-09-05 14:24:39 +02:00
Vladimir 'phcoder' Serbinenko
fc2ef1172c * grub-core/io/gzio.c (grub_gzio_open): Removed "transparent" parameter.
Made static.
	(grub_gzfile_open): Removed. All users updated.
	(GRUB_MOD_INIT): New function.
	(GRUB_MOD_FINI): Likewise.
	* grub-core/kern/file.c (grub_file_filters_all): New variable.
	(grub_file_filters_enabled): Likewise.
	(grub_file_open): Handle filters.
	* grub-core/loader/i386/bsd.c (GRUB_MOD_INIT): Load gzio.
	* grub-core/normal/main.c (GRUB_MOD_INIT): Likewise.
	* include/grub/file.h (grub_file_filter_id_t): New type.
	(grub_file_filter_t): Likewise.
	(grub_file_filters_all): New extern variable.
	(grub_file_filters_enabled): Likewise.
	(grub_file_filter_register): New inline function.
	(grub_file_filter_unregister): Likewise.
	(grub_file_filter_disable): Likewise.
	(grub_file_filter_disable_compression): Likewise.
	* include/grub/gzio.h: Removed.
2010-09-05 13:05:36 +02:00
BVK Chaitanya
1bce65c7b1 not command (!) support 2010-09-05 14:57:28 +05:30
BVK Chaitanya
ee14ec9935 merge with mainline 2010-09-04 22:34:32 +05:30
BVK Chaitanya
5f0c4acaca Support for updating environment variables with matched substrings
of regexp.

	* tests/grub_cmd_regexp.in: New test.
	* Makefile.util.def: Rule for new test.

	* grub-core/commands/regexp.c: New option -s to update environment
	variables with regexp matches.
2010-09-04 22:19:58 +05:30
BVK Chaitanya
a431c98a52 merge with mainline 2010-09-04 22:13:45 +05:30
Szymon Janc
3759a35f75 * include/grub/file.h (grub_file): New member not_easly_seekable.
(grub_file_seekable): New inline function.
	* grub-core/io/gzio.c (test_header): Don't test end magic if file isn't
	easily seekable.
	(grub_gzio_open): Set not_easly_seekable.
	* grub-core/fs/i386/pc/pxe.c (grub_pxefs_open): Set not_easily_seekable.
	* grub-core/io/bufio.c (grub_bufio_open): Propagate not_easily_seekable.
2010-09-04 18:28:42 +02:00
BVK Chaitanya
ed8c6dec96 Support for options to appear multiple times on cmdline.
* include/grub/lib/arg.h (grub_arg_list_alloc): New prototype.
	* grub-core/commands/extcmd.c: Support for repeatable option.
	* grub-core/lib/arg.c (grub_arg_list_alloc): New function for
	repeatable option support.

	Refactor menuentry into a regular command.

	* grub-core/commands/menuentry.c: New file, menuentry command
	implementation.
	* grub-core/Makefile.core.def: Rule update for normal.mod.
	* grub-core/normal/main.c: Moved menuentry creation to
	grub-core/commands/menuentry.c.
	* grub-core/normal/menu.c (grub_menu_execute_entry): Removed.
	(grub_menu_execute_entry_real): Removed.
	* grub-core/script/execute.c (grub_script_execute_sourcecode): New
	function.
	(grub_script_execute_menuentry): Removed.
	* grub-core/script/parser.y (menuentry): Removed.
	* grub-core/script/script.c (grub_script_create_cmdmenu): Removed.
	* grub-core/script/yylex.l (menuentry): Removed.
	* include/grub/menu.h (grub_menu_init): New prototype.
	(grub_menu_fini): New prototype.
	* include/grub/normal.h (grub_normal_add_menu_entry): Removed.
	* include/grub/script_sh.h (grub_script_cmd_menuentry): Removed.
	(grub_script_execute_sourcecode): New prototype.
2010-09-04 21:43:54 +05:30
BVK Chaitanya
9fcd1ee541 merge with mainline 2010-09-04 21:02:48 +05:30
BVK Chaitanya
165bfce138 merge with mainline 2010-09-04 20:44:44 +05:30
Vladimir 'phcoder' Serbinenko
df3df23d5c Reorganise memory map handling 2010-09-04 17:10:10 +02:00
BVK Chaitanya
52e72f9d46 "setparams" command to update positional parameters.
* tests/grub_script_setparams.in: New test.
	* Makefile.util.def: Rules for new test.

	* grub-core/script/argv.c (grub_script_argv_make): New function.
	* grub-core/script/execute.c (replace_scope): New function.
	(grub_script_setparams): New function.
	* grub-core/script/lexer.c: Remove unused variables.
	* grub-core/script/main.c: Register/unregister setparams command.
	* include/grub/script_sh.h (grub_script_argv_make): New prototype.
	(grub_script_setparams): New prototype.
2010-09-04 20:27:48 +05:30
BVK Chaitanya
cd652829a1 merge with mainline 2010-09-04 14:41:08 +05:30
BVK Chaitanya
49649ac85d review comments 2010-09-04 14:32:59 +05:30
BVK Chaitanya
965e0faac8 merge with mainline 2010-09-04 14:30:12 +05:30
BVK Chaitanya
854bd47cb8 fix memory leak and out-of-range writes 2010-09-04 14:22:51 +05:30
BVK Chaitanya
e77cc389d5 merge with mainline 2010-09-04 14:21:56 +05:30
BVK Chaitanya
25b60c913b * grub-core/normal/completion.c (grub_normal_do_completion): Fix
grub_free order.
2010-09-04 14:19:04 +05:30
BVK Chaitanya
6d7c073bc8 merge with mainline 2010-09-04 11:49:02 +05:30
BVK Chaitanya
7af6505ba1 merge with mainline 2010-09-04 11:37:59 +05:30
BVK Chaitanya
312e3e3668 merge with mainline 2010-09-04 11:28:45 +05:30
BVK Chaitanya
227cab7c79 merge with mainline 2010-09-04 10:56:23 +05:30
BVK Chaitanya
e5a73c4247 merge with mainline 2010-09-04 09:05:21 +05:30
BVK Chaitanya
adcf5a8e30 merge with mainline 2010-09-04 08:33:42 +05:30
BVK Chaitanya
80f5b97cdc --source option for menuentry 2010-09-04 08:14:50 +05:30
Vladimir 'phcoder' Serbinenko
dda060dd0f * grub-core/kern/misc.c: Don't add abort alias in utils.
Reported by: echoline.
2010-09-04 02:18:48 +02:00
Vladimir 'phcoder' Serbinenko
7b111db538 resync MAkefile.core.def 2010-09-04 01:31:13 +02:00
Vladimir 'phcoder' Serbinenko
5b1d8b4832 Remove leftover files 2010-09-04 01:17:08 +02:00
Vladimir 'phcoder' Serbinenko
844d0fd5aa Remove excessive dprintfs 2010-09-04 01:13:20 +02:00
Vladimir 'phcoder' Serbinenko
babad161fb Reorganise net and openbsdlabel 2010-09-04 01:10:58 +02:00
Vladimir 'phcoder' Serbinenko
56a4b23d37 fix several issues with nested labels 2010-09-04 00:49:45 +02:00