]> git.proxmox.com Git - grub2.git/log
grub2.git
14 years agoMerge mainline into keylayouts
Vladimir 'phcoder' Serbinenko [Wed, 18 Aug 2010 20:28:47 +0000 (22:28 +0200)]
Merge mainline into keylayouts

14 years ago* configure.ac: Move AM_INIT_AUTOMAKE after AC_CANONICAL_TARGET to
Colin Watson [Wed, 18 Aug 2010 10:15:08 +0000 (11:15 +0100)]
* configure.ac: Move AM_INIT_AUTOMAKE after AC_CANONICAL_TARGET to
fix warnings from Autoconf.

14 years ago* acinclude.m4 (grub_ASM_USCORE): Use a more accurate grep pattern,
Colin Watson [Wed, 18 Aug 2010 10:08:00 +0000 (11:08 +0100)]
* acinclude.m4 (grub_ASM_USCORE): Use a more accurate grep pattern,
to avoid false positives with some assemblers that output things
like "someprefix_func" as part of their output.

14 years ago2010-08-15 Robert Millan <rmh@gnu.org>
Robert Millan [Sun, 15 Aug 2010 20:48:23 +0000 (22:48 +0200)]
2010-08-15  Robert Millan  <rmh@gnu.org>

* kern/emu/misc.c (grub_get_libzfs_handle): Handle libzfs_init()
errors.
* kern/emu/getroot.c (find_root_device_from_libzfs): Handle
grub_get_libzfs_handle() errors.

14 years ago2010-08-14 Robert Millan <rmh@gnu.org>
Robert Millan [Sat, 14 Aug 2010 14:53:25 +0000 (16:53 +0200)]
2010-08-14  Robert Millan  <rmh@gnu.org>

* kern/emu/misc.c (grub_find_zpool_from_dir): Abort function if
filesystem is not ZFS.

14 years ago Fix for misspelled color names defaulting to black/black (bug
BVK Chaitanya [Thu, 12 Aug 2010 15:22:42 +0000 (20:52 +0530)]
Fix for misspelled color names defaulting to black/black (bug
reported by Doug Nazar)

* include/grub/normal.h (grub_parse_color_name_pair): Add return
status to prototype.
* normal/color.c (grub_parse_color_name_pair): Return failure
status.
(grub_env_write_color_normal): Ignore bad color names.
(grub_env_write_color_highlight): Likewise.
* normal/main.c (GRUB_MOD_INIT): Set default color names.

14 years agofix bad color name handling
BVK Chaitanya [Thu, 12 Aug 2010 15:15:55 +0000 (20:45 +0530)]
fix bad color name handling

14 years ago "shift" command support to GRUB script.
BVK Chaitanya [Thu, 12 Aug 2010 06:37:27 +0000 (12:07 +0530)]
"shift" command support to GRUB script.

* include/grub/script_sh.h (grub_script_shift): New prototype.
* script/execute.c (grub_script_shift): New function.
* script/main.c (grub_script_init): Register shift command.
(grub_script_fini): Unregister shift command.
* util/grub-script-check.c (grub_script_cmd_shift): New function.

* tests/grub_script_shift.in: New testcase.
* conf/tests.rmk: Rules for new testcase.

14 years agomerge with mainline
BVK Chaitanya [Thu, 12 Aug 2010 06:32:48 +0000 (12:02 +0530)]
merge with mainline

14 years ago "continue" command support to GRUB script.
BVK Chaitanya [Thu, 12 Aug 2010 06:18:21 +0000 (11:48 +0530)]
"continue" command support to GRUB script.

* script/execute.c (grub_script_execute_cmdwhile): Continue support.
(grub_script_break): Continue support.
* script/main.c (grub_script_init): Register continue command.
(grub_script_fini): Unregister continue command.

* tests/grub_script_continue.in: New testcase.
* conf/tests.rmk: Rules for new testcase.

14 years agomerge with mainline
BVK Chaitanya [Thu, 12 Aug 2010 04:16:01 +0000 (09:46 +0530)]
merge with mainline

14 years ago "break" command support to GRUB script.
BVK Chaitanya [Thu, 12 Aug 2010 04:05:15 +0000 (09:35 +0530)]
"break" command support to GRUB script.

* conf/common.rmk: Rule updates to grub-script-check.
* include/grub/misc.h (grub_min): New function.
* include/grub/script_sh.h (grub_script_init): New prototype.
(grub_script_fini): New prototype.
(grub_script_break): New prototype.
* script/main.c (grub_script_init): New function.
(grub_script_fini): New function.
* script/execute.c (grub_script_break): New function.
* normal/main.c: Calls to grub_script_{init,fini}.
* util/grub-script-check.c (grub_script_break): New function.

* tests/grub_script_break.in: New testcase.
* conf/tests.rmk: Rules for new test case.

14 years agomerge with mainline
BVK Chaitanya [Thu, 12 Aug 2010 04:00:26 +0000 (09:30 +0530)]
merge with mainline

14 years ago Function parameters support to GRUB script.
BVK Chaitanya [Thu, 12 Aug 2010 03:50:58 +0000 (09:20 +0530)]
Function parameters support to GRUB script.

* script/yylex.l (VARIABLE): Regular expression update.
* script/function.c (grub_script_function_call): Moved ...
* script/execute.c (grub_script_function_call): ... to here.
(grub_script_execute_arglist_to_argv): Removed.
(grub_script_arglist_to_argv): New function.
* script/argv.c: New file.
(grub_script_argv_free): New function.
(grub_script_argv_next): Likewise.
(grub_script_argv_append): Likewise.
(grub_script_argv_split_append): Likewise.
* include/grub/script_sh.h (grub_script_argv): New struct.
(grub_script_argv_free): New function.
(grub_script_argv_next): Likewise.
(grub_script_argv_append): Likewise.
(grub_script_argv_split_append): Likewise.

* conf/common.rmk (normal.mod): New source script/argv.c.

* tests/grub_script_echo1.in: More tests.
* tests/grub_script_vars1.in: Likewise.
* tests/grub_script_functions.in: New test case.
* conf/tests.rmk: Rules for new testcase.

14 years agomerge with mainline
BVK Chaitanya [Thu, 12 Aug 2010 03:46:24 +0000 (09:16 +0530)]
merge with mainline

14 years ago Remove grub_script_cmdblock struct.
BVK Chaitanya [Thu, 12 Aug 2010 03:34:37 +0000 (09:04 +0530)]
Remove grub_script_cmdblock struct.

* include/grub/script_sh.h: Remove grub_script_cmdblock.
* script/parser.y: Likewise.
* script/execute.c: Rename cmdblock suffix to cmdlist.
* script/script.c: Likewise.
* util/grub-script-check.c: Likewise.

14 years agomerge with mainline
BVK Chaitanya [Thu, 12 Aug 2010 03:31:59 +0000 (09:01 +0530)]
merge with mainline

14 years ago2010-08-11 Yves Blusseau <blusseau@zetam.org>
Yves Blusseau [Wed, 11 Aug 2010 11:24:37 +0000 (13:24 +0200)]
2010-08-11  Yves Blusseau  <blusseau@zetam.org>

    * .bzrignore: add grub-macho2img

14 years ago * kern/i386/qemu/init.c (grub_qemu_init_cirrus): Fix compilation error.
Vladimir 'phcoder' Serbinenko [Wed, 11 Aug 2010 02:25:56 +0000 (04:25 +0200)]
* kern/i386/qemu/init.c (grub_qemu_init_cirrus): Fix compilation error.

14 years ago Remove the dump of sm712 initialisation sequence.
Vladimir 'phcoder' Serbinenko [Wed, 11 Aug 2010 02:18:07 +0000 (04:18 +0200)]
Remove the dump of sm712 initialisation sequence.

* include/grub/pci.h (GRUB_PCI_CLASS_SUBCLASS_VGA): New const.
* include/grub/vga.h (GRUB_VGA_IO_ARX_READ): New register.
(GRUB_VGA_IO_MISC_WRITE): Likewise.
(GRUB_VGA_CR_*): Added many registers.
(GRUB_VGA_SR_*): Likewise.
(GRUB_VGA_GR_*): Likewise.
(grub_vga_write_arx): New function.
(grub_video_hw_config): New struct.
(grub_vga_set_geometry): New function.
* kern/i386/qemu/init.c (load_palette): Use grub_vga_write_arx and
GRUB_PCI_CLASS_SUBCLASS_VGA.
* video/cirrus.c (grub_video_cirrus_setup): Use grub_vga_set_geometry.
* video/sm712.c (grub_sm712_write_reg): New function
(grub_sm712_read_reg): Likewise.
(grub_sm712_sr_write): Likewise.
(grub_sm712_gr_write): Likewise.
(grub_sm712_cr_write): Likewise.
(grub_sm712_write_arx): Likewise.
(grub_sm712_cr_shadow_write): Likewise.
(grub_sm712_write_dda_lookup): Likewise.
(grub_video_sm712_setup): Initialise the video rather then
blindly replay the dump.
(main) [TEST]: Add a routine to be able to compile as standalone for
tests.
* video/sm712_init.c (sm712_init): Removed.
(sm712_sr_seq1): New array.
(sm712_sr_seq2): Likewise.

14 years ago * include/grub/vga.h: Add missing grub/pci.h include.
Vladimir 'phcoder' Serbinenko [Wed, 11 Aug 2010 02:00:06 +0000 (04:00 +0200)]
* include/grub/vga.h: Add missing grub/pci.h include.

14 years ago2010-08-10 Yves Blusseau <blusseau@zetam.org>
Yves Blusseau [Tue, 10 Aug 2010 14:32:48 +0000 (16:32 +0200)]
2010-08-10  Yves Blusseau  <blusseau@zetam.org>

    * util/grub-macho2img.c (main): fix typo

14 years ago * include/grub/vga.h (grub_vga_gr_write): Add GRUB_MACHINE_PCI_IO_BASE.
Vladimir 'phcoder' Serbinenko [Tue, 10 Aug 2010 11:43:43 +0000 (13:43 +0200)]
* include/grub/vga.h (grub_vga_gr_write): Add GRUB_MACHINE_PCI_IO_BASE.
(grub_vga_gr_read): Likewise.
(grub_vga_cr_write): Likewise.
(grub_vga_cr_read): Likewise.
(grub_vga_sr_write): Likewise.
(grub_vga_sr_read): Likewise.
(grub_vga_palette_read): Likewise.
(grub_vga_palette_write): Likewise.
* video/sm712.c (GRUB_SM712_REG_BASE): New definition.
(grub_sm712_sr_read): New function.
(grub_video_sm712_setup): Use grub_vga_sr_write and grub_sm712_sr_read.
* video/sm712_init.c (sm712_init): Substract GRUB_MACHINE_PCI_IO_BASE.

14 years agomerge with mainline
BVK Chaitanya [Tue, 10 Aug 2010 04:22:16 +0000 (09:52 +0530)]
merge with mainline

14 years ago2010-08-09 Robert Millan <rmh@gnu.org>
Robert Millan [Mon, 9 Aug 2010 15:44:24 +0000 (17:44 +0200)]
2010-08-09  Robert Millan  <rmh@gnu.org>

* kern/emu/misc.c (grub_make_system_path_relative_to_its_root): Filter
out unused variables on non-ZFS build.

14 years ago2010-08-08 Robert Millan <rmh@gnu.org>
Robert Millan [Sun, 8 Aug 2010 22:11:19 +0000 (00:11 +0200)]
2010-08-08  Robert Millan  <rmh@gnu.org>

Fix path generation for sub-filesystems in ZFS.

* kern/emu/misc.c (grub_make_system_path_relative_to_its_root): Add
missing slash.

14 years ago2010-08-08 Robert Millan <rmh@gnu.org>
Robert Millan [Sun, 8 Aug 2010 20:47:32 +0000 (22:47 +0200)]
2010-08-08  Robert Millan  <rmh@gnu.org>

* util/grub-fstest.c (read_file, cmd_cmp): Improve error message.

14 years ago2010-08-08 Robert Millan <rmh@gnu.org>
Robert Millan [Sun, 8 Aug 2010 14:27:58 +0000 (16:27 +0200)]
2010-08-08  Robert Millan  <rmh@gnu.org>

* util/grub.d/10_kfreebsd.in: When files required for ZFS do not
exist, issue a proper error message (rely on `ls' for translated
strings).

14 years ago2010-08-08 Robert Millan <rmh@gnu.org>
Robert Millan [Sun, 8 Aug 2010 13:45:33 +0000 (15:45 +0200)]
2010-08-08  Robert Millan  <rmh@gnu.org>

Fix grub-probe invocation.

* util/grub.d/10_kfreebsd.in: s/label/fs_label/g.

14 years ago2010-08-04 Robert Millan <rmh@gnu.org>
Robert Millan [Wed, 4 Aug 2010 12:45:58 +0000 (14:45 +0200)]
2010-08-04  Robert Millan  <rmh@gnu.org>

* configure.ac: Remove checks for getfsstat() and getmntany().
Add checks for `<sys/param.h>' and `<sys/mount.h>'.
* kern/emu/misc.c [HAVE_GETMNTANY]: Remove `<sys/mnttab.h>'.
[HAVE_SYS_PARAM_H]: Include `<sys/param.h>'.
[HAVE_SYS_MOUNT_H]: Include `<sys/mount.h>'.
[HAVE_LIBZFS && HAVE_LIBNVPAIR] (find_mount_point_from_dir): Remove
function.
(grub_find_zpool_from_dir): Use statfs() instead of indirect matching
via find_mount_point_from_dir() and getfsstat() / getmntany().

14 years ago2010-08-04 Robert Millan <rmh@gnu.org>
Robert Millan [Wed, 4 Aug 2010 11:29:13 +0000 (13:29 +0200)]
2010-08-04  Robert Millan  <rmh@gnu.org>

* include/grub/emu/misc.h (grub_find_mount_point_from_dir)
(grub_find_zpool_from_mount_point): Merge into ...
(grub_find_zpool_from_dir): ... this.
* kern/emu/misc.c: Likewise.

* kern/emu/misc.c
(grub_make_system_path_relative_to_its_root): Replace
grub_find_mount_point_from_dir() / grub_find_zpool_from_mount_point()
with grub_find_zpool_from_dir().
* kern/emu/getroot.c (find_root_device_from_libzfs): Likewise.

14 years ago2010-08-04 Robert Millan <rmh@gnu.org>
Robert Millan [Tue, 3 Aug 2010 22:15:29 +0000 (00:15 +0200)]
2010-08-04  Robert Millan  <rmh@gnu.org>

Support OpenSolaris in ZFS device resolution.

* configure.ac: Check for getmntany().
* kern/emu/misc.c [HAVE_GETMNTANY]: Include `<sys/mnttab.h>'.
[HAVE_GETMNTANY] (grub_find_zpool_from_mount_point): Add OpenSolaris
support.

14 years ago2010-08-03 Robert Millan <rmh@gnu.org>
Robert Millan [Tue, 3 Aug 2010 21:51:48 +0000 (23:51 +0200)]
2010-08-03  Robert Millan  <rmh@gnu.org>

Fix grub-emu build.

* include/grub/util/misc.h: Move `<grub/util/libzfs.h>' to ...
* include/grub/emu/misc.h: ... here.

* include/grub/util/misc.h (grub_get_libzfs_handle): Move function ...
* include/grub/emu/misc.h (grub_get_libzfs_handle): ... here.

* util/misc.c: Remove `<grub/util/libzfs.h>'.
[HAVE_LIBZFS] (libzfs_handle, fini_libzfs)
(grub_get_libzfs_handle): Move to ...
* kern/emu/misc.c [HAVE_LIBZFS] (__libzfs_handle, fini_libzfs)
(grub_get_libzfs_handle): ... here.

14 years ago * script/execute.c (grub_script_execute_cmdline): Check for NULL
BVK Chaitanya [Tue, 3 Aug 2010 06:26:36 +0000 (11:56 +0530)]
* script/execute.c (grub_script_execute_cmdline): Check for NULL
as command name case.

14 years ago* disk/raid.c (insert_array): Select unique numbers for named arrays
Colin Watson [Mon, 2 Aug 2010 14:51:23 +0000 (09:51 -0500)]
* disk/raid.c (insert_array): Select unique numbers for named arrays
as well, for use as keys in the disk cache.

14 years ago2010-08-01 Robert Millan <rmh@gnu.org>
Robert Millan [Sun, 1 Aug 2010 21:21:09 +0000 (23:21 +0200)]
2010-08-01  Robert Millan  <rmh@gnu.org>

* util/grub.d/10_kfreebsd.in: Initialize ${kfreebsd_device} as the
kFreeBSD device name, except on ZFS where the filesystem label is
used.
(kfreebsd_entry): On ZFS root, load `opensolaris.ko', `zfs.ko' and
`/boot/zfs/zpool.cache'.
Set mountfrom kernel variable using ${kfreebsd_device}.

14 years ago2010-08-01 Robert Millan <rmh@gnu.org>
Robert Millan [Sun, 1 Aug 2010 21:12:24 +0000 (23:12 +0200)]
2010-08-01  Robert Millan  <rmh@gnu.org>

Make it even harder to use uninitialized `libzfs_handle' (and
make the interface a bit simpler).

* include/grub/util/misc.h (grub_util_init_libzfs)
(libzfs_handle): Remove.
(grub_get_libzfs_handle): New prototype.

* util/misc.c [HAVE_LIBZFS] (libzfs_handle): Add `static'
attribute.
(grub_util_init_libzfs): Remove.
(grub_get_libzfs_handle): New function.

* kern/emu/getroot.c (find_root_device_from_libzfs): Use
grub_get_libzfs_handle() to obtain a libzfs handle instead of
accessing `libzfs_handle' directly.

14 years ago2010-08-01 Robert Millan <rmh@gnu.org>
Robert Millan [Sun, 1 Aug 2010 20:59:02 +0000 (22:59 +0200)]
2010-08-01  Robert Millan  <rmh@gnu.org>

* include/grub/emu/misc.h (grub_find_mount_point_from_dir)
(grub_find_zpool_from_mount_point): New function prototypes.

* kern/emu/getroot.c [HAVE_GETFSSTAT]: Move `<sys/mount.h>' to ...
* kern/emu/misc.c [HAVE_GETFSSTAT]: ... here.

* kern/emu/getroot.c (find_mount_point_from_dir): Move to ...
* kern/emu/misc.c (grub_find_mount_point_from_dir): ... this.  Remove
`static' attribute.

* kern/emu/getroot.c (find_root_device_from_libzfs): Split code for
finding zpool from mount point into ...
* kern/emu/misc.c (grub_find_zpool_from_mount_point): ... this.

* kern/emu/misc.c (grub_make_system_path_relative_to_its_root): When
requested path is part of a ZFS pool, use
grub_find_zpool_from_mount_point() to detect its filesystem name,
and generate a path with `/fsname@path' syntax.

14 years ago* include/grub/util/libzfs.h (libzfs_init): Set argument list to
Colin Watson [Sun, 1 Aug 2010 21:41:46 +0000 (16:41 -0500)]
* include/grub/util/libzfs.h (libzfs_init): Set argument list to
(void) rather than () so that this is a proper prototype.

14 years ago * lib/arg.c (grub_arg_show_help): Add the necessary spacing.
Vladimir 'phcoder' Serbinenko [Sun, 1 Aug 2010 19:01:05 +0000 (21:01 +0200)]
* lib/arg.c (grub_arg_show_help): Add the necessary spacing.

14 years ago * kern/emu/getroot.c (find_mount_point_from_dir): Compile only if
Vladimir 'phcoder' Serbinenko [Sun, 1 Aug 2010 14:11:27 +0000 (16:11 +0200)]
* kern/emu/getroot.c (find_mount_point_from_dir): Compile only if
[HAVE_LIBZFS && HAVE_LIBNVPAIR]

14 years ago* util/grub-mkrescue.in: Remove ${efi_dir} after building efi.img.
Colin Watson [Sun, 1 Aug 2010 16:30:03 +0000 (11:30 -0500)]
* util/grub-mkrescue.in: Remove ${efi_dir} after building efi.img.

14 years ago* script/yylex.l (NAME): Remove [:digit:], redundant with [:alnum:].
Colin Watson [Sun, 1 Aug 2010 16:28:12 +0000 (11:28 -0500)]
* script/yylex.l (NAME): Remove [:digit:], redundant with [:alnum:].

14 years ago* docs/grub.texi (Simple configuration): Document GRUB_CMDLINE_XEN
Colin Watson [Sun, 1 Aug 2010 16:25:09 +0000 (11:25 -0500)]
* docs/grub.texi (Simple configuration): Document GRUB_CMDLINE_XEN
and GRUB_CMDLINE_XEN_DEFAULT.  Recommend setting
GRUB_GFXPAYLOAD_LINUX=text rather than unsetting it in order to
disable gfxpayload.
(Shell-like scripting): Add real content.
(Serial terminal): Suggest `terminal_input serial; terminal_output
serial' rather than putting the two commands on separate lines,
since console input will be inoperative after the first command.
(menuentry): Document --class, --users, and --hotkey options.
(terminfo): Describe what `visually-ordered UTF-8' means (thanks,
Vladimir Serbinenko).

14 years ago* kern/misc.c (grub_memset): Optimise to reduce cache stalls.
Vladimir Serbinenko [Sun, 1 Aug 2010 14:44:36 +0000 (09:44 -0500)]
* kern/misc.c (grub_memset): Optimise to reduce cache stalls.
Also-By: Colin Watson <cjwatson@ubuntu.com>
14 years ago2010-08-01 Robert Millan <rmh@gnu.org>
Robert Millan [Sun, 1 Aug 2010 13:23:44 +0000 (15:23 +0200)]
2010-08-01  Robert Millan  <rmh@gnu.org>

Prevent accidental use of uninitialized libzfs_handle.

* util/grub-probe.c (main): Move grub_util_init_libzfs() call to ...
* kern/emu/getroot.c (find_root_device_from_libzfs): ... here.
* util/misc.c (grub_util_init_libzfs): Make this function idempotent.

14 years ago* util/grub.d/20_linux_xen.in: Don't use UUID for LVM root (matching
Colin Watson [Sun, 1 Aug 2010 13:54:10 +0000 (08:54 -0500)]
* util/grub.d/20_linux_xen.in: Don't use UUID for LVM root (matching
util/grub.d/10_linux.in).  Fixes Debian bug #591093.

14 years ago2010-08-01 Robert Millan <rmh@gnu.org>
Robert Millan [Sun, 1 Aug 2010 12:47:14 +0000 (14:47 +0200)]
2010-08-01  Robert Millan  <rmh@gnu.org>

* kern/emu/getroot.c: Include `<grub/util/misc.h>'.

14 years ago2010-07-31 Robert Millan <rmh@gnu.org>
Robert Millan [Sun, 1 Aug 2010 00:14:07 +0000 (02:14 +0200)]
2010-07-31  Robert Millan  <rmh@gnu.org>

* util/grub.d/10_kfreebsd.in: Make module handling more generic.

14 years ago2010-07-31 Robert Millan <rmh@gnu.org>
Robert Millan [Sat, 31 Jul 2010 16:45:57 +0000 (18:45 +0200)]
2010-07-31  Robert Millan  <rmh@gnu.org>

* kern/emu/misc.c: Add missing license header.

14 years ago2010-07-31 Robert Millan <rmh@gnu.org>
Robert Millan [Sat, 31 Jul 2010 10:22:01 +0000 (12:22 +0200)]
2010-07-31  Robert Millan  <rmh@gnu.org>

* configure.ac: Check for `libzfs.h' and `libnvpair.h'.

* include/grub/util/libnvpair.h: Include `<config.h>'.
[HAVE_LIBNVPAIR_H]: Include `<libnvpair.h>' instead of
declaring libnvpair prototypes ourselves.
* include/grub/util/libzfs.h: Include `<config.h>'.
[HAVE_LIBZFS_H]: Include `<libzfs.h>' instead of
declaring libzfs prototypes ourselves.

(libzfs_handle): Moved to ...
* include/grub/util/misc.h (libzfs_handle): ... here.
Include `<grub/util/libzfs.h>'.

14 years ago2010-07-30 Robert Millan <rmh@gnu.org>
Robert Millan [Fri, 30 Jul 2010 20:01:10 +0000 (22:01 +0200)]
2010-07-30  Robert Millan  <rmh@gnu.org>

* include/grub/emu/misc.h: Add missing license header.

14 years ago2010-07-30 Robert Millan <rmh@gnu.org>
Robert Millan [Fri, 30 Jul 2010 19:43:12 +0000 (21:43 +0200)]
2010-07-30  Robert Millan  <rmh@gnu.org>

Enable `grub-probe -t device' resolution on ZFS.

* configure.ac: Check for getfsstat(), libzfs and libnvpair.
* include/grub/util/libnvpair.h: New file.
* include/grub/util/libzfs.h: New file.

* kern/emu/getroot.c: Include `<assert.h>' and `<error.h>'.
[HAVE_LIBZFS && HAVE_LIBNVPAIR]: Include `<grub/util/libzfs.h>' and
`<grub/util/libnvpair.h>'.
[HAVE_GETFSSTAT]: Include `<sys/mount.h>'.

(find_mount_point_from_dir): New static function.
[HAVE_LIBZFS && HAVE_LIBNVPAIR] (find_root_device_from_libzfs): New
function.
[HAVE_LIBZFS && HAVE_LIBNVPAIR] (grub_guess_root_device): Use
find_root_device_from_libzfs() before ressorting to find_root_device().

* include/grub/util/misc.h (grub_util_init_libzfs): New function
prototype.
* util/misc.c: Include `<grub/util/libzfs.h>'.
(grub_util_init_libzfs): New function.
[HAVE_LIBZFS] (libzfs_handle): New global variable.
[HAVE_LIBZFS] (fini_libzfs): New static function.
(grub_util_init_libzfs): New function.
* util/grub-probe.c (main): Call grub_util_init_libzfs().

14 years ago2010-07-30 Robert Millan <rmh@gnu.org>
Robert Millan [Fri, 30 Jul 2010 09:27:02 +0000 (11:27 +0200)]
2010-07-30  Robert Millan  <rmh@gnu.org>

* include/grub/emu/misc.h (grub_make_system_path_relative_to_its_root)
(xmalloc, xrealloc, xstrdup, xasprintf): Add
`warn_unused_result' attribute.
* include/grub/misc.h (grub_strdup, grub_strndup, grub_strlen)
(grub_xasprintf, grub_xvasprintf): Likewise.
* include/grub/emu/misc.h (xasprintf): Remove duplicate prototype.

14 years ago2010-07-29 Robert Millan <rmh@gnu.org>
Robert Millan [Thu, 29 Jul 2010 16:46:42 +0000 (18:46 +0200)]
2010-07-29  Robert Millan  <rmh@gnu.org>

* util/grub-probe.c (PRINT_FS_LABEL): New enum value.
(probe): Handle `PRINT_FS_LABEL'.
(main): Handle `-t fs_label'.

14 years ago2010-07-29 Robert Millan <rmh@gnu.org>
Robert Millan [Thu, 29 Jul 2010 13:06:39 +0000 (15:06 +0200)]
2010-07-29  Robert Millan  <rmh@gnu.org>

* configure.ac: Remove grub-mkisofs checks.

14 years ago * util/ieee1275/grub-install.in: Don't use empty grub_device.
Vladimir 'phcoder' Serbinenko [Wed, 28 Jul 2010 15:25:48 +0000 (18:25 +0300)]
* util/ieee1275/grub-install.in: Don't use empty grub_device.
Reported by: Lennart Sorensen.

14 years agoadd comment
BVK Chaitanya [Thu, 22 Jul 2010 22:35:15 +0000 (04:05 +0530)]
add comment

14 years agomerge with mainline
BVK Chaitanya [Thu, 22 Jul 2010 17:09:20 +0000 (22:39 +0530)]
merge with mainline

14 years ago * util/grub.d/00_header.in: Remove compatibility with terminal.mod
Vladimir 'phcoder' Serbinenko [Wed, 21 Jul 2010 04:44:38 +0000 (06:44 +0200)]
* util/grub.d/00_header.in: Remove compatibility with terminal.mod
prior to terminal_input/terminal_output separation. It's been over 1.5
years and those versions weren't widely deployed.

14 years agoreal name for Michael Guntsche
Colin Watson [Thu, 22 Jul 2010 08:44:19 +0000 (09:44 +0100)]
real name for Michael Guntsche

14 years ago* disk/raid.c (insert_array): Don't count named arrays when looking
Colin Watson [Thu, 22 Jul 2010 08:38:06 +0000 (09:38 +0100)]
* disk/raid.c (insert_array): Don't count named arrays when looking
for unused array numbers.
Reported and tested by: maru.

14 years ago* bus/usb/emu/usb.c (grub_usb_poll_devices): Add a dummy
Colin Watson [Tue, 20 Jul 2010 22:16:32 +0000 (23:16 +0100)]
* bus/usb/emu/usb.c (grub_usb_poll_devices): Add a dummy
implementation of this so that grub-emu links again, with a note
that this should support hotplugging in the future.

14 years ago* kern/emu/getroot.c (grub_util_get_grub_dev): Use xasprintf.
Colin Watson [Tue, 20 Jul 2010 22:09:45 +0000 (23:09 +0100)]
* kern/emu/getroot.c (grub_util_get_grub_dev): Use xasprintf.

14 years ago* disk/loopback.c (grub_cmd_loopback): Don't leak a grub_file_t
Colin Watson [Tue, 20 Jul 2010 21:14:26 +0000 (22:14 +0100)]
* disk/loopback.c (grub_cmd_loopback): Don't leak a grub_file_t
handle on failure.
(grub_loopback_close): Remove empty function.
(grub_loopback_dev): Remove close method.

14 years agoDisable EFI cursor when the EFI console becomes inactive.
Colin Watson [Tue, 20 Jul 2010 21:00:18 +0000 (22:00 +0100)]
Disable EFI cursor when the EFI console becomes inactive.
* term/efi/console.c (grub_efi_console_init): New function.
(grub_efi_console_fini): New function.
(grub_console_term_output): Register init and fini methods.

14 years ago * tests/util/grub-shell-tester.in: Remove bashism and declare as
Vladimir 'phcoder' Serbinenko [Tue, 20 Jul 2010 20:10:23 +0000 (22:10 +0200)]
* tests/util/grub-shell-tester.in: Remove bashism and declare as
sh script.

14 years ago * disk/loopback.c (grub_loopback): Replace filename with file.
Vladimir 'phcoder' Serbinenko [Tue, 20 Jul 2010 19:56:00 +0000 (21:56 +0200)]
* disk/loopback.c (grub_loopback): Replace filename with file.
(delete_loopback): Handle new semantics.
(grub_cmd_loopback): Likewise.
(grub_loopback_iterate): Likewise.
(grub_loopback_close): Likewise.

14 years ago * util/i386/efi/grub-install.in: Revert to platform-specific behaviour
Vladimir 'phcoder' Serbinenko [Tue, 20 Jul 2010 18:36:11 +0000 (20:36 +0200)]
* util/i386/efi/grub-install.in: Revert to platform-specific behaviour
with -p "".
Reported by: Tito Keitel.

14 years ago * docs/grub.texi (Naming convention): Document new naming convention.
Vladimir 'phcoder' Serbinenko [Tue, 20 Jul 2010 18:22:52 +0000 (20:22 +0200)]
* docs/grub.texi (Naming convention): Document new naming convention.

14 years ago2010-07-20 Vadim Solomin <vadic052@gmail.com>
Vadim Solomin [Tue, 20 Jul 2010 16:14:00 +0000 (17:14 +0100)]
2010-07-20  Vadim Solomin  <vadic052@gmail.com>
2010-07-20  Colin Watson  <cjwatson@ubuntu.com>

Generate device.map in something closer to the old ordering.

* util/deviceiter.c (struct device): New declaration.
(compare_file_names): Rename to ...
(compare_devices): ... this.  Sort by kernel name in preference to
the stable by-id name, but keep the latter as a fallback comparison.
Update header comment.
(grub_util_iterate_devices) [__linux__]: Construct and sort an array
of `struct device' rather than of plain file names.

Also-By: Colin Watson <cjwatson@ubuntu.com>
14 years ago * lib/i386/relocator_asm.S [! __x86_64__]: Don't try to disable amd64
Thomas Frauendorfer [Tue, 20 Jul 2010 13:59:56 +0000 (15:59 +0200)]
* lib/i386/relocator_asm.S [! __x86_64__]: Don't try to disable amd64
on i386.

14 years ago * commands/acpi.c (setup_common_tables): Use sizeof instead of
Vladimir 'phcoder' Serbinenko [Tue, 20 Jul 2010 12:42:32 +0000 (14:42 +0200)]
* commands/acpi.c (setup_common_tables): Use sizeof instead of
hardcoding size.
(setv1table): Likewise.

14 years ago2010-07-20 Colin Watson <cjwatson@ubuntu.com>
Felix Zielcke [Tue, 20 Jul 2010 10:26:27 +0000 (11:26 +0100)]
2010-07-20  Colin Watson  <cjwatson@ubuntu.com>

* disk/raid.c (insert_array): Use md/%s to name mdadm 1.x devices,
removing the homehost if present.
* kern/emu/getroot.c (get_mdadm_name) [__linux__]: New function.
(grub_util_get_grub_dev): Use md/%s to name mdadm 1.x devices,
removing the homehost if present.
(grub_util_get_grub_dev) [__linux__]: Get the array name from mdadm
if possible.
* util/i386/pc/grub-setup.c (main): Handle md/* devices.

* disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Add start_sector
parameter.  Set its pointer target to 0.
* disk/mdraid_linux.c (grub_mdraid_detect): Add start_sector
parameter.  Set its pointer target to 0 for 0.9 metadata, or to the
`data_offset' value from the superblock for 1.x metadata.
* disk/raid.c (grub_raid_read): Offset reads by the start sector of
data on the device.
(insert_array): Record the start sector of data on the device.
(grub_raid_register): Pass start_sector parameters to
grub_raid_list->detect and insert_array.
* include/grub/raid.h (struct grub_raid_array): Add start_sector
member.
(struct grub_raid): Add start_sector parameter to `detect'.

* disk/mdraid_linux.c (struct grub_raid_super_1x): Remove
__attribute__ ((packed)), leaving a comment.
(grub_mdraid_detect): Split out 0.9 and 1.x detection to ...
(grub_mdraid_detect_09): ... here and ...
(grub_mdraid_detect_1x): ... here.

2010-07-20  Peter Henn  <peter.henn@web.de>

* disk/mdraid_linux.c (grub_mdraid_detect): Fix calculation of 1.x
chunk size and disk size, which are already given as sector counts
as distinct from the 0.90 units.  Fetch the correct device number
from the role table instead of using the table index.

2010-07-20  Felix Zielcke  <fzielcke@z-51.de>

* disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Set array->name to NULL.
* disk/mdraid_linux.c (grub_raid_super_1x): New structure.
(WriteMostly1): New macro.
Set array->name to NULL for metadata format 0.90.  Add support for
metadata 1.x.  Fix some comments.
* disk/raid.c (): Add support for name based RAID arrays.  Fix a
few comments.
* util/getroot.c (grub_util_get_grub_dev): Add support for
/dev/md/name style devices.

Also-By: Peter Henn <peter.henn@web.de>
Also-By: Colin Watson <cjwatson@ubuntu.com>
14 years ago* .bzrignore: Ignore 20_linux_xen.
Colin Watson [Tue, 20 Jul 2010 10:20:23 +0000 (11:20 +0100)]
* .bzrignore: Ignore 20_linux_xen.

14 years ago* disk/mdraid_linux.c: Update copyright years.
Colin Watson [Tue, 20 Jul 2010 10:10:49 +0000 (11:10 +0100)]
* disk/mdraid_linux.c: Update copyright years.
* disk/raid.c: Likewise.
* include/grub/raid.h: Likewise.
* kern/emu/getroot.c: Likewise.

14 years ago* disk/mdraid_linux.c (struct grub_raid_super_1x): Remove
Colin Watson [Mon, 19 Jul 2010 10:35:16 +0000 (11:35 +0100)]
* disk/mdraid_linux.c (struct grub_raid_super_1x): Remove
__attribute__ ((packed)), leaving a comment.
(grub_mdraid_detect): Split out 0.9 and 1.x detection to ...
(grub_mdraid_detect_09): ... here and ...
(grub_mdraid_detect_1x): ... here.
* disk/raid.c (insert_array): Check for grub_xasprintf returning
NULL.

14 years ago* disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Add start_sector
Colin Watson [Sun, 18 Jul 2010 17:31:10 +0000 (18:31 +0100)]
* disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Add start_sector
parameter.  Set its pointer target to 0.
* disk/mdraid_linux.c (grub_mdraid_detect): Add start_sector
parameter.  Set its pointer target to 0 for 0.9 metadata, or to the
`data_offset' value from the superblock for 1.x metadata.
* disk/raid.c (grub_raid_read): Offset reads by the start sector of
data on the device.
(insert_array): Record the start sector of data on the device.
(grub_raid_register): Pass start_sector parameters to
grub_raid_list->detect and insert_array.
* include/grub/raid.h (struct grub_raid_array): Add start_sector
member.
(struct grub_raid): Add start_sector parameter to `detect'.

14 years ago* disk/raid.c (insert_array): Use md/%s to name mdadm 1.x devices,
Colin Watson [Sun, 18 Jul 2010 14:53:14 +0000 (15:53 +0100)]
* disk/raid.c (insert_array): Use md/%s to name mdadm 1.x devices,
removing the homehost if present.
* kern/emu/getroot.c (get_mdadm_name) [__linux__]: New function.
(grub_util_get_grub_dev): Use md/%s to name mdadm 1.x devices,
removing the homehost if present.
(grub_util_get_grub_dev) [__linux__]: Get the array name from mdadm
if possible.
* util/i386/pc/grub-setup.c (main): Handle md/* devices.

14 years ago* util/import_unicode.py: Remove unnecessary imports.
Colin Watson [Sat, 17 Jul 2010 18:27:18 +0000 (19:27 +0100)]
* util/import_unicode.py: Remove unnecessary imports.

14 years agomerge mainline
Colin Watson [Sat, 17 Jul 2010 10:17:49 +0000 (11:17 +0100)]
merge mainline

14 years ago Hotplugging and USB hub support.
Aleš Nesrsta [Sat, 17 Jul 2010 01:06:34 +0000 (03:06 +0200)]
Hotplugging and USB hub support.

* bus/usb/ohci.c (grub_ohci_td): Add convenience fields.
(grub_ohci): Likewise.
(GRUB_OHCI_REG_CONTROL_BULK_ENABLE): New definition.
(GRUB_OHCI_REG_CONTROL_CONTROL_ENABLE): Likewise.
(GRUB_OHCI_RESET_CONNECT_CHANGE): Likewise.
(GRUB_OHCI_CTRL_EDS): Likewise.
(GRUB_OHCI_BULK_EDS): Likewise.
(GRUB_OHCI_TDS): Likewise.
(GRUB_OHCI_ED_ADDR_MASK): Likewise.
(grub_ohci_ed_phys2virt): New function.
(grub_ohci_virt_to_phys): Likewise.
(grub_ohci_td_phys2virt): Likewise.
(grub_ohci_td_virt2phys): Likewise.
(grub_ohci_pci_iter): Allocate memory and don't wait for stable
attachment.
(grub_ohci_find_ed): New function.
(grub_ohci_alloc_td): Likewise.
(grub_ohci_free_td): Likewise.
(grub_ohci_free_tds): Likewise.
(grub_ohci_transfer): Use previously allocated memory.
(grub_ohci_portstatus): Reset status changed bit.
(grub_ohci_detect_dev): Supply status changed.
(grub_ohci_fini_hw): Free memory.
(grub_ohci_restore_hw): Reallocate memory.
* bus/usb/uhci.c (grub_uhci_portstatus): Don't reset on disable.
Reset status change.
(grub_uhci_detect_dev): Supply status_change.
* bus/usb/usb.c (attach_hooks): New var.
(grub_usb_device_attach): New function.
(grub_usb_register_attach_hook_class): Likewise.
(grub_usb_unregister_attach_hook_class): Likewise.
* bus/usb/usbhub.c (grub_usb_hub_add_dev): Handle errors correctly.
(grub_usb_add_hub): Reset connection changed bit.
(attach_root_port): New function.
(grub_usb_root_hub): Likewise.
(poll_nonroot_hub): Likewise.
(grub_usb_poll_devices): Likewise.
* commands/usbtest.c (grub_cmd_usbtest): Poll devices before listing.
* disk/usbms.c (grub_usbms_open): Use device hooks.
(grub_usbms_iterate) :Poll devices.
(grub_usbms_finddevs): Split into ...
(grub_usbms_attach): ... this ...
(grub_usbms_attach): ... and this.
* include/grub/usb.h (grub_usb_controller_dev): Supply status_changed
in detect_dev.
(grub_usb_interface): New fields attached and detach_hook.
(grub_usb_attach_hook_class): New type.
(grub_usb_attach_desc): New struct.
(grub_usb_register_attach_hook_class): New function.
(grub_usb_unregister_attach_hook_class): Likewise.
(grub_usb_poll_devices): Likewise.
(grub_usb_device_attach): Likewise.
* include/grub/usbtrans.h (GRUB_USB_HUB_FEATURE_C_CONNECTED): New const.
(GRUB_USB_HUB_STATUS_C_CONNECTED): Likewise.

14 years agoMerge mainline into usb
Vladimir 'phcoder' Serbinenko [Sat, 17 Jul 2010 00:44:33 +0000 (02:44 +0200)]
Merge mainline into usb

14 years ago * include/grub/bsdlabel.h (GRUB_PC_PARTITION_BSD_LABEL_WHOLE_DISK_PARTITION): New...
Vladimir 'phcoder' Serbinenko [Fri, 16 Jul 2010 23:57:48 +0000 (01:57 +0200)]
* include/grub/bsdlabel.h (GRUB_PC_PARTITION_BSD_LABEL_WHOLE_DISK_PARTITION): New definition.
* partmap/bsdlabel.c (bsdlabel_partition_map_iterate): Use FreeBSD
delta determination style. Works with most NetBSD partitions too.

14 years ago * kern/partition.c [GRUB_UTIL]: Add missing util/misc.h inclusion.
Vladimir 'phcoder' Serbinenko [Fri, 16 Jul 2010 23:55:01 +0000 (01:55 +0200)]
* kern/partition.c [GRUB_UTIL]: Add missing util/misc.h inclusion.
* partmap/bsdlabel.c [GRUB_UTIL]: Likewise.

14 years ago * disk/scsi.c (grub_scsi_open): Fix incorrect pointer dereference.
Vladimir 'phcoder' Serbinenko [Fri, 16 Jul 2010 23:52:41 +0000 (01:52 +0200)]
* disk/scsi.c (grub_scsi_open): Fix incorrect pointer dereference.

14 years agomerge mainline into usb
Vladimir 'phcoder' Serbinenko [Fri, 16 Jul 2010 23:14:13 +0000 (01:14 +0200)]
merge mainline into usb

14 years agoUse inline functions instead of macros
Vladimir 'phcoder' Serbinenko [Fri, 16 Jul 2010 22:57:14 +0000 (00:57 +0200)]
Use inline functions instead of macros

14 years agoFix mismerge
Vladimir 'phcoder' Serbinenko [Fri, 16 Jul 2010 22:56:38 +0000 (00:56 +0200)]
Fix mismerge

14 years ago* loader/powerpc/ieee1275/linux.c (grub_cmd_linux): Do not reject
Anton Blanchard [Wed, 14 Jul 2010 15:47:45 +0000 (16:47 +0100)]
* loader/powerpc/ieee1275/linux.c (grub_cmd_linux): Do not reject
ET_DYN files.

14 years agoFix condition in Makefile.in's LINGUAS assignment.
Grégoire Sutre [Wed, 14 Jul 2010 14:47:28 +0000 (16:47 +0200)]
Fix condition in Makefile.in's LINGUAS assignment.

14 years agoDiscard improperly nested partitions.
Grégoire Sutre [Wed, 14 Jul 2010 09:26:17 +0000 (11:26 +0200)]
Discard improperly nested partitions.

14 years ago* Makefile.in (.SUFFIX): Spell correctly, as ...
Colin Watson [Tue, 13 Jul 2010 11:24:07 +0000 (12:24 +0100)]
* Makefile.in (.SUFFIX): Spell correctly, as ...
(.SUFFIXES): ... this.  Fixes bug where `make foo' (where foo is a
bare module name without `.mod', e.g. `test') tried to invoke a
Modula-2 compiler.

14 years ago* README: Point to the Info manual.
Colin Watson [Tue, 13 Jul 2010 11:20:32 +0000 (12:20 +0100)]
* README: Point to the Info manual.

14 years ago * fs/nilfs2.c: fix macro NILFS_2ND_SUPER_BLOCK to calculate
Jiro SEKIBA [Tue, 13 Jul 2010 09:47:30 +0000 (11:47 +0200)]
* fs/nilfs2.c: fix macro NILFS_2ND_SUPER_BLOCK to calculate
2nd superblock position from partition size.

14 years agomerge with mainline
BVK Chaitanya [Mon, 12 Jul 2010 11:33:01 +0000 (17:03 +0530)]
merge with mainline

14 years agomerge with mainline
BVK Chaitanya [Mon, 12 Jul 2010 11:08:19 +0000 (16:38 +0530)]
merge with mainline

14 years agomerge with mainline
BVK Chaitanya [Sun, 11 Jul 2010 16:10:25 +0000 (21:40 +0530)]
merge with mainline

14 years agomerge with mainline
BVK Chaitanya [Sun, 11 Jul 2010 15:50:26 +0000 (21:20 +0530)]
merge with mainline

14 years agomerge with mainline
BVK Chaitanya [Sun, 11 Jul 2010 15:44:18 +0000 (21:14 +0530)]
merge with mainline