Commit graph

7168 commits

Author SHA1 Message Date
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
fc6171d58e neater gnulib backport 2012-12-28 07:13:34 +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
Christoph Junghans
9e0bee42cd * grub-core/Makefile.am (moddep.lst): Use $(AWK) instead of awk 2012-10-12 15:04:02 +02: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