Commit graph

2003 commits

Author SHA1 Message Date
Colin Watson
5c23bb0f52 2010-10-05 Jordan Uggla <jordan.uggla@gmail.com>
2010-10-05  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub.d/00_header.in: Define a "savedefault" function for use
	in menu entries.
	* util/grub-mkconfig_lib.in (save_default_entry): Use it.
2010-01-05 10:41:51 +00:00
Colin Watson
fcab4f04e5 missing backslash 2010-01-05 10:39:30 +00:00
Colin Watson
b445cfaa4d 2010-10-05 Jordan Uggla <jordan.uggla@gmail.com>
2010-10-05  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub-mkconfig_lib.in (save_default_entry): Only set
	saved_entry if boot_once is unset.
	* util/grub.d/00_header.in: Set boot_once to "true" if there was a
	previous saved entry (i.e. grub-reboot).
2010-01-05 10:30:14 +00:00
Colin Watson
6c1f8c1215 2009-12-08 Colin Watson <cjwatson@ubuntu.com>
* util/grub.d/30_os-prober.in: Call save_default_entry for hurd.
2009-12-08 01:02:08 +00:00
Colin Watson
b967a04d5b 2009-12-08 Colin Watson <cjwatson@ubuntu.com>
* util/grub.d/00_header.in: Use `set var=val' rather than plain
	`var=val'.
	* util/grub-mkconfig_lib.in (save_default_entry): Likewise.
2009-12-08 01:01:21 +00:00
Colin Watson
47075ea3c7 2009-12-08 Colin Watson <cjwatson@ubuntu.com>
* util/grub-reboot.in: Fix --version output.
	* util/grub-set-default.in: Likewise.
2009-12-08 01:00:26 +00:00
Colin Watson
42356b4d5e 2009-12-08 Colin Watson <cjwatson@ubuntu.com>
* util/grub.d/00_header.in: Silently ignore zero-sized environment
	blocks.
2009-12-08 00:59:26 +00:00
Colin Watson
36cd6dd151 2009-12-08 Colin Watson <cjwatson@ubuntu.com>
* util/grub.d/00_header.in: Quote the value assigned to `default',
	in case it contains spaces.
2009-12-08 00:57:46 +00:00
Colin Watson
b824145a8f 2009-12-08 Colin Watson <cjwatson@ubuntu.com>
* util/grub.d/30_os-prober.in: Fix merge error that moved a
	`save_default_entry' call from the macosx case to the linux case.
2009-12-08 00:56:39 +00:00
Colin Watson
e8b2988803 merge from trunk 2009-12-08 00:55:17 +00:00
Carles Pina i Estany
e3069ec1a5 2009-12-08 Carles Pina i Estany <carles@pina.cat>
* include/grub/misc.h (grub_printf_): New declaration.
	* kern/misc.c (grub_printf_): New definition.
	* normal/main.c (grub_normal_reader_init): Use `grub_printf_' and `N_'
	instead of `grub_printf' and `_'.
	* normal/menu_entry.c (store_completion): Likewise.
	(run): Likewise.
	(grub_menu_entry_run): Likewise.
	* normal/menu_text.c (grub_wait_after_message): Likewise.
	(notify_booting): Likewise.
	(notify_fallback): Likewise.
	(notify_execution_failure): Likewise.
2009-12-08 00:08:52 +00:00
Colin Watson
d6ceebf1d9 2009-12-07 Colin Watson <cjwatson@ubuntu.com>
* configure.ac: Check for vasprintf.
	* util/misc.c (asprintf): Move allocation from here ...
	(vasprintf): ... to here.  New function.
	(xasprintf): New function.
	* include/grub/util/misc.h (vasprintf, xasprintf): Add
	prototypes.
	* util/getroot.c (grub_util_get_grub_dev): Use xasprintf.
	* util/grub-mkfont.c (write_font): Likewise.
	* util/grub-probe.c (probe): Likewise.
	* util/hostdisk.c (make_device_name): Likewise.
2009-12-07 16:46:24 +00:00
David S. Miller
de6daa8b56 2009-12-06 David S. Miller <davem@sunset.davemloft.net>
* disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Recognize
	anything even prefixed with 'cdrom' as a cdrom.
2009-12-07 11:54:25 +01:00
Felix Zielcke
df91e67900 2009-12-06 Felix Zielcke <fzielcke@z-51.de>
* util/misc.c (make_system_path_relative_to_its_root): Correctly cope with
	mount points.
2009-12-06 10:20:01 +01:00
Carles Pina i Estany
98d3dc02fe 2009-12-05 Carles Pina i Estany <carles@pina.cat>
* gettext/gettext.c: Include `<grub/list.h>'. Define grub_gettext_msg,
	grub_gettext_msg_list.
	(grub_gettext_gettranslation_from_position): Return const char *
	and not char *.
	(grub_gettext_translate): Add the translated strings into a list, 
	returns from the list if existing there.
	(grub_gettext_init_ext): Add \n at the end of grub_dprintf string.
	(grub_gettext_delete_list): Delete the list.
	(grub_gettext_env_write_lang): Call grub_gettext_delete_list when
	lang environment variable is changed.
	(GRUB_MOD_FINI): Call grub_gettext_delete_list.
2009-12-05 19:03:27 +00:00
Vladimir 'phcoder' Serbinenko
b283f10857 2009-12-05 Vladimir Serbinenko <phcoder@gmail.com>
Rename kernel.mod to kernel.img.

	* conf/i386-efi.rmk (pkglib_MODULES): Change kernel.mod to kernel.img.
	(kernel_mod_EXPORTS): Rename to ...
	(kernel_img_EXPORTS): ... this.
	(kernel_mod_SOURCES): Rename to ...
	(kernel_img_SOURCES): ... this.
	(kernel_mod_HEADERS): Rename to ...
	(kernel_img_HEADERS): ... this. All users updated.
	(kernel_mod_CFLAGS): Rename to ...
	(kernel_img_CFLAGS): ... this.
	(kernel_mod_ASFLAGS): Rename to ...
	(kernel_img_ASFLAGS): ... this.
	(kernel_mod_LDFLAGS): Rename to ...
	(kernel_img_LDFLAGS): ... this.
	* conf/x86_64-efi.rmk: Likewise.
	* util/i386/efi/grub-mkimage.c (read_kernel_module): Rename to ...
	(read_kernel_image): ... this. All users updated.
	(read_kernel_image): Read "kernel.img" instead of "kernel.mod".
2009-12-05 17:10:36 +01:00
Carles Pina i Estany
69055f8a2f 2009-12-05 Carles Pina i Estany <carles@pina.cat>
* normal/menu_text.c (grub_color_menu_high): Gettexttize string.
	(print_spaces): New function.
	(grub_print_ucs4): New function.
	(getstringwidth): New function.
	(print_message_indented): New function.
	(print_message): Gettexttize strings using print_message_indented.
	(run_menu): Replaces grub_printf by print_spaces and dynamic terminal
	width.
	(get_entry_number): Gettextize and uses dynamic terminal width.
	(notify_booting, notify_fallback, notify_execution_failure): 
	Gettextize.
	* normal/menu_entry.c (store_completion): Cleanup the gettextized
	string.
	(run): Likewise.
	(grub_menu_entry_run): Likewise.
	* PO/POTFILES: Add normal/menu_entry.c.
2009-12-05 11:25:07 +00:00
Vladimir 'phcoder' Serbinenko
f616f51c3c 2009-12-05 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac (TARGET_ASFLAGS): Add "-D<MACHINE>".
2009-12-05 11:08:26 +01:00
Carles Pina i Estany
57bbe3beb1 2009-12-05 Carles Pina i Estany <carles@pina.cat>
* util/grub-install.in: Install gettext .mo files.
	* util/grub-mkrescue.in (process_input_dir): Copy gettext .mo files.
2009-12-05 09:31:36 +00:00
Carles Pina i Estany
013d67a149 2009-12-05 Carles Pina i Estany <carles@pina.cat>
* gettext/gettext.c (grub_gettext_init_ext): Replace grub_printf with
	grub_dprintf.
2009-12-05 09:25:46 +00:00
Robert Millan
fb954db0d5 2009-12-05 Robert Millan <rmh.grub@aybabtu.com>
* kern/ieee1275/openfw.c (grub_reboot): Disable for i386.  The         
        non-firmware-dependant one in realmode.S takes precedence.
2009-12-05 01:43:17 +00:00
Robert Millan
6b8474f8e8 2009-12-04 Robert Millan <rmh.grub@aybabtu.com>
* commands/halt.c: Replace misc arch-specific headers with
        `<grub/misc.h>'.
        * commands/reboot.c: Likewise.
        * commands/i386/pc/halt.c: Replace `<grub/machine/init.h>' with
        `<grub/misc.h>'.
        * conf/i386-coreboot.rmk (kernel_img_HEADERS): Remove `cpu/reboot.h'.
        (halt_mod_SOURCES): Move `kern/i386/halt.c' from here ...
        (kernel_img_SOURCES): ... to here.

        * include/grub/efi/efi.h (grub_reboot, grub_halt): Remove prototypes.
        * include/grub/i386/pc/init.h: Likewise.
        * include/grub/powerpc/ieee1275/kernel.h: Likewise.
        * include/grub/sparc64/ieee1275/kernel.h: Likewise.

        * include/grub/misc.h (grub_reboot, grub_halt): New prototypes.

        * include/grub/i386/halt.h: Remove.
        * include/grub/i386/reboot.h: Likewise.

        * kern/i386/halt.c: Remove `<grub/cpu/halt.h>'.
2009-12-03 23:07:29 +00:00
David S. Miller
4b2e6ca2b6 2009-12-03 David S. Miller <davem@sunset.davemloft.net>
* conf/sparc64-ieee1275.rmk (grub_mkimage_SOURCES,
	grub_setup_SOURCES, grub_ofpathname_SOURCES): Add gnulib/progname.c
	* util/sparc64/ieee1275/grub-mkimage.c: Include <grub/i18n.h> and
	"progname.h"
	* util/sparc64/ieee1275/grub-ofpathname.c: Likewise.
	* util/sparc64/ieee1275/grub-setup.c: Likewise.
	(usage): Add missing comma in printf.
2009-12-03 12:18:56 +01:00
Robert Millan
5239348f18 2009-12-02 Robert Millan <rmh.grub@aybabtu.com>
Use the same reboot approach on i386 coreboot and qemu as we do on
        BIOS.

        * conf/i386-coreboot.rmk (kernel_img_HEADERS): Add `cpu/reboot.h'.
        (reboot_mod_SOURCES): Remove `kern/i386/reboot.c'.
        * kern/i386/reboot.c: Remove.
        * include/grub/i386/reboot.h (grub_reboot): Export function.
        * kern/i386/pc/startup.S (grub_reboot): Move from here ...
        * kern/i386/realmode.S (grub_reboot): ... to here.  Jump to
        0xf000:0xfff0 instead of 0xffff:0x0000.
        [!GRUB_MACHINE_PCBIOS] (prot_to_real): Do not restore interrupts.
        * kern/i386/qemu/startup.S: Include `"../realmode.S"'.
2009-12-02 22:48:02 +00:00
Vladimir 'phcoder' Serbinenko
c8dea671ff 2009-12-02 Vladimir Serbinenko <phcoder@gmail.com>
Rename kernel.mod to kernel.img.

	* conf/i386-efi.rmk (pkglib_MODULES): Change kernel.mod to kernel.img.
	(kernel_mod_EXPORTS): Rename to ...
	(kernel_img_EXPORTS): ... this.
	(kernel_mod_SOURCES): Rename to ...
	(kernel_img_SOURCES): ... this.
	(kernel_mod_HEADERS): Rename to ...
	(kernel_img_HEADERS): ... this. All users updated.
	(kernel_mod_CFLAGS): Rename to ...
	(kernel_img_CFLAGS): ... this.
	(kernel_mod_ASFLAGS): Rename to ...
	(kernel_img_ASFLAGS): ... this.
	(kernel_mod_LDFLAGS): Rename to ...
	(kernel_img_LDFLAGS): ... this.
	* conf/x86_64-efi.rmk: Likewise.
	* util/i386/efi/grub-mkimage.c (read_kernel_module): Rename to ...
	(read_kernel_image): ... this. All users updated.
	(read_kernel_image): Read "kernel.img" instead of "kernel.mod".
2009-12-02 17:13:45 +01:00
Robert Millan
ef34cbd4fa 2009-11-30 Robert Millan <rmh.grub@aybabtu.com>
Fix $srcdir != $objdir build.

        * Makefile.in (po/%.po):  Rewrite as ...
        ($(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po)): ... this.
2009-11-30 01:25:57 +00:00
Samuel Thibault
dc9837ea5f 2009-11-29 Samuel Thibault <samuel.thibault@ens-lyon.org>
Fix GNU/Hurd grub-install crash.
	* util/grub-probe.c (probe): Try to access `path' only when it is not
	NULL.
2009-11-29 12:40:32 +01:00
Vladimir 'phcoder' Serbinenko
2f857f9813 2009-11-28 Vladimir Serbinenko <phcoder@gmail.com>
Correct module naming.

	* video/efi_uga.c (GRUB_MOD_INIT(efi_fb)): Renamed from this ...
	(GRUB_MOD_INIT(efi_uga)): ... to this
	(GRUB_MOD_FINI(efi_fb)): Renamed from this ...
	(GRUB_MOD_FINI(efi_uga)): ... to this
	* video/efi_gop.c (GRUB_MOD_INIT(efi_fb)): Renamed from this ...
	(GRUB_MOD_INIT(efi_gop)): ... to this
	(GRUB_MOD_FINI(efi_fb)): Renamed from this ...
	(GRUB_MOD_FINI(efi_gop)): ... to this
2009-11-28 20:40:44 +01:00
Robert Millan
c5448046d3 2009-11-28 Robert Millan <rmh.grub@aybabtu.com>
* util/mkisofs/mkisofs.c (ld_options): Mark all `arg' strings as
        translatable.
        (usage): Translate `arg' strings using gettext().
        Thanks to Jordi Mallach for the suggestion.
2009-11-28 19:31:30 +00:00
Vladimir 'phcoder' Serbinenko
f704cae368 Fix declarations of previous commit 2009-11-28 00:46:09 +01:00
Vladimir 'phcoder' Serbinenko
c85184ad3d 2009-11-28 Vladimir Serbinenko <phcoder@gmail.com>
GOP support. Based on patch from Bean
	(http://lists.gnu.org/archive/html/grub-devel/2009-08/msg00384.html)

	* video/efi_gop.c: New file.
	* include/grub/efi/graphics_output.h: Likewise.
	* conf/i386-efi.rmk (pkglib_MODULES): Add `efi_gop.mod'.
	(efi_fb_mod_SOURCES, efi_fb_mod_CFLAGS, efi_fb_mod_LDFLAGS): New
	variables.
	* conf/x86_64-efi.rmk: Likewise.
2009-11-28 00:24:57 +01:00
Vladimir 'phcoder' Serbinenko
1708050b6f GOP support
Also-By: Bean Lee <>
2009-11-28 00:15:04 +01:00
Vladimir 'phcoder' Serbinenko
8a4c48d86f 2009-11-28 Vladimir Serbinenko <phcoder@gmail.com>
Rename efi_fb to efi_uga.

	* conf/i386-efi.rmk (pkglib_MODULES): Rename 'efi_fb.mod' to
	'efi_uga.mod'.
	(efi_fb_mod_SOURCES): Rename this ...
	(efi_uga_mod_SOURCES): ... to this.
	(efi_fb_mod_CFLAGS): Rename this ...
	(efi_uga_mod_CFLAGS): ... to this.
	(efi_fb_mod_LDFLAGS): Rename this ...
	(efi_uga_mod_LDFLAGS): ... to this.
	* conf/x86_64-efi.rmk (pkglib_MODULES): Rename 'efi_fb.mod' to
	'efi_uga.mod'.
	(efi_fb_mod_SOURCES): Rename this ...
	(efi_uga_mod_SOURCES): ... to this.
	(efi_fb_mod_CFLAGS): Rename this ...
	(efi_uga_mod_CFLAGS): ... to this.
	(efi_fb_mod_LDFLAGS): Rename this ...
	(efi_uga_mod_LDFLAGS): ... to this.
	* video/efi_fb.c: Move this ...
	* video/efi_uga.c: ... to this. Change prefix to 'grub_video_uga_'.
2009-11-28 00:13:51 +01:00
Vladimir 'phcoder' Serbinenko
b1309dae1a finish renaiming efi_Fb to efi_uga 2009-11-27 23:48:20 +01:00
Robert Millan
fb6c1a7b25 2009-11-27 Robert Millan <rmh.grub@aybabtu.com>
* po/README: New file.  Explain our PO file workflow.
2009-11-27 17:33:35 +00:00
Robert Millan
3bc7896c1a 2009-11-27 Robert Millan <rmh.grub@aybabtu.com>
* po/ChangeLog: Remove.  Move relevant entries back to ...
        * ChangeLog: ... here.
        * po/ca.po: Remove (now handled by TLP).
        * po/id.po: Likewise.
        * po/zh_CN.po: Likewise.
        * Makefile.in (LINGUAS): Initialize in a way that supports
        empty set.
2009-11-27 17:11:38 +00:00
Robert Millan
9ed4841d7a 2009-11-27 Robert Millan <rmh.grub@aybabtu.com>
* Makefile.in (LINGUAS): Rewrite by scanning po/ directory instead of
        reliing on po/LINGUAS.
        ($(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po)): Rewrite as ...
        (po/%.po): ... this.
2009-11-27 16:46:00 +00:00
Vladimir 'phcoder' Serbinenko
dc63338117 Rename efi_fb to efi_uga 2009-11-27 16:33:22 +01:00
Felix Zielcke
242668a26a 2009-11-26 Felix Zielcke <fzielcke@z-51.de>
* util/i386/efi/grub-mkimage.c: Include "progname.h".
	(main): Use `program_name' instead of nonexistent `progname'.
2009-11-26 17:15:16 +01:00
Felix Zielcke
e30dd39296 2009-11-26 Felix Zielcke <fzielcke@z-51.de>
* conf/i386-efi.rmk (grub_mkimage_SOURCES): Add `gnulib/progname.c'.
	* conf/x86_64-efi.rmk (grub_mkimage_SOURCES): Likewise.
2009-11-26 16:29:06 +01:00
Robert Millan
7656de4f5b 2009-11-26 Robert Millan <rmh.grub@aybabtu.com>
* conf/i386-coreboot.rmk: Cleanup stale filenames from my previous
        commit.
        * conf/i386-efi.rmk: Likewise.
        * conf/i386-ieee1275.rmk: Likewise.
        * conf/powerpc-ieee1275.rmk: Likewise.
        * conf/sparc64-ieee1275.rmk: Likewise.
        * conf/x86_64-efi.rmk: Likewise.
2009-11-26 00:45:53 +00:00
Felix Zielcke
db77c4d43c 2009-11-26 Felix Zielcke <fzielcke@z-51.de>
* conf/any-emu.rmk (grub_emu_SOURCES): Add `gnulib/progname.c'.
2009-11-26 01:08:42 +01:00
Felix Zielcke
a755bb0437 2009-11-26 Felix Zielcke <fzielcke@z-51.de>
* conf/any-emu.rmk (grub_mkfont_SOURCES): Add `gnulib/progname.c'.
2009-11-26 00:52:55 +01:00
Robert Millan
8a4c07fd6a 2009-11-26 Robert Millan <rmh.grub@aybabtu.com>
* conf/common.rmk (sbin_UTILITIES): Add `grub-mkdevicemap'.
        (grub_mkdevicemap_SOURCES): New variable.
        (grub_probe_SOURCES, grub_fstest_SOURCES, grub_mkfont_SOURCES)
        (grub_mkrelpath_SOURCES, grub_editenv_SOURCES)
        (grub_pe2elf_SOURCES): Add `gnulib/progname.c'.
        * conf/i386-coreboot.rmk (sbin_UTILITIES): Remove `grub-mkdevicemap'.
        (grub_mkdevicemap_SOURCES): Remove.
        * conf/i386-efi.rmk: Likewise.
        * conf/i386-ieee1275.rmk: Likewise.
        * conf/i386-pc.rmk: Likewise.
        * conf/powerpc-ieee1275.rmk: Likewise.
        * conf/sparc64-ieee1275.rmk: Likewise.
        * conf/x86_64-efi.rmk: Likewise.
        * util/elf/grub-mkimage.c: Include `<grub/i18n.h>' and `"progname.h"'.
        (usage): Fix strings to use `program_name'.
        (main): Initialize gettext.
        * util/grub-editenv.c: Likewise.
        * util/grub-emu.c: Likewise.
        * util/grub-fstest.c: Likewise.
        * util/grub-mkdevicemap.c: Likewise.
        * util/grub-mkfont.c: Likewise.
        * util/grub-mkrelpath.c: Likewise.
        * util/grub-pe2elf.c: Likewise.
        * util/grub-probe.c: Likewise.
        * util/sparc64/ieee1275/grub-mkimage.c: Likewise.
        * util/sparc64/ieee1275/grub-ofpathname.c: Likewise.
        * util/sparc64/ieee1275/grub-setup.c: Likewise.

        * util/misc.c: Include `"progname.h"'.
        (progname): Remove variable.
        (grub_util_warn, grub_util_info, grub_util_error): Use `program_name'.
2009-11-25 23:10:02 +00:00
Felix Zielcke
6f61ed5513 2009-11-25 Felix Zielcke <fzielcke@z-51.de>
* util/grub.d/10_linux.in (linux_entry): Quote the arguments to
	printf and print a newline after the menuentry header line.
	* util/grub.d/10_kfreebsd.in (kfreebsd_entry): Likewise.
2009-11-25 19:13:35 +01:00
Felix Zielcke
f022876b03 2009-11-25 Felix Zielcke <fzielcke@z-51.de>
autoconf >= 2.60 support $(localedir).

	* INSTALL: Note that autoconf 2.60 is required.
	* configure.ac (AC_PREREQ): Bump to 2.60.
	* util/grub.d/10_kfreebsd.in (TEXTDOMAINDIR): Set to lowercased @localedir@.
	* util/grub.d/10_linux.in (TEXTDOMAINDIR): Likewise.
2009-11-25 18:37:04 +01:00
Yves Blusseau
6717926e6e 2009-11-25 Yves Blusseau <yves.blusseau@zetam.org>
* configure.ac: move the call to AM_GNU_GETTEXT to avoid warnings when
    aclocal is run.
2009-11-25 12:23:16 +01:00
Robert Millan
08806a54c5 2009-11-25 Robert Millan <rmh.grub@aybabtu.com>
* normal/main.c (grub_normal_read_line): Fix off-by-one
        buffer overflow..
2009-11-25 03:48:33 +00:00
Robert Millan
13b33fba6f 2009-11-25 Robert Millan <rmh.grub@aybabtu.com>
* normal/main.c (grub_normal_execute): Replace "parser.sh" with
        "parser.grub" in grub_command_execute() call.
2009-11-25 01:50:33 +00:00
Carles Pina i Estany
4a8572e9d8 2009-11-24 Carles Pina i Estany <carles@pina.cat>
* conf/i386-coreboot.rmk (kernel_img_HEADERS): Add i18n.h.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.
	* gettext/gettex.c: Include <grub/i18n.h>.
	* include/grub/misc.h (grub_gettext_dummy, grub_gettext): Move from
 	  here ...
	* include/grub/i18n.h: ... to here
	* include/grub/i18n.h: ... to here.
	* kern/misc.c: Include <grub/i18n.h>
	(grub_gettext_dummy): Move above user.
2009-11-24 21:42:14 +00:00