Commit graph

4624 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
055b36b6a6 * grub-core/lib/libgcrypt_wrap/mem.c (gcry_x*alloc): Make out of memory
fatal.
2013-01-12 16:27:37 +01:00
Vladimir 'phcoder' Serbinenko
f7ff879bd2 * grub-core/lib/libgcrypt_wrap/mem.c (_gcry_log_bug): Make gcrypt bugs
fatal.
2013-01-12 16:21:06 +01:00
Vladimir 'phcoder' Serbinenko
4d7219f90b * autogen.sh: Do not try to delete nonexistant files.
* util/import_gcrypth.sed: Add some missing header removals.
2013-01-12 16:14:09 +01:00
Colin Watson
01323d49bf Clean up dangling references to grub-setup.
Fixes Ubuntu bug #1082045.

* docs/grub.texi (Images): Refer generally to grub-install rather
than directly to grub-setup.
(Installing GRUB using grub-install): Remove direct reference to
grub-setup.
(Device map) Likewise.
(Invoking grub-install): Likewise.
* docs/man/grub-install.h2m (SEE ALSO): Likewise.
* docs/man/grub-mkimage.h2m (SEE ALSO): Likewise.
* util/grub-install.in (usage): Likewise.

* util/bash-completion.d/grub-completion.bash.in (_grub_setup):
Apply to grub-bios-setup and grub-sparc64-setup rather than to
grub-setup.
* configure.ac: Remove grub_setup output variable.

* docs/man/grub-bios-setup.h2m (NAME): Change name from grub-setup
to grub-bios-setup.
* docs/man/grub-sparc64-setup.h2m (NAME): Change name from
grub-setup to grub-sparc64-setup.
2013-01-12 13:30:37 +00:00
Vladimir 'phcoder' Serbinenko
5e3b8dcbb5 Import gcrypt public-key cryptography and implement signature checking. 2013-01-11 21:32:42 +01:00
Vladimir 'phcoder' Serbinenko
535714bdcf * grub-core/fs/ntfs.c: Ue more appropriate types.
* grub-core/fs/ntfscomp.c: Likewise.
	* include/grub/ntfs.h: Likewise.
2013-01-11 07:41:05 +01:00
Vladimir 'phcoder' Serbinenko
3e4f356646 Support Apple FAT binaries on non-Apple platforms.
* include/grub/macho.h (GRUB_MACHO_FAT_EFI_MAGIC): New define.
	* include/grub/i386/macho.h (GRUB_MACHO_CPUTYPE_IS_HOST_CURRENT):
	Likewise.
	* grub-core/loader/efi/chainloader.c (grub_cmd_chainloader): Parse
	Apple FAT binaries.
2013-01-10 12:50:01 +01:00
Vladimir 'phcoder' Serbinenko
4dedb13f51 * grub-core/kern/disk.c (grub_disk_write): Fix sector number on 4K
sector devices.
2013-01-10 08:09:26 +01:00
Colin Watson
f8861eaf9f * grub-core/io/bufio.c (grub_bufio_open): Use grub_zalloc instead of
explicitly zeroing elements.
* grub-core/io/gzio.c (grub_gzio_open): Likewise.
* grub-core/io/lzopio.c (grub_lzopio_open): Remove explicit zeroing
of elements in a structure already allocated using grub_zalloc.
* grub-core/io/xzio.c (grub_xzio_open): Likewise.
2013-01-07 10:45:05 +00:00
Colin Watson
86065b0ad6 * docs/grub.texi (grub_cpu): New subsection.
(grub_platform): Likewise.
2013-01-07 10:43:00 +00:00
Vladimir 'phcoder' Serbinenko
c6f1e92f0b * grub-core/fs/minix.c (grub_minix_read_file): Simplify arithmetics. 2013-01-07 11:27:18 +01:00
Vladimir 'phcoder' Serbinenko
f797ec85a0 * grub-core/fs/ext2.c (grub_ext2_read_block): Use shifts rather than
divisions.
2013-01-05 18:37:34 +01:00
Vladimir 'phcoder' Serbinenko
033d0b4b0b * grub-core/fs/ntfs.c: Eliminate useless divisions in favor of shifts.
* grub-core/fs/ntfscomp.c: Likewise.
	* include/grub/ntfs.h (grub_ntfs_data): Replace spc with log_spc.
	(grub_ntfs_comp): Likewise.
2013-01-05 17:36:04 +01:00
Vladimir 'phcoder' Serbinenko
21d1b9a029 * grub-core/fs/nilfs2.c (-grub_nilfs2_palloc_groups_per_desc_block):
Rename to ...
	(grub_nilfs2_palloc_log_groups_per_desc_block): ... this. Return log
	of groups_per_block. All users updated.
2013-01-05 16:53:04 +01:00
Vladimir 'phcoder' Serbinenko
10ca8645cc * grub-core/disk/diskfilter.c (grub_diskfilter_write): Call
grub_error properly.
	* grub-core/disk/ieee1275/nand.c (grub_nand_write): Likewise.
	* grub-core/disk/loopback.c (grub_loopback_write): Likewise.
2013-01-05 15:10:46 +01:00
Vladimir 'phcoder' Serbinenko
a4c3ed4c8f * util/grub.d/10_kfreebsd.in: Correct the patch to zpool.cache as it's
always in /boot/zfs.
	Reported by: Yuta Satoh.
2013-01-03 23:19:19 +01:00
Yuta Satoh
0b716507a1 * util/grub.d/10_kfreebsd.in: Fix improper references to grub-probe by
${grub_probe}
2013-01-03 23:06:07 +01:00
Vladimir 'phcoder' Serbinenko
00c05e22f1 * configure.ac: Extend -Wno-trampolines to host. 2013-01-03 21:34:34 +01:00
Vladimir 'phcoder' Serbinenko
dadddb7665 * grub-core/fs/iso9660.c (grub_iso9660_susp_iterate): Avoid hang if
entry->len = 0.
2013-01-03 21:27:00 +01:00
Colin Watson
54ce53cadc * docs/grub.texi (Invoking grub-mkrelpath): New section.
(Invoking grub-script-check): Likewise.
2013-01-03 10:53:53 +00:00
Colin Watson
8912efca03 * docs/grub.texi (Invoking grub-mount): New section.
Reported by: Filipus Klutiero.  Fixes Debian bug #666427.
2013-01-03 10:32:57 +00:00
Colin Watson
c3fc8394a0 * grub-core/tests/lib/test.c (grub_test_run): Return non-zero on
test failures, so that a failing unit test correctly causes 'make
check' to fail.
2013-01-02 16:42:48 +00:00
Colin Watson
45d26abb40 Fix failing printf test.
* grub-core/kern/misc.c (grub_vsnprintf_real): Parse '-', '.', and
'$' in the correct order when collecting type information.
2013-01-02 12:48:31 +00:00
Colin Watson
971dd2c6d5 * docs/grub.texi (configfile): Explain environment variable
handling.
(source): New section.
Reported by: Arbiel Perlacremaz.  Fixes Savannah bug #35564.
2013-01-02 09:29:48 +00:00
Colin Watson
5c67ea6cd9 Remove several trivially-unnecessary uses of nested functions.
* grub-core/commands/i386/pc/sendkey.c
(grub_cmd_sendkey: find_key_code, find_ascii_code): Make static
instead of nested.
* grub-core/commands/legacycfg.c (legacy_file: getline): Likewise.
Rename to ...
(legacy_file_getline): ... this.
* grub-core/commands/loadenv.c (grub_cmd_load_env: set_var):
Likewise.
* grub-core/kern/corecmd.c (grub_core_cmd_set: print_env): Likewise.
* grub-core/kern/fs.c (grub_fs_probe: dummy_func): Likewise.  Rename
to ...
(probe_dummy_iter): ... this.
* grub-core/kern/i386/coreboot/mmap.c
(grub_linuxbios_table_iterate: check_signature): Likewise.
* grub-core/kern/parser.c (grub_parser_split_cmdline:
check_varstate): Likewise.  Mark inline.
* grub-core/lib/arg.c (find_short: fnd_short): Likewise.  Pass
an additional parameter.
(find_long: fnd_long): Likewise.  Pass two additional parameters.
* grub-core/lib/crc.c (init_crc32c_table: reflect): Likewise.
* grub-core/lib/crc64.c (init_crc64_table: reflect): Likewise.
* grub-core/lib/ieee1275/cmos.c (grub_cmos_find_port: hook):
Likewise.  Rename to ...
(grub_cmos_find_port_iter): ... this.
* grub-core/lib/ieee1275/datetime.c (find_rtc: hook): Likewise.
Rename to ...
(find_rtc_iter): ... this.

* grub-core/normal/menu_entry.c (run): Fold nested editor_getsource
function directly into the function body, since it is only called
once.
2012-12-31 17:31:38 +00:00
Colin Watson
33a68ac643 * grub-core/bus/usb/ehci.c (grub_ehci_pci_iter): Remove incorrect
__attribute__ ((unused)).
* grub-core/video/bochs.c (find_card): Likewise.
* grub-core/video/cirrus.c (find_card): Likewise.
* grub-core/video/radeon_fuloong2e.c (find_card): Likewise.
* grub-core/video/sis315pro.c (find_card): Likewise.
* grub-core/video/sm712.c (find_card): Likewise.
2012-12-30 09:57:58 +00:00
Colin Watson
608b647ad9 * util/grub-mkconfig.in: Accept GRUB_TERMINAL_OUTPUT=vga_text.
Fixes Savannah bug #37821.
2012-12-28 07:21:17 +00:00
Colin Watson
fd49ceb35c Apply program name transformations at build-time rather than at
run-time.  Fixes Debian bug #696465.

* acinclude.m4 (grub_TRANSFORM): New macro.
* configure.ac: Create output variables with transformed names for
most programs.
* util/bash-completion.d/grub-completion.bash.in: Use
pre-transformed variables for program names.
* util/grub-install.in: Likewise.
* util/grub-kbdcomp.in: Likewise.
* util/grub-mkconfig.in: Likewise.
* util/grub-mkconfig_lib.in: Likewise.
* util/grub-mknetdir.in: Likewise.
* util/grub-mkrescue.in: Likewise.
* util/grub-mkstandalone.in: Likewise.
* util/grub-reboot.in: Likewise.
* util/grub-set-default.in: Likewise.
* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
* tests/util/grub-shell-tester.in: Remove unused assignment.
* tests/util/grub-shell.in: Likewise.
* util/grub.d/00_header.in: Likewise.
2012-12-28 06:57:17 +00:00
Colin Watson
7024b3c0c2 Backport gnulib fixes for C11. Fixes Savannah bug #37738.
* grub-core/gnulib/stdio.in.h (gets): Warn on use only if
HAVE_RAW_DECL_GETS.
* m4/stdio_h.m4 (gl_STDIO_H): Check for gets.
2012-12-28 06:43:35 +00:00
Vladimir 'phcoder' Serbinenko
e3501b1306 * util/grub.d/20_linux_xen.in: Addmissing assignment to machine.
Reported by: Eriks Latosheks <foresterlv>.
2012-12-11 17:40:35 +01:00
Vladimir 'phcoder' Serbinenko
b40c88a9c2 * docs/grub.texi (Network): Update instructions on generating netboot
image.
2012-12-10 22:22:23 +01:00
Vladimir 'phcoder' Serbinenko
ce96d01c93 * grub-core/disk/cryptodisk.c (grub_cmd_cryptomount): Strip brackets
around device name if necessarry.
2012-12-10 19:15:51 +01:00
Paulo Flabiano Smorigo
0f596201dc * util/grub-install.in: Follow the symbolic link parameter added
to the file command.
2012-12-10 17:07:01 +01:00
Andrey Borzenkov
600d5bdbf5 * util/grub-install.in: Remove stale TODO. 2012-12-10 17:00:56 +01:00
Paulo Flabiano Smorigo
64ebd2f4b9 * grub-core/kern/ieee1275/init.c (grub_machine_get_bootlocation): Use
dynamic allocation for the bootpath buffer.
2012-12-10 16:23:16 +01:00
Dr. Tilmann Bubeck
74b2fe3e4f * grub-core/gfxmenu/view.c (init_terminal): Avoid making terminal
window too small.
2012-12-10 16:14:12 +01:00
Vladimir 'phcoder' Serbinenko
969b804f2a * grub-core/term/gfxterm.c (grub_virtual_screen_setup): Get font as
argument rather than font name. All users updated.
	(grub_gfxterm_set_window): Likewise.
2012-12-10 16:07:33 +01:00
Vladimir Testov
b9f5ebd65c * util/grub-mkfont.c (argp_parser): Fix a typo which prevented --asce
from working.
2012-12-10 11:45:00 +01:00
Vladimir 'phcoder' Serbinenko
258f43b7d7 * util/getroot.c (convert_system_partition_to_system_disk): Support
nbd disks.
2012-12-10 11:12:38 +01:00
Vladimir 'phcoder' Serbinenko
cc1ce5f9b4 * grub-core/fs/ufs.c (grub_ufs_dir): Stop if direntlen is 0 to avoid
infinite loop on corrupted FS.
2012-12-10 09:22:40 +01:00
Vladimir 'phcoder' Serbinenko
e77a16ca02 Fix big-endian mtime.
* grub-core/fs/ufs.c (grub_ufs_inode): Split improperly attached
	together sec and usec.
	(grub_ufs_dir): Use correct byteswapping for UFS time.
2012-12-08 21:14:08 +01:00
Vladimir 'phcoder' Serbinenko
d9c48c7b7c Support big-endian UFS1.
* Makefile.util.def (libgrubmods): Add ufs_be.c
	* grub-core/Makefile.core.def (ufs1_be): New module.
	* grub-core/fs/ufs_be.c: New file.
	* grub-core/fs/ufs.c: Declare grub_ufs_to_le* and use them throughout
	the file.
2012-12-08 20:56:58 +01:00
Leif Lindholm
2f9f40ba35 * include/grub/types.h: Fix functionality unaffecting typo in
GRUB_TARGET_WORDSIZE conditional macro.
2012-11-28 14:18:45 +01:00
Paulo Flabiano Smorigo
48ff08895d * grub-core/net/bootp.c (parse_dhcp_vendor): Fix double increment. 2012-11-28 14:14:20 +01:00
Grégoire Sutre
03711240c8 Fix ordering and tab indentation of NetBSD boot menu entries. 2012-10-28 11:55:22 +01:00
Christoph Junghans
a31b11bd96 * grub-core/Makefile.am (moddep.lst): Use $(AWK) rather than awk.
Fixes Savannah bug #37558.
2012-10-12 15:37:49 +01:00
Colin Watson
e8a5d5d4da * grub-core/commands/configfile.c (GRUB_MOD_INIT): Correct
description of extract_entries_configfile.
2012-10-12 15:34:33 +01:00
Colin Watson
39525c22be * grub-core/loader/i386/linux.c (allocate_pages): Fix spelling of
preferred_address.
(grub_cmd_linux): Likewise.
* grub-core/net/icmp6.c (struct prefix_option): Fix spelling of
preferred_lifetime.  Update all users.
2012-10-05 13:09:19 +01:00
Colin Watson
288c757d70 * Makefile.util.def (grub-mknetdir): Move to $prefix/bin.
Reported by: Daniel Kahn Gillmor.  Fixes Debian bug #688799.
2012-09-26 13:51:13 +01:00
Colin Watson
0d35da3f2b * util/grub-mkconfig_lib.in (is_path_readable_by_grub): Redirect
errors from grub-probe to /dev/null, not stdout.
2012-09-26 13:12:20 +01:00
Vladimir 'phcoder' Serbinenko
b78c312722 * grub-core/fs/affs.c (grub_affs_mount): Support AFFS bootblock in
sector 1.
2012-09-26 09:33:41 +02:00
Colin Watson
473959f052 * util/grub-install.in: Make the error message if $source_dir
doesn't exist more useful.
2012-09-24 18:50:35 +01:00
Colin Watson
794c8c3375 Fix grub-emu build on FreeBSD.
* Makefile.util.def (grub-mount): Add LIBGEOM to ldadd.
* grub-core/net/drivers/emu/emunet.c: Only include Linux-specific
headers on Linux.
(GRUB_MOD_INIT): Return immediately on non-Linux platforms; this
implementation is currently Linux-specific.
* util/getroot.c (exec_pipe): Define only on Linux or when either
libzfs or libnvpair is unavailable.
(find_root_devices_from_poolname): Remove unused path variable.
2012-09-22 21:19:58 +01:00
Colin Watson
86d08fdb18 * grub-core/partmap/msdos.c (pc_partition_map_embed): Revert
incorrect off-by-one fix from 2011-02-12.  A 62-sector core image
should fit before end == 63.
2012-09-19 02:44:54 +01:00
Colin Watson
735abf545c * util/grub-setup.c (write_rootdev): Remove unused core_img
parameter.  Update all callers.
(setup): Define core_sectors only if GRUB_SETUP_BIOS, to appease
'gcc -Wunused-but-set-variable'.  Remove unnecessary nested #ifdef
GRUB_SETUP_BIOS.
2012-09-19 02:41:51 +01:00
Vladimir 'phcoder' Serbinenko
140acd3c83 * util/grub-mkconfig_lib.in (grub_tab): New variable.
(grub_add_tab): New function.
	* util/grub.d/10_hurd.in: Replace \t with $grub_tab orgrub_add_tab.
	* util/grub.d/10_illumos.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/10_xnu.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
2012-09-18 13:04:06 +02:00
Vladimir 'phcoder' Serbinenko
7ddffdadea * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN on mac.
	* grub-core/term/ieee1275/console.c (grub_console_init_lately): Use
	ieee1275-nocursor if GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN is set.
	* grub-core/term/terminfo.c (grub_terminfo_set_current): Add new type
	ieee1275-nocursor.
	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New value
	GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN.
2012-09-18 11:52:19 +02:00
Vladimir 'phcoder' Serbinenko
4e09245441 * grub-core/loader/i386/linux.c (grub_cmd_linux): Fix incorrect
le-conversion.
	Reported by: BURETTE, Bernard.
2012-09-18 11:44:29 +02:00
Colin Watson
a2fc392426 * util/grub-mkconfig_lib.in (grub_quote): Remove outdated sentence
from comment.
2012-09-17 16:58:50 +01:00
Colin Watson
dfd39dbdea * grub-core/term/terminfo.c: Only fix up powerpc key repeat on
IEEE1275 machines.  Fixes powerpc-emu compilation.
* include/grub/terminfo.h: Likewise.
2012-09-14 11:23:36 +01:00
Vladimir 'phcoder' Serbinenko
3bfa763c48 * include/grub/efi/api.h (grub_efi_runtime_services): Make vendor_guid
a const pointer.
	* grub-core/efiemu/runtime/efiemu.c (efiemu_memcpy): Make from a
	const pointer.
	(efiemu_set_variable): Make vendor_guid a const pointer.
2012-09-12 08:31:05 +02:00
Vladimir 'phcoder' Serbinenko
250e475b26 Don't require grub-mkconfig_lib to generate manpages for programs.
* gentpl.py (manpage): Additional argument adddeps. Add adddeps to
	dependencies, don't add grub-mkconfig_lib.
	(program): Pass empty adddeps.
	(script): Pass grub-mkconfig_lib as adddeps.
2012-09-12 08:27:26 +02:00
Vladimir 'phcoder' Serbinenko
592fd0e4d6 * grub-core/disk/diskfilter.c (free_array) [GRUB_UTIL]: Fix memory leak.
* util/getroot.c (grub_find_device): Likewise.
	(get_mdadm_uuid): Likewise.
	(grub_util_is_imsm): Likewise.
	(grub_util_pull_device): Likewise.
	* util/grub-probe.c (probe): Likewise.
2012-09-11 07:53:26 +02:00
Benoit Gschwind
801a3027be * grub-core/loader/efi/appleloader.c (devpath_8): New var.
(devs): Add devpath_8.
2012-09-10 09:34:29 +02:00
Peter Jones
c5052c81ab * grub-core/Makefile.core.def (efifwsetup): New module.
* grub-core/commands/efi/efifwsetup.c: New file.
	* grub-core/kern/efi/efi.c (grub_efi_set_variable): New function
	* include/grub/efi/api.h (GRUB_EFI_OS_INDICATIONS_BOOT_TO_FW_UI):
	New define.
	* include/grub/efi/efi.h (grub_efi_set_variable): New proto.
2012-09-08 09:40:24 +02:00
Jiri Slaby
8e832f715b * configure.ac: Add SuSe path. 2012-09-05 16:09:41 +02:00
Colin Watson
f0f5575291 * NEWS: Fix typo. 2012-09-05 13:55:54 +01:00
Colin Watson
ecadc4c2c4 * util/import_gcry.py: Sort cipher_files, to make build system
generation more deterministic.
2012-09-05 09:00:39 +01:00
Vladimir 'phcoder' Serbinenko
64498f2538 * grub-core/disk/ieee1275/ofdisk.c (scan): Check function return value.
* grub-core/lib/ieee1275/datetime.c (grub_get_datetime): Likewise.
	(grub_set_datetime): Likewise.
2012-09-05 08:56:08 +02:00
Vladimir 'phcoder' Serbinenko
9cc836a27b * grub-core/script/yylex.l: Ignore unused-function and sign-compare
warnings.
2012-09-05 08:51:31 +02:00
Vladimir 'phcoder' Serbinenko
bcfcea0174 * grub-core/partmap/dvh.c (grub_dvh_is_valid): Add missing byteswap. 2012-09-05 08:47:39 +02:00
Vladimir 'phcoder' Serbinenko
a40994852d * grub-core/fs/xfs.c (grub_xfs_read_block): Make keys a const pointer. 2012-09-05 08:45:07 +02:00
Colin Watson
265c162a28 * Makefile.am (EXTRA_DIST): Add linguas.sh. It's only strictly
required for checkouts from bzr, but it may be useful for users or
distributors wishing to update translations against a tarball
distribution, and it can be helpful for the tarball to be a superset
of what's in bzr.
2012-09-04 23:35:38 +01:00
Colin Watson
3d171e951a * Makefile.am (EXTRA_DIST): Add
grub-core/tests/boot/linux.init-mips.S,
grub-core/tests/boot/linux.init-ppc.S, and
grub-core/tests/boot/linux-ppc.cfg.
2012-09-04 18:59:41 +01:00
Colin Watson
f2c2503eab * grub-core/mmap/mips/loongson: Remove empty directory. 2012-09-04 18:56:13 +01:00
Colin Watson
dd77d2be32 * docs/man/grub-mkdevicemap.h2m: Remove, since grub-mkdevicemap is
gone.
2012-09-04 18:39:40 +01:00
Colin Watson
ab2163d5da * .bzrignore: Add grub-bios-setup, grub-ofpathname, and
grub-sparc64-setup.
2012-09-04 18:33:33 +01:00
Grégoire Sutre
ce93814031 Strengthen the configure test for working -nostdinc -isystem. 2012-08-05 16:49:03 +02:00
Grégoire Sutre
529f58a5d7 Regenerate po/POTFILES.in with the following commmand in a clean tree:
export LC_ALL=en_US.UTF-8
find . -iname '*.[ch]' | sort > po/POTFILES.in
2012-08-01 01:06:53 +02:00
Grégoire Sutre
16cf79e9aa Update manual NetBSD-wise. 2012-08-01 00:18:57 +02:00
starous
39b27f1eaf EHCI and OHCI PCI bus master 2012-07-22 21:09:30 +02:00
Vladimir 'phcoder' Serbinenko
a885261b5d * util/grub-mkconfig_lib.in (grub_quote): Remove extra layer of escape.
* util/grub.d/10_hurd.in: Add missing quoting.
	* util/grub.d/10_illumos.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
2012-07-22 20:02:17 +02:00
Vladimir 'phcoder' Serbinenko
7bd29c01f0 New command `lsefi'.
* grub-core/Makefile.core.def (lsefi): New module.
	* grub-core/commands/efi/lsefi.c: New file.
	* include/grub/efi/api.h: Add more GUIDs.
2012-07-22 19:59:06 +02:00
Vladimir 'phcoder' Serbinenko
ac625d8f79 * grub-core/loader/i386/bsd.c (grub_bsd_elf32_size_hook): Fix mask.
(grub_bsd_elf32_hook): Likewise.
	(grub_bsd_elf64_size_hook): Likewise.
	(grub_bsd_elf64_hook): Likewise.
	(grub_bsd_load_elf): Likewise.
2012-07-22 16:30:48 +02:00
Vladimir 'phcoder' Serbinenko
e73bb80170 * grub-core/lib/xzembed/xz_dec_stream.c (hash_validate): Fix behaviour
if hash function is unavailable.
	(dec_stream_header): Likewise.
2012-07-22 16:27:03 +02:00
Vladimir 'phcoder' Serbinenko
e81db8b5fd * grub-core/normal/autofs.c (autoload_fs_module): Save and restore
filter state.
2012-07-22 16:23:46 +02:00
Vladimir 'phcoder' Serbinenko
d187a1c3d7 Fix coreboot compilation.
* grub-core/term/i386/pc/vga_text.c (grub_vga_text_init): Rename to ...
	(grub_vga_text_init_real): ... this.
	(grub_vga_text_fini): Rename to ...
	(grub_vga_text_fini_real): ... this.
2012-07-22 16:21:24 +02:00
Vladimir 'phcoder' Serbinenko
91a05f64e6 * grub-core/Makefile.am: Fix path to boot/i386/pc/startup_raw.S. 2012-07-07 14:29:01 +02:00
Vladimir 'phcoder' Serbinenko
6af96df768 * grub-core/lib/legacy_parse.c: Support clear and testload. 2012-07-02 11:31:31 +02:00
Vladimir 'phcoder' Serbinenko
4d569e12e3 * grub-core/term/efi/serial.c: Support 1.5 stop bits. 2012-07-02 11:30:04 +02:00
Vladimir 'phcoder' Serbinenko
073b57bb8e * grub-core/fs/ext2.c: Experimental support for 64-bit. 2012-07-02 11:28:42 +02:00
Vladimir 'phcoder' Serbinenko
a706f4cc6b * grub-core/net/tftp.c (ack): Fix endianness problem.
(tftp_receive): Likewise.
	Reported by: Michael Davidsaver.
2012-07-02 11:22:50 +02:00
Vladimir 'phcoder' Serbinenko
e7850aa9b5 * gentpl.py: Make mans depend on grub-mkconfig_lib. 2012-07-02 11:20:51 +02:00
Vladimir 'phcoder' Serbinenko
3569288126 * grub-core/loader/i386/linux.c (find_efi_mmap_size): Don't decrease
efi_mmap_size.
	Reported by: Stuart Hayes.
2012-07-02 11:14:37 +02:00
Vladimir 'phcoder' Serbinenko
c35fc5bd15 Add monochrome text support (mda_text, aka `hercules' in grub-legacy).
* grub-core/Makefile.core.def (mda_text): New module.
	* grub-core/lib/legacy_parse.c (grub_legacy_parse): Support `hercules'.
	* grub-core/term/i386/vga_common.c (grub_console_cur_color): Moved to ..
	* grub-core/term/i386/pc/vga_text.c (cur_color): ... here
	* grub-core/term/i386/pc/console.c (grub_console_cur_color): ... and
	here.
	* grub-core/term/i386/vga_common.c (grub_console_getwh): Moved to ..
	* grub-core/term/i386/pc/vga_text.c (grub_console_getwh): ... here
	* grub-core/term/i386/pc/console.c (grub_console_getwh): ... and
	here.
	* grub-core/term/i386/vga_common.c (grub_console_setcolorstate): Moved
	to ..
	* grub-core/term/i386/pc/vga_text.c (grub_console_setcolorstate):
	... here
	* grub-core/term/i386/pc/console.c (grub_console_setcolorstate): ... and
	here.
	* grub-core/term/i386/vga_common.c: Removed.
	* include/grub/i386/vga_common.h: Likewise.
	* include/grub/vga.h (grub_vga_cr_bw_write): New function.
	(grub_vga_cr_bw_read): Likewise.
	* include/grub/vgaregs.h (GRUB_VGA_IO_CR_BW_INDEX): New enum value.
	(GRUB_VGA_IO_CR_BW_DATA): Likewise.
	* grub-core/term/i386/pc/vga_text.c [MODE_MDA]: Call
	grub_vga_cr_bw_read/grub_vga_cr_bw_write instead of
	grub_vga_cr_read/grub_vga_cr_write.
	(grub_vga_text_setcolorstate) [MODE_MDA]: Ignore color.
2012-06-28 15:27:54 +02:00
Vladimir 'phcoder' Serbinenko
5f91f70146 * configure.ac: Bump version to 2.00.
* grub-core/normal/main.c (features): Add feature_200_final.
2012-06-28 02:06:36 +02:00
Vladimir 'phcoder' Serbinenko
0c4f85f651 * NEWS: Fix unclarity and language mistakes. 2012-06-27 23:37:20 +02:00
Vladimir 'phcoder' Serbinenko
f923ad22ce * grub-core/loader/i386/linux.c (find_efi_mmap_size): Increase
additional size to 3 pages.
	Reported by: Stuart Hayes.
2012-06-27 22:55:09 +02:00
Vladimir 'phcoder' Serbinenko
d22029ba28 * NEWS: Add 2.00 entry. 2012-06-27 22:28:32 +02:00
Vladimir 'phcoder' Serbinenko
58eee08fff * grub-core/commands/wildcard.c (check_file): Fix bad logic.
put explicit "/" for empty path.
	(wildcard_expand): Improve dprintf.
2012-06-27 21:13:06 +02:00
Vladimir 'phcoder' Serbinenko
c59bdff709 * grub-core/fs/fshelp.c (grub_fshelp_find_file): Don't free oldnode if
it's equal to currnode. This can happen with "" symlink.
2012-06-27 19:37:40 +02:00
Yves Blusseau
5e6a440ad7 * util/grub-mkconfig_lib.in: Fix print messages replacing builtin
echo shell command by printf command.
2012-06-27 11:22:43 +02:00
Vladimir 'phcoder' Serbinenko
73a68bcb3a * grub-core/term/arc/console.c (grub_console_init_output): Add one since
the value returned by firmware is the maximal position, not diumension.
	(grub_terminfo_output_state): Use a more sane fallback.
2012-06-26 23:34:32 +02:00
Vladimir 'phcoder' Serbinenko
392a603b67 * grub-core/term/terminfo.c (print_terminfo): Print terminal dimensions. 2012-06-26 23:32:00 +02:00
Vladimir 'phcoder' Serbinenko
42d0867ff7 * grub-core/kern/mips/arc/init.c (grub_machine_init): Set clock
frequency to 150 MHz.
2012-06-26 23:28:23 +02:00
Vladimir 'phcoder' Serbinenko
489509f40e Apple fixes.
* grub-core/lib/i386/relocator16.S: Use correct __APPLE__ and not
	__APPLE_
	* grub-core/lib/i386/relocator_common.S [__APPLE__]: Fix gdtdesc
	definition.
	* grub-core/lib/i386/relocator64.S [__APPLE__]: Assemble jmp manually.
2012-06-26 14:56:28 +02:00
Vladimir 'phcoder' Serbinenko
9f3fc8835f Handle slash in HFS label.
* grub-core/fs/hfs.c (macroman_to_utf8): New argument slash_translate.
	(grub_hfs_dir): Tanslate slash.
	(grub_hfs_label): Don't translate slash.
2012-06-26 14:53:35 +02:00
Vladimir 'phcoder' Serbinenko
54853fd72e * grub-core/commands/ls.c (grub_ls_list_devices): Disable
network protocol listing since it introduces problematic dependency on
	net module.
2012-06-26 03:45:46 +02:00
Vladimir 'phcoder' Serbinenko
4dc02ddfc5 * util/grub-mkimage.c (generate_image): Add Yeeloong verified hash. 2012-06-26 03:38:10 +02:00
Vladimir 'phcoder' Serbinenko
c50c867da3 Init video early on yeeloong to avoid being rebooted by watchdog.
* grub-core/Makefile.am (gensm712): New target.
	(sm712_start.S): Likewise.
	(boot/mips/loongson/fwstart.S): Depend on sm712_start.S
	* grub-core/boot/mips/loongson/fwstart.S [!FULOONG2F]: Init SM712.
	* grub-core/video/sm712.c [GENINIT]: Generate compact init procedure
	description.
	* include/grub/vga.h: Move registry definitions to...
	* include/grub/vgaregs.h: ... here.
2012-06-26 03:36:14 +02:00
Vladimir 'phcoder' Serbinenko
5f92c8a110 * grub-core/boot/decompressor/minilib.c (grub_memcmp): Fix the compare
signedness.
2012-06-26 03:31:41 +02:00
Vladimir 'phcoder' Serbinenko
e9e6f11155 * util/grub-install.in: Fix dvhtool invocation. Add arc to the list of
platforms with firmware disk drivers in the core.
2012-06-25 19:32:22 +02:00
Vladimir 'phcoder' Serbinenko
754ad9ebbe * grub-core/disk/diskfilter.c (scan_disk) [GRUB_UTIL]: Put more
informative verbose message.
	(read_lv): Handle 64-bit segment size.
2012-06-25 17:54:46 +02:00
Vladimir 'phcoder' Serbinenko
315654c269 * grub-core/disk/lvm.c (grub_lvm_getvalue): Handle 64-bit values. 2012-06-25 17:52:20 +02:00
Vladimir 'phcoder' Serbinenko
fb022c79ef * grub-core/fs/fat.c (grub_fat_iterate_dir_next): Don't stop on a space
character but still remove trainling spaces.
	(grub_fat_label): Ignore archive flag.
2012-06-25 17:47:52 +02:00
Vladimir 'phcoder' Serbinenko
8645f72c72 * grub-core/loader/i386/linux.c (grub_cmd_initrd): Avoid unnecessarry
cast between linux_kernel_header and linux_kernel_params.
2012-06-25 17:44:36 +02:00
Vladimir 'phcoder' Serbinenko
36498496a0 * include/grub/diskfilter.h (grub_raid5_recover_func_t): Use proper
type for size.
	(grub_raid6_recover_func_t): Likewise.
	* grub-core/disk/raid5_recover.c (grub_raid5_recover): Likewise.
	* grub-core/disk/raid6_recover.c (grub_raid6_recover): Likewise.
2012-06-25 17:36:50 +02:00
Vladimir 'phcoder' Serbinenko
0b5ea6b8c3 * util/grub-mkimage.c (generate_image): Add Fuloong2F verified hash. 2012-06-25 12:36:50 +02:00
Grégoire Sutre
650cfcfea2 Fix overflow in grub_util_get_fd_size for NetBSD. 2012-06-25 10:09:57 +02:00
Vladimir 'phcoder' Serbinenko
8a4d6a445b * configure.ac: Bump to 2.00~rc1. 2012-06-23 22:56:19 +02:00
Vladimir 'phcoder' Serbinenko
2fb97ed37a * grub-core/boot/mips/loongson/fwstart.S: Add missing setting of high
half of $a0.
2012-06-23 11:27:27 +02:00
Vladimir 'phcoder' Serbinenko
1fa097dc98 * docs/grub.texi: Fix search syntax.
(Multi-boot manual config): Put msdos rather than GPT example.
	Grammar corrections.
2012-06-23 10:55:14 +02:00
Vladimir 'phcoder' Serbinenko
c890ba78ca * docs/grub.texi (Multi-boot manual config): Use --set. Improve remark. 2012-06-23 00:55:25 +02:00
Vladimir 'phcoder' Serbinenko
0f92dca7ef * grub-core/kern/mm.c (grub_free): Fix agglomerating of free regions. 2012-06-23 00:39:10 +02:00
Vladimir 'phcoder' Serbinenko
3988c4a09f * grub-core/kern/mm.c (get_header_from_pointer): Put a more informative
message on double free. Put the value of magic in case of mismatch.
2012-06-22 23:54:43 +02:00
Vladimir 'phcoder' Serbinenko
9e86d4c59a Speed-up video on yeeloong.
* grub-core/video/sm712.c (framebuffer): Remove render_target and
	add cached_ptr.
	(grub_video_sm712_video_fini): Unmap cached_ptr.
	(grub_video_sm712_setup): Use cache address and grub_video_fb_setup.
	(grub_video_sm712_set_active_render_target): Removed.
	(grub_video_adapter): Use grub_video_fb_set_active_render_target.
	(grub_video_sm712_swap_buffers): Call grub_video_fb_swap_buffers and
	sync caches.
2012-06-22 23:47:34 +02:00
Vladimir 'phcoder' Serbinenko
ed24c31201 Avoid flushing the same line multiple times on loongson.
* grub-core/kern/mips/cache.S [GRUB_MACHINE_MIPS_LOONGSON]:
	Step in 32 bytes and not 1 byte.
	* grub-core/kern/mips/cache_flush.S [GRUB_MACHINE_MIPS_LOONGSON]:
	Likewise.
2012-06-22 23:36:33 +02:00
Vladimir 'phcoder' Serbinenko
d1718e7d2b * util/getroot.c (grub_find_root_devices_from_mountinfo): Handle btrfs
subvolumes.
2012-06-22 22:11:23 +02:00
Vladimir 'phcoder' Serbinenko
982f1909cf Implement flow control for http.
* grub-core/net/http.c (parse_line): Handle response 206.
	(http_receive): Stall if too many packets are in the queue.
	(http_establish): Fix range header.
	(http_seek): Fix double free.
	(http_close): Likewise.
	(http_packets_pulled): New function.
	(grub_http_protocol): Set http_seek
	* grub-core/net/tcp.c (grub_net_tcp_socket): New field `i_stall'.
	(ack_real): Set window depending on i_stall.
	(grub_net_send_tcp_packet): Likewise.
	(grub_net_tcp_stall): New function.
	(grub_net_tcp_unstall): Likewise.
	* include/grub/net/tcp.h (grub_net_tcp_stall): New proto.
	(grub_net_tcp_unstall): Likewise.
2012-06-22 22:09:31 +02:00
Vladimir 'phcoder' Serbinenko
bd407d6e5e * grub-core/net/tftp.c: Decrease stall to 50 packets. 2012-06-22 22:04:16 +02:00
Vladimir 'phcoder' Serbinenko
c7564b8e13 * grub-core/net/net.c (grub_net_fs_open): Free resources on failed open. 2012-06-22 22:02:47 +02:00
Vladimir 'phcoder' Serbinenko
a370616293 * tests/util/grub-shell.in: Fix a typo. 2012-06-22 21:59:10 +02:00
Vladimir 'phcoder' Serbinenko
b27069e06d Implement flow control for tftp.
* grub-core/net/net.c (receive_packets): Decrease the stop to 10
	packets but stop only if stop condition is satisfied.
	(grub_net_fs_read_real): Call packets_pulled after real read. Use
	`stall' instead of `eof' as stop condition.
	* grub-core/net/http.c (parse_line): Set `stall' on EOF.
	(http_err): Likewise.
	* grub-core/net/tftp.c (ack): Replace the first argument with data
	instead of socket.
	(tftp_receive): Stall if too many packets are in wait queue.
	(tftp_packets_pulled): New function.
	(grub_tftp_protocol): Set packets_pulled.
	* include/grub/net.h (grub_net_packets): New field count.
	(grub_net_put_packet): Increment count.
	(grub_net_remove_packet): Likewise.
	(grub_net_app_protocol): New field `packets_pulled'.
	(grub_net): New field `stall'.
2012-06-22 14:17:46 +02:00
Vladimir 'phcoder' Serbinenko
6b9cfac683 * grub-core/net/net.c (receive_packets): Stop after 100 packets to let
sync part to handle them.
2012-06-22 12:42:31 +02:00
Vladimir 'phcoder' Serbinenko
f35abd8190 * grub-core/kern/main.c (grub_set_prefix_and_root): Fix memory leak.
* grub-core/net/drivers/ieee1275/ofnet.c
	(grub_ieee1275_net_config_real): Likewise.
2012-06-22 11:51:48 +02:00
Vladimir 'phcoder' Serbinenko
0e7ec82034 * grub-core/net/bootp.c (grub_net_configure_by_dhcp_ack): Don't create
the direct route for server/gateway.
2012-06-21 22:20:57 +02:00
Vladimir 'phcoder' Serbinenko
9d611a318d * grub-core/net/bootp.c (grub_net_configure_by_dhcp_ack): Prefer
IP address to server name since we may not hame the DNS.
2012-06-21 22:15:10 +02:00
Vladimir 'phcoder' Serbinenko
418f45abd1 * grub-core/net/dns.c (grub_cmd_nslookup): Init addresses to 0 to avoid
freeing random buffer on failure.
	* grub-core/net/net.c (grub_net_resolve_address): Likewise.
2012-06-21 22:11:47 +02:00
Vladimir 'phcoder' Serbinenko
44a0efc180 * grub-core/net/bootp.c (grub_cmd_bootp): Fix packet allocation size. 2012-06-21 22:08:33 +02:00
Vladimir 'phcoder' Serbinenko
531e2241a6 * grub-core/net/drivers/emu/emunet.c (get_card_packet): Allocate the
reserved bytes.
	* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_recv): Likewise.
	* grub-core/net/drivers/ieee1275/ofnet.c (get_card_packet): Likewise.
	Handle malloc error correctly.
2012-06-21 22:05:41 +02:00
Vladimir 'phcoder' Serbinenko
cde393c9a3 * grub-core/script/execute.c (grub_script_arglist_to_argv): Escape
blocks.
2012-06-21 22:02:09 +02:00
Vladimir 'phcoder' Serbinenko
538478d082 * grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Fix double
increment.
2012-06-21 21:59:52 +02:00
Vladimir 'phcoder' Serbinenko
9b55efe09a * grub-core/net/dns.c (grub_cmd_nslookup): Use configured DNS servers if
none is explicitly specified.
2012-06-21 00:14:51 +02:00
Vladimir 'phcoder' Serbinenko
9eb832c365 * grub-core/net/dns.c (grub_net_add_dns_server): Don't erase old servers
while reallocating.
2012-06-20 23:51:56 +02:00
Vladimir 'phcoder' Serbinenko
d6b7c7c986 Respect netmask from bootp/dhcp.
* grub-core/net/bootp.c (parse_dhcp_vendor): Parse mask.
	(grub_net_configure_by_dhcp_ack): Use mask and grub_net_add_ipv4_local.
	* grub-core/net/net.c (grub_net_add_addr): Split creating local route
	into ...
	(grub_net_add_ipv4_local): ... this.
	(grub_cmd_addaddr): Use grub_net_add_ipv4_local.
	* include/grub/net.h (GRUB_NET_BOOTP_NETMASK): New enum value.
	(grub_net_add_ipv4_local): New proto.
2012-06-20 23:46:50 +02:00
Vladimir 'phcoder' Serbinenko
67caf9eb06 * grub-core/loader/i386/linux.c (grub_linux_boot): Setup video before
determining EFI memory map size.
2012-06-20 23:39:33 +02:00
Vladimir 'phcoder' Serbinenko
436575581e * grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Escape commas. 2012-06-20 23:37:24 +02:00
Vladimir 'phcoder' Serbinenko
eb6d0dd3a1 * grub-core/kern/main.c (grub_set_prefix_and_root): Skip escaped commas
when looking for partition separator.
2012-06-20 23:33:34 +02:00
Vladimir 'phcoder' Serbinenko
3123054474 * grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname):
Escape commas.
2012-06-20 23:31:59 +02:00
Vladimir 'phcoder' Serbinenko
918a25179c Restructure FAT driver to avoid hook in label reading as it hits a
GCC bug.

	* include/grub/err.h (grub_err_t): New enum value GRUB_ERR_EOF.
	* grub-core/fs/fat.c (grub_fat_iterate_context): New struct.
	(grub_fat_iterate_dir): Split into ...
	(grub_fat_iterate_init): ... this, ...
	(grub_fat_iterate_fini): ... this, ...
	(grub_fat_iterate_dir_next): ... and this. All users updated.
2012-06-20 23:29:28 +02:00