2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
[grub2/phcoder/solaris.git] / ChangeLog
blobf78766a5eec9c7e68d66c0b3de1c275dfabfb261
1 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
3         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
4         indexes.  Check for -f explicitly.
6 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
8         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
9         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
11 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
13         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
14         * conf/i386-ieee1275.rmk: Likewise.
15         * conf/i386-coreboot.rmk: Likewise.
17         * kern/i386/pc/startup.S (grub_stop): Remove function.
18         * kern/i386/ieee1275/startup.S: Likewise.
19         * kern/i386/coreboot/startup.S: Likewise.
20         * kern/i386/misc.S (grub_stop): New function.
22 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
24         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
25         * kern/i386/realmode.S (real_to_prot): ... to here.
27 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
29         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
30         with `kernel.img'.
31         (kernel_elf_SOURCES): Rename to ...
32         (kernel_img_SOURCES): ... this.
33         (kernel_elf_HEADERS): Rename to ...
34         (kernel_img_HEADERS): ... this.  Update all users.
35         (kernel_elf_ASFLAGS): Rename to ...
36         (kernel_img_ASFLAGS): ... this.
37         (kernel_elf_CFLAGS): Rename to ...
38         (kernel_img_CFLAGS): ... this.
39         (kernel_elf_LDFLAGS): Rename to ...
40         (kernel_img_LDFLAGS): ... this.
41         * conf/i386-coreboot.rmk: Likewise.
42         * conf/powerpc-ieee1275.rmk: Likewise.
44         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
45         with "kernel.img".
47 2009-06-21  Pavel Roskin  <proski@gnu.org>
49         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
50         to match nested functions.
51         * loader/sparc64/ieee1275/linux.c: Likewise.
53         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
55 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
57         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
58         all i386 platforms.
60 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
62         Fix asm file handling on ELF, and remove workarounds.
64         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
65         and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
66         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
67         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
69 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
71         Load BSD ELF modules
73         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
74         and loader/i386/bsd64.c
75         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
76         (FREEBSD_MODTYPE_ELF_MODULE): New definition
77         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
78         (grub_freebsd_load_elfmodule32): New declaration
79         (grub_freebsd_load_elfmoduleobj64): Likewise
80         (grub_freebsd_load_elf_meta32): Likewise
81         (grub_freebsd_load_elf_meta64): Likewise
82         (grub_freebsd_add_meta): Likewise
83         (grub_freebsd_add_meta_module): Likewise
84         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
85         (grub_freebsd_add_meta_module): Likewise and move module-specific
86         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
87         (grub_cmd_freebsd): Add elf-kernel specific parts
88         based on grub_freebsd_add_meta_module
89         (grub_cmd_freebsd_module): Add type parsing moved from
90         grub_freebsd_add_meta_module
91         (grub_cmd_freebsd_module_elf): New function
92         (cmd_freebsd_module_elf): New variable
93         (GRUB_MOD_INIT): Register freebsd_module_elf
94         * loader/i386/bsd32.c: New file
95         * loader/i386/bsd64.c: Likewise
96         * loader/i386/bsdXX.c: Likewise
97         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
98         (grub_elf64_load): Likewise
99         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
100         All users updated
101         (grub_elf64_load_hook_t): Likewise
103 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
105         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
106         variable.
107         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
108         don't write a menu entry for recovery mode.
110 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
112         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
113         after it's no longer needed.
115 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
117         * include/grub/i386/loader.h (grub_linux_prot_size)
118         (grub_linux_tmp_addr, grub_linux_real_addr)
119         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
120         GRUB_MACHINE_PCBIOS.
121         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
122         common grub_util_info() call to ...
123         (generate_image): ... here.
124         Fix use of uninitialized memory, comparison of signed with
125         unsigned integers and memory leak.
126         Remove bogus module address message.
128 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
130         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
131         grub_raid_register
132         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
134 2009-06-19  Pavel Roskin  <proski@gnu.org>
136         * configure.ac: Remove stray AC_MSG_CHECKING.
138 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
140         * disk/scsi.c (grub_scsi_open): use continue instead of big if
142 2009-06-18  Pavel Roskin  <proski@gnu.org>
144         * conf/common.rmk: Add fs_file.mod.
145         * disk/fs_file.c: New file.
146         * include/grub/disk.h (enum grub_disk_dev_id): Add
147         GRUB_DISK_DEVICE_FILE_ID.
149 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
151         Fix build with Apple's toolchain. Part 2
153         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
154         a fake start
156 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
158         Fix build with Apple's toolchain. Part 1
160         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
161         for long calls
162         * configure.ac: remove a leftover AC_MSG_RESULT
163         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
164         Apple's toolchain
166 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
168         Fix warnings
170         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
171         (decomp_block): initialize ch
172         use grub_memcpy instead of memcpy
174 2009-06-17  Pavel Roskin  <proski@gnu.org>
176         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
177         version, use declarations needed to use vga_text as the startup
178         console.
180         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
181         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
182         the kernel.
183         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
184         and grub_at_keyboard_fini(), it's done on module load and
185         unload.
187 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
189         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
190         file can't be found.
191         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
193 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
195         Fix newline handling
197         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
198         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
199         (grub_script_yylex): don't segfault on unterminated script
200         newline terminates command and variable
202 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
204         avoid double grub_adjust_range call. Bug reported by David Simner
206         * kern/disk.c (grub_disk_write): change to raw disk access before
207         calling disk_read
209 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
211         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
212         spaces, for the benefit of help2man.
213         * util/i386/efi/grub-mkimage.c (usage): Likewise.
215 2009-06-16  Pavel Roskin  <proski@gnu.org>
217         * kern/i386/halt.c: Include grub/machine/init.h.
218         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
220 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
222         * util/grub.d/30_os-prober.in: Use ${root} in the generated
223         drivemap menuentry.
225 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
227         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
228         `echo' command.
230 2009-06-16  Pavel Roskin  <proski@gnu.org>
232         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
233         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
234         save %dx, we only need %dl and we never change it.
235         * boot/i386/pc/cdboot.S: Don't set the root drive.
236         * boot/i386/pc/pxeboot.S: Likewise.
237         * include/grub/i386/pc/boot.h: Remove
238         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
239         GRUB_BOOT_MACHINE_DRIVE_CHECK.
240         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
241         * kern/i386/pc/init.c (make_install_device): Remove references
242         to grub_root_drive.
243         * kern/i386/pc/startup.S: Likewise.
244         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
246 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
248         xnu_uuid command
250         * commands/xnu_uuid.c: new file
251         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
252         (xnu_uuid_mod_SOURCES): new variable
253         (xnu_uuid_mod_CFLAGS): likewise
254         (xnu_uuid_mod_LDFLAGS): likewise
255         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
256         * conf/i386-ieee1275.rmk: likewise
257         * conf/i386-pc.rmk: likewise
258         * conf/powerpc-ieee1275.rmk: likewise
259         * conf/sparc64-ieee1275.rmk: likewise
260         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
262 2009-06-16  Pavel Roskin  <proski@gnu.org>
264         * configure.ac: Avoid '==' in test command, it's not portable.
266 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
268         Probe command
270         * commands/probe.c: new file
271         * conf/common.rmk (pkglib_MODULES): add probe.mod
272         (probe_mod_SOURCES): new variable
273         (probe_mod_CFLAGS): likewise
274         (probe_mod_LDFLAGS): likewise
275         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
276         * conf/i386-ieee1275.rmk: likewise
277         * conf/i386-pc.rmk: likewise
278         * conf/powerpc-ieee1275.rmk: likewise
279         * conf/sparc64-ieee1275.rmk: likewise
281 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
283         Fix handling of string like \"hello\" and "a
284         b"
286         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
287         (grub_script_yylex): fix parsing of quoting, escaping and newline
289 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
291         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
292         handling
294 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
296         * util/grub-mkconfig.in: Fix parsing of --output option.
298 2009-06-12  Pavel Roskin  <proski@gnu.org>
300         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
301         genmk.rb don't need to be generated or installed.
303 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
305         * commands/i386/pc/drivemap_int13h.S: add more comments
307 2009-06-11  Pavel Roskin  <proski@gnu.org>
309         * Makefile.in (uninstall): Uninstall manuals.
311         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
312         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
313         and update-grub_lib in two places.
314         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
316         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
317         a compiler warning.
319         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
320         `entry_lo' to fix variable shadowing.
322 2009-06-11  Christian Franke  <franke@computer.org>
324         * kern/misc.c (__enable_execute_stack): Add missing return type
325         to prevent gcc warning.
327 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
329         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
331 2009-06-11  Pavel Roskin  <proski@gnu.org>
333         * Makefile.in: Don't rely on any scripts being executable.
334         Always use $(SHELL) to run shell scripts.
336         * configure.ac: Always define ___main if using -nostdlib.  This
337         fixes tests on Cygwin.
339 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
341         UDF fix
343         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
344         is in bytes and not in blocks
346 2009-06-11  Pavel Roskin  <proski@gnu.org>
348         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
349         warning.
351 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
353         * util/grub.d/30_os-prober.in: Fix a comment. Source
354         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
355         to set the root device.  Place drivemap command in the generated
356         chain entry.
358 2009-06-11  Pavel Roskin  <proski@gnu.org>
360         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
361         have long been resolved.
363 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
365         * util/grub.d/10_linux.in: Capitalise "Linux".
367         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
369 2009-06-11  Pavel Roskin  <proski@gnu.org>
371         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
372         fix a gcc warning and ensure that the function won't ever exit.
374         * kern/i386/ieee1275/init.c: Add missing prototype for
375         grub_stop_floppy().
377         * loader/ieee1275/multiboot2.c [__i386__]: Include
378         grub/cpu/multiboot.h.
380         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
381         casts to short - they are not portable and cause warnings.  Fix
382         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
384 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
386         Drivemap fixes
388         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
389         new function
390         (grub_get_root_biosnumber_saved): new variable
391         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
392         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
393         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
394         %dx after the call if necessary
395         * conf/common.rmk (pkglib_MODULES): remove boot.mod
396         (boot_mod_SOURCES): remove
397         (boot_mod_CFLAGS): remove
398         (boot_mod_LDFLAGS): remove
399         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
400         (boot_mod_SOURCES): new variable
401         (boot_mod_CFLAGS): likewise
402         (boot_mod_LDFLAGS): likewise
403         * conf/i386-efi.rmk: likewise
404         * conf/i386-ieee1275.rmk: likewise
405         * conf/i386-pc.rmk: likewise
406         * conf/powerpc-ieee1275.rmk: likewise
407         * conf/sparc64-ieee1275.rmk: likewise
408         * conf/x86_64-efi.rmk: likewise
409         * include/grub/i386/pc/biosnum.h: new file
410         * lib/i386/pc/biosnum.c: likewise
411         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
412         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
413         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
415 2009-06-10  Pavel Roskin  <proski@gnu.org>
417         * io/gzio.c (test_header): Don't reuse one buffer for all data.
418         Use separate variables.  Read only the file size at the end, but
419         not the checksum that we don't use.
421         * kern/file.c (grub_file_read): Use void pointer for the buffer.
422         Adjust all callers.
424         * kern/ieee1275/openfw.c: Remove libc includes.
425         * kern/ieee1275/cmain.c: Likewise.
426         * include/grub/ieee1275/ieee1275.h: Likewise.
428         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
429         compiler warnings.
431 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
433         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
434         `genparttoollist.sh'.
435         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
436         Add `*.sh' to the list find searches for and change `mdate.sh'
437         to `mdate-sh'.
439 2009-06-10  Pavel Roskin  <proski@gnu.org>
441         * include/grub/multiboot2.h: Provide compatibility defines for
442         multiboot2.h.
443         * include/multiboot2.h: Include stdint.h only if needed, using
444         angle brackets.
445         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
446         grub/multiboot2.h.
447         * loader/ieee1275/multiboot2.c: Likewise.
448         * loader/multiboot2.c: Likewise.
449         * loader/multiboot_loader.c: Likewise.
451         * configure.ac: Use -nostdlib when probing for the target.  It
452         should not be required to have libc for the target.
454         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
455         they fail without libc headers for the target.
456         * include/grub/powerpc/libgcc.h: Use weak attribute for all
457         exports.
458         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
459         preprocessor conditionals.
461         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
462         build system doesn't need to be aware of the tar.c internals.
464 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
466         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
468 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
470         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
471         disk limit to 26 for IDE, Virtio, Xen and SCSI.
473 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
475         * util/i386/pc/grub-install.in: Change the error message if UUIDs
476         aren't available if ata.mod gets used.
478 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
480         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
481         initialising controller.
482         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
484 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
486         * util/i386/pc/grub-install.in: Add a parameter --disk-module
487         to choose between ata and biosdisk module on i386-pc.
489 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
491         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
492         Subclass and Programming Interface fields in terms of the 3 byte
493         Class Code register.
494         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
496         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
497         interface is OHCI.  Add grub_dprintf for symmetry with
498         bus/usb/uhci.c.
499         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
500         interface is UHCI.  Add interf variable for programming
501         interface.  Print interface with class/subclass.
503         * bus/usb/ohci.c: Set interf with correct field.
505         * bus/usb/uhci.c: Remove unneeded doubled lines.
506         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
507         Remove whitespace inside comment.
509 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
511         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
512         as fallback an equivalent option without depth.
514 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
516         Not fail if unable to retrieve C/H/S on LBA disks
518         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
519         if unable to retrieve C/H/S on LBA disks
521 2009-06-08  Pavel Roskin  <proski@gnu.org>
523         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
524         about aliasing.
526 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
528         * Makefile.in (uninstall): Remove all $lib_DATA files.
530 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
532         Bugfix: install on partitionless device
534         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
535         is a whole disk
537 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
539         * Makefile.in (uninstall): Remove all $include_DATA files.
541 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
543         * commands/true.c: New file.  Implement the true and false commands.
544         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
545         (true_mod_SOURCES): New variable.
546         (true_mod_CFLAGS): Likewise.
547         (true_mod_LDFLAGS): Likewise.
549 2009-06-05  Colin D Bennett  <colin@gibibit.com>
551         Optimized font character lookup using binary search instead of linear
552         search.  Fonts now are required to have the character index ordered by
553         code point.
555         * font/font.c (load_font_index): Verify that fonts have ordered
556         character indices.
557         (find_glyph): Use binary search instead of linear search to find a
558         character in a font.
560 2009-06-05  Michael Scherer  <misc@mandriva.org>
562         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
563         uses case sensitive btree.
564         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
565         only for case insensitive filesystems.
567 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
569         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
570         * conf/common.rmk (search_mod_CFLAGS): likewise
572 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
574         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
575         compensate a compiler bug
577 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
579         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
580         instead of '\b'
582 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
584         Definitions for creating asm symbols with Apple's CC
586         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
587         [APPLE_CC] (VARIABLE): likewise
589 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
591         Disable lnxboot.img when compiled
592         with Apple's CC
594         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
595         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
596         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
597         [! APPLE_CC] (CODE_LENG): skip
598         [! APPLE_CC] (setup_sects): likewise
599         [! APPLE_CC]: skip filling
601 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
603         Address in trampolines based on 32-bit registers when compiled
604         with Apple's CC
606         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
607         for addresses
608         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
610 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
612         Avoid aliases when compiling with Apple's CC for PCBIOS machine
614         * kern/misc.c [APPLE_CC] (memcpy): new function
615         [APPLE_CC] (memmove): likewise
616         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
617         (memcpy): define alias conditionally on !APPLE_CC
618         (memset): likewise
619         (abort): likewise
620         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
621         APPLE_CC are defined
622         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
623         (grub_assert_fail): make prototype conditional
625 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
627         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
629         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
630         grub-macho2img
631         (CLEANFILES): add grub-macho2img
632         (grub_macho2img_SOURCES): new variable
633         * kern/i386/pc/startup.S (bss_start): new variable
634         (bss_end): likewise
635         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
636         * util/grub-macho2img.c: new file
638 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
640         Use objconv when compiling with Apple's CC
642         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
643         (efiemu64.o): likewise
644         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
645         when compiling with Apple's CC
646         (efiemu64_s.o): likewise
647         * configure.ac: check for objconv when compiling with Apple's CC
648         * genmk.rb: use objconv for modules when compiled with Apple's CC
650 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
652         Define segment as well as section when compiling with
653         Apple's CC
655         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
656         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
657         (efiemu_convert_pointer): likewise
658         (efiemu_set_virtual_address_map): likewise
659         (efiemu_convert_pointer): likewise
660         (efiemu_getcrc32): likewise
661         (init_crc32_table): likewise
662         (reflect): likewise
663         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
664         (GRUB_MOD_DEP): likewise
666 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
668         Allow a compilation without -mcmodel=large
670         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
671         when compiled without -mcmodel=large
672         (filter_memory_map): remove memory post 4 GiB when compiled
673         without -mcmodel=large
674         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
675         TARGET_CFLAGS when -mcmodel=large isn't supported
677 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
679         Remove nested functions in efiemu core
681         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
683 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
685         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
687         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
688         temporary storage
689         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
690         using Apple's CC
691         (grub_cpu_is_tsc_supported): likewise
692         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
694 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
696         Absolute addressing through constant with Apple's cc
698         * kern/i386/pc/startup.S: Define necessary constants
699         and address through it when using ABS with Apple's CC
700         * boot/i386/pc/diskboot.S: likewise
701         * boot/i386/pc/boot.S: likewise
702         * boot/i386/pc/lnxboot.S: likewise
703         * boot/i386/pc/cdboot.S: likewise
704         * mmap/i386/pc/mmap_helper.S: likewise
705         * commands/i386/pc/drivemap_int13h.S: likewise
707 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
709         Check if compiler is apple cc
711         * Makefile.in (ASFLAGS): new variable
712         (TARGET_ASFLAGS): likewise
713         (TARGET_MODULE_FORMAT): likewise
714         (TARGET_APPLE_CC): likewise
715         (OBJCONV): likewise
716         (TARGET_IMG_CFLAGS): likewise
717         (TARGET_CPPFLAGS): add includedir
718         * configure.ac: call grub_apple_cc and grub_apple_target_cc
719         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
720         Check for linker script only if compiler isn't Apple's CC
721         (TARGET_MODULE_FORMAT): set
722         (TARGET_APPLE_CC): likewise
723         (TARGET_ASFLAGS): likewise
724         (ASFLAGS): likewise
725         Check for objcopy only if compiler isn't Apple's CC
726         Check for BSS symbol only if compiler isn't Apple's CC
727         * genmk.rb: adapt nm options if we use Apple's utils
728         * aclocal.m4 (grub_apple_cc): new test
729         (grub_apple_target_cc): likewise
731 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
733         Simplify sed expressions and improve awk
735         * Makefile.in (install-local): simplify sed expression
736         * gencmdlist.sh: likewise
737         * genmoddep.awk: avoid adding module as a dependency of itself
739 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
741         Add missing start symbols
743         * boot/i386/pc/boot.S: add start
744         * boot/i386/pc/pxeboot.S: likewise
746 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
748         Fix wrong assumptions with grub-mkimage on EFI
750         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
751         (relocate_addresses): consider both r_addend and value at offset
752         (make_mods_section): zerofill modinfo and header
753         (convert_elf): write prefix here
755 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
757         Use .asciz instead of .string
759         * i386/pc/diskboot.S: use .asciz instead of .string
760         * i386/pc/boot.S: likewise
761         * include/grub/dl.h (GRUB_MOD_DEP): likewise
762         (GRUB_MOD_NAME): likewise
764 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
766         gfxpayload support
768         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
769         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
770         (grub_video_setup): remove
771         (grub_video_set_mode): new prototype
772         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
773         (vid_mode): remove
774         (linux_vesafb_res): compile only on PCBIOS
775         (grub_linux_boot): support gfxpayload
776         * loader/i386/pc/xnu.c (video_hook): new function
777         (grub_xnu_set_video): support gfxpayload
778         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
779         (DEFAULT_VIDEO_HEIGHT): likewise
780         (DEFAULT_VIDEO_FLAGS): likewise
781         (DEFAULT_VIDEO_MODE): new definition
782         (video_hook): new function
783         (grub_gfxterm_init): use grub_video_set_mode
784         * util/grub.d/30_os-prober.in: remove explicit modesetting before
785         loading xnu
786         * video/video.c (grub_video_setup): removed
787         (grub_video_set_mode): new function based on grub_gfxterm_init and
788         grub_video_setup
790 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
792         Avoid calling biosdisk in drivemap
794         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
795         (revparse_biosdisk): likewise
796         (list_mappings): derive name from id directly
797         (grub_cmd_drivemap): use tryparse_diskstring
799 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
801         Script fixes
803         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
804         (grub_lexer_param): add tokenonhold
805         (grub_script_create_cmdline): remove cmdline. All callers updated
806         (grub_script_function_create): make functionname
807         grub_script_arg. All callers updated
808         (grub_script_execute_argument_to_string): new prototype
809         * kern/parser.c (state_transitions): reorder
810         (grub_parser_cmdline_state): fix a bug and make more compact
811         * script/sh/execute.c (grub_script_execute_argument_to_string):
812         make global
813         (grub_script_execute_cmdline): use new format
814         * script/sh/function.c (grub_script_function_create): make functionname
815         grub_script_arg. All callers updated
816         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
817         (grub_script_yylex): remove
818         (grub_script_yylex2): renamed to ...
819         (grub_script_yylex): ...renamed
820         parse the expressions like a${b}c
821         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
822         (GRUB_PARSER_TOKEN_VAR): remove
823         (GRUB_PARSER_TOKEN_NAME): likewise
824         ("if"): declare as typeless
825         ("while"): likewise
826         ("function"): likewise
827         ("else"): likewise
828         ("then"): likewise
829         ("fi"): likewise
830         (text): remove
831         (argument): likewise
832         (script): accept empty scripts and make exit on error
833         (arguments): use GRUB_PARSER_TOKEN_ARG
834         (function): likewise
835         (command): move error handling to script
836         (menuentry): move grub_script_lexer_ref before
837         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
838         argument. All callers updated
840 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
842         Prevent GRUB from probing floppies during boot.
844         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
845         * commands/search.c (options): Add --no-floppy.
846         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
847         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
848         --no-floppy when searching for UUIDs.
850 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
852         Simplify the code duplication in commands/search.c.
854         * commands/search.c (search_label, search_fs_uuid): Merge into ...
855         (search_fs): ... this.  Update all users.
857 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
859         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
861 2009-05-28  Pavel Roskin  <proski@gnu.org>
863         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
864         Remove the original symlink explicitly.
866         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
867         just one slash.  That's how grub_fshelp_find_file() does it.
869 2009-05-26  Pavel Roskin  <proski@gnu.org>
871         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
872         to `str'.
874         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
875         possibly unused.
877 2009-05-25  Christian Franke  <franke@computer.org>
879         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
880         register.
881         (grub_atapi_identify): Add wait after drive select.
882         (grub_ata_identify): Do more strict status register check before
883         calling grub_atapi_identify ().  Suppress error message if status
884         register is 0x00 after command failure.  Add status register
885         check after PIO read to avoid bogus identify due to stuck DRQ.
886         Thanks to Pavel Roskin for testing.
887         (grub_device_initialize): Remove unsafe status register check.
888         Thanks to 'phcoder' for problem report and patch.
889         Prevent sign extension in debug message.
891 2009-05-23  Colin D Bennett  <colin@gibibit.com>
893         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
894         definition file, and functions defined in `normal/menu.c' have had
895         their prototypes moved to `include/grub/menu.h' for consistency.
897         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
898         from normal.h.
899         (grub_menu_get_entry): Likewise.
900         (grub_menu_get_timeout): Likewise.
901         (grub_menu_set_timeout): Likewise.
902         (grub_menu_execute_entry): Likewise.
903         (grub_menu_execute_with_fallback): Likewise.
904         (grub_menu_entry_run): Likewise.
906         * include/grub/normal.h: Re-ordered and grouped function
907         prototypes by file that the function is defined in.
908         (grub_menu_execute_callback): Removed; moved to menu.h.
909         (grub_menu_get_entry): Likewise.
910         (grub_menu_get_timeout): Likewise.
911         (grub_menu_set_timeout): Likewise.
912         (grub_menu_execute_entry): Likewise.
913         (grub_menu_execute_with_fallback): Likewise.
914         (grub_menu_entry_run): Likewise.
915         (grub_menu_addentry): Renamed from this ...
916         (grub_normal_add_menu_entry): ... to this.
918         * normal/main.c (grub_menu_addentry): Renamed from this ...
919         (grub_normal_add_menu_entry): ... to this.
921         * script/sh/execute.c (grub_script_execute_menuentry): Update
922         reference to renamed grub_menu_addentry function.
924 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
926         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
928 2009-05-22  Pavel Roskin  <proski@gnu.org>
930         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
931         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
932         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
933         compiling for the i386 targets, but not for the utilities.
935         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
936         to grub_uint8_t.
937         (grub_root_drive): Likewise.
938         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
939         remove alignment.
940         (grub_root_drive): Change size to byte.
941         (grub_start_addr): Remove.
942         (grub_end_addr): Likewise.
943         (grub_apm_bios_info): Likewise.
945 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
947         * normal/i386: Remove.
948         * normal/powerpc: Likewise.
949         * normal/sparc64: Likewise.
950         * normal/x86_64: Likewise.
952 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
954         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
955         * loader/i386/linux_trampoline.S: Fix indentation
956         * loader/i386/xnu_helper.S: Likewise
958 2009-05-18  Colin D Bennett  <colin@gibibit.com>
960         Display error messages when parsing a Lua statement fails.
961         Previously, executing a syntactically invalid statement like
962         ")foo" or "bar;" would silently fail.
964         * script/lua/grub_main.c (handle_lua_error): New function.
965         (grub_lua_parse_line): Improved reporting of Lua parser and
966         execution errors.
968 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
970         Remove -Werror which causes build to fail on some systems
972         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
973         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
974         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
976 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
978         trampoline for linux on 64-bit platform
980         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
981         loader/i386/efi/linux_trampoline.S
982         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
983         declaration
984         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
985         here
986         * loader/i386/linux_trampoline.S: moved here
987         * loader/i386/efi/linux.c (allocate_pages): reserve space for
988         trampoline
989         (jumpvector): removed
990         (grub_linux_trampoline_start): new declaration
991         (grub_linux_trampoline_end): likewise
992         (grub_linux_boot): use trampoline when on 64-bit platform
993         * loader/i386/linux.c: likewise
995 2009-05-16  Pavel Roskin  <proski@gnu.org>
997         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
998         const to avoid a warning.
999         (grub_lua_setenv): Likewise.
1000         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1001         lmsg to fix a warning.
1003 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1005         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1006         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1007         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1008         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1009         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1010         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1011         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1012         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1014 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1016         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1018 2009-05-16  Bean  <bean123ch@gmail.com>
1020         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1021         (lua_mod_SOURCES): New variable.
1022         (lua_mod_CFLAGS): Likewise.
1023         (lua_mod_LDFLAGS): Likewise.
1025         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1026         (setjmp_mod_SOURCES): New variable.
1027         (setjmp_mod_CFLAGS): Likewise.
1028         (setjmp_LDFLAGS): Likewise.
1030         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1031         (setjmp_mod_SOURCES): New variable.
1032         (setjmp_mod_CFLAGS): Likewise.
1033         (setjmp_LDFLAGS): Likewise.
1035         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1036         (setjmp_mod_SOURCES): New variable.
1037         (setjmp_mod_CFLAGS): Likewise.
1038         (setjmp_LDFLAGS): Likewise.
1040         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1041         (setjmp_mod_SOURCES): New variable.
1042         (setjmp_mod_CFLAGS): Likewise.
1043         (setjmp_LDFLAGS): Likewise.
1045         * normal/i386/setjmp.S: Moved from here ...
1046         * lib/i386/setjmp.S: ... Moved here
1047         * normal/x86_64/setjmp.S: Moved from here ...
1048         * lib/x86_64/setjmp.S: ... Moved here
1049         * normal/powerpc/setjmp.S: Moved from here ...
1050         * lib/powerpc/setjmp.S: ... Moved here
1051         * normal/sparc64/setjmp.S: Moved from here ...
1052         * lib/sparc64/setjmp.S: ... Moved here
1054         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1055         returns_twice in mingw.
1057         * script/lua/grub_lib.c: New file.
1058         * script/lua/grub_lib.h: Likewise.
1059         * script/lua/grub_lua.h: Likewise.
1060         * script/lua/grub_main.c: Likewise.
1061         * script/lua/lapi.c: Likewise.
1062         * script/lua/lapi.h: Likewise.
1063         * script/lua/lauxlib.c: Likewise.
1064         * script/lua/lauxlib.h: Likewise.
1065         * script/lua/lbaselib.c: Likewise.
1066         * script/lua/lcode.c: Likewise.
1067         * script/lua/lcode.h: Likewise.
1068         * script/lua/ldblib.c: Likewise.
1069         * script/lua/ldebug.c: Likewise.
1070         * script/lua/ldebug.h: Likewise.
1071         * script/lua/ldo.c: Likewise.
1072         * script/lua/ldo.h: Likewise.
1073         * script/lua/ldump.c: Likewise.
1074         * script/lua/lfunc.c: Likewise.
1075         * script/lua/lfunc.h: Likewise.
1076         * script/lua/lgc.c: Likewise.
1077         * script/lua/lgc.h: Likewise.
1078         * script/lua/linit.c: Likewise.
1079         * script/lua/liolib.c: Likewise.
1080         * script/lua/llex.c: Likewise.
1081         * script/lua/llex.h: Likewise.
1082         * script/lua/llimits.h: Likewise.
1083         * script/lua/lmathlib.c: Likewise.
1084         * script/lua/lmem.c: Likewise.
1085         * script/lua/lmem.h: Likewise.
1086         * script/lua/loadlib.c: Likewise.
1087         * script/lua/lobject.c: Likewise.
1088         * script/lua/lobject.h: Likewise.
1089         * script/lua/lopcodes.c: Likewise.
1090         * script/lua/lopcodes.h: Likewise.
1091         * script/lua/loslib.c: Likewise.
1092         * script/lua/lparser.c: Likewise.
1093         * script/lua/lparser.h: Likewise.
1094         * script/lua/lstate.c: Likewise.
1095         * script/lua/lstate.h: Likewise.
1096         * script/lua/lstring.c: Likewise.
1097         * script/lua/lstring.h: Likewise.
1098         * script/lua/lstrlib.c: Likewise.
1099         * script/lua/ltable.c: Likewise.
1100         * script/lua/ltable.h: Likewise.
1101         * script/lua/ltablib.c: Likewise.
1102         * script/lua/ltm.c: Likewise.
1103         * script/lua/ltm.h: Likewise.
1104         * script/lua/lua.h: Likewise.
1105         * script/lua/luaconf.h: Likewise.
1106         * script/lua/lualib.h: Likewise.
1107         * script/lua/lundump.c: Likewise.
1108         * script/lua/lundump.h: Likewise.
1109         * script/lua/lvm.c: Likewise.
1110         * script/lua/lvm.h: Likewise.
1111         * script/lua/lzio.c: Likewise.
1112         * script/lua/lzio.h: Likewise.
1114 2009-05-16  Bean  <bean123ch@gmail.com>
1116         * include/grub/kernel.h (grub_module_header_types): Add type
1117         OBJ_TYPE_CONFIG.
1119         * kern/main.c (grub_load_config): New function.
1120         (grub_main): Call grub_load_config to read boot config.
1122         * grub-mkimage (generate_image): New parameter config_path.
1123         (options): New option --config.
1124         (main): Parse --config option, and pass it to generate_image.
1126 2009-05-14  Christian Franke  <franke@computer.org>
1128         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1129         This fixes build on Cygwin.
1131 2009-05-14  Pavel Roskin  <proski@gnu.org>
1133         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1134         jump.  This saves two bytes, so the typical case of 2 swapped
1135         drives would fit 32 bytes.
1137 2009-05-13  Pavel Roskin  <proski@gnu.org>
1139         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1140         grub_uint32_t to avoid a warning.
1142         * loader/i386/linux.c (allocate_pages): When assigning
1143         real_mode_mem, cast through grub_size_t to fix a warning.  The
1144         code already makes sure that the value would fit a pointer.
1145         (grub_linux_setup_video): Cast render_target->data to
1146         grub_size_t to fix a warning.
1148 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
1150         * commands/i386/pc/drivemap.c: New file - implement drivemap
1151         command.
1152         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1153         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1155 2009-05-13  Pavel Roskin  <proski@gnu.org>
1157         * util/i386/pc/grub-setup.c (setup): Remove unused variable
1158         embedding_area_exists.
1160 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
1162         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1163         it easier to understand / work with.
1164         Improve warning messages for cases where there's no embedding area,
1165         or when it is too small (or core.img too large).
1167 2009-05-13  Pavel Roskin  <proski@gnu.org>
1169         * loader/i386/pc/multiboot2.c: Add necessary includes for
1170         grub_multiboot2_real_boot().
1172         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1173         PX record is always little-endian.  We only need the lower 2
1174         bytes of the mode.
1176         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1177         facilitate code reuse.
1178         (grub_cpio_mount): Use "struct head", not a char buffer.  This
1179         fixes a warning reported by gcc 4.4.
1181         * kernel/disk.c (grub_disk_read): Use void pointer for the
1182         buffer.
1183         (grub_disk_write): Use const void pointer for the buffer.
1184         Adjust all callers.  Remove unnecessary casts.
1186 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
1188         * util/i386/pc/grub-install.in: Update copyright year.
1190 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1192         gptsync
1194         * commands/gptsync.c: new file
1195         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1196         (gptsync_mod_SOURCES): new variable
1197         (gptsync_mod_CFLAGS): likewise
1198         (gptsync_mod_LDFLAGS): likewise
1199         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1200         new definition
1201         (GRUB_PC_PARTITION_TYPE_HFS): likewise
1202         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1203         * conf/i386-ieee1275.rmk: likewise
1204         * conf/i386-pc.rmk: likewise
1205         * conf/powerpc-ieee1275.rmk: likewise
1207 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1209         Fixed grub-emu
1211         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1212         (grub_dl_ref): likewise
1214 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
1216         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1217         split in two functions (one for msdos and one for gpt).
1219 2009-05-08  Pavel Roskin  <proski@gnu.org>
1221         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1222         not modified.
1224         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1225         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
1226         Initialize them with -1.  Add sanity check for bad1.  Eliminate
1227         nerr variable.
1229 2009-05-08  David S. Miller  <davem@davemloft.net>
1231         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1233 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
1235         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1236         existence.
1238 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
1240         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1241         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1243 2009-05-05  David S. Miller  <davem@davemloft.net>
1245         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1247 2009-05-05  Pavel Roskin  <proski@gnu.org>
1249         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1250         of grub_dl_ref() and grub_dl_unref().
1251         * commands/parttool.c: Remove preprocessor conditionals around
1252         grub_dl_ref() and grub_dl_unref().
1253         * fs/affs.c: Likewise.
1254         * fs/afs.c: Likewise.
1255         * fs/cpio.c: Likewise.
1256         * fs/ext2.c: Likewise.
1257         * fs/fat.c: Likewise.
1258         * fs/hfs.c: Likewise.
1259         * fs/hfsplus.c: Likewise.
1260         * fs/iso9660.c: Likewise.
1261         * fs/jfs.c: Likewise.
1262         * fs/minix.c: Likewise.
1263         * fs/ntfs.c: Likewise.
1264         * fs/reiserfs.c: Likewise.
1265         * fs/sfs.c: Likewise.
1266         * fs/udf.c: Likewise.
1267         * fs/ufs.c: Likewise.
1268         * fs/xfs.c: Likewise.
1269         * include/grub/dl.h: Likewise.
1270         * loader/xnu.c: Likewise.
1272 2009-05-04  Pavel Roskin  <proski@gnu.org>
1274         * commands/acpi.c: Remove unused variable my_mod.
1275         * partmap/amiga.c: Likewise.
1276         * partmap/apple.c: Likewise.
1277         * partmap/gpt.c: Likewise.
1278         * partmap/pc.c: Likewise.
1279         * partmap/sun.c: Likewise.
1280         * term/gfxterm.c: Likewise.
1281         * term/i386/pc/vesafb.c: Likewise.
1282         * term/i386/pc/vga.c: Likewise.
1284 2009-05-04  David S. Miller  <davem@davemloft.net>
1286         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1287         pointer args to grub_ieee1275_get_property().
1289         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1291         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1292         devices, and do not traverse down under controller nodes.
1294         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1295         (grub_ofdisk_open): Use it to un-escape "," characters.
1296         * kern/disk.c (find_part_sep): New.
1297         (grub_disk_open): Use it to find the first non-escaped ','
1298         character in the disk name.
1299         * util/ieee1275/devicemap.c (escape_of_path): New.
1300         (grub_util_emit_devicemap_entry): Use it.
1301         * util/sparc64/ieee1275/grub-install.in: Update script to
1302         strip partition specifiers properly by not triggering on
1303         '\' escaped ',' characters.
1305 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1307         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1308         to 0x300.
1309         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1310         resolutions.
1311         (linux_vesafb_modes): Add a lot of additional modes to the list (based
1312         on documentation from Wikipedia).
1314 2009-05-04  Pavel Roskin  <proski@gnu.org>
1316         * disk/ata.c: Spelling fixes.
1317         * disk/raid.c: Likewise.
1318         * disk/usbms.c: Likewise.
1319         * disk/dmraid_nvidia.c: Likewise.
1320         * kern/ieee1275/openfw.c: Likewise.
1321         * kern/ieee1275/init.c: Likewise.
1322         * kern/ieee1275/cmain.c: Likewise.
1323         * boot/i386/pc/cdboot.S: Likewise.
1324         * video/readers/png.c: Likewise.
1325         * video/i386/pc/vbe.c: Likewise.
1326         * fs/udf.c: Likewise.
1327         * fs/hfs.c: Likewise.
1328         * fs/reiserfs.c: Likewise.
1329         * efiemu/runtime/efiemu.c: Likewise.
1330         * efiemu/main.c: Likewise.
1331         * efiemu/mm.c: Likewise.
1332         * include/grub/elf.h: Likewise.
1333         * include/grub/xnu.h: Likewise.
1334         * include/grub/usbdesc.h: Likewise.
1335         * include/grub/usb.h: Likewise.
1336         * include/grub/script_sh.h: Likewise.
1337         * include/grub/lib/LzmaEnc.h: Likewise.
1338         * include/grub/efiemu/efiemu.h: Likewise.
1339         * include/grub/command.h: Likewise.
1340         * normal/menu.c: Likewise.
1341         * normal/main.c: Likewise.
1342         * normal/datetime.c: Likewise.
1343         * bus/usb/uhci.c: Likewise.
1344         * mmap/i386/uppermem.c: Likewise.
1345         * mmap/mmap.c: Likewise.
1346         * commands/acpi.c: Likewise.
1347         * commands/test.c: Likewise.
1348         * partmap/apple.c: Likewise.
1349         * font/font.c: Likewise.
1350         * loader/sparc64/ieee1275/linux.c: Likewise.
1351         * loader/macho.c: Likewise.
1352         * loader/i386/bsd_trampoline.S: Likewise.
1353         * loader/i386/bsd.c: Likewise.
1354         * loader/xnu.c: Likewise.
1355         * term/i386/pc/vesafb.c: Likewise.
1356         * term/usb_keyboard.c: Likewise.
1357         * util/resolve.c: Likewise.
1358         * util/getroot.c: Likewise.
1360 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1362         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1364 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1366         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1367         build error.
1369 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1371         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1372         parameter only available on BIOS.
1374 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1376         Removed wrong semicolon in declaration
1378         * grub/misc.h (grub_dprintf): remove semicolon
1380 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1382         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1383         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1384         is done by grub_cmd_linux() now).
1385         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1386         restore video to text mode.
1387         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1388         indicates lack of "vga=" parameter.  "vga=0" is mapped to
1389         `GRUB_LINUX_VID_MODE_NORMAL'.
1391 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1393         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1394         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1395         and `normal/script.c'.  Add `kern/rescue_reader.c',
1396         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1397         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1398         `grub_script.tab.c'.
1400         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1401         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1402         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1403         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1404         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1406         * Makefile.in: Remove duplicated 2008 in Copyright line.
1408 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1410         * util/misc.c (grub_util_warn): New function.  Emits a warning
1411         unconditionally.
1412         * include/grub/util/misc.h (grub_util_warn): New declaration.
1414         * util/i386/pc/grub-install.in: Understand --force and pass it down
1415         to grub-setup.
1417         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1418         down to setup().
1419         (setup): Improve error messages and add warnings when requested to
1420         install in odd layouts.  Refuse to install using blocklists unless
1421         --force was set.
1423 2009-05-04  martin f. krafft  <madduck@madduck.net>
1425         * disk/raid.c (grub_raid_scan_device): Improve debug message.
1427 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1429         Updated copyright year
1431         * fs/hfsplus.c: updated copyright year
1433 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1435         HFS+ UUID
1437         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1438         in the space previously used by unused3
1439         (grub_hfsplus_uuid): new function
1440         (grub_hfsplus_fs): added uuid field
1442 2009-05-03  Pavel Roskin  <proski@gnu.org>
1444         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1445         suppress warnings.  It's no longer needed.
1446         * disk/host.c: Likewise.
1447         * disk/ata_pthru.c: Likewise.
1448         * disk/loopback.c: Likewise.
1449         * hook/datehook.c: Likewise.
1450         * parttool/pcpart.c: Likewise.
1451         * fs/i386/pc/pxe.c: Likewise.
1452         * fs/ntfscomp.c: Likewise.
1453         * efiemu/main.c: Likewise.
1454         * mmap/mmap.c: Likewise.
1455         * commands/crc.c: Likewise.
1456         * commands/hexdump.c: Likewise.
1457         * commands/hdparm.c: Likewise.
1458         * commands/acpi.c: Likewise.
1459         * commands/echo.c: Likewise.
1460         * commands/minicmd.c: Likewise.
1461         * commands/blocklist.c: Likewise.
1462         * commands/memrw.c: Likewise.
1463         * commands/loadenv.c: Likewise.
1464         * commands/usbtest.c: Likewise.
1465         * commands/lsmmap.c: Likewise.
1466         * commands/boot.c: Likewise.
1467         * commands/parttool.c: Likewise.
1468         * commands/configfile.c: Likewise.
1469         * commands/search.c: Likewise.
1470         * commands/ieee1275/suspend.c: Likewise.
1471         * commands/cat.c: Likewise.
1472         * commands/i386/pc/pxecmd.c: Likewise.
1473         * commands/i386/pc/play.c: Likewise.
1474         * commands/i386/pc/halt.c: Likewise.
1475         * commands/i386/pc/vbeinfo.c: Likewise.
1476         * commands/i386/pc/vbetest.c: Likewise.
1477         * commands/lspci.c: Likewise.
1478         * commands/date.c: Likewise.
1479         * commands/handler.c: Likewise.
1480         * commands/ls.c: Likewise.
1481         * commands/test.c: Likewise.
1482         * commands/cmp.c: Likewise.
1483         * commands/efi/loadbios.c: Likewise.
1484         * commands/efi/fixvideo.c: Likewise.
1485         * commands/halt.c: Likewise.
1486         * commands/help.c: Likewise.
1487         * commands/reboot.c: Likewise.
1488         * hello/hello.c: Likewise.
1489         * script/sh/main.c: Likewise.
1490         * loader/xnu.c: Likewise.
1491         * term/terminfo.c: Likewise.
1492         * term/i386/pc/serial.c: Likewise.
1493         * term/usb_keyboard.c: Likewise.
1495 2009-05-03  David S. Miller  <davem@davemloft.net>
1497         * normal/menu.c: Include grub/parser.h
1499 2009-05-03  Pavel Roskin  <proski@gnu.org>
1501         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1502         not char*.
1503         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1504         Suggested by Javier Martín <lordhabbit@gmail.com>
1506         * util/i386/pc/grub-mkrescue.in: Allow for the case when
1507         efiemu??.o doesn't exist.
1508         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
1509         copying.
1511 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
1513         FreeBSD 64-bit support
1515         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1516         and loader/i386/bsd_trampoline.S
1517         (bsd_mod_ASFLAGS): new variable
1518         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1519         (FREEBSD_MODTYPE_KERNEL64): likewise
1520         (grub_bsd64_trampoline_start): likewise
1521         (grub_bsd64_trampoline_end): likewise
1522         (grub_bsd64_trampoline_selfjump): likewise
1523         (grub_bsd64_trampoline_gdt): likewise
1524         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1525         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1526         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1527         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1528         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1529         of "attrib" member
1530         * loader/i386/bsd_pagetable.c: new file
1531         * loader/i386/bsd_trampoline.S: likewise
1532         * loader/i386/bsd.c (ALIGN_QWORD): new macro
1533         (ALIGN_VAR): likewise
1534         (entry_hi): new variable
1535         (kern_end_mdofs): likewise
1536         (is_64bit): likewise
1537         (grub_freebsd_add_meta): use ALIGN_VAR
1538         (grub_e820_mmap): new declaration
1539         (grub_freebsd_add_mmap): new function
1540         (grub_freebsd_add_meta_module): support 64 bit kernels
1541         (grub_freebsd_list_modules): use ALIGN_VAR
1542         (gdt_descriptor): new declaration
1543         (grub_freebsd_boot): support 64 bit kernels
1544         (grub_bsd_elf64_hook): new function
1545         (grub_bsd_load_elf): support elf64
1547 2009-05-03  Bean  <bean123ch@gmail.com>
1549         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1550         after we get the result of if statement.
1552 2009-05-03  Bean  <bean123ch@gmail.com>
1554         * Makefile.in (enable_efiemu): New variable.
1556         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1557         set.
1558         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1559         path.
1560         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1561         path, add -mno-red-zone option.
1562         (efiemu64_s.o): Likewise.
1563         (efiemu64.o): Use macro $^ for source file.
1565         * configure.ac (--enable-efiemu): New option.
1567 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
1569         xnu support
1571         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1572         (pkglib_MODULES): add xnu.mod
1573         (xnu_mod_SOURCES): new variable
1574         (xnu_mod_CFLAGS): likewise
1575         (xnu_mod_LDFLAGS): likewise
1576         (xnu_mod_ASFLAGS): likewise
1577         * conf/i386-pc.rmk: likewise
1578         * conf/x86_64-efi.rmk: likewise
1579         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1580         new declaration
1581         * include/grub/i386/macho.h: new file
1582         * include/grub/i386/xnu.h: likewise
1583         * include/grub/macho.h: likewise
1584         * include/grub/machoload.h: likewise
1585         * include/grub/x86_64/macho.h: likewise
1586         * include/grub/x86_64/xnu.h: likewise
1587         * include/grub/xnu.h: likewise
1588         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1589         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1590         * loader/i386/efi/xnu.c: new file
1591         * loader/i386/pc/xnu.c: likewise
1592         * loader/i386/xnu.c: likewise
1593         * loader/i386/xnu_helper.S: likewise
1594         * loader/macho.c: likewise
1595         * loader/xnu.c: likewise
1596         * loader/xnu_resume.c: likewise
1597         * util/grub-dumpdevtree: likewise
1598         * include/grub/i386/pit.h: include grub/err.h
1599         (grub_pit_wait): export
1600         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1602 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1604         Efiemu
1606         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1607         _linux_efi, linux_efi.
1608         new files in grub-emu
1609         new targets efiemu32.o and efiemu64.o
1610         * loader/linux_normal_efiemu.c: likewise
1611         * loader/i386/efi/linux.c: added preliminary efiemu support
1612         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1613         files to copy
1614         * include/grub/autoefi.h: new file
1615         * include/grub/i386/efiemu.h: likewise
1616         * include/grub/i386/pc/efiemu.h: likewise
1617         * include/grub/efi/api.h: add LL suffix when necessary
1618         new definitions relating to tables
1619         * include/grub/efiemu/efiemu.h: new file
1620         * include/grub/efiemu/runtime.h: likewise
1621         * efiemu/prepare.c: likewise
1622         * efiemu/loadcore_common.c: likewise
1623         * efiemu/loadcore64.c: likewise
1624         * efiemu/runtime/efiemu.sh: likewise
1625         * efiemu/runtime/efiemu.S: likewise
1626         * efiemu/runtime/efiemu.c: likewise
1627         * efiemu/runtime/config.h: likewise
1628         * efiemu/prepare32.c: likewise
1629         * efiemu/main.c: likewise
1630         * efiemu/modules/pnvram.c: likewise
1631         * efiemu/modules/i386: likewise
1632         * efiemu/modules/i386/pc: likewise
1633         * efiemu/modules/acpi.c: likewise
1634         * efiemu/i386/pc/cfgtables.c: likewise
1635         * efiemu/i386/loadcore64.c: likewise
1636         * efiemu/i386/loadcore32.c: likewise
1637         * efiemu/prepare64.c: likewise
1638         * efiemu/loadcore.c: likewise
1639         * efiemu/symbols.c: likewise
1640         * efiemu/mm.c: likewise
1641         * efiemu/loadcore32.c: likewise
1643 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1645         ACPI spoofing
1647         * commands/acpi.c: new file
1648         * commands/i386/pc/acpi.c: likewise
1649         * commands/efi/acpi.c: likewise
1650         * include/grub/acpi.h: likewise
1651         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1652         (acpi_mod_SOURCES): new variable
1653         (acpi_mod_CFLAGS): likewise
1654         (acpi_mod_LDFLAGS): likewise
1655         * conf/i386-efi.rmk: likewise
1656         * conf/x86_64-efi.rmk: likewise
1658 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1660         Missing part from mmap patch
1662         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1663         (grub_mmap_unregister)
1664         (grub_mmap_free_and_unregister): use grub_mmap_register
1666 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1668         Mmap services
1670         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1671         * loader/i386/linux.c (find_mmap_size): likewise
1672         (allocate_pages): likewise
1673         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1674         (grub_fill_multiboot_mmap): likewise
1675         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1676         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1677         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1678         (OPENBSD_MMAP_RESERVED): likewise
1679         * include/grub/i386/pc/memory.h: include grub/memory.h
1680         (grub_lower_mem): removed
1681         (grub_upper_mem): likewise
1682         (GRUB_MACHINE_MEMORY_ACPI): new definition
1683         (GRUB_MACHINE_MEMORY_NVS): likewise
1684         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1685         (GRUB_MACHINE_MEMORY_HOLE): likewise
1686         (grub_machine_mmap_register): likewise
1687         (grub_machine_mmap_unregister): likewise
1688         (grub_machine_get_upper): likewise
1689         (grub_machine_get_lower): likewise
1690         (grub_machine_get_post64): likewise
1691         * include/grub/i386/efi/memory.h: new file
1692         * include/grub/x86_64/efi/memory.h: likewise
1693         * include/grub/efi/memory.h: likewise
1694         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1695         (mmap_mod_SOURCES): new variable
1696         (mmap_mod_LDFLAGS): likewise
1697         (mmap_mod_ASFLAGS): likewise
1698         * conf/i386-coreboot.rmk: likewise
1699         * conf/i386-ieee1275.rmk: likewise
1700         * conf/i386-efi.rmk: likewise
1701         * conf/x86_64-efi.rmk: likewise
1702         * include/grub/types.h (UINT_TO_PTR): new macro
1703         (PTR_TO_UINT32): likewise
1704         (PTR_TO_UINT64): likewise
1705         * include/grub/memory.h: new file
1706         * mmap/i386/pc/mmap.c: likewise
1707         * mmap/i386/pc/mmap_helper.S: likewise
1708         * mmap/i386/uppermem.c: likewise
1709         * mmap/mmap.c: likewise
1710         * mmap/efi/mmap.c: likewise
1711         * kern/i386/coreboot/init.c (grub_machine_init): don't use
1712         grub_upper_mem
1713         * kern/i386/pc/init.c (grub_lower_mem): removed variable
1714         (grub_upper_mem): likewise
1715         (grub_machine_init): don't use grub_upper_mem,
1716         make grub_lower_mem local
1717         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1718         grub_mmap_iterate and grub_mmap_get_upper
1719         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1721 2009-05-02  Bean  <bean123ch@gmail.com>
1723         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1724         script/sh/parser.y.
1725         (pkglib_MODULES): Add normal.mod and sh.mod.
1726         (normal_SOURCES): New variable.
1727         (normal_mod_CFLAGS): Likewise.
1728         (normal_mod_LDFLAGS): Likewise.
1729         (sh_mod_SOURCES): Likewise.
1730         (sh_mod_CFLAGS): Likewise.
1731         (sh_mod_LDFLAGS): Likewise.
1733         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1734         script/sh/lexer.c_DEPENDENCIES.
1735         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1736         kern/rescue_reader.c and kern/rescue_parser.c.
1737         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1738         (grub_emu_SOURCES): Change source files.
1739         (pkglib_MODULES): Remove normal.mod.
1740         (normal_SOURCES): Removed.
1741         (normal_mod_CFLAGS): Likewise.
1742         (normal_mod_LDFLAGS): Likewise.
1743         * conf/i386-coreboot.rmk: Likewise.
1744         * conf/i386-efi.rmk: Likewise.
1745         * conf/i386-ieee1276.rmk: Likewise.
1746         * conf/powerpc-ieee1275.rmk: Likewise.
1747         * conf/sparc64-ieee1275.rmk: Likewise.
1748         * conf/x86_64-efi.rmk: Likewise.
1750         * include/grub/command.h (grub_command_execute): New inline function.
1752         * include/grub/menu.h (grub_menu_entry): Removed commands field.
1754         * include/grub/normal.h: Remove <grub/setjmp.h>.
1755         (grub_fs_module_list): Moved to normal/autofs.c.
1756         (grub_exit_env): Removed.
1757         (grub_command_execute): Likewise.
1758         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1759         parameter script.
1760         (read_command_list): New function declaration.
1761         (read_fs_list): Likewise.
1763         * include/parser.h: Include <grub/reader.h>.
1764         (grub_parser_split_cmdline): Change type of getline parameter.
1765         (grub_parser): New structure.
1766         (grub_parser_class): New variable.
1767         (grub_parser_execute): New function declaration.
1768         (grub_register_rescue_parser): Likewise.
1769         (grub_parser_register): New inline function.
1770         (grub_parser_unregister): Likewise.
1771         (grub_parser_get_current): Likewise.
1772         (grub_parser_set_current): Likewise.
1774         * include/grub/reader.h: New file.
1775         * kern/reader.c: Likewise.
1776         * kern/rescue_parser.c: Likewise.
1777         * kern/rescue_reader.c: Likewise.
1778         * normal/autofs.c: Likewise.
1779         * normal/dyncmd.c: Likewise.
1781         * include/grub/rescue.h: Removed.
1782         * normal/command.h: Likewise.
1784         * include/grub/script.h: Moved to ...
1785         * include/grub/script_sh.h: ... Moved here.
1786         * normal/execute.c: Moved to ...
1787         * script/sh/execute.c: ... Moved here.
1788         * normal/function.c: Moved to ...
1789         * script/sh/function.c: ... Moved here.
1790         * normal/lexer.c: Moved to ...
1791         * script/sh/lexer.c: ... Moved here.
1792         * normal/parser.y: Moved to ...
1793         * script/sh/parser.y: ... Moved here.
1794         * normal/script.c: Moved to ...
1795         * script/sh/script.c: ... Moved here.
1797         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1798         <grub/reader.h>.
1799         (grub_exit_env): Removed.
1800         (fs_module_list): Moved to normal/autofs.c.
1801         (grub_file_getline): Don't handle comment here.
1802         (free_menu): Skip removed field entry->commands.
1803         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1804         script parameter.
1805         (read_config_file): Removed nested parameter, change getline function.
1806         (grub_enter_normal_mode): Removed.
1807         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1808         (read_command_list): Likewise.
1809         (autoload_fs_module): Moved to normal/autofs.c.
1810         (read_fs_list): Likewise.
1811         (reader_nested): New variable.
1812         (grub_normal_execute): Run parser.sh to switch to sh parser.
1813         (grub_cmd_rescue): Removed.
1814         (cmd_normal): Removed.
1815         (grub_cmd_normal): Unregister itself at the beginning. Don't register
1816         rescue command.
1817         (grub_cmdline_run): New function.
1818         (grub_normal_reader_init): Likewise.
1819         (grub_normal_read_line): Likewise.
1820         (grub_env_write_pager): Likewise.
1821         (cmdline): New variable.
1822         (grub_normal_reader): Likewise.
1823         (GRUB_MOD_INIT): Register normal reader and set as current, register
1824         pager hook, register normal command with grub_register_command_prio,
1825         so that it won't show up in command.lst.
1826         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1827         grub_fs_autoload_hook.
1829         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1830         (grub_menu_execute_entry): Replace grub_script_execute with
1831         grub_parser_execute, change parameter to grub_command_execute.
1833         * normal/menu_text.c: Remove <grub/script.h>.
1835         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1836         and <grub/parser.h>.
1837         (run): Change editor_getline to use new parser interface. Change
1838         parameter to grub_command_execute.
1840         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1841         <grub/reader.h> and <grub/parser.h>.
1842         (grub_load_normal_mode): Execute normal command.
1843         (grub_main): Call grub_register_core_commands,
1844         grub_register_rescue_parser and grub_register_rescue_reader, use
1845         grub_reader_loop to enter input loop.
1847         * kern/parser.c (grub_parser_split_cmdline): Change type of
1848         getline parameter.
1849         (grub_parser_class): New variable.
1850         (grub_parser_execute): New function.
1852         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1853         * loader/multiboot2.c: Likewise.
1854         * loader/sparc64/ieee1275/linux.c: Likewise.
1856         * util/grub-emu.c (read_command_list): New dummy function.
1858 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1860         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1861         count to 16 for CCISS and IDA.
1863 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1865         * normal/menu_text.c  (grub_wait_after_message): Print a newline
1866         after waiting for user input.
1868         * loader/i386/linux.c: Include `<grub/normal.h>'.
1869         (grub_cmd_linux): Improve the error message about `ask' mode, by
1870         waiting for user input so it's not missed (we can do this, since
1871         user requested interaction).
1873 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1875         Added missing lst to grub-mkrescue
1877         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1878         and ${input_dir}/parttool.lst
1880 2009-04-30  David S. Miller  <davem@davemloft.net>
1882         * util/hostdisk.c (device_is_wholedisk): New function.
1883         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1884         zero only if device_is_wholedisk() returns true.
1886         * util/hostdisk.c (convert_system_partition_to_system_disk):
1887         Handle virtual disk devices named /dev/vdiskX as found on sparc
1888         and powerpc.
1890         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1891         lettered partition specifier is found, convert to numbered.
1893 2009-04-29  David S. Miller  <davem@davemloft.net>
1895         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1896         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1898         * normal/command.c: Add missing newline at end of file.
1900         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1901         warnings.
1902         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1903         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1904         grub_ofdisk_read): Likewise, and deal similarly with the fact that
1905         ihandles have a 32-bit type but need to be stored in a "void *".
1907 2009-04-28  Pavel Roskin  <proski@gnu.org>
1909         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1910         not disk.  Adjust all dependencies.
1911         (grub_fs_uuid_close): Use grub_device_close(), not
1912         grub_disk_close().
1914         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1915         parent's partition, don't copy it by reference, as it gets freed
1916         on close.
1918 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1920         Preboot hooks support
1922         * commands/boot.c (struct grub_preboot_t): new declaration
1923         (preboots_head): new variable
1924         (preboots_tail): likewise
1925         (grub_loader_register_preboot_hook): new function
1926         (grub_loader_unregister_preboot_hook): likewise
1927         (grub_loader_set): launch preboot hooks
1928         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1929         (grub_loader_register_preboot_hook): new declaration
1930         (grub_loader_unregister_preboot_hook): likewise
1932 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1934         Warning fix
1936         * disk/scsi.c (grub_scsi_open): added missing cast when
1937         calling grub_dprintf
1939 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
1941         Bug and warning fixes
1943         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1944         declaration
1945         * commands/test.c (test_parse): fixed bug with file tests and corrected
1946         declaration of find_file
1948 2009-04-26  Pavel Roskin  <proski@gnu.org>
1950         * Makefile.in: Don't install empty manual pages if help2man is
1951         missing.  Use help2man option for output, not shell redirection.
1953 2009-04-26  David S. Miller  <davem@davemloft.net>
1955         * util/grub-mkdevicemap.c (make_device_map): Add missing
1956         NESTED_FUNC_ATTR to process_device().
1958 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1960         Test command
1962         * commands/test.c: rewritten to use bash-like test
1964 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1966         Parttool autoloading and improvements
1968         * Makefile.in (pkglib_DATA): add parttool.lst
1969         (parttool.lst): new target
1970         * genmk.rb: generate parttool-*
1971         (CLEANFILES): add #{parttool}
1972         (PARTTOOLFILES): new variable
1973         * genparttoollist.sh: new file
1974         * parttool/pcpart.c (grub_pcpart_boot): more feedback
1975         (grub_pcpart_type): likewise
1976         * commands/parttool.c (helpmsg): new variable
1977         (grub_cmd_parttool): output help if not enough arguments are supplied
1978         autoload modules
1979         (GRUB_MOD_INIT(parttool)): use helpmsg
1981 2009-04-24  David S. Miller  <davem@davemloft.net>
1983         Avoiding opening same device multiple times in device iterator.
1985         * kern/device.c: (grub_device_iterate): Define struct part_ent,
1986         and use it to build a list of partitions in iterate_disk() and
1987         iterate_partition().
1989         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1990         on disk->data.
1992         * disk/ieee1275/nand.c (grub_nand_iterate): Return
1993         grub_devalias_iterate() result instead of unconditional 0.
1994         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1995         Also, capture hook return value, either directly or via
1996         grub_children_iterate(), and propagate to caller.
1997         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1998         grub_children_iterate): Return value is now 'int' instead of
1999         'grub_err_t'.
2000         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2001         like a proper iterator, stopping when hooks return non-zero.
2002         (grub_devalias_iterate): Likewise.
2004 2009-04-23  David S. Miller  <davem@davemloft.net>
2006         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2008 2009-04-22  David S. Miller  <davem@davemloft.net>
2010         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2011         is larger than address_cells, use that value for address_cells too.
2013         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2014         IEEE1275_MAX_PATH_LEN): Define.
2015         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2016         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2017         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2018         'devtype'.  Explicitly NULL terminate devalias expansion.
2020         * util/sparc64/ieee1275/misc.c: New file.
2021         * util/sparc64/ieee1275/grub-setup.c: New file.
2022         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2023         * util/sparc64/ieee1275/grub-mkimage.c: New file.
2024         * util/sparc64/ieee1275/grub-install.in: New file.
2025         * util/ieee1275/ofpath.c: New file.
2026         * util/ieee1275/devicemap.c: New file.
2027         * util/devicemap.c: New file.
2028         * util/deviceiter.c: New file.
2029         * kern/sparc64/ieee1275/init.c: New file.
2030         * include/grub/util/ofpath.h: New file.
2031         * include/grub/util/deviceiter.h: New file.
2032         * util/grub-mkdevicemap.c: Include deviceiter.h.
2033         Implement using grub_util_emit_devicemap_entry and
2034         grub_util_iterate_devices.
2035         * conf/i386-corebook.rmk: Build util/deviceiter.c and
2036         util/devicemap.c into grub-mkdevicemap
2037         * conf/i386-efi.rmk: Likewise.
2038         * conf/i386-ieee1275.rmk: Likewise.
2039         * conf/i386-pc.rmk: Likewise.
2040         * conf/powerpc-ieee1275.rmk: Likewise.
2041         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2042         images and installation utilities.  Build kernel as image
2043         instead of as elf binary.  Use common rules as much as possible.
2045 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
2047         Correct GPT definition
2049         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2050         of "attrib" member
2052 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
2054         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2056 2009-04-19  David S. Miller  <davem@davemloft.net>
2058         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2059         (grub_rescue_cmd_linux): Rename to...
2060         (grub_cmd_linux): and fix prototype.
2061         (grub_rescue_cmd_initrd): Rename to...
2062         (grub_cmd_initrd): and fix prototype.
2063         (cmd_linux, cmd_initrd): New.
2064         (GRUB_MOD_INIT(linux)): Use grub_register_command().
2065         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2067 2009-04-17  Pavel Roskin  <proski@gnu.org>
2069         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2070         format.
2071         (grub_ohci_transfer): Likewise.
2073         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2075         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2076         return without a value.  Fix inconsistent indentation.
2078         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2079         match struct grub_fs.
2081         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2082         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2083         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2084         * commands/lspci.c (grub_lspci_iter): Likewise.
2086 2009-04-16  Bean  <bean123ch@gmail.com>
2088         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2089         value.
2091 2009-04-15  Pavel Roskin  <proski@gnu.org>
2093         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2094         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
2095         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2096         definitions.
2098 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2100         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2101         that no multiple data or metadata areas are supported and `Unknown
2102         metadata header'.
2104 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2106         Move loader out of the kernel
2108         * kern/loader.c: moved to ...
2109         * commands/boot.c: ... moved here
2110         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2111         * commands/boot.c (grub_cmd_boot): moved here. All users updated
2112         * include/grub/kernel.h (grub_machine_fini): export
2113         * include/grub/loader.h (grub_loader_is_loaded): update declaration
2114         (grub_loader_set): likewise
2115         (grub_loader_unset): likewise
2116         (grub_loader_boot): likewise
2117         * conf/common.rmk: new module boot.mod
2118         (pkglib_MODULES): add boot.mod
2119         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2120         (grub_emu_SOURCES): likewise
2121         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2122         (grub_emu_SOURCES): likewise
2123         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2124         (grub_emu_SOURCES): likewise
2125         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2126         (grub_emu_SOURCES): likewise
2127         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2128         (grub_emu_SOURCES): likewise
2129         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2130         (grub_emu_SOURCES): likewise
2131         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2132         (grub_emu_SOURCES): likewise
2134 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2136         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2138         * kern/misc.c (grub_itoa): Removed function
2139         (grub_ltoa): likewise
2140         (grub_vsprintf): use grub_lltoa
2142 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2144         Restore grub-emu
2146         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2147         * conf/i386-coreboot.rmk: likewise
2148         * conf/i386-ieee1275.rmk: likewise
2149         * conf/powerpc-ieee1275.rmk: likewise
2151 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2153         * INSTALL: Add that `./autogen.sh' needs to be run before
2154         `./configure.'.
2156 2009-04-14  Bean  <bean123ch@gmail.com>
2158         * Makefile.in (pkglib_DATA): Add handler.lst.
2159         (handler.lst): New rule.
2161         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2162         * conf/i386-coreboot.rmk: Likewise.
2163         * conf/i386-ieee1275.rmk: Likewise.
2164         * conf/i386-efi.rmk: Likewise.
2165         * conf/x86_64-efi.rmk: Likewise.
2166         * conf/powerpc-ieee1275.rmk: Likewise.
2167         * conf/sparc64-ieee1275.rmk: Likewise.
2169         * genhandlerlist.sh: New file.
2171         * genmk.rb: Add rules to generate handler.lst.
2173         * include/grub/normal.h (grub_file_getline): New function definition.
2174         (read_handler_list): Likewise.
2175         (free_handler_list): Likewise.
2177         * include/grub/term.h (grub_term_register_input): Add name parameter
2178         for auto generation of handler.lst.
2179         (grub_term_register_output): Likewise.
2181         * normal/handler.c: New file.
2183         * normal/main.c (get_line): Renamed to grub_file_getline.
2184         (read_config_file): Use the newly renamed grub_file_getline.
2185         (read_command_list): Likewise.
2186         (read_fs_list): Likewise.
2187         (grub_normal_execute): Call read_handler_list to parse handler.lst.
2188         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2190         * term/efi/console.c (grub_console_init): Add name parameter for auto
2191         generation of handler.lst.
2192         * term/gfxterm.c: Likewise.
2193         * term/i386/pc/at_keyboard.c: Likewise.
2194         * term/i386/pc/console.c: Likewise.
2195         * term/i386/pc/serial.c: Likewise.
2196         * term/i386/pc/vesafb.c: Likewise.
2197         * term/i386/pc/vga.c: Likewise.
2198         * term/i386/pc/vga_text.c: Likewise.
2199         * term/ieee1275/ofconsole.c: Likewise.
2200         * term/usb_keyboard.c: Likewise.
2202 2009-04-14  Bean  <bean123ch@gmail.com>
2204         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2205         properly with null character.
2207 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2209         * configure: Remove.
2210         * config.h.in: Likewise.
2211         * stamp-h.in: Likewise.
2212         * DISTLIST: Likewise.
2213         * conf/common.mk: Likewise.
2214         * conf/i386-coreboot.mk: Likewise.
2215         * conf/i386-efi.mk: Likewise.
2216         * conf/i386-ieee1275.mk: Likewise.
2217         * conf/i386.mk: Likewise.
2218         * conf/i386-pc.mk: Likewise.
2219         * conf/powerpc-ieee1275.mk: Likewise.
2220         * conf/sparc64-ieee1275.mk: Likewise.
2221         * conf/x86_64-efi.mk: Likewise.
2223         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2224         develop on GRUB.
2226 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
2227             David S. Miller  <davem@davemloft.net>
2229         * util/hostdisk.c (make_device_name): Fix buffer length
2230         calculations.
2232 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2234         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2235         <sys/param.h> and <sys/sysctl.h>.
2236         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2237         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2238         opening the device and reset them afterwards.
2240 2009-04-13  Pavel Roskin  <proski@gnu.org>
2242         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2243         Reported by John Stanley <jpsinthemix@verizon.net>
2245 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2247         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2248         that name for menuentries when appropriate.
2250 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2252         * util/grub.d/10_freebsd.in: Add a missing `fi'.
2254 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2256         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2257         to Linux, simply abort telling the user it's no longer supported.
2259 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2261         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2262         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
2263         `freebsd_loadenv' only when devices.hints exist.
2265 2009-04-13  Pavel Roskin  <proski@gnu.org>
2267         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2269 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2271         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2272         partition number.
2273         (grub_drive): Likewise.
2275 2009-04-13  David S. Miller  <davem@davemloft.net>
2277         * kern/sparc64/ieee1275/ieee1275.c: New file.
2278         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2279         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2280         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2281         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2282         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2283         grub_ieee1275_alloc_physmem): Declare new exported functions.
2285         * include/grub/sparc64/ieee1275/loader.h: New file.
2286         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2287         * include/grub/sparc64/kernel.h: Likewise.
2288         * loader/sparc64/ieee1275/linux.c: Likewise.
2290         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2291         (grub_fstest_SOURCES): Likewise.
2293         * util/hostdisk.c (make_device_name): Do not make any assumptions
2294         about the length of drive names.
2296         * kern/dl.c (grub_dl_load_file): Close file immediately when
2297         we are done using it.
2299 2009-04-12  David S. Miller  <davem@davemloft.net>
2301         * kern/misc.c (grub_ltoa): Fix cast when handling negative
2302         values.  Noticed by Pavel Roskin.
2304         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2305         target compiler.
2307         * genmk.rb: Add more flexible image type specification, also
2308         pass --strip-unneeded to objcopy.
2309         * conf/i386-pc.rmk: Use *_FORMAT.
2310         * conf/i386-pc.mk: Rebuilt.
2312         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2313         (OFDISK_HASH_SZ): Define.
2314         (ofdisk_hash): New hash table.
2315         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2316         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2317         instead of device phandle which is not unique.
2319         * kern/sparc64/ieee1275/init.c: Delete, replace with...
2320         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2321         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2322         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2323         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2324         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2325         GRUB_KERNEL_MACHINE_DATA_END): Define.
2326         (grub_kernel_image_size, grub_total_module_size): Declare.
2328 2009-04-12  Pavel Roskin  <proski@gnu.org>
2330          * configure.ac: Change the logic when we check for target tools.
2331          Do it when the target is specified and it's different from the
2332          specified value of the host.
2334 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
2336         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2337         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2338         GNU/kFreeBSD. Check if a device is a character device. Use
2339         DIOCGMEDIASIZE to get the size.
2340         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2341         support for GNU/kFreeBSD.
2342         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2343         is a character device instead of a block device. Add support for
2344         FreeBSD device names.
2346         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2347         is a character device instead of a block device.
2349         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2350         is a character device instead of a block device.
2352 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
2354         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2355         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2356         FreeBSD. Check if a device is a character device. Use
2357         DIOCGMEDIASIZE to get the size.
2358         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2359         support for FreeBSD.
2360         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2361         is a character device instead of a block device. Add support for
2362         FreeBSD device names.
2364         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2365         a character device instead of a block device.
2366         (grub_util_check_char_device): New function.
2368         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2369         a character device instead of a block device.
2371         * include/grub/util/getroot.h (grub_util_check_char_device): New
2372         prototype.
2374 2009-04-11  David S. Miller  <davem@davemloft.net>
2376         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2377         static libgcc.
2378         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2379         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2380         function, if present.
2381         (__bswapdi2): Likewise.
2383         * include/grub/sparc64/ieee1275/boot.h: New file.
2384         * boot/sparc64/ieee1275/boot.S: Likewise.
2385         * boot/sparc64/ieee1275/diskboot.S: Likewise.
2387         * kern/misc.c (grub_ltoa): New function.
2388         (grub_vsprintf): Use it to format 'long' integers.
2390 2009-04-10  David S. Miller  <davem@davemloft.net>
2392         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2393         slots are of type grub_ieee1275_cell_t.
2394         (grub_nand_read): Likewise.
2395         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2396         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2397         macros are used to compare values in arg/ret block of the call.
2398         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2399         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2400         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2401         grub_ieee1275_instance_to_path, grub_ieee1275_write,
2402         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2403         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2404         grub_ieee1275_close, grub_ieee1275_set_property,
2405         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2406         grub_ieee1275_cell_t.
2407         * kern/ieee1275/openfw.c (grub_map): Likewise.
2408         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2409         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2411         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2412         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2413         (grub_devalias_iterate): Likewise.
2415 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
2417         UFS improvements
2419         * fs/ufs.c (INODE_NBLOCKS): new definition
2420         (struct grub_ufs_dirent): added fields for non-BSD dirents
2421         (grub_ufs_get_file_block): fixed double indirect handling
2422         (grub_ufs_lookup_symlink): use more robust way to determine whether
2423         symlink is inline
2424         (grub_ufs_find_file): support for non-BSD dirents
2425         (grub_ufs_dir): support for non-BSD dirents
2427 2009-04-10  Bean  <bean123ch@gnail.com>
2429         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2430         attribute, otherwise the size would be wrong for i386 platform.
2432         * include/grub/pci.h (grub_pci_read_word): New inline function.
2433         (grub_pci_read_byte): Likewise.
2434         (grub_pci_write): Likewise.
2435         (grub_pci_write_word): Likewise.
2436         (grub_pci_write_byte): Likewise.
2438         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2440         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2441         (find_framebuf): Scan pci to locate the frame buffer address.
2443         * commands/efi/fixvideo.c: New file.
2445         * commands/efi/loadbios.c: Likewise.
2447         * commands/memrw.c: Likewise.
2449         * util/grub-dumpbios.in: Likewise.
2451         * conf/common.rmk (grub-dumpbios): New utility.
2452         (pkglib_MODULES): New module memrw.mod.
2453         (memrw_mod_SOURCE): New macro.
2454         (memrw_mod_CFLAGS): Likewise.
2455         (memrw_mod_LDFLAGS): Likewise.
2457         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2458         fixvideo.mod.
2459         (loadbios_mod_SOURCE): New macro.
2460         (loadbios_mod_CFLAGS): Likewise.
2461         (loadbios_mod_LDFLAGS): Likewise.
2462         (fixvideo_mod_SOURCE): Likewise.
2463         (fixvideo_mod_CFLAGS): Likewise.
2464         (fixvideo_mod_LDFLAGS): Likewise.
2466         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2467         fixvideo.mod.
2468         (loadbios_mod_SOURCE): New macro.
2469         (loadbios_mod_CFLAGS): Likewise.
2470         (loadbios_mod_LDFLAGS): Likewise.
2471         (fixvideo_mod_SOURCE): Likewise.
2472         (fixvideo_mod_CFLAGS): Likewise.
2473         (fixvideo_mod_LDFLAGS): Likewise.
2475 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
2477         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2479 2009-04-07  David S. Miller  <davem@davemloft.net>
2481         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2482         support for R_SPARC_OLO10 relocations.  Fix compile warning for
2483         R_SPARC_WDISP30 case.
2484         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2486 2009-04-06  Pavel Roskin  <proski@gnu.org>
2488         * include/grub/misc.h (ARRAY_SIZE): New macro.
2489         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2490         New macro.
2491         * loader/i386/linux.c (allocate_pages): Use free_pages().
2492         (grub_linux_unload): Don't use free_pages().
2493         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2494         wrong index.  Treat all other modes as text modes.
2495         (grub_cmd_linux): Initialize vid_mode unconditionally to
2496         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
2498         * commands/help.c (print_command_help): Use cmd->prio, not
2499         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2501 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
2503         Parttool
2505         * parttool/pcpart.c: new file
2506         * commands/parttool.c: likewise
2507         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2508         (parttool_mod_SOURCES): new variable
2509         (parttool_mod_CFLAGS): likewise
2510         (parttool_mod_LDFLAGS): likewise
2511         (pcpart_mod_SOURCES): likewise
2512         (pcpart_mod_CFLAGS): likewise
2513         (pcpart_mod_LDFLAGS): likewise
2514         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2515         and parttool/pcpart.c
2516         * conf/i386-efi.rmk: likewise
2517         * conf/i386-ieee1275.rmk: likewise
2518         * conf/i386-pc.rmk: likewise
2519         * conf/powerpc-ieee1275.rmk: likewise
2520         * conf/sparc64-ieee1275.rmk: likewise
2521         * conf/x86_64-ieee1275.rmk: likewise
2523 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2525         Support for mtime and further expandability of dir command
2527         * include/grub/lib/datetime.h: moved to ...
2528         * include/grub/datetime.h: ... moved here and added
2529         declaration of grub_unixtime2datetime. All users updated
2530         * include/grub/fs.h: new syntax for dir and mtime functions in
2531         struct grub_fs
2532         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2533         and GRUB_FSHELP_FLAGS_MASK
2534         * commands/ls.c (grub_ls_list_files): Write mtime in long format
2535         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2536         (grub_ext2_mtime): new function
2537         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2538         (grub_hfsplus_mtime): new function
2539         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2540         (GRUB_UFS_ATTR_FILE): likewise
2541         (GRUB_UFS_ATTR_LNK): likewise
2542         (struct grub_ufs_sblock): new fields mtime
2543         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2544         all users updated
2545         (grub_ufs_dir): mtime support
2546         (grub_ufs_mtime): new function
2547         * fs/affs.c (grub_affs_dir): use new dir syntax
2548         * fs/afs.c (grub_afs_dir): likewise
2549         * fs/cpio.c (grub_cpio_dir): likewise
2550         * fs/fat.c (grub_fat_find_dir): likewise
2551         * fs/hfs.c (grub_hfs_dir): likewise
2552         * fs/iso9660.c (grub_iso9660_dir): likewise
2553         * fs/jfs.c (grub_jfs_dir): likewise
2554         * fs/minix.c (grub_minix_dir): likewise
2555         * fs/ntfs.c (grub_ntfs_dir): likewise
2556         * fs/reiserfs.c (grub_reiserfs_dir): likewise
2557         * fs/sfs.c (grub_sfs_dir): likewise
2558         * fs/xfs.c (grub_xfs_dir): likewise
2559         * util/hostfs.c (grub_hostfs_dir): likewise
2560         * lib/datetime.c: moved to ...
2561         * normal/datetime.c: ... moved here
2562         (grub_unixtime2datetime): new function
2563         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2564         * normal/completion.c (iterate_dir): use new dir syntax
2565         * normal/misc.c (grub_normal_print_device_info): tell the
2566         last modification time of a volume
2567         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2568         * conf/common.rmk: added lib/datetime.c to ls.mod
2569         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2570         (normal_mod_SOURCES): likewise
2571         (datetime_mod_SOURCES): Removed lib/datetime.c
2572         * conf/i386-efi.rmk: likewise
2573         * conf/i386-ieee1275.rmk: likewise
2574         * conf/i386-pc.rmk: likewise
2575         * conf/powerpc-ieee1275.rmk: likewise
2576         * conf/sparc64-ieee1275.rmk: likewise
2577         * conf/x86_64-efi.rmk: likewise
2579 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2581         Trim trailing spaces in FAT label and support mtools-like labels
2583         * fs/fat.c (grub_fat_iterate_dir): New function based
2584         on grub_fat_find_dir
2585         (grub_fat_find_dir): use grub_fat_iterate_dir
2586         (grub_fat_label): likewise
2588 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
2590         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2591         and command.h
2592         remove extraneous kernel_elf_HEADERS
2594 2009-04-04  Bean  <bean123ch@gnail.com>
2596         * include/grub/util/misc.h: Add dummy function fsync for mingw.
2598         * util/misc.c: Likewise.
2600 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
2602         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2603         instead of grub_printf.
2605 2009-04-03  Robert Millan  <rmh@aybabtu.com>
2607         * loader/i386/linux.c (grub_linux_setup_video): Fill
2608         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2609         values from `mode info' structure instead of hardcoded
2610         values.
2612 2009-04-01  Pavel Roskin  <proski@gnu.org>
2614         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2615         unused now.
2616         * genmk.rb: Likewise.
2617         * configure.ac: Likewise.
2619 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
2621         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2622         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
2624 2009-04-01  David S. Miller  <davem@davemloft.net>
2626         * normal/sparc64/setjmp.S: Fix setjmp implementation.
2627         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2628         (grub_setjmp): Mark with 'returns_twice' attribute.
2629         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2630         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2631         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2633 2009-04-01  Robert Millan  <rmh@aybabtu.com>
2635         Reapply fix from 2008-07-28 which was accidentally reverted; also
2636         perform the same fix to a similar check in same function.
2638         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2639         with the same number are found, just use issue a warning with
2640         grub_dprintf(), as this error has been reported to be non-fatal.
2642 2009-03-31  Pavel Roskin  <proski@gnu.org>
2644         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2645         for cross-compilation.
2647 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2649         Fix i386-ieee1275 build.
2651         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2652         Remove declaration.
2654 2009-03-30  Pavel Roskin  <proski@gnu.org>
2656         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2657         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
2658         zero-terminated, rely only on the strlen value.  Fix comparison
2659         of strings differing in length.
2661 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2663         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2664         checking for abi version.  Improve error messages on BIOS to notify
2665         user about `linux16' command.
2667 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
2669         Leak fixes
2671         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2672         in case of collision
2673         * disk/scsi.c (grub_scsi_open): free scsi in case of error
2675 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2677         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2678         set `vid_mode' accordingly.
2679         (grub_linux_boot): Process `vid_mode' and set video mode.
2681 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2683         * util/grub.d/10_linux.in (linux_entry): New function.
2684         Factorize generation of Linux boot entries.
2686 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
2688         Make the format of Environment Block plain text. The boot loader
2689         part is not tested well yet.
2691         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2692         (buffer): Removed.
2693         (envblk): Likewise.
2694         (usage): Remove "info" and "clear". Add "unset". Update the
2695         description of "set", as this does not delete variables any
2696         longer.
2697         (create_envblk_file): Complete rewrite.
2698         (open_envblk_file): Likewise.
2699         (cmd_info): Removed.
2700         (cmd_list): Likewise.
2701         (cmd_set): Likewise.
2702         (cmd_clear): Likewise.
2703         (list_variables): New function.
2704         (write_envblk): Likewise.
2705         (set_variables): Likewise.
2706         (unset_variables): Likewise.
2707         (main): Complete rewrite.
2709         * commands/loadenv.c (buffer): Removed.
2710         (envblk): Likewise.
2711         (open_envblk_file): New function.
2712         (read_envblk_file): Complete rewrite.
2713         (grub_cmd_load_env): Likewise.
2714         (grub_cmd_list_env): Likewise.
2715         (struct blocklist): New struct.
2716         (free_blocklists): New function.
2717         (check_blocklists): Likewise.
2718         (write_blocklists): Likewise.
2719         (grub_cmd_save_env): Complete rewrite.
2721         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2722         a plain text signature.
2723         (GRUB_ENVBLK_MAXLEN): Removed.
2724         (struct grub_envblk): Complete rewrite.
2725         (grub_envblk_find): Removed.
2726         (grub_envblk_insert): Likewise.
2727         (grub_envblk_open): New prototype.
2728         (grub_envblk_set): Likewise.
2729         (grub_envblk_delete): Put const to VALUE.
2730         (grub_envblk_iterate): Put const to NAME and VALUE.
2731         (grub_envblk_close): New prototype.
2732         (grub_envblk_buffer): New inline function.
2733         (grub_envblk_size): Likewise.
2735         * lib/envblk.c: Include grub/mm.h.
2736         (grub_env_find): Removed.
2737         (grub_envblk_open): New function.
2738         (grub_envblk_close): Likewise.
2739         (escaped_value_len): Likewise.
2740         (find_next_line): Likewise.
2741         (grub_envblk_insert): Removed.
2742         (grub_envblk_set): New function.
2743         (grub_envblk_delete): Complete rewrite.
2744         (grub_envblk_iterate): Likewise.
2746 2009-03-28  Robert Millan  <rmh@aybabtu.com>
2748         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2749         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2750         variables.  Use 16-bit loader.
2751         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2752         loader.
2753         * kern/i386/loader.S (grub_linux_boot): Rename to ...
2754         (grub_linux16_boot): ... this.  Update all users.
2755         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2756         (grub_linux_boot): ... this.  Update all users.
2758         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2759         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
2760         commands to `linux16' and `initrd16'.
2761         (GRUB_MOD_FINI(linux)): Rename to ...
2762         (GRUB_MOD_FINI(linux16)): ... this.
2764 2009-03-24  Pavel Roskin  <proski@gnu.org>
2766         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2767         not just for compilation.
2769 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
2771         Move multiboot helper out of kernel
2773         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2774         `loader/i386/multiboot_helper.S'.
2775         * conf/i386-coreboot.rmk: Likewise
2776         * conf/i386-ieee1275.rmk: Likewise
2778         * kern/i386/loader.S: Move multiboot helpers from here...
2779         * loader/i386/multiboot_helper.S: ...moved here
2780         * include/grub/i386/loader.h: Move declarations of multiboot
2781         helpers from here...
2782         * include/grub/i386/multiboot.h: ...moved here
2783         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2785 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2787         * kern/env.c (grub_env_context_open): Added an argument to specify
2788         whether a new context inherits exported variables from current
2789         one. This is useful when making a sandbox to interpret a config
2790         file.
2791         All callers updated.
2793         * include/grub/env.h (grub_env_context_open): Updated the prototype.
2795 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2797         * kern/env.c (grub_env_context_close): Fix memory leaks.
2799 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2801         * normal/main.c (grub_normal_execute): Added an argument
2802         BATCH to specify if an interactive interface should be provided
2803         after reading a config file.
2804         All callers updated.
2805         (read_command_list): Prevent being executed twice.
2806         (read_fs_list): Likewise.
2808         * include/grub/normal.h (grub_normal_execute): Updated the
2809         prototype.
2811 2009-03-22  Pavel Roskin  <proski@gno.org>
2813         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2814         _start.
2815         * kern/i386/pc/startup.S: Likewise.
2816         * kern/i386/efi/startup.S: Likewise.
2817         * kern/i386/ieee1275/startup.S: Likewise.
2818         * kern/i386/coreboot/startup.S: Likewise.
2819         * kern/x86_64/efi/startup.S: Likewise.
2821         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2822         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2823         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2825 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
2827         Bugfixes in multiboot for bugs uncovered by solaris kernel.
2829         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2830         limit detection.
2831         Use vaddr of correct segment for entry_point.
2833 2009-03-21  Bean  <bean123ch@gmail.com>
2835         * commands/blocklist.c: Add include file <grub/command.h>, remove
2836         <grub/normal.h> and <grub/arg.h>.
2837         (grub_cmd_blocklist): Use the new command interface.
2838         (GRUB_MOD_INIT): Likewise.
2839         (GRUB_MOD_FINI): Likewise.
2840         * commands/boot.c: Likewise.
2841         * commands/cat.c: Likewise.
2842         * commands/cmp.c: Likewise.
2843         * commands/configfile.c: Likewise.
2844         * commands/crc.c: Likewise.
2845         * commands/echo.c: Likewise.
2846         * commands/halt.c: Likewise.
2847         * commands/handler.c: Likewise.
2848         * commands/hdparm.c: Likewise.
2849         * commands/help.c: Likewise.
2850         * commands/hexdump.c: Likewise.
2851         * commands/loadenv.c: Likewise.
2852         * commands/ls.c: Likewise.
2853         * commands/lsmmap.c: Likewise.
2854         * commands/lspci.c: Likewise.
2855         * commands/loadenv.c: Likewise.
2856         * commands/read.c: Likewise.
2857         * commands/reboot.c: Likewise.
2858         * commands/search.c: Likewise.
2859         * commands/sleep.c: Likewise.
2860         * commands/test.c: Likewise.
2861         * commands/usbtest.c: Likewise.
2862         * commands/videotest.c: Likewise.
2863         * commands/i386/cpuid.c: Likewise.
2864         * commands/i386/pc/halt.c: Likewise.
2865         * commands/i386/pc/play.c: Likewise.
2866         * commands/i386/pc/pxecmd.c: Likewise.
2867         * commands/i386/pc/vbeinfo.c: Likewise.
2868         * commands/i386/pc/vbetest.c: Likewise.
2869         * commands/ieee1275/suspend.c: Likewise.
2870         * disk/loopback.c: Likewise.
2871         * font/font_cmd.c: Likewise.
2872         * hello/hello.c: Likewise.
2873         * loader/efi/appleloader.c: Likewise.
2874         * loader/efi/chainloader.c: Likewise.
2875         * loader/i386/bsd.c: Likewise.
2876         * loader/i386/efi/linux.c: Likewise.
2877         * loader/i386/ieee1275/linux.c: Likewise.
2878         * loader/i386/linux.c: Likewise.
2879         * loader/i386/pc/chainloader.c: Likewise.
2880         * loader/i386/pc/linux.c: Likewise.
2881         * loader/powerpc/ieee1275/linux.c: Likewise.
2882         * loader/multiboot_loader.c: Likewise.
2883         * term/gfxterm.c: Likewise.
2884         * term/i386/pc/serial.c: Likewise.
2885         * term/terminfo.c: Likewise.
2887         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2888         * term/i386/pc/vga.c: Likewise.
2889         * video/readers/jpeg.c: Likewise.
2890         * video/readers/png.c: Likewise.
2891         * video/readers/tga.c: Likewise.
2893         * util/grub-fstest (cmd_loopback): Removed.
2894         (cmd_blocklist): Likewise.
2895         (cmd_ls): Likewise.
2896         (grub_register_command): Likewise.
2897         (grub_unregister_command): Likewise.
2898         (execute_command): Use grub_command_find to locate command and execute
2899         it.
2901         * include/grub/efi/chainloader.h: Removed.
2902         * loader/efi/chainloader_normal.c: Likewise.
2903         * loader/i386/bsd_normal.c: Likewise.
2904         * loader/i386/pc/chainloader_normal.c: Likewise.
2905         * loader/i386/pc/multiboot_normal.c: Likewise.
2906         * loader/linux_normal.c: Likewise.
2907         * loader/multiboot_loader_normal.c: Likewise.
2908         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2910         * gencmdlist.sh: Scan new registration command grub_register_extcmd
2911         and grub_register_command_p1.
2913         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2914         kern/command.c, lib/arg.c and commands/extcmd.c.
2915         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2916         (minicmd_mod_SOURCES): New variable.
2917         (minicmd_mod_CFLAGS): Likewise.
2918         (minicmd_mod_LDFLAGS): Likewise.
2919         (extcmd_mod_SOURCES): Likewise.
2920         (extcmd_mod_CFLAGS): Likewise.
2921         (extcmd_mod_LDFLAGS): Likewise.
2922         (boot_mod_SOURCES): Removed.
2923         (boot_mod_CFLAGS): Likewise.
2924         (boot_mod_LDFLAGS): Likewise.
2926         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2927         kern/corecmd.c.
2928         (kernel_img_HEADERS): Add command.h.
2929         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2930         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2931         and lib/arg.c.
2932         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2933         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2934         remove the corresponding normal mode command.
2935         (normal_mod_SOURCES): Remove normal/arg.c.
2936         * conf/i386-coreboot.rmk: Likewise.
2937         * conf/i386-efi.rmk: Likewise.
2938         * conf/i386-ieee1275.rmk: Likewise.
2939         * conf/powerpc-ieee1275.rmk: Likewise.
2940         * conf/x86_64-efi.rmk: Likewise.
2942         * include/grub/arg.h: Move from here ...
2943         * include/grub/lib/arg.h: ... to here.
2945         * normal/arg.c: Move from here ...
2946         * lib/arg.c: ... to here.
2948         * commands/extcmd.c: New file.
2949         * commands/minicmd.c: Likewise.
2950         * include/grub/command.h: Likewise.
2951         * include/grub/extcmd.h: Likewise.
2952         * kern/command.c: Likewise.
2953         * kern/corecmd.c: Likewise.
2955         * kern/list.c (grub_list_iterate): Return int instead of void.
2956         (grub_list_insert): New function.
2957         (grub_prio_list_insert): Likewise.
2959         * kern/rescue.c (grub_rescue_command): Removed.
2960         (grub_rescue_command_list): Likewise.
2961         (grub_rescue_register_command): Likewise.
2962         (grub_rescue_unregister_command): Likewise.
2963         (grub_rescue_cmd_boot): Move to minicmd.c
2964         (grub_rescue_cmd_help): Likewise.
2965         (grub_rescue_cmd_info): Likewise.
2966         (grub_rescue_cmd_boot): Likewise.
2967         (grub_rescue_cmd_testload): Likewise.
2968         (grub_rescue_cmd_dump): Likewise.
2969         (grub_rescue_cmd_rmmod): Likewise.
2970         (grub_rescue_cmd_lsmod): Likewise.
2971         (grub_rescue_cmd_exit): Likewise.
2972         (grub_rescue_print_devices): Moved to corecmd.c.
2973         (grub_rescue_print_files): Likewise.
2974         (grub_rescue_cmd_ls): Likewise.
2975         (grub_rescue_cmd_insmod): Likewise.
2976         (grub_rescue_cmd_set): Likewise.
2977         (grub_rescue_cmd_unset): Likewise.
2978         (attempt_normal_mode): Use grub_command_find to get normal module.
2979         (grub_enter_rescue_mode): Use grub_register_core_commands to register
2980         commands, remove grub_rescue_register_command calls.
2982         * normal/command.c (grub_register_command): Removed.
2983         (grub_unregister_command): Likewise.
2984         (grub_command_find): Likewise.
2985         (grub_iterate_commands): Likewise.
2986         (rescue_command): Likewise.
2987         (export_command): Moved to corecmd.c.
2988         (set_command): Removed.
2989         (unset_command): Likewise.
2990         (insmod_command): Likewise.
2991         (rmmod_command): Likewise.
2992         (lsmod_command): Likewise.
2993         (grub_command_init): Likewise.
2995         * normal/completion.c (iterate_command): Use cmd->prio to check for
2996         active command.
2997         (complete_arguments): Use grub_extcmd_t structure to find options.
2998         (grub_normal_do_completion): Change function grub_iterate_commands to
2999         grub_command_iterate.
3001         * normal/execute.c (grub_script_execute_cmd): No need to parse
3002         argument here.
3004         * normal/main.c (grub_dyncmd_dispatcher): New function.
3005         (read_command_list): Register unload commands as dyncmd.
3006         (grub_cmd_normal): Use new command interface, register rescue,
3007         unregister normal at entry, register normal, unregister rescue at exit.
3009         * include/grub/list.h (grub_list_test_t): New type.
3010         (grub_list_iterate): Return int instead of void.
3011         (grub_list_insert): New function.
3012         (GRUB_AS_NAMED_LIST_P): New macro.
3013         (GRUB_AS_PRIO_LIST): Likewise.
3014         (GRUB_AS_PRIO_LIST_P): Likewise.
3015         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3016         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3017         (grub_prio_list): New structure.
3018         (grub_prio_list_insert): New function.
3019         (grub_prio_list_remove): New inline function.
3021         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3022         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3023         (GRUB_COMMAND_FLAG_MENU): Likewise.
3024         (GRUB_COMMAND_FLAG_BOTH): Likewise.
3025         (GRUB_COMMAND_FLAG_TITLE): Likewise.
3026         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3027         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3028         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3029         (grub_command): Likewise.
3030         (grub_register_command): Likewise.
3031         (grub_command_find): Likewise.
3032         (grub_iterate_commands): Likewise.
3033         (grub_command_init): Likewise.
3034         (grub_arg_parse): Likewise.
3035         (grub_arg_show_help): Likewise.
3037         * include/grub/rescue.h (grub_rescue_register_command): Removed.
3038         (grub_rescue_unregister_command): Likewise.
3040         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3041         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3042         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3044         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3045         grub_rescue_cmd_initrd.
3046         * include/grub/i386/loader.h: Likewise.
3047         * include/grub/x86_64/loader.h: Likewise.
3049         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3051 2009-03-21  Bean  <bean123ch@gmail.com>
3053         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3054         instead of stat in mingw environment.
3056         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3058         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3060         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3061         AC_CONFIG_LINKS.
3063 2009-03-21  Bean  <bean123ch@gmail.com>
3065         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3066         out of range error.
3068 2009-03-18  Michel Dänzer  <michel@daenzer.net>
3070         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3071         checking inode flags for EXT4_EXTENTS_FLAG.
3073 2009-03-18  Robert Millan  <rmh@aybabtu.com>
3075         * loader/i386/linux.c: Include `<grub/video.h>' and
3076         `<grub/i386/pc/vbe.h>'..
3077         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
3078         (grub_linux32_boot): Attempt to configure video settings with
3079         grub_linux_setup_video().
3080         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3081         to avoid grub_console_fini() which would step out of graphical mode
3082         unconditionally.
3084 2009-03-14  Robert Millan  <rmh@aybabtu.com>
3086         Fix build on powerpc.
3087         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3089 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
3091         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3092         background image command.
3094 2009-03-12  Colin D Bennett  <colin@gibibit.com>
3096         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3097         (grub_gfxterm_putchar): Extract pairs of identical calls to
3098         draw_cursor out of conditional blocks.
3100 2009-03-11  Pavel Roskin  <proski@gnu.org>
3102         * fs/hfs.c (grub_hfs_strncasecmp): New function.
3103         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3105 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3107         * loader/i386/multiboot_elfxx.c
3108         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3110 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
3112         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3113         `kern/handler.c'.
3115 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3117         * loader/i386/multiboot.c (code_size): New variable.
3118         (grub_multiboot): Define offsets by adding to `code_size' rather
3119         than subtracting from `grub_multiboot_payload_size'.  Provide
3120         4-byte alignment to MBI and others by increasing
3121         `boot_loader_name_length' appropriately.
3123         * loader/i386/multiboot_elfxx.c
3124         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3126 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
3128         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3129         `fs/ext2.c'.
3131 2009-03-08  Robert Millan  <rmh@aybabtu.com>
3133         Make loader/i386/linux.c usable on i386-pc again.
3135         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3136         memory to heap.
3137         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3138         `#error' stanza.
3140 2009-03-07  Bean  <bean123ch@gmail.com>
3142         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3143         allocation.
3145 2009-03-06  Robert Millan  <rmh@aybabtu.com>
3147         Fix display issue on terminals with screen size other than 80x25
3148         (e.g. gfxterm with resolution higher than 640x480).
3150         * normal/main.c (grub_normal_init_page): Display title text in a
3151         position relative to the center of the terminal instead of relying
3152         on a hardcoded offset.
3154 2009-03-04  Robert Millan  <rmh@aybabtu.com>
3156         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3157         installed.
3159         * Makefile.in (host_kernel): New variable.
3160         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3161         scripts instead of just the windows one.
3162         * configure.ac: Initialize and AC_SUBST `host_kernel'.
3164 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3166         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3167         `kern/handler.c'.
3168         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3169         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3170         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3171         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3172         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3173         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3175 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3177         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3178         or if there's no space for the disk label and print the partition number on a
3179         invalid magic.
3181 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3183         * util/misc.c: Include <time.h>.
3184         (grub_millisleep): New function.
3186 2009-03-04  Bean  <bean123ch@gmail.com>
3188         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3189         another option -mno-red-zone.
3191         * commands/handler.c: Change module description.
3193         * kern/handler.c: Add missing space at the end of description line.
3195         * kern/list.c: Likewise.
3197 2009-03-03  Robert Millan  <rmh@aybabtu.com>
3199         Move more components to the relocation area, and fix mbi pointer
3200         handling to use the destination rather than the origin (thanks to
3201         Vladimir Serbinenko for spotting).
3203         * loader/i386/multiboot.c (mbi_dest): New variable.
3204         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3205         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3206         relocation area.
3208 2009-03-01  Bean  <bean123ch@gmail.com>
3210         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3211         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3212         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3213         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3215         * loader/i386/efi/linux.c (acpi_guid): New variable.
3216         (acpi_guid): Likewise.
3217         (EBDA_SEG_ADDR): New constant.
3218         (LOW_MEM_ADDR): Likewise.
3219         (FAKE_EBDA_SEG): Likewise.
3220         (fake_bios_data): New function.
3221         (grub_linux_boot): Call fake_bios_data.
3223 2009-03-01  Bean  <bean123ch@gmail.com>
3225         * commands/terminal.c: Removed.
3227         * commands/handler.c: New file.
3229         * include/grub/list.h: Likewise.
3231         * include/grub/handler.h: Likewise.
3233         * kern/list.c: Likewise.
3235         * kern/handler.c: Likewise.
3237         * kern/term.h: Include header file <grub/handler.h>.
3238         (grub_term_input): Move next field to the beginning.
3239         (grub_term_output): Likewise.
3240         (grub_term_input_class): New variable.
3241         (grub_term_output_class): Likewise.
3242         (grub_term_register_input): Changed to inline function.
3243         (grub_term_register_output): Likewise.
3244         (grub_term_unregister_input): Likewise.
3245         (grub_term_unregister_output): Likewise.
3246         (grub_term_set_current_input): Likewise.
3247         (grub_term_set_current_output): Likewise.
3248         (grub_term_get_current_input): Likewise.
3249         (grub_term_get_current_output): Likewise.
3250         (grub_term_iterate_input): Removed.
3251         (grub_term_iterate_output): Likewise.
3253         * kern/term.c (grub_term_list_input): Removed.
3254         (grub_term_list_output): Likewise.
3255         (grub_term_input_class): New variable.
3256         (grub_term_output_class): Likewise.
3257         (grub_cur_term_input): Change variable as macro.
3258         (grub_cur_term_output): Likewise.
3259         (grub_term_register_input): Removed.
3260         (grub_term_register_output): Likewise.
3261         (grub_term_unregister_input): Likewise.
3262         (grub_term_unregister_output): Likewise.
3263         (grub_term_set_current_input): Likewise.
3264         (grub_term_set_current_output): Likewise.
3265         (grub_term_iterate_input): Likewise.
3266         (grub_term_iterate_output): Likewise.
3267         (grub_term_get_current_input): Likewise.
3268         (grub_term_get_current_output): Likewise.
3270         * util/grub-editenv.c: Include header file <grub/handler.h>.
3271         (grub_term_get_current_input): Removed.
3272         (grub_term_get_current_output): Likewise.
3273         (grub_term_input_class): New variable.
3274         (grub_term_output_class): Likewise.
3276         * util/grub-fstest.c (grub_term_get_current_input): Removed.
3277         (grub_term_get_current_output): Likewise.
3278         (grub_term_input_class): New variable.
3279         (grub_term_output_class): Likewise.
3281         * util/grub-probe.c (grub_term_get_current_input): Removed.
3282         (grub_term_get_current_output): Likewise.
3283         (grub_term_input_class): New variable.
3284         (grub_term_output_class): Likewise.
3286         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3287         (grub_term_get_current_output): Likewise.
3288         (grub_term_input_class): New variable.
3289         (grub_term_output_class): Likewise.
3291         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3292         (terminal_mod_SOURCES): Likewise.
3293         (terminal_mod_CFLAGS): Likewise.
3294         (terminal_mod_LDFLAGS): Likewise.
3296         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3297         handler.c.
3298         (kernel_img_SOURCES): Add list.c and handler.c.
3299         (kernel_img_HEADERS): Add list.h and handler.h.
3301         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3302         handler.c.
3303         (kernel_mod_SOURCES): Add list.c and handler.c.
3304         (kernel_mod_HEADERS): Add list.h and handler.h.
3306         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3307         handler.c.
3308         (kernel_elf_SOURCES): Add list.c and handler.c.
3309         (kernel_elf_HEADERS): Add list.h and handler.h.
3311         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3312         handler.c.
3313         (kernel_elf_SOURCES): Add list.c and handler.c.
3314         (kernel_elf_HEADERS): Add list.h and handler.h.
3316         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3317         handler.c.
3318         (kernel_mod_SOURCES): Add list.c and handler.c.
3319         (kernel_mod_HEADERS): Add list.h and handler.h.
3321         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3322         handler.c.
3323         (kernel_elf_SOURCES): Add list.c and handler.c.
3324         (kernel_elf_HEADERS): Add list.h and handler.h.
3326 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3328         Factorize elf32 / elf64 code in Multiboot loader.  This will
3329         prevent it from getting out of sync again.
3331         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3332         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3333         grub_multiboot_load_elf64): Move from here ...
3334         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3335         grub_multiboot_load_elf): ... to here (new file).
3337 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3339         * util/grub.d/10_linux.in: Rename "single-user mode" to
3340         "recovery mode".
3342 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
3344         Don't leak in SCSI code.
3345         * disk/scsi.c (grub_scsi_close): free `scsi'.
3347 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3349         * loader/i386/pc/multiboot.c: Move from here ...
3350         * loader/i386/multiboot.c: ... to here.  Update all users.
3352 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3354         Patch from Alexandre Bique <bique.alexandre@gmail.com>
3355         * util/i386/pc/grub-setup.c (setup): Fix directory path.
3357 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
3359         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3360         b-tree.
3362 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3364         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3365         `0x' qualifier as 0 when base is specified as parameter).
3367 2009-02-24  Bean  <bean123ch@gmail.com>
3369         * configure.ac: Check for -mcmodel=large in x86_64 target.
3371         * include/grub/efi/api.h (efi_call_10): New macro.
3372         (efi_wrap_10): New function.
3374         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3375         (GRUB_PE32_REL_BASED_HIGH): Likewise.
3376         (GRUB_PE32_REL_BASED_LOW): Likewise.
3377         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3378         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3379         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3380         (GRUB_PE32_REL_BASED_SECTION): Likewise.
3381         (GRUB_PE32_REL_BASED_REL): Likewise.
3382         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3383         (GRUB_PE32_REL_BASED_DIR64): Likewise.
3384         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3386         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3387         issue.
3389         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3390         (efi_wrap_10): New function.
3392         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3394         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3395         MB/MBP model (NV chipset).
3396         (devdata_devs): Add devpath_5 to the list.
3398         * load/i386/efi/linux.c (video_base): Remove variable.
3399         (RGB_MASK): New macro.
3400         (RGB_MAGIC): Likewise.
3401         (LINE_MIN): Likewise.
3402         (LINE_MAX): Likewise.
3403         (FBTEST_STEP): Likewise.
3404         (FBTEST_COUNT): Likewise.
3405         (fb_list): New variable.
3406         (grub_find_video_card): Remove function.
3407         (find_framebuf): New function.
3408         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3409         line length.
3411         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3412         problem for x86_64.
3414 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
3416         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3418         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3419         coding tool name.
3421 2009-02-22  Robert Millan  <rmh@aybabtu.com>
3423         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3424         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3425         in our relocation, instead of using it directly from heap.  Also
3426         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3428 2009-02-21  Robert Millan  <rmh@aybabtu.com>
3430         Implement USB keyboard support (based on patch by Marco Gerards)
3432         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3433         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3434         (usb_keyboard_mod_LDFLAGS): New variables.
3436         * term/usb_keyboard.c: New file.
3438 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
3440         Corrected wrong declaration
3442         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3444 2009-02-14  Christian Franke  <franke@computer.org>
3446         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3447         (grub_lspci_iter): Print class code and programming interface byte.
3449 2009-02-14  Christian Franke  <franke@computer.org>
3451         * gendistlist.sh: Ignore `.svn' directories.
3453 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
3455         * fs/fat.c: Add 2009 to Copyright line.
3457 2009-02-14  Christian Franke  <franke@computer.org>
3459         * commands/hdparm.c: New file.  Provides `hdparm' command
3460         which sends ATA commands via grub_disk_ata_pass_through ().
3462         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3464         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
3465         and <grub/cpu/io.h> to include/grub/ata.h.
3466         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3467         (GRUB_CDROM_SECTOR_SIZE): Remove.
3468         (GRUB_ATA_*): Move to include/grub/ata.h.
3469         (GRUB_ATAPI_*): Likewise.
3470         (enum grub_ata_commands): Likewise.
3471         (enum grub_ata_timeout_milliseconds): Likewise.
3472         (struct grub_ata_device): Likewise.
3473         (grub_ata_regset): Likewise.
3474         (grub_ata_regget): Likewise.
3475         (grub_ata_regset2): Likewise.
3476         (grub_ata_regget2): Likewise.
3477         (grub_ata_check_ready): Likewise.
3478         (grub_ata_wait_not_busy): Remove static, exported in
3479         include/grub/ata.h.
3480         (grub_ata_wait_drq): Likewise.
3481         (grub_ata_pio_read): Likewise.
3483         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
3484         function for hdparm.mod.
3486         * include/grub/ata.h: New file, contains declarations from
3487         disk/ata.c.
3488         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3490         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3491         (grub_disk_ata_pass_through): New exported variable.
3493         * kern/disk.c (grub_disk_ata_pass_through): New variable.
3495 2009-02-13  Colin D Bennett  <colin@gibibit.com>
3497         Support multiple fallback entries, and provide an API to support
3498         executing default+fallback menu entries.  Renamed the `terminal' menu
3499         viewer to `text'.
3501         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3502         variable declaration.
3503         (grub_menu_execute_callback): New structure declaration.
3504         (grub_menu_execute_callback_t): New typedef.
3505         (grub_menu_execute_with_fallback): New function declaration.
3506         (grub_menu_get_entry): Likewise.
3507         (grub_menu_get_timeout): Likewise.
3508         (grub_menu_set_timeout): Likewise.
3510         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3512         * normal/menu.c (grub_wait_after_message): Moved to
3513         `normal/menu_text.c'.
3514         (draw_border): Likewise.
3515         (print_message): Likewise.
3516         (print_entry): Likewise.
3517         (print_entries): Likewise.
3518         (grub_menu_init_page): Likewise.
3519         (get_entry_number): Likewise.
3520         (print_timeout): Likewise.
3521         (run_menu): Likewise.
3522         (grub_menu_execute_entry): Likewise.
3523         (show_text_menu): Likewise.
3524         (get_and_remove_first_entry_number): New function.
3525         (grub_menu_execute_with_fallback): Likewise.
3526         (get_entry): Renamed to ...
3527         (grub_menu_get_entry): .. this and made it global.
3528         (get_timeout): Renamed to ...
3529         (grub_menu_get_timeout): ... this and made it global.
3530         (set_timeout): Renamed to ...
3531         (grub_menu_set_timeout): ... this and made it global.
3532         (grub_normal_terminal_menu_viewer): Renamed to ...
3533         (grub_normal_text_menu_viewer): ... this.
3535         * normal/menu_text.c: New file.  Extracted text-menu-specific code
3536         from normal/menu.c.
3538         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3539         (normal_mod_SOURCES): Likewise.
3541         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3542         (normal_mod_SOURCES): Likewise.
3544         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3545         (normal_mod_SOURCES): Likewise.
3547         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3548         (normal_mod_SOURCES): Likewise.
3550         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3551         (normal_mod_SOURCES): Likewise.
3553         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3554         (normal_mod_SOURCES): Likewise.
3556         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3557         (normal_mod_SOURCES): Likewise.
3559 2009-02-11  Robert Millan  <rmh@aybabtu.com>
3561         * util/grub.d/00_header.in: Update old reference to `font' command.
3563 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
3565         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3567         Based on patch from Javier Martín.
3569 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3571         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3572         to avoid false positives with FAT.
3573         (grub_fstest_SOURCES): Likewise.
3574         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3575         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3576         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3577         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3578         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3579         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3581 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3583         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3584         bpb.version_specific.fat12_or_fat16.fstype and
3585         bpb.version_specific.fat32.fstype.
3587 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3589         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3591 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3593         * Makefile.in (host_os, host_cpu): New variables.
3594         (target_os): Remove.  Update all users.
3596 2009-02-08  Marco Gerards  <marco@gnu.org>
3598         * Makefile.in (enable_grub_emu_usb): New variable.
3599         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3600         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3601         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3602         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3603         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3604         `usbtest.mod' and `usbms.mod'.
3605         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3606         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3607         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3608         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3609         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3610         variables.
3612         * disk/usbms.c: New file.
3614         * include/grub/usb.h: Likewise.
3616         * include/grub/usbtrans.h: Likewise.
3618         * include/grub/usbdesc.h: Likewise.
3620         * bus/usb/usbtrans.c: Likewise.
3622         * bus/usb/ohci.c: Likewise.
3624         * bus/usb/uhci.c: Likewise.
3626         * bus/usb/usbhub.c: Likewise.
3628         * bus/usb/usb.c: Likewise.
3630         * commands/usbtest.c: Likewise.
3632         * util/usb.c: Likewise.
3634         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3636         * configure.ac: Test for libusb presence.
3638         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3640 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
3642         * kern/mm.c: Add more comments.
3644 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3646         Patch from Javier Martín.
3647         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3648         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3650 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3652         * fs/cpio.c: Split tar functionality to ...
3653         * fs/tar.c: ... here (new file).  Update all users.
3655 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3657         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3658         backward-incompatible features.
3660         Based on patch from Javier Martín, with some adjustments.
3662 2009-02-07  Michael Scherer  <misc@mandriva.org>
3664         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3666 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3668         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3669         position of `disk/lvm.c' to ensure grub_init_all() always picks it
3670         after the RAID stuff.
3672 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
3674         Fixes problem when running vbetest command as reported by
3675         Vladimir Serbinenko <phcoder@gmail.com>.
3677         * (grub_vbe_set_video_mode): Fixed problem with text modes.
3679 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
3681         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3682         /dev/md/NpN style mdraid devices.
3684 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3686         * util/unifont2pff.rb: Remove.
3688 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3690         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3691         `#'.
3693 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3695         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3696         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3697         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3698         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3699         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3700         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3701         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3703 2009-02-02  Christian Franke  <franke@computer.org>
3705         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3707 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
3709         * INSTALL: Note that we now require at least autoconf 2.59 and
3710         that LZO is optional.
3712 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3714         Base on patch on bug #24154 created by Tomas Tintera
3715         <trosos@seznam.cz>.
3717         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3719 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3721         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3722         <bero@arklinux.org>.
3724         * normal/parser.y (script_init): Add missing semicolon.
3726 2009-01-31  Colin D Bennett  <colin@gibibit.com>
3728         * normal/main.c: Add include to grub/menu_viewer.h.
3729         (free_menu_entry_classes): Added.
3730         (grub_normal_menu_addentry): Added class property handling.
3731         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3732         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3734         * normal/menu_viewer.c: New file.
3736         * normal/menu.c (run_menu_entry): Renamed to ...
3737         (grub_menu_execute_entry): ... this and made it as global.
3738         (grub_menu_run): Renamed to ...
3739         (show_text_menu): ... this and made it local.
3740         (show_text_menu): Adapt to new function names.
3741         (grub_normal_terminal_menu_viewer): New global variable.
3743         * include/grub/menu.h: New file.
3745         * include/grub/menu_viewer.h: New file.
3747         * include/grub/normal.h: Added include to grub/menu.h.
3748         (grub_menu_entry): Moved to include/grub/menu.h.
3749         (grub_menu_entry_t): Likewise.
3750         (grub_menu): Likewise.
3751         (grub_menu_t): Likewise.
3752         (grub_normal_terminal_menu_viewer): Added.
3753         (grub_menu_execute_entry): Likewise.
3754         (grub_menu_run): Removed.
3756         * DISTLIST: Added include/grub/menu.h.
3757         Added include/grub/menu_viewer.h.
3758         Added normal/menu_viewer.c.
3760 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
3762         * normal/execute.c (grub_script_execute_menuentry): Changed to use
3763         arglist for menutitle arguments.
3765         * normal/main.c (grub_normal_menu_addentry): Likewise.
3767         * normal/parser.y (menuentry): Likewise.
3769         * normal/script.c (grub_script_create_cmdmenu): Likewise.
3771         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3772         (grub_script_create_cmdmenu): Likewise.
3774         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3776         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3777         changes.
3779         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3781         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3783         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3785         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3787         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3789         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3791 2009-01-30  Christian Franke  <franke@computer.org>
3793         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3794         in option help text.
3796 2009-01-27  Pavel Roskin  <proski@gnu.org>
3798         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3800 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3802         * commands/lsmmap.c: Add include to grub/machine/memory.h.
3804         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3806         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3807         unregister function.
3809 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3811         * disk/scsi.c (grub_scsi_read): Fix sign problem.
3813         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3815         * util/grub-mkfont.c (usage): Fix typo.
3817         * util/elf/grub-mkimage.c (load_modules): Fix warning.
3819 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
3821         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3823         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3825         * kern/misc.c (grub_strcasecmp): New function.
3826         (grub_strcasecmp): Use grub_size_t instead of int for length.
3827         Fix return value.
3828         * include/grub/misc.h: Update function prototypes.
3830 2009-01-26  Robert Millan  <rmh@aybabtu.com>
3832         * configure.ac: Fix cross-compilation check.
3834 2009-01-22  Christian Franke  <franke@computer.org>
3836         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3837         (precision) digit string.  Allow `.format2' without `format1' (width).
3838         Limit input chars for `%s' output to `format2' if specified.  This is
3839         compatible with standard printf ().
3841 2009-01-22  Christian Franke  <franke@computer.org>
3843         * disk/ata.c (grub_ata_wait_status): Replace by ...
3844         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
3845         other status bits may be invalid while BSY is asserted.
3846         (grub_ata_check_ready): New function.
3847         (grub_ata_cmd): Removed.
3848         (grub_ata_wait_drq): New function.
3849         (grub_ata_strncpy): Remove inline.
3850         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
3851         and error check now done by grub_ata_wait_drq ().
3852         (grub_ata_pio_write): Likewise.
3853         (grub_atapi_identify): Set DEV before check for !BSY.  Use
3854         grub_ata_wait_drq () to wait for data.
3855         (grub_ata_device_initialize): Add status register check to
3856         detect missing SATA slave devices.  Add debug messages.
3857         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3858         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
3859         transfer loop by grub_ata_pio_write ().
3860         (grub_ata_identify): Set DEV before check for !BSY. Use
3861         grub_ata_wait_drq () to wait for data.
3862         (grub_ata_setaddress): Set DEV before check for !BSY.
3863         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3864         read/write in one loop.  Fix invalid command on write.  Fix incomplete
3865         command on (size % batch) == 0.  Add missing error check after write of
3866         last block.  Add debug messages.
3867         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
3869 2009-01-19  Christian Franke  <franke@computer.org>
3871         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3872         (GRUB_ATAPI_IREASON_*): Likewise.
3873         (grub_ata_pio_write): Fix timeout error return.
3874         (grub_atapi_identify): Add grub_ata_wait () after cmd.
3875         (grub_atapi_wait_drq): New function.
3876         (grub_atapi_packet): New parameter `size'.
3877         Use grub_atapi_wait_drq () and direct write instead of
3878         grub_ata_pio_write ().
3879         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3880         reads the number of bytes requested by the device for each DRQ
3881         assertion.
3882         (grub_atapi_write): Remove old implementation, return not
3883         implemented instead.
3885 2009-01-19  Christian Franke  <franke@computer.org>
3887         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3888         of 512 to calculate data size.
3889         (grub_scsi_read12): Likewise.
3890         (grub_scsi_write10): Likewise.
3891         (grub_scsi_write12): Likewise.
3892         (grub_scsi_read): Adjust size according to blocksize.
3893         Add checks for invalid blocksize and unaligned transfer.
3895 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
3897         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3899         * term/gfxterm.c (write_char): Fix background rendering for wide
3900         width glyphs.
3902 2009-01-19  Robert Millan  <rmh@aybabtu.com>
3904         * config.guess: Update to latest version from config git.
3905         * config.sub: Likewise.
3907 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
3909         * Makefile.in: Change font compilation to use new grub-mkfont instead
3910         of java version.
3912         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3913         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3914         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3915         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3916         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3917         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3918         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3919         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3920         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3922 2009-01-16  Christian Franke  <franke@computer.org>
3924         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3925         (enum grub_ata_timeout_milliseconds): New enum.
3926         (grub_ata_wait_status): Add parameter milliseconds.
3927         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
3928         recovery from timed-out commands.
3929         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
3930         return grub_errno instead of REG_ERROR.
3931         (grub_ata_pio_write): Add parameter milliseconds.
3932         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3933         Pass milliseconds to grub_ata_wait_status () and
3934         grub_ata_pio_read ().
3935         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3936         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
3937         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
3938         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3939         It is not suitable for device detection, because DEV bit is ignored,
3940         the command may run too long, and not all devices set the signature
3941         properly.
3942         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3943         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3944         Fix device selection, DEV bit must be set first to address the registers
3945         of the correct device.
3946         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3947         grub_ata_pio_read/write ().
3948         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3949         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3951 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
3953         * util/grub-editenv.c (main): Use fseeko(), not fseek().
3955 2009-01-13  Bean  <bean123ch@gmail.com>
3957         * util/grub-mkfont.c (write_font): forget to remove some debug code.
3959 2009-01-13  Bean  <bean123ch@gmail.com>
3961         * Makefile.in: (enable_grub_mkfont): New variable.
3962         (freetype_cflags): Likewise.
3963         (freetype_libs): Likewise.
3965         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3966         (grub_mkfont_SOURCES): New variable.
3967         (grub_mkfont_CFLAGS): Likewise.
3968         (grub_mkfont_LDFLAGS): Likewise.
3970         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3971         library if `--enable-grub-mkfont' is requested.
3972         (enable_grub_mkfont): New variable.
3973         (freetype_cflags): Likewise.
3974         (freetype_libs): Likewise.
3976         * util/grub-mkfont.c: New file.
3978 2009-01-12  Christian Franke  <franke@computer.org>
3980         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3981         mode check.  Fix setting of compat_use[].
3983 2009-01-10  Robert Millan  <rmh@aybabtu.com>
3985         Update a few copyright years which we forgot to do in 2008 (only for
3986         files whose changes made in 2008 were copyright-significant)
3988         * Makefile.in: Add 2008 to Copyright line.
3989         * disk/ieee1275/ofdisk.c: Likewise.
3990         * disk/efi/efidisk.c: Likewise.
3991         * kern/dl.c: Likewise.
3992         * kern/sparc64/ieee1275/init.c: Likewise.
3993         * kern/mm.c: Likewise.
3994         * kern/efi/mm.c: Likewise.
3995         * boot/i386/pc/boot.S: Likewise.
3996         * genfslist.sh: Likewise.
3997         * fs/iso9660.c: Likewise.
3998         * fs/hfs.c: Likewise.
3999         * fs/jfs.c: Likewise.
4000         * fs/minix.c: Likewise.
4001         * fs/ufs.c: Likewise.
4002         * gensymlist.sh.in: Likewise.
4003         * genkernsyms.sh.in: Likewise.
4004         * include/grub/misc.h: Likewise.
4005         * include/grub/types.h: Likewise.
4006         * include/grub/symbol.h: Likewise.
4007         * include/grub/elf.h: Likewise.
4008         * include/grub/kernel.h: Likewise.
4009         * include/grub/disk.h: Likewise.
4010         * include/grub/dl.h: Likewise.
4011         * include/grub/i386/linux.h: Likewise.
4012         * include/grub/i386/pc/biosdisk.h: Likewise.
4013         * include/grub/efi/api.h: Likewise.
4014         * include/grub/efi/pe32.h: Likewise.
4015         * include/grub/util/misc.h: Likewise.
4016         * normal/execute.c: Likewise.
4017         * normal/arg.c: Likewise.
4018         * normal/completion.c: Likewise.
4019         * normal/lexer.c: Likewise.
4020         * normal/parser.y: Likewise.
4021         * normal/misc.c: Likewise.
4022         * commands/i386/pc/vbeinfo.c: Likewise.
4023         * commands/hexdump.c: Likewise.
4024         * commands/terminal.c: Likewise.
4025         * commands/ls.c: Likewise.
4026         * commands/help.c: Likewise.
4027         * partmap/pc.c: Likewise.
4028         * loader/efi/chainloader.c: Likewise.
4029         * loader/multiboot_loader.c: Likewise.
4030         * loader/i386/pc/multiboot2.c: Likewise.
4031         * term/efi/console.c: Likewise.
4032         * term/i386/pc/serial.c: Likewise.
4033         * util/lvm.c: Likewise.
4034         * util/console.c: Likewise.
4035         * util/i386/efi/grub-mkimage.c: Likewise.
4036         * util/raid.c: Likewise.
4038 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
4040         * commands/videotest.c: Removed include to grub/machine/memory.h.
4042         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4043         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4044         (video_mod_SOURCES): Removed.
4045         (video_mod_CFLAGS): Likewise.
4046         (video_mod_LDFLAGS): Likewise.
4047         (gfxterm_mod_SOURCES): Likewise.
4048         (gfxterm_mod_CFLAGS): Likewise.
4049         (gfxterm_mod_LDFLAGS): Likewise.
4050         (videotest_mod_SOURCES): Likewise.
4051         (videotest_mod_CFLAGS): Likewise.
4052         (videotest_mod_LDFLAGS): Likewise.
4053         (bitmap_mod_SOURCES): Likewise.
4054         (bitmap_mod_CFLAGS): Likewise.
4055         (bitmap_mod_LDFLAGS): Likewise.
4056         (tga_mod_SOURCES): Likewise.
4057         (tga_mod_CFLAGS): Likewise.
4058         (tga_mod_LDFLAGS): Likewise.
4059         (jpeg_mod_SOURCES): Likewise.
4060         (jpeg_mod_CFLAGS): Likewise.
4061         (jpeg_mod_LDFLAGS): Likewise.
4062         (png_mod_SOURCES): Likewise.
4063         (png_mod_CFLAGS): Likewise.
4064         (png_mod_LDFLAGS): Likewise.
4066         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4067         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4068         (video_mod_SOURCES): Added.
4069         (video_mod_CFLAGS): Likewise.
4070         (video_mod_LDFLAGS): Likewise.
4071         (videotest_mod_SOURCES): Likewise.
4072         (videotest_mod_CFLAGS): Likewise.
4073         (videotest_mod_LDFLAGS): Likewise.
4074         (bitmap_mod_SOURCES): Likewise.
4075         (bitmap_mod_CFLAGS): Likewise.
4076         (bitmap_mod_LDFLAGS): Likewise.
4077         (tga_mod_SOURCES): Likewise.
4078         (tga_mod_CFLAGS): Likewise.
4079         (tga_mod_LDFLAGS): Likewise.
4080         (jpeg_mod_SOURCES): Likewise.
4081         (jpeg_mod_CFLAGS): Likewise.
4082         (jpeg_mod_LDFLAGS): Likewise.
4083         (png_mod_SOURCES): Likewise.
4084         (png_mod_CFLAGS): Likewise.
4085         (png_mod_LDFLAGS): Likewise.
4086         (gfxterm_mod_SOURCES): Likewise.
4087         (gfxterm_mod_CFLAGS): Likewise.
4088         (gfxterm_mod_LDFLAGS): Likewise.
4090         * term/gfxterm.c: Removed include to grub/machine/memory.h,
4091         grub/machine/console.h.
4093 2009-01-04  Jerone Young  <jerone@gmail.com>
4095         Make on screen instructions clearer
4097         Based on patch created by Jidanni <jidanni@jidanni.org>
4099         * normal/menu.c: print clearer instructions on the screen
4101 2009-01-02  Colin D Bennett  <colin@gibibit.com>
4103         New font engine.
4105         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4106         build system and fixed gfxterm.c to work with different sized fonts.
4108         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4110         * configure: Re-generated.
4112         * DISTLIST: Removed font/manager.c.
4113         Added font/font.c.
4114         Added font/font_cmd.c.
4116         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
4117         compilation.
4119         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
4121         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4123         * kern/term.c: Changed users of grub_utf8_to_ucs4.
4125         * normal/menu.c: Likewise.
4127         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4128         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4130         * include/grub/font.h: Replaced with new file.
4132         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4133         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4134         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4135         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4136         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4137         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4138         fg_red, fg_green, fg_blue, fg_alpha.
4139         (grub_video_adapter): Removed blit_glyph.
4140         (grub_video_blit_glyph): Removed.
4142         * font/manager.c: Removed file.
4144         * font/font.c: New file.
4146         * font/font_cmd.c: Likewise.
4148         * video/video.c (grub_video_blit_glyph): Removed.
4150         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4151         (grub_video_vbe_map_rgba): Likewise.
4152         (grub_video_vbe_unmap_color_int): Likewise.
4153         (grub_video_vbe_blit_glyph): Removed.
4154         (grub_video_vbe_adapter): Removed blit_glyph.
4156         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4157         (get_pixel): Likewise.
4158         (set_pixel): Likewise.
4160         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4162         * term/gfxterm.c: Adapted to new font engine.
4164         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
4166         * term/i386/pc/vga.c: Likewise.
4168         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4170         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4172         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4174         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4176         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4178         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4180         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4182         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4184         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4186         * util/grub.d/00_header.in: Changed to use new loadfont command.
4188         * util/grub-mkconfig_lib.in: Changed font extension.
4190 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
4192         * util/getroot.c (grub_util_get_grub_dev): Add support for
4193         /dev/md/dNNpNN style partitionable mdraid devices.
4195 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
4197         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4198         at a time limit of the PXE TFTP API correctly.
4199         (grub_pxefs_close): Likewise.
4201 2008-11-29  Robert Millan  <rmh@aybabtu.com>
4203         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4204         grub_ata_device_initialize() calls.
4206 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
4208         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4209         iteration failed.
4210         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4212 2008-11-28  Robert Millan  <rmh@aybabtu.com>
4214         Fix build on powerpc-ieee1275.  Based on patch created by
4215         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4216         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4217         `kern/ieee1275/mmap.c'.
4218         * include/grub/powerpc/ieee1275/memory.h: New file.
4220         Provide grub-install on coreboot.
4221         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4222         (grub_install_SOURCES): New variable.
4223         * util/i386/pc/grub-install.in: Add a few condition checks to make it
4224         usable on coreboot.
4226 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
4228         * util/grub-fstest.c (grub_term_get_current_input): Change return type
4229         to `grub_term_input_t'.
4230         (grub_term_get_current_output): Change return type to
4231         `grub_term_output_t'.
4233 2008-11-22  Robert Millan  <rmh@aybabtu.com>
4235         Fix breakage on coreboot due to declaration mismatch.
4236         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4237         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4238         grub_vga_text_cls().
4240         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4241         comments.  Avoid copying one more byte than necessary (just in case).
4243         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4244         to 0x200000 (avoids trouble with some OFW implementations, and matches
4245         with the one in Yaboot).
4246         Reported by Manoel Abranches
4248 2008-11-20  Robert Millan  <rmh@aybabtu.com>
4250         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4251         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4253         * util/grub-mkconfig_lib.in (grub_warn): New function.
4254         (convert_system_path_to_grub_path): Use grub_warn() when issuing
4255         warnings, to obtain consistent formatting.
4256         * util/grub.d/00_header.in: Likewise.
4257         * util/update-grub_lib.in: Likewise.
4259         * loader/i386/linux.c (allocate_pages): Fix a warning.
4260         Move comment text to `#error' stanza.
4262         Harmonize ieee1275's grub_available_iterate() with the generic
4263         grub_machine_mmap_iterate() interface (fixes a recently-introduced
4264         build problem on i386-ieee1275):
4265         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4266         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
4267         parameter `type'.  Update all users of this function.
4268         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4269         `kern/ieee1275/mmap.c'.
4270         * kern/ieee1275/init.c
4271         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4272         with ...
4273         (grub_machine_mmap_iterate): ... this.
4274         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4275         return type to `grub_err_t'.  Update all implementations of this
4276         function prototype.
4277         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4278         Likewise.
4280         Add `lsmmap' command (lists firmware-provided memory map):
4281         * commands/lsmmap.c: New file.
4282         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4283         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4284         variables.
4285         * conf/powerpc-ieee1275.rmk: Likewise.
4286         * conf/i386-coreboot.rmk: Likewise.
4287         * conf/i386-ieee1275.rmk: Likewise.
4289 2008-11-19  Robert Millan  <rmh@aybabtu.com>
4291         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4292         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4293         constraints to initrd allocation (based on code from
4294         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
4295         for Linux to find it.
4297 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4299         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4300         order to cope with duplicate slashes.
4302 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4304         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4305         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
4306         don't want to mess with lower memory, because it is used in the Linux
4307         loader.
4309         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4310         an appropriate place in lower memory, between 0x10000 and 0x90000,
4311         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
4312         is in our heap (probably as a result of it being corrupted during
4313         decompression).  Add #error instance with comment to explain why this
4314         loader isn't currently usable on PC/BIOS.
4316 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4318         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4319         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4321 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4323         Make loader/i386/linux.c buildable on i386-pc (although disabled).
4325         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4326         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4327         from here ...
4328         * include/grub/i386/pc/memory.h: ... to here.
4330 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4332         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4333         split).
4335         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4336         (grub_console_cur_color, grub_console_real_putchar)
4337         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4338         (grub_console_setcolorstate, grub_console_setcolor)
4339         (grub_console_getcolor): Move from here ...
4340         * include/grub/i386/vga_common.h: ... to here (new file).
4342         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4343         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4344         `<grub/i386/io.h>'.
4345         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4346         `<grub/i386/vga_common.h>'.
4348 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4350         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4351         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4352         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4353         variables.
4354         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4355         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4357         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4358         grub_console_init() with call to grub_vga_text_init().
4359         (grub_machine_fini): Replace call to
4360         grub_console_fini() with call to grub_vga_text_fini() and
4361         grub_at_keyboard_fini().
4363         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4364         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4365         (grub_console_setcolorstate, grub_console_setcolor)
4366         (grub_console_getcolor): New function prototypes.
4368         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4369         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4370         (grub_vga_text_setcursor): Static-ize.
4371         (grub_vga_text_term): New structure.
4372         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4374         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4375         (grub_console_cur_color, grub_console_standard_color)
4376         (grub_console_normal_color, grub_console_highlight_color)
4377         (map_char, grub_console_putchar, grub_console_getcharwidth)
4378         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4379         (grub_console_getcolor): Move from here ...
4380         * term/i386/vga_common.c: ... to here (same function names).
4382 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4384         Use newly-added Multiboot support in coreboot.
4386         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4387         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4389         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4390         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4391         (codestart): Store the MBI in `startup_multiboot_info' when we're
4392         being loaded using Multiboot.
4394         * kern/i386/coreboot/init.c (grub_machine_init): Move
4395         grub_at_keyboard_init() call to beginning of function (useful for
4396         debugging).  Call grub_machine_mmap_init() before attempting to use
4397         grub_machine_mmap_iterate().
4398         (grub_lower_mem, grub_upper_mem): Move from here ...
4399         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4400         here (new file).
4402         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4403         function prototype.
4405 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4407         Fix a regression introduced by the at_keyboard.mod split.  Because
4408         some terminals are default on some platforms and non-default on
4409         others, the first terminal being registered determines which is
4410         going to be default.
4412         * kern/term.c (grub_term_register_input): If this is the first
4413         terminal being registered, set it as the current one.
4414         (grub_term_register_output): Likewise.
4416         * term/efi/console.c (grub_console_init): Do not call
4417         grub_term_set_current_output() or grub_term_set_current_input().
4418         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4419         * term/i386/pc/console.c (grub_console_init): Likewise.
4420         (grub_console_fini): Do not call grub_term_set_current_input()
4421         (but leave grub_term_set_current_output() to restore text mode).
4423 2008-11-10  Robert Millan  <rmh@aybabtu.com>
4425         * util/grub.d/00_header.in: Add backward compatibility check for
4426         versions of terminal.mod that don't understand `terminal_input' or
4427         `terminal_output'.
4429 2008-11-09  Robert Millan  <rmh@aybabtu.com>
4431         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4432         `terminal_input' / `terminal_output', not `terminal'.
4434 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4436         * Makefile.in (include_DATA): Fix srcdir=. assumption.
4437         (DISTCLEANFILES): Add `build_env.mk'.
4439 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4441         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4442         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
4443         members.  Update all users.
4444         * util/console.c (grub_ncurses_term): Split in ...
4445         (grub_ncurses_term_input): ... this, and ...
4446         (grub_ncurses_term_output): ... this.  Update all users.
4447         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4449 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4451         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4452         (PKGDATA): Add $(pkgdata_SRCDIR).
4453         (pkglib_BUILDDIR): New variable.
4454         (pkgdata_SRCDIR): New variable.
4455         (build_env.mk): New target.
4456         (include_DATA): New variable.
4457         (install-local): Install $(include_DATA) files in $(includedir).
4459 2008-11-07  Pavel Roskin  <proski@gnu.org>
4461         * gendistlist.sh: Use C locale for sorting to ensure consistent
4462         output on all systems.
4464         * util/grub.d/00_header.in: Remove incorrect space before
4465         "serial".
4467 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4469         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4470         per specification.
4471         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4472         * loader/multiboot_loader.c (find_multi_boot2_header): New function
4473         (based on find_multi_boot1_header).
4474         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4475         using find_multi_boot2_header(), and abort if neither Multiboot or
4476         Multiboot headers were found.
4478 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4480         Modularize at_keyboard.mod:
4482         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4483         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4484         (at_keyboard_mod_LDFLAGS): New variables.
4486         Actual terminal split:
4488         * include/grub/term.h (struct grub_term): Split in ...
4489         (struct grub_term_input): ... this, and ...
4490         (struct grub_term_output): ... this.  Update all users.
4491         (grub_term_set_current): Split in ...
4492         (grub_term_set_current_input): ... this, and ...
4493         (grub_term_set_current_output): ... this.
4494         (grub_term_get_current): Split in ...
4495         (grub_term_get_current_input): ... this, and ...
4496         (grub_term_get_current_output): ... this.
4497         (grub_term_register): Split in ...
4498         (grub_term_register_input): ... this, and ...
4499         (grub_term_register_output): ... this.
4500         (grub_term_unregister): Split in ...
4501         (grub_term_unregister_input): ... this, and ...
4502         (grub_term_unregister_output): ... this.
4503         (grub_term_iterate): Split in ...
4504         (grub_term_iterate_input): ... this, and ...
4505         (grub_term_iterate_output): ... this.
4507         * kern/term.c (grub_term_list): Split in ...
4508         (grub_term_list_input): ... this, and ...
4509         (grub_term_list_output): ... this.  Update all users.
4510         (grub_cur_term): Split in ...
4511         (grub_cur_term_input): ... this, and ...
4512         (grub_cur_term_output): ... this.  Update all users.
4513         (grub_term_set_current): Split in ...
4514         (grub_term_set_current_input): ... this, and ...
4515         (grub_term_set_current_output): ... this.
4516         (grub_term_get_current): Split in ...
4517         (grub_term_get_current_input): ... this, and ...
4518         (grub_term_get_current_output): ... this.
4519         (grub_term_register): Split in ...
4520         (grub_term_register_input): ... this, and ...
4521         (grub_term_register_output): ... this.
4522         (grub_term_unregister): Split in ...
4523         (grub_term_unregister_input): ... this, and ...
4524         (grub_term_unregister_output): ... this.
4525         (grub_term_iterate): Split in ...
4526         (grub_term_iterate_input): ... this, and ...
4527         (grub_term_iterate_output): ... this.
4529         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4530         a check for input and one for output (and only attempt to get keys
4531         from user when input works).
4533         * util/grub-probe.c (grub_term_get_current): Split in ...
4534         (grub_term_get_current_input): ... this, and ...
4535         (grub_term_get_current_output): ... this.
4536         * util/grub-fstest.c: Likewise.
4537         * util/i386/pc/grub-setup.c: Likewise.
4538         * util/grub-editenv.c: Likewise.
4540         Portability adjustments:
4542         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4543         `term/i386/pc/at_keyboard.c'.
4544         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4545         grub_keyboard_controller_init() (now handled by terminal .init).
4546         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4547         grub_at_keyboard_init().
4548         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4549         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4550         at_keyboard.mod via input terminal interface).
4551         * include/grub/i386/coreboot/console.h: Convert into a stub for
4552         `<grub/i386/pc/console.h>'.
4554         Migrate full terminals to new API:
4556         * term/efi/console.c (grub_console_term): Split into ...
4557         (grub_console_term_input): ... this, and ...
4558         (grub_console_term_output): ... this.  Update all users.
4559         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4560         (grub_ofconsole_init): Split into ...
4561         (grub_ofconsole_init_input): ... this, and ...
4562         (grub_ofconsole_init_output): ... this.
4563         (grub_ofconsole_term): Split into ...
4564         (grub_ofconsole_term_input): ... this, and ...
4565         (grub_ofconsole_term_output): ... this.  Update all users.
4566         * term/i386/pc/serial.c (grub_serial_term): Split into ...
4567         (grub_serial_term_input): ... this, and ...
4568         (grub_serial_term_output): ... this.  Update all users.
4569         * term/i386/pc/console.c (grub_console_term): Split into ...
4570         (grub_console_term_input): ... this, and ...
4571         (grub_console_term_output): ... this.  Update all users.
4572         (grub_console_term_input): Only enable it on PC/BIOS platform.
4573         (grub_console_init): Remove grub_keyboard_controller_init() call.
4575         Migrate input terminals to new API:
4577         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4578         `i386' and `i386/pc' to enable build on x86_64 (this driver is
4579         i386-specific anyway).
4580         (grub_console_checkkey): Rename to ...
4581         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
4582         users.
4583         (grub_keyboard_controller_orig): New variable.
4584         (grub_console_getkey): Rename to ...
4585         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
4586         users.
4587         (grub_keyboard_controller_init): Static-ize.  Save original
4588         controller value so that it can be restored ...
4589         (grub_keyboard_controller_fini): ... here (new function).
4590         (grub_at_keyboard_term): New structure.
4591         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4592         functions.
4594         Migrate output terminals to new API:
4596         * term/i386/pc/vga.c (grub_vga_term): Change type to
4597         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4598         members.  Update all users.
4599         * term/gfxterm.c (grub_video_term): Change type to
4600         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4601         members.  Update all users.
4602         * include/grub/i386/pc/console.h (grub_console_checkkey)
4603         (grub_console_getkey): Do not export (no longer needed by gfxterm,
4604         etc).
4606         Migrate `terminal' command and userland tools to new API:
4608         * commands/terminal.c (grub_cmd_terminal): Split into ...
4609         (grub_cmd_terminal_input): ... this, and ...
4610         (grub_cmd_terminal_output): ... this.
4611         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4612         `terminal_input' and `terminal_output'.
4613         * util/grub.d/00_header.in: Adjust `terminal' calls to new
4614         `terminal_input' / `terminal_output' API.
4615         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4616         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4617         provided ${GRUB_TERMINAL}, convert it).
4619 2008-11-04  Robert Millan  <rmh@aybabtu.com>
4621         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
4622         for FreeBSD.
4623         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4625 2008-11-03  Bean  <bean123ch@gmail.com>
4627         * kern/elf.c (grub_elf32_load): Revert to previous code.
4628         (grub_elf64_load): Likewise.
4630         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4632 2008-11-01  Robert Millan  <rmh@aybabtu.com>
4634         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4635         (TARGET_CPPFLAGS): Likewise.
4636         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4638 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
4640         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4642 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4644         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4645         addition of objects until the code is not going to be able to fail.
4647 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4649         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4650         (add a missing NULL check, and correct them by moving the pointer
4651         operations after the actual check).
4653 2008-10-29  Robert Millan  <rmh@aybabtu.com>
4655         * util/i386/pc/grub-install.in: Handle empty string as output from
4656         make_system_path_relative_to_its_root().
4658 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
4660         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4661         circular metadata worst case scenario. If the metadata is circular
4662         then copy the wrap in place.
4663         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4664         project lib/format_text/layout.h
4665         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4667 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4669         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4671 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4673         * util/update-grub_lib.in: Mention filename in warning message.
4675 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4677         * NEWS: Update for rename of update-grub to grub-mkconfig.
4679 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4681         * util/update-grub_lib.in: Copy to ...
4682         * util/grub-mkconfig_lib.in: ... this.  Update all users.
4683         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4684         * util/update-grub.in: Rename to ...
4685         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
4686         option. Add `--output' option to allow users to specify the generated
4687         configuration file.  Default to stdout.
4688         (update_grub_dir): Rename to ...
4689         (grub_mkconfig_dir): ... this.
4690         (grub_cfg): Default to an empty string.
4691         * conf/common.rmk (update-grub): Rename to ...
4692         (grub-mkconfig): ... this.
4693         (update-grub_lib): Copy to ...
4694         (grub-mkconfig_lib): ... this.
4695         (update-grub_SCRIPTS): Copy to ...
4696         (grub-mkconfig_SCRIPTS): ... this. Update all users.
4697         (update-grub_DATA): Rename to ...
4698         (grub-mkconfig_DATA): ... this.
4700 2008-09-28  Robert Millan  <rmh@aybabtu.com>
4702         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4703         to `modified'.  Add the real `created' field.
4704         (grub_iso9660_uuid): Use `modified' rather than `created' for
4705         constructing the UUID.
4707 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
4709         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4710         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4712 2008-09-28  Bean  <bean123ch@gmail.com>
4714         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4715         Thanks to Christian Franke for finding this bug.
4717 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4719         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4720         instances of grub_util_get_disk_name() (see previous commit).
4722 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4724         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4725         `util/i386/get_disk_name.c'.
4726         * conf/i386-efi.rmk: Likewise.
4727         * conf/x86_64-efi.rmk: Likewise.
4728         * conf/i386-coreboot.rmk: Likewise.
4729         * conf/i386-ieee1275.rmk: Likewise.
4730         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4731         `util/ieee1275/get_disk_name.c'.
4732         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4733         * util/ieee1275/get_disk_name.c: Remove file.
4734         * util/i386/get_disk_name.c: Remove file.
4735         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4736         "hd%d" for device.map entries, rather than using
4737         grub_util_get_disk_name().
4739 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4741         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4742         warning.
4743         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4745 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4747         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4748         Changed to 0x5100.
4749         (GRUB_TERM_PPAGE): Changed to 0x4900.
4751 2008-09-24  Robert Millan  <rmh@aybabtu.com>
4753         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4754         macros (they were i386-pc specific).
4755         * include/grub/sparc64/ieee1275/console.h: Likewise.
4756         * include/grub/efi/console.h: Likewise.
4758 2008-09-22  Bean  <bean123ch@gmail.com>
4760         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4761         resident and in attribute list.
4763         * include/grub/ntfs.h (BMP_LEN): Removed.
4765 2008-09-22  Bean  <bean123ch@gmail.com>
4767         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4768         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4770         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4771         error occurs, as grub_disk_open will call grub_disk_close, which will
4772         call p->close (scsi).
4774 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4776         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4777         (AC_PREREQ): Bumped to 2.59.
4778         (AC_TRY_COMPILE): Replace obsolete macro with ...
4779         (AC_COMPILE_IFELSE): ... this.
4780         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4781         (AC_LINK_IFELSE): ... this.
4783 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4785         * autogen.sh: Add a call to `gendistlist.sh'.
4787 2008-09-19  Christian Franke  <franke@computer.org>
4789         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4790         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4791         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4792         Export __enable_execute_stack() to modules.
4793         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4794         New function.
4796 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4798         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4799         Sort the list.
4801 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4803         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4804         #include <grub/util/hostdisk.h>.
4806 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4808         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4809         segments when their filesz is zero (grub_file_read() interprets
4810         zero-size as "read until EOF", which results in memory corruption).
4811         Use `lowest_segment' rather than 0 for calculating the current
4812         segment load address.
4814 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4816         * util/hostdisk.c (open_device): Replace a grub_util_info() call
4817         with grub_dprintf("hostdisk", ...), as it was so verbose that it
4818         clobbered useful information.
4820 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4822         * include/grub/util/biosdisk.h: Move to ...
4823         * include/grub/util/hostdisk.h: ... here.  Update all users.
4824         * util/biosdisk.c: Move to ...
4825         * util/hostdisk.c: ... here.  Update all users.
4827 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4829         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4830         variables.
4831         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4832         and length can be stored directly in the `mbi->mmap_addr' and
4833         `mbi->mmap_length' struct fields.
4835 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4837         * conf/i386.rmk: New file.  Provides declaration for building
4838         `cpuid.mod'.
4839         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4840         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4841         variables.
4842         Include `conf/i386.mk'.
4843         * conf/i386-efi.rmk: Likewise.
4844         * conf/x86_64-efi.rmk: Likewise.
4845         * conf/i386-coreboot.rmk: Likewise.
4846         * conf/i386-ieee1275.rmk: Likewise.
4848 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
4850         Based on patch created by Colin D Bennett <colin@gibibit.com>.
4851         Adds optimization support for BGR based modes.
4853         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4854         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4855         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4856         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4857         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4858         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4859         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4860         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4861         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4862         (grub_video_i386_vbeblit_index_index): Likewise.
4863         (grub_video_i386_vbeblit_replace_directN): Added.
4864         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4865         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4866         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4867         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4868         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4869         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4870         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4871         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4872         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4873         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4874         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4875         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4876         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4878         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4879         (grub_video_i386_vbefill_R8G8B8): Likewise.
4880         (grub_video_i386_vbefill_index): Likewise.
4881         (grub_video_i386_vbefill_direct32): Added.
4882         (grub_video_i386_vbefill_direct24): Likewise.
4883         (grub_video_i386_vbefill_direct16): Likewise.
4884         (grub_video_i386_vbefill_direct8): Likewise.
4886         * include/grub/video.h (grub_video_blit_format): Removed
4887         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4888         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4889         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4890         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4891         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4893         * video/video.c (grub_video_get_blit_format): Updated to use new
4894         blit formats.  Added handling for 16 bit color modes.
4896         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4897         fillers.
4898         (common_blitter): Updated to use new blitters.
4900         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4901         Removed.
4902         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4903         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4904         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4905         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4906         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4907         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4908         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4909         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4910         (grub_video_i386_vbeblit_index_index): Likewise.
4911         (grub_video_i386_vbeblit_replace_directN): Added.
4912         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4913         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4914         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4915         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4916         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4917         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4918         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4919         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4920         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4921         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4922         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4923         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4924         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4926         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4927         (grub_video_i386_vbefill_R8G8B8): Likewise.
4928         (grub_video_i386_vbefill_index): Likewise.
4929         (grub_video_i386_vbefill_direct32): Added.
4930         (grub_video_i386_vbefill_direct24): Likewise.
4931         (grub_video_i386_vbefill_direct16): Likewise.
4932         (grub_video_i386_vbefill_direct8): Likewise.
4934         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4935         types.
4937         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4938         types.
4940         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4941         blitter types.
4943         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4944         types.
4946 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4948         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4949         RAID level 1.
4951 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4953         * fs/iso9660.c (grub_iso9660_date): New structure.
4954         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4955         (grub_iso9660_uuid): New function.
4957 2008-09-05  Bean  <bean123ch@gmail.com>
4959         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4961         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4962         insensitive bit for names in Win32 and Win32 & DOS namespace.
4964         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4966         * include/grub/types.h (LONG_MAX): Likewise.
4968 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4970         * util/getroot.c: Include <config.h>.
4971         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4972         add support for /dev/md/N devices and handle LVM double dash escaping.
4974 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4976         * config.guess: Update to latest version from config git.
4977         * config.sub: Likewise.
4979 2008-09-03  Robert Millan  <rmh@aybabtu.com>
4981         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4982         `disk->total_sectors'.
4984 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4986         * include/grub/normal.h: Fixed incorrect comment for
4987         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4989 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4991         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4992         values with defines.
4994         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4995         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4996         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4997         (GRUB_VBE_MODEATTR_COLOR): Likewise.
4998         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4999         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5000         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5001         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5002         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5003         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5004         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5005         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5006         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5007         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5008         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5009         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5010         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5011         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5012         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5014 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5016         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5017         declaration.
5018         (grub_multiboot): Fix a few warnings.
5020 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5022         * loader/i386/pc/multiboot.c: Update comment not to say that
5023         boot_device support is unimplemented.
5025 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5027         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5028         or memory map support are unimplemented.
5030 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5032         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5034 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5036         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5037         total video memory in 'vbeinfo' output; show color format details for
5038         each video mode.
5040 2008-08-30  Pavel Roskin  <proski@gnu.org>
5042         * util/genmoddep.c: Remove for real this time.
5043         * DISTLIST: Remove util/genmoddep.c.
5045 2008-08-30  Robert Millan  <rmh@aybabtu.com>
5047         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5048         as required by Multiboot spec (it was already 4-byte aligned, but
5049         only by chance).
5051 2008-08-29  Pavel Roskin  <proski@gnu.org>
5053         * kern/powerpc/ieee1275/crt0.S: Rename to ...
5054         * kern/powerpc/ieee1275/startup.S: ... this.
5055         * conf/powerpc-ieee1275.rmk: Adjust for the above.
5056         * DISTLIST: Likewise.
5058         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5059         grub/cpu/kernel.h.  Add start label for consistency with other
5060         platforms.  Add grub_prefix immediately after start.  Add jump
5061         to the code after grub_prefix.
5062         * include/grub/powerpc/kernel.h: Provide valid values for
5063         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5065 2008-08-29  Bean  <bean123ch@gmail.com>
5067         * configure.ac: Change host_os to cygwin for mingw.
5068         (asprintf): New check for function.
5070         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5071         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5073         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5074         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5075         sync, sleep and grub_util_get_disk_size for mingw.
5077         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5078         to get size in mingw.
5079         (open_device): Use flag O_BINARY if it's defined.
5080         (find_root_device): Add dummy code for mingw.
5082         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5083         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5084         (get_scsi_disk_name): Return 0 for mingw.
5086         * util/hostfs.c: #include <grub/util/misc.h>.
5087         (grub_hostfs_open): Use "rb" flag to open file, use
5088         grub_util_get_disk_size to get disk size for mingw.
5090         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5091         (asprintf): New function if HAVE_ASPRINTF is not set.
5092         (sync): New function for mingw.
5093         (sleep): Likewise.
5094         (grub_util_get_disk_size): Likewise.
5096 2008-08-28  Pavel Roskin  <proski@gnu.org>
5098         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5099         kern/time.c.
5101 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5103         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5105 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5107         Change find_grub_drive() syntax so it doesn't prevent it from
5108         detecting NULL names as errors.
5110         * util/biosdisk.c (find_grub_drive): Move free slot search code
5111         from here ...
5112         (find_free_slot): ... to here.
5113         (read_device_map): Use find_free_slot() to search for free slots.
5115 2008-08-27  Marco Gerards  <marco@gnu.org>
5117         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5118         (scsi_mod_SOURCES): New variable.
5119         (scsi_mod_CFLAGS): Likewise
5120         (scsi_mod_LDFLAGS): Likewise.
5122         * disk/scsi.c: New file.
5124         * include/grub/scsi.h: Likewise.
5126         * include/grub/scsicmd.h: Likewise.
5128         * disk/ata.c: Include <grub/scsi.h>.
5129         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5130         instead.
5131         (grub_ata_iterate): Skip ATAPI devices.
5132         (grub_ata_open): Only handle ATAPI devices.
5133         (struct grub_atapi_read): Removed.
5134         (grub_atapi_readsector): Likewise.
5135         (grub_ata_read): No longer handle ATAPI devices.
5136         (grub_ata_write): Likewise.
5137         (grub_atapi_iterate): New function.
5138         (grub_atapi_read): Likewise.
5139         (grub_atapi_write): Likewise.
5140         (grub_atapi_open): Likewise.
5141         (grub_atapi_close): Likewise.
5142         (grub_atapi_dev): New variable.
5143         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5144         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5146         * include/grub/disk.h (enum grub_disk_dev_id): Add
5147         `GRUB_DISK_DEVICE_SCSI_ID'.
5149 2008-08-26  Robert Millan  <rmh@aybabtu.com>
5151         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5152         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5153         descriptive.
5155 2008-08-23  Bean  <bean123ch@gmail.com>
5157         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5158         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5159         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5160         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5161         dm_nv.mod.
5162         (raid5rec_mod_SOURCES): New macro.
5163         (raid5rec_mod_CFLAGS): Likewise.
5164         (raid5rec_mod_LDFLAGS): Likewise.
5165         (raid6rec_mod_SOURCES): Likewise.
5166         (raid6rec_mod_CFLAGS): Likewise.
5167         (raid6rec_mod_LDFLAGS): Likewise.
5168         (mdraid_mod_SOURCES): Likewise.
5169         (mdraid_mod_CFLAGS): Likewise.
5170         (mdraid_mod_LDFLAGS): Likewise.
5171         (dm_nv_mod_SOURCES): Likewise.
5172         (dm_nv_mod_CFLAGS): Likewise.
5173         (dm_nv_mod_LDFLAGS): Likewise.
5175         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5176         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
5177         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5179         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5180         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5182         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5184         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5186         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5188         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5190         * disk/raid5_recover.c: New file.
5192         * disk/raid6_recover.c: Likewise.
5194         * disk/mdraid_linux.c: Likewise.
5196         * disk/dmraid_nvidia.c: Likewise.
5198         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5199         ULONG_MAX.
5201         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5202         calculate the size of raid device.
5203         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5204         different layout of raid5.
5205         (grub_raid_scan_device): Remove code specific to mdraid.
5206         (grub_raid_list): New variable.
5207         (free_array): New function.
5208         (grub_raid_register): Likewise.
5209         (grub_raid_unregister): Likewise.
5210         (grub_raid_rescan): Likewise.
5211         (GRUB_MOD_INIT): Don't iterate device here.
5212         (GRUB_MOD_FINI): Use free_array to release resource.
5214         * include/grub/raid.h: Remove macro and structure specific to mdraid.
5215         (grub_raid5_recover_func_t): New function variable type.
5216         (grub_raid6_recover_func_t): Likewise.
5217         (grub_raid5_recover_func): New variable.
5218         (grub_raid6_recover_func): Likewise.
5219         (grub_raid_register): New function.
5220         (grub_raid_unregister): Likewise.
5221         (grub_raid_rescan): Likewise.
5222         (grub_raid_block_xor): Likewise.
5224         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5225         (CMD_CRC): New macro.
5226         (part): Removed.
5227         (read_file): Handle device as well as file.
5228         (cmd_crc): New function.
5229         (fstest): Handle multiple disks.
5230         (options): Remove part, raw and long, add root and diskcount.
5231         (usage): Add crc, remove -p, -r, -l, add -r and -c.
5232         (main): Find the first non option entry and ignore subsequent options,
5233         add handling for the new options, support multiple disks.
5235         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5237 2008-08-23  Bean  <bean123ch@gmail.com>
5239         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5241         * genfslist.sh: Ignore kernel.mod.
5243         * genpartmaplist.sh: Likewise.
5245 2008-08-23  Robert Millan  <rmh@aybabtu.com>
5247         * util/getroot.c (find_root_device): Skip anything that starts with
5248         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
5250 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
5252         * util/update-grub.in (GRUB_GFXMODE): Export variable.
5253         * util/grub.d/00_header.in: Allow the administrator to change default
5254         gfxmode via ${GRUB_GFXMODE}.
5256 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
5258         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5260 2008-08-21  Robert Millan  <rmh@aybabtu.com>
5262         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
5263         loader.
5264         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5265         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5267 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
5269         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5270         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5272 2008-08-19  Robert Millan  <rmh@aybabtu.com>
5274         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5275         (struct grub_virtual_screen): Remove `cursor_color'.
5276         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5277         initialization.
5278         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5280 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5282         Unify (identical) linux_normal.c files.
5283         * loader/i386/efi/linux_normal.c: Move from here ...
5284         * loader/linux_normal.c: ... to here.  Update all users.
5285         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
5286         * loader/i386/ieee1275/linux_normal.c: Likewise.
5288 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5290         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5291         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5292         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5293         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5294         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5295         New macros.
5296         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5297         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5298         (GRUB_LINUX_CL_END_OFFSET): ... to here.
5299         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5300         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
5301         (GRUB_EFI_CL_END_OFFSET): Rename to ...
5302         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
5303         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5304         Initialize `params->video_cursor_x' and `params->video_cursor_y'
5305         portably using grub_getxy().
5306         Replace `-EFI' with `-bzImage' in boot message.
5308 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5310         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5312 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5314         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5316         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5317         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5318         (grub_machine_mmap_iterate): New function declaration.
5319         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5320         structure.
5321         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5322         macros.
5324         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5325         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5326         Move e820 parsing from here ...
5327         * kern/i386/pc/mmap.c: New file.
5328         (grub_machine_mmap_iterate): ... to here.
5330         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5331         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5332         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
5333         (grub_available_iterate): Redeclare to return `void', and redeclare
5334         its hook to use grub_uint64_t as addr and size parameters, and rename
5335         to ...
5336         (grub_machine_mmap_iterate): ... this.  Update all users.
5338         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5339         to make it more readable.  Rename to ...
5340         (grub_machine_mmap_iterate): ... this.
5342         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5343         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5344         (grub_multiboot): Allocate an extra region after the payload, and fill
5345         it with a Multiboot memory map.  Adjust a.out loader to calculate size
5346         with the extra space.
5347         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5348         with the extra space.
5350 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
5352         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5354 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
5356         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5357         mdate-sh to the list `find' searches for.
5358         * DISTLIST: Regenerated.
5360 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
5362         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5363         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5364         genmoddep.awk, gensymlist.sh.in.
5365         (DISTDIRS): Add bus, docs, hook, lib.
5366         * DISTLIST: Regenerated.
5367         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5369 2008-08-16  Robert Millan  <rmh@aybabtu.com>
5371         * disk/raid.c (grub_raid_init): Handle/report errors set by
5372         grub_device_iterate().
5373         * disk/lvm.c (grub_lvm_init): Likewise.
5375 2008-08-15  Bean  <bean123ch@gmail.com>
5377         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5378         and datehook.mod.
5379         (datetime_mod_SOURCES): New macro.
5380         (datetime_mod_CFLAGS): Likewise.
5381         (datetime_mod_LDFLAGS): Likewise.
5382         (date_mod_SOURCES): Likewise.
5383         (date_mod_CFLAGS): Likewise.
5384         (date_mod_LDFLAGS): Likewise.
5385         (datehook_mod_SOURCES): Likewise.
5386         (datehook_mod_CFLAGS): Likewise.
5387         (datehook_mod_LDFLAGS): Likewise.
5389         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5390         and datehook.mod.
5391         (datetime_mod_SOURCES): New macro.
5392         (datetime_mod_CFLAGS): Likewise.
5393         (datetime_mod_LDFLAGS): Likewise.
5394         (date_mod_SOURCES): Likewise.
5395         (date_mod_CFLAGS): Likewise.
5396         (date_mod_LDFLAGS): Likewise.
5397         (datehook_mod_SOURCES): Likewise.
5398         (datehook_mod_CFLAGS): Likewise.
5399         (datehook_mod_LDFLAGS): Likewise.
5401         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5402         and datehook.mod.
5403         (datetime_mod_SOURCES): New macro.
5404         (datetime_mod_CFLAGS): Likewise.
5405         (datetime_mod_LDFLAGS): Likewise.
5406         (date_mod_SOURCES): Likewise.
5407         (date_mod_CFLAGS): Likewise.
5408         (date_mod_LDFLAGS): Likewise.
5409         (datehook_mod_SOURCES): Likewise.
5410         (datehook_mod_CFLAGS): Likewise.
5411         (datehook_mod_LDFLAGS): Likewise.
5413         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5414         and datehook.mod.
5415         (datetime_mod_SOURCES): New macro.
5416         (datetime_mod_CFLAGS): Likewise.
5417         (datetime_mod_LDFLAGS): Likewise.
5418         (date_mod_SOURCES): Likewise.
5419         (date_mod_CFLAGS): Likewise.
5420         (date_mod_LDFLAGS): Likewise.
5421         (datehook_mod_SOURCES): Likewise.
5422         (datehook_mod_CFLAGS): Likewise.
5423         (datehook_mod_LDFLAGS): Likewise.
5425         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5426         and datehook.mod.
5427         (datetime_mod_SOURCES): New macro.
5428         (datetime_mod_CFLAGS): Likewise.
5429         (datetime_mod_LDFLAGS): Likewise.
5430         (date_mod_SOURCES): Likewise.
5431         (date_mod_CFLAGS): Likewise.
5432         (date_mod_LDFLAGS): Likewise.
5433         (datehook_mod_SOURCES): Likewise.
5434         (datehook_mod_CFLAGS): Likewise.
5435         (datehook_mod_LDFLAGS): Likewise.
5437         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5439         * commands/date.c: New file.
5441         * hook/datehook.c: Likewise.
5443         * include/grub/lib/datetime.h: Likewise.
5445         * include/grub/i386/cmos.h: Likewise.
5447         * lib/datetime.c: Likewise.
5449         * lib/i386/datetime.c: Likewise.
5451         * lib/efi/datetime.c: Likewise.
5453 2008-08-14  Robert Millan  <rmh@aybabtu.com>
5455         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5456         (grub_mkelfimage_SOURCES): New variable.
5457         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5459         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5460         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5461         * conf/powerpc-ieee1275.rmk: Likewise.
5462         * conf/i386-ieee1275.rmk: Likewise.
5464         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5465         * kern/i386/coreboot/init.c: Likewise.
5467         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5468         with `<grub/cpu/kernel.h>'.
5469         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5470         to ...
5471         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5472         * kern/i386/coreboot/startup.S: Likewise.
5474         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5475         (GRUB_MOD_GAP): Remove.
5476         * include/grub/powerpc/kernel.h: New file.
5477         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5478         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5479         * include/grub/i386/kernel.h: New file.
5480         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5481         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5482         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5484         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5485         `grub-mkelfimage'.
5486         Use --directory when invoking grub_mkimage.
5488         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5489         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5490         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5491         and GRUB_KERNEL_CPU_PREFIX.
5493 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
5495         * include/grub/err.h (grub_err_printf): New function prototype.
5496         * util/misc.c (grub_err_printf): New function.
5497         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5498         grub_printf.
5499         * kern/err.c (grub_print_error): Use grub_err_printf.
5501 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5503         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5505 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5507         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5508         boot entry.
5510 2008-08-12  Robert Millan  <rmh@aybabtu.com>
5512         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5513         of the relocation code from here ...
5514         (grub_multiboot): ... to here.
5515         (forward_relocator, backward_relocator): Move from here ...
5516         * kern/i386/loader.S (grub_multiboot_forward_relocator)
5517         (grub_multiboot_backward_relocator): ... to here.
5518         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
5519         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
5520         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5521         (grub_multiboot_forward_relocator_end)
5522         (grub_multiboot_backward_relocator)
5523         (grub_multiboot_backward_relocator_end): New variables.
5525 2008-08-12  Bean  <bean123ch@gmail.com>
5527         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5529 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5531         * kern/i386/linuxbios/startup.S: Move from here ...
5532         * kern/i386/coreboot/startup.S: ... to here.
5534         * kern/i386/linuxbios/init.c: Move from here ...
5535         * kern/i386/coreboot/init.c: ... to here.
5537         * kern/i386/linuxbios/table.c: Move from here ...
5538         * kern/i386/coreboot/mmap.c: ... to here.
5540         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5542 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5544         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5545         errors.  Leave it to the upper layer to handle them.
5547 2008-08-09  Christian Franke  <franke@computer.org>
5549         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5550         * conf/common.rmk: Install `grub-pe2elf' only if requested.
5551         Install `grub.d/10_windows' only on Cygwin.
5552         * configure.ac: Add subst of `target_os'.
5553         Check `target_os' also before setting TARGET_OBJ2ELF.
5554         Add `--enable-grub-pe2elf'.
5556 2008-08-08  Robert Millan  <rmh@aybabtu.com>
5558         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5559         (grub_last_time): Change type to grub_uint64_t.
5560         (grub_disk_open): Migrate code from to using grub_get_time_ms().
5561         (grub_disk_close): Likewise.
5563         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5564         (run_menu): Migrate code from to using grub_get_time_ms().
5566         * util/misc.c (grub_get_time_ms): New function.
5568 2008-08-08  Marco Gerards  <marco@gnu.org>
5570         * disk/ata.c (grub_ata_regget): Change return type to
5571         `grub_uint8_t'.
5572         (grub_ata_regget2): Likewise.
5573         (grub_ata_wait_status): New function.
5574         (grub_ata_wait_busy): Removed function, updated all users to use
5575         `grub_ata_wait_status'.
5576         (grub_ata_wait_drq): Likewise.
5577         (grub_ata_cmd): New function.
5578         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
5579         error handling.
5580         (grub_ata_pio_write): Add error handling.
5581         (grub_atapi_identify): Likewise.
5582         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5583         handling.
5584         (grub_ata_identify): Use `grub_ata_cmd' and improve error
5585         handling.  Actually use the detected registers.  Reorder the
5586         detection logic such that it is easier to read.
5587         (grub_ata_pciinit): Do not assign the same ID to each controller.
5588         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5589         handling.
5590         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5592         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5594 2008-08-08  Marco Gerards  <marco@gnu.org>
5596         * NEWS: Update.
5598 2008-08-07  Bean  <bean123ch@gmail.com>
5600         * include/grub/x86_64/pci.h: New file.
5602 2008-08-07  Christian Franke  <franke@computer.org>
5604         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5605         (TIMER2_GATE): Likewise.
5606         (grub_pit_wait): Add enable/disable of the timer2 gate
5607         bit of port 0x61.  This fixes a possible infinite loop.
5609 2008-08-07  Bean  <bean123ch@gmail.com>
5611         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5612         kern/i386/tsc.c and kern/i386/pit.c.
5614         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5615         x86_64 platform.
5617         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5618         <grub/i386/tsc.h>.
5620         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5622 2008-08-07  Bean  <bean123ch@gmail.com>
5624         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5626         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5628         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5629         multiple inclusion. Add #include <grub/types.h>.
5631 2008-08-06  Christian Franke  <franke@computer.org>
5633         * conf/common.rmk: Build and install `10_windows'.
5634         * util/grub.d/10_windows.in: New script.
5636 2008-08-06  Pavel Roskin  <proski@gnu.org>
5638         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5640 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5642         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5643         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5645 2008-08-06  Bean  <bean123ch@gmail.com>
5647         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5648         (grub_pxefs_fs_int): Remove dummy definition.
5649         (grub_pxefs_open): Use data->block_size to store the current block
5650         size setting.
5651         (grub_pxefs_read): Use block size stored in data->block_size. As the
5652         value of grub_pxe_blksize can be changed after the file is opened.
5654 2008-08-06  Bean  <bean123ch@gmail.com>
5656         * fs/i386/pc/pxe.c (curr_file): new variable.
5657         (grub_pxefs_open): Simply the handling of pxe file system. Don't
5658         require the dummy internal file system anymore.
5659         (grub_pxefs_read): Removed.
5660         (grub_pxefs_close): Likewise.
5661         (grub_pxefs_fs_int): Likewise.
5662         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5663         connection when we switch file.
5664         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5666 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5668         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5669         `halt.mod'.
5670         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5671         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5673         * kern/i386/halt.c: New file.
5674         * kern/i386/reboot.c: Likewise.
5675         * include/grub/i386/reboot.h: Likewise.
5676         * include/grub/i386/halt.h: Likewise.
5678         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5679         Include `<grub/cpu/halt.h>'.
5680         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5681         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5683         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5684         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5685         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5686         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5687         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5688         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5689         from here ...
5690         * include/grub/i386/at_keyboard.h: ... to here.
5692 2008-08-05  Robert Millan  <rmh@aybabtu.com>
5694         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5695         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5696         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5697         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5698         `kern/generic/millisleep.c'.
5700         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5701         instead of grub_get_rtc().
5702         (grub_tsc_init): Initialize `tsc_boot_time'.
5704         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5705         (grub_machine_init): Use grub_tsc_init() rather than
5706         installing an RTC-based handler via grub_install_get_time_ms().
5708         * kern/i386/pit.c: New file.
5709         * include/grub/i386/pit.h: Likewise.
5711 2008-08-05  Bean  <bean123ch@gmail.com>
5713         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5715         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5716         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5717         (pxe_mod_SOURCES): New macro.
5718         (pxe_mod_CFLAGS): Likewise.
5719         (pxe_mod_LDFLAGS): Likewise.
5720         (pxecmd_mod_SOURCES): Likewise.
5721         (pxecmd_mod_CFLAGS): Likewise.
5722         (pxecmd_mod_LDFLAGS): Likewise.
5724         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5725         (grub_pxe_call): Likewise.
5727         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5729         * commands/i386/pc/pxecmd.c: New file.
5731         * fs/i386/pc/pxe.c: Likewise.
5733         * include/grub/i386/pc/pxe.h: Likewise.
5735 2008-08-05  Bean  <bean123ch@gmail.com>
5737         * util/console.c (grub_console_cur_color): New variable.
5738         (grub_console_standard_color): Likewise.
5739         (grub_console_normal_color): Likewise.
5740         (grub_console_highlight_color): Likewise.
5741         (color_map): Likewise.
5742         (use_color): Likewise.
5743         (NUM_COLORS): New macro.
5744         (grub_ncurses_setcolorstate): Handle color properly.
5745         (grub_ncurses_setcolor): Don't change color here, just remember the
5746         settings, color will be set in grub_ncurses_setcolorstate.
5747         (grub_ncurses_getcolor): New function.
5748         (grub_ncurses_init): Initialize color pairs.
5749         (grub_ncurses_term): New member grub_ncurses_getcolor.
5751 2008-08-05  Colin D Bennett  <colin@gibibit.com>
5753         High resolution timer support.  Implemented for x86 CPUs using TSC.
5754         Extracted generic grub_millisleep() so it's linked in only as needed.
5755         This requires a Pentium compatible CPU; if the RDTSC instruction is
5756         not supported, then it falls back on the generic grub_get_time_ms()
5757         implementation that uses the machine's RTC.
5759         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5760         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5761         `kern/generic/millisleep.c'.
5763         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5764         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5766         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5767         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5769         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5771         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5772         `kern/generic/millisleep.c'.
5774         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5776         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5778         * kern/generic/rtc_get_time_ms.c: New file.
5780         * kern/generic/millisleep.c: New file.
5782         * kern/misc.c: Don't include
5783         <kern/time.h> anymore.
5784         (grub_millisleep_generic): Removed.
5786         * commands/sleep.c (grub_interruptible_millisleep): Uses
5787         grub_get_time_ms() instead of grub_get_rtc().
5789         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
5790         function.
5791         (grub_cpu_is_cpuid_supported): New inline function.
5792         (grub_cpu_is_tsc_supported): New inline function.
5793         (grub_tsc_init): New function prototype.
5794         (grub_tsc_get_time_ms): New function prototype.
5796         * kern/i386/tsc.c (grub_get_time_ms): New file.
5798         * include/grub/time.h: Include <grub/types.h.
5799         (grub_millisleep_generic): Removed.
5800         (grub_get_time_ms): New prototype.
5801         (grub_install_get_time_ms): New prototype.
5802         (grub_rtc_get_time_ms): New prototype.
5804         * kern/time.c (grub_get_time_ms): New function.
5805         (grub_install_get_time_ms): New function.
5807         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
5808         <grub/time.h> anymore.
5809         (grub_millisleep): Removed.
5810         (grub_machine_init): Call grub_tsc_init.
5812         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5813         get_time_ms() implementation.
5815         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5816         (ieee1275_get_time_ms): New function.
5817         (grub_machine_init): Install get_time_ms() implementation.
5819         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5820         (grub_machine_init): Call grub_tsc_init().
5821         (grub_millisleep): Removed.
5823         * kern/ieee1275/init.c (grub_millisleep): Removed.
5824         (grub_machine_init): Install ieee1275_get_time_ms()
5825         implementation.
5826         (ieee1275_get_time_ms): New function.
5827         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5828         real work.
5830 2008-08-05  Marco Gerards  <marco@gnu.org>
5832         * disk/ata.c: Include <grub/pci.h>.
5833         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5834         (grub_ata_initialize): Rewritten.
5835         (grub_ata_device_initialize): New function.
5837 2008-08-04  Pavel Roskin  <proski@gnu.org>
5839         * kern/main.c: Include grub/mm.h.
5841 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5843         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5844         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5845         corruption problem).
5847 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5849         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5850         warnings introduced in my last commit.
5852 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5854         Make PCI available on all i386 architectures.
5856         * include/grub/i386/pc/pci.h: Move from here ...
5857         * include/grub/i386/pci.h: ... to here.
5859         * include/grub/i386/pc/pci.h: Remove.
5860         * include/grub/i386/efi/pci.h: Remove.
5861         * include/grub/x86_64/efi/pci.h: Remove.
5863         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5864         `<grub/cpu/pci.h>'.
5866         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5867         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5868         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5870         * conf/i386-ieee1275.rmk: Likewise.
5872 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5874         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5875         (grub_console_setcursor): Make it possible to set cursor off.
5877 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5879         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
5880         of modules instead of assuming which platform provides what.
5881         * util/update-grub.in: Likewise.
5883 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5885         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5886         instead of `grub_install_dos_part' to determine whether a drive needs
5887         to be prepended to prefix (`grub_install_dos_part' is not reliable,
5888         because it can be overridden when loading GRUB via Multiboot).
5890 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5892         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5894 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5896         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5897         of informational grub_dprintf() calls.
5899 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5901         * disk/memdisk.c (memdisk_size): Don't initialize.
5902         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5904         * include/grub/i386/pc/kernel.h
5905         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5906         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5907         (grub_memdisk_image_size, grub_arch_memdisk_addr)
5908         (grub_arch_memdisk_size): Remove.
5910         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5911         field (was only used to transfer a constant).  Add `type' field to
5912         support multiple module types.
5913         (grub_module_iterate): New function.
5915         * kern/device.c (grub_device_open): Do not hide error messages
5916         when grub_disk_open() fails.  Use grub_print_error() instead.
5918         * kern/i386/pc/init.c (grub_arch_modules_addr)
5919         (grub_arch_memdisk_size): Remove functions.
5920         (grub_arch_modules_addr): Return the module address in high memory
5921         (now that it isn't copied anymore).
5923         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5924         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5925         decompression routine (grub_total_module_size already includes that
5926         now).  Don't copy modules back to low memory.
5928         * kern/main.c: Include `<grub/mm.h>'.
5929         (grub_load_modules): Split out (and use) ...
5930         (grub_module_iterate): ... this function, which iterates through
5931         module objects and runs a hook.
5932         Comment out grub_mm_init_region() call, as it would cause non-ELF
5933         modules to be overwritten.
5935         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5936         the memdisk image in its own region, make it part of the module list.
5937         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5938         (main): Parse --memdisk|-m option, and pass user-provided path as
5939         parameter to generate_image().
5940         (add_segments): Pass `memdisk_path' down to load_modules().
5941         (load_modules): Embed memdisk image in module section when requested.
5942         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5943         `header.type' instead of `header.offset'.
5945         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5946         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5947         (memdisk_mod_LDFLAGS): New variables.
5948         * conf/i386-coreboot.rmk: Likewise.
5949         * conf/i386-ieee1275.rmk: Likewise.
5951 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5953         * loader/i386/pc/multiboot.c (playground, forward_relocator)
5954         (backward_relocator): New variables.  Used to allocate and relocate
5955         the payload, respectively.
5956         (grub_multiboot_load_elf32): Load into heap instead of requested
5957         address, install the appropriate relocator code in each bound of
5958         the payload, and set the entry point such that
5959         grub_multiboot_real_boot() will jump to one of them.
5961         * kern/i386/loader.S (grub_multiboot_payload_size)
5962         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5963         (grub_multiboot_payload_entry_offset): New variables.
5964         (grub_multiboot_real_boot): Set cpu context to what the relocator
5965         expects, and jump to the relocator instead of the payload.
5967         * include/grub/i386/loader.h (grub_multiboot_payload_size)
5968         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5969         (grub_multiboot_payload_entry_offset): Export.
5971 2008-08-01  Bean  <bean123ch@gmail.com>
5973         * normal/menu_entry.c (editor_getline): Don't return the original
5974         string as result, as it will be released by lexer once it has done
5975         using it.
5977 2008-08-01  Robert Millan  <rmh@aybabtu.com>
5979         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5980         within menuentries, not before them.
5981         util/grub.d/10_hurd.in: Likewise.
5983 2008-08-01  Bean  <bean123ch@gmail.com>
5985         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5986         (bufio_mod_SOURCES): New macro.
5987         (bufio_mod_CFLAGS): Likewise.
5988         (bufio_mod_LDFLAGS): Likewise.
5990         * include/grub/bufio.h: New file.
5992         * io/bufio.c: Likewise.
5994         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5995         (grub_video_reader_png): Use grub_buffile_open to open file.
5997         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5998         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6000         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6001         (grub_video_reader_tga): Use grub_buffile_open to open file.
6003         * font/manager.c: Include <grub/bufio.h>.
6004         (add_font): Use grub_buffile_open to open file.
6006 2008-07-31  Robert Millan  <rmh@aybabtu.com>
6008         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6009         ELF segments, use a macro for arbitrarily accessing any of them instead
6010         of preparing a pointer that allows access to one at a time.
6011         (grub_multiboot_load_elf64): Likewise.
6013 2008-07-31  Bean  <bean123ch@gmail.com>
6015         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6016         GRUB_KERNEL_MACHINE_DATA_END.
6018 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6020         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6021         Increase from 0x50 to 0x60.
6022         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6023         use UUIDs to identify the root drive for them.  If that's not
6024         possible, abort.
6025         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6026         check, for cross-disk installs.
6028 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6030         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6031         is non-empty, use it to set the `prefix' environment variable instead
6032         of the usual approach.
6033         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6034         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6035         environment variable instead of dummy make_install_device().
6037         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6038         (start): Insert a data section, with `grub_prefix' variable.
6039         * kern/i386/linuxbios/startup.S: Likewise.
6041         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6042         New variable reference.
6043         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6044         New macro.  Defines offset of `grub_prefix' within startup.S (relative
6045         to `start').
6046         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
6047         section within startup.S (relative to `start').
6048         * include/grub/i386/coreboot/kernel.h: Likewise.
6050         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6051         Overwrite grub_prefix with its contents, at the beginning of the
6052         first segment.
6053         (main): Understand -p|--prefix.
6055 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6057         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6059 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6061         * term/i386/pc/vga_text.c (grub_console_cls): Use
6062         grub_console_gotoxy() to go back to beginning of the screen.
6063         Found by Patrick Georgi <patrick.georgi@coresystems.de>
6065 2008-07-29  Christian Franke  <franke@computer.org>
6067         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6068         Add conversion of emulated mount points on Cygwin.
6070 2008-07-29  Christian Franke  <franke@computer.org>
6072         * util/update-grub.in: Add a check for admin
6073         group on Cygwin.
6074         Remove old `grub.cfg.new' before creation.
6075         Add `-f' to `mv' to handle the different filesystem
6076         semantics of Windows.
6078 2008-07-29  Bean  <bean123ch@gmail.com>
6080         * normal/main.c (get_line): Fix buffer overflow bug.
6082 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6084         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6085         (struct grub_apple_header): New struct.  Describes the layout of
6086         the partmap header.
6087         (apple_partition_map_iterate): Check the header magic as well as the
6088         partition magic (which was already being checked).
6090 2008-07-28  Pavel Roskin  <proski@gnu.org>
6092         * genmk.rb: Add a warning to the beginning of the output that
6093         it's a generated file and should not be edited.
6095 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6097         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6098         with the same number are found, just use issue a warning with
6099         grub_dprintf(), as this error has been reported to be non-fatal.
6101 2008-07-27  Robert Millan  <rmh@aybabtu.com>
6103         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6104         information.
6106 2008-07-27  Bean  <bean123ch@gmail.com>
6108         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6109         (grub_fat_find_dir): Ignore case when comparing filename.
6111 2008-07-27  Bean  <bean123ch@gmail.com>
6113         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6114         smallino, as it's more descriptive, and i8count can be confused with
6115         the other field count.
6116         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6117         inode type.
6119 2008-07-27  Bean  <bean123ch@gmail.com>
6121         * commands/crc.c: New file.
6123         * lib/crc.c: Likewise.
6125         * include/grub/lib/crc.h: Likewise.
6127         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6129         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6130         (hexdump): Move this function to ...
6132         * lib/hexdump.c: ... here.
6134         * include/grub/hexdump.h: Renamed to ...
6136         * include/grub/lib/hexdump.h: ... this.
6138         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6140         * util/grub-editenv.c: Likewise.
6142         * include/envblk.h: Renamed to ...
6144         * include/lib/envblk.h: ... this.
6146         * util/envblk.c: Renamed to ...
6148         * lib/envblk.c: ... this.
6150         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6151         lib/hexdump.c.
6152         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6153         (pkglib_MODULES): Add crc.mod.
6154         (hexdump_mod_SOURCES): Add lib/hexdump.c.
6155         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6156         (crc_mod_SOURCES): New macro.
6157         (crc_mod_CFLAGS): Likewise.
6158         (crc_mod_LDFLAGS): Likewise.
6160         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6162         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6164         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6166         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6168         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6170 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
6172         * commands/help.c: Include <grub/term.h>.
6173         (TERM_WIDTH): Removed.  Updated all users.
6175 2008-07-27  Pavel Roskin  <proski@gnu.org>
6177         * util/getroot.c (find_root_device): Rephrase a comment to avoid
6178         spurious warnings about a comment within a comment.
6180 2008-07-25  Robert Millan  <rmh@aybabtu.com>
6182         * util/getroot.c (find_root_device): Skip devices that match
6183         /dev/dm-[0-9].  This lets the real device be found for any type of
6184         abstraction (LVM, EVMS, RAID..).
6185         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6186         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
6187         device is found first, find_root_device() will now skip it.
6189 2008-07-24  Pavel Roskin  <proski@gnu.org>
6191         * include/grub/types.h: Use __builtin_bswap32() and
6192         __builtin_bswap64() with gcc 4.3 and newer.
6194 2008-07-24  Christian Franke  <franke@computer.org>
6196         * util/i386/pc/grub-install.in: If `--debug' is specified,
6197         pass `--verbose' to grub-setup.
6198         Abort script if make_system_path_relative_to_its_root() fails.
6200 2008-07-24  Bean  <bean123ch@gmail.com>
6202         * configure.ac: Fixed a bug caused by the previous cygwin patch,
6203         variable `target_platform' should be `platform'.
6205 2008-07-24  Bean  <bean123ch@gmail.com>
6207         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6208         (grub_png_init_fixed_block): New function.
6209         (grub_png_decode_image_data): Handle fixed huffman code compression.
6211 2008-07-24  Bean  <bean123ch@gmail.com>
6213         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6214         (grub_pe2elf_SOURCES): New macro.
6215         (CLEANFILES): Add grub-pe2elf.
6217         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6218         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6219         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6220         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6221         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6222         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6223         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6224         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6225         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6226         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6227         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6228         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6229         (GRUB_PE32_DT_FUNCTION): Likewise.
6230         (GRUB_PE32_REL_I386_DIR32): Likewise.
6231         (GRUB_PE32_REL_I386_REL32): Likewise.
6232         (grub_pe32_symbol): New structure.
6233         (grub_pe32_reloc): Likewise.
6235         * util/grub-pe2elf.c: New file.
6237         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6238         start symbol in non pc platform.
6240         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6242         The following patches are from Christian Franke.
6244         * include/grub/dl.h: Remove .previous, gas supports this only
6245         for ELF format.
6247         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6248         Remove .type, gas supports this only for ELF format.
6250         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6251         nullbytes in symbol table. This fixes an infinite loop if table is
6252         zero filled.
6254         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6255         TARGET_IMG_LDFLAGS and EXEEXT.
6257         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6258         TARGET_IMG_LDFLAGS_AC.
6259         (grub_CHECK_STACK_ARG_PROBE): New function.
6261         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6263         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6265         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6266         to set TARGET_IMG_LD* accordingly.
6267         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6268         Add call to grub_CHECK_STACK_ARG_PROBE.
6269         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6271         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6273         * genmk.rb: Add EXEEXT to CLEANFILES.
6275 2008-07-23  Robert Millan  <rmh@aybabtu.com>
6277         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6278         define the codes for arrows and lines used for the menu).
6279         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6280         as well.
6282         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6283         fonts, because the latter are too slow.
6285 2008-07-21  Bean  <bean123ch@gmail.com>
6287         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6288         a20. Run keyboard test last, as it will cause macbook to halt.
6290 2008-07-18  Pavel Roskin  <proski@gnu.org>
6292         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
6293         load foreign architecture modules correctly anyway.  Keep
6294         support for loading host architecture modules, whether we
6295         compile them or not.
6297 2008-07-17  Pavel Roskin  <proski@gnu.org>
6299         * configure.ac: Use -m32 or -m64 regardless of whether we had to
6300         change target_cpu.  The compiler default can mismatch target_cpu
6301         in any case.
6303         * disk/efi/efidisk.c: Fix format warnings on x86_64.
6304         * kern/efi/efi.c: Likewise.
6306         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
6307         target compiler is functional.
6308         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6309         are set up.
6311         * configure.ac: Default to efi platform for x86_64-apple.  Allow
6312         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
6313         adjustments from the rest, only do them if target is not
6314         explicitly given.  Merge other adjustments with the final sanity
6315         check.  Remove an extraneous check for supported CPU.  Be
6316         specific which CPU and which platform is not supported.
6318         * configure.ac: Default to pc platform for x86_64.
6320 2008-07-17  Robert Millan  <rmh@aybabtu.com>
6322         Partial LinuxBIOS -> Coreboot rename.
6324         * conf/i386-linuxbios.rmk: Renamed to ...
6325         * conf/i386-coreboot.rmk: ... this.
6326         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6327         * configure.ac: Accept "coreboot" as input platform (but maintain
6328         compatibility with "linuxbios").
6329         * include/grub/i386/linuxbios: Renamed to ...
6330         * include/grub/i386/coreboot: ... this.
6332 2008-07-17  Bean  <bean123ch@gmail.com>
6334         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6335         (appleldr_mod_SOURCE): New variable.
6336         (appleldr_mod_CFLAGS): Likewise.
6337         (appleldr_mod_LDFLAGS): Likewise.
6338         (pci_mod_SOURCES): Likewise.
6339         (pci_mod_CFLAGS): Likewise.
6340         (pci_mod_LDFLAGS): Likewise.
6341         (lspci_mod_SOURCES): Likewise.
6342         (lspci_mod_CFLAGS): Likewise.
6343         (lspci_mod_LDFLAGS): Likewise.
6345         * conf/x86_64-efi.rmk: New file.
6347         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6348         macro.
6349         (grub_efidisk_write): Likewise.
6351         * include/efi/api.h (efi_call_0): New macro.
6352         (efi_call_1): Likewise.
6353         (efi_call_2): Likewise.
6354         (efi_call_3): Likewise.
6355         (efi_call_4): Likewise.
6356         (efi_call_5): Likewise.
6357         (efi_call_6): Likewise.
6359         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6360         grub_rescue_cmd_chainloader.
6362         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6363         (grub_pe32_optional_header): Change some fields based on i386 or
6364         x86_64 platform.
6365         (GRUB_PE32_PE32_MAGIC): Likewise.
6367         * include/grub/efi/uga_draw.h: New file.
6369         * include/grub/elf.h (STN_ABS): New constant.
6370         (R_X86_64_NONE): Relocation constant for x86_64.
6371         (R_X86_64_64): Likewise.
6372         (R_X86_64_PC32): Likewise.
6373         (R_X86_64_GOT32): Likewise.
6374         (R_X86_64_PLT32): Likewise.
6375         (R_X86_64_COPY): Likewise.
6376         (R_X86_64_GLOB_DAT): Likewise.
6377         (R_X86_64_JUMP_SLOT): Likewise.
6378         (R_X86_64_RELATIVE): Likewise.
6379         (R_X86_64_GOTPCREL): Likewise.
6380         (R_X86_64_32): Likewise.
6381         (R_X86_64_32S): Likewise.
6382         (R_X86_64_16): Likewise.
6383         (R_X86_64_PC16): Likewise.
6384         (R_X86_64_8): Likewise.
6385         (R_X86_64_PC8): Likewise.
6387         * include/grub/i386/efi/pci.h: New file.
6389         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6390         Change it value based on platform.
6391         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6392         (GRUB_E820_RAM): Likewise.
6393         (GRUB_E820_RESERVED): Likewise.
6394         (GRUB_E820_ACPI): Likewise.
6395         (GRUB_E820_NVS): Likewise.
6396         (GRUB_E820_EXEC_CODE): Likewise.
6397         (GRUB_E820_MAX_ENTRY): Likewise.
6398         (grub_e820_mmap): New structure.
6399         (linux_kernel_header): Change the efi field according to different
6400         kernel version, also field from linux_kernel_header.
6402         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6404         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6405         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6406         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6407         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6408         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6409         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6410         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6411         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6412         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6413         (GRUB_PCI_ADDR_IO_MASK): Likewise.
6415         * include/grub/x86_64/efi/kernel.h: New file.
6417         * include/grub/x86_64/efi/loader.h: Likewise.
6419         * include/grub/x86_64/efi/machine.h: Likewise.
6421         * include/grub/x86_64/efi/pci.h: Likewise.
6423         * include/grub/x86_64/efi/time.h: Likewise.
6425         * include/grub/x86_64/linux.h: Likewise.
6427         * include/grub/x86_64/setjmp.h: Likewise.
6429         * include/grub/x86_64/time.h: Likewise.
6431         * include/grub/x86_64/types.h: Likewise.
6433         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6434          GRUB_TARGET_SIZEOF_VOID_P.
6436         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6437         (grub_efi_locate_handle): Likewise.
6438         (grub_efi_open_protocol): Likewise.
6439         (grub_efi_set_text_mode): Likewise.
6440         (grub_efi_stall): Likewise.
6441         (grub_exit): Likewise.
6442         (grub_reboot): Likewise.
6443         (grub_halt): Likewise.
6444         (grub_efi_exit_boot_services): Likewise.
6445         (grub_get_rtc): Likewise.
6447         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6448         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6449         (grub_efi_allocate_pages): Wrap efi calls.
6450         (grub_efi_free_pages): Wrap efi calls.
6451         (grub_efi_get_memory_map): Wrap efi calls.
6453         * kern/x86_64/dl.c: New file.
6455         * kern/x86_64/efi/callwrap.S: Likewise.
6457         * kern/x86_64/efi/startup.S: Likewise.
6459         * loader/efi/appleloader.c: Likewise.
6461         * loader/efi/chainloader.c (cmdline): New variable.
6462         (grub_chainloader_unload): Wrap efi calls.
6463         (grub_chainloader_boot): Likewise.
6464         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6465         command line.
6467         * loader/efi/chainloader_normal.c (chainloader_command):
6468         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6469         command line.
6471         * loader/i386/efi/linux.c (allocate_pages): Change allocation
6472         method.
6473         (grub_e820_add_region): New function.
6474         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6475         booting.
6476         (grub_find_video_card): New function.
6477         (grub_linux_setup_video): New function.
6478         (grub_rescue_cmd_linux): Probe for video information.
6480         * normal/x86_64/setjmp.S: New file.
6482         * term/efi/console.c (map_char): New function.
6483         (grub_console_putchar): Map unicode char.
6484         (grub_console_checkkey): Wrap efi calls.
6485         (grub_console_getkey): Likewise.
6486         (grub_console_getwh): Likewise.
6487         (grub_console_gotoxy): Likewise.
6488         (grub_console_cls): Likewise.
6489         (grub_console_setcolorstate): Likewise.
6490         (grub_console_setcursor): Likewise.
6492         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6494 2008-07-16  Pavel Roskin  <proski@gnu.org>
6496         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6497         format strings.
6499         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6500         pointer, not an integer.  This fixes a warning and prevents
6501         precision loss on 64-bit systems.
6502         (relocate_addresses): Remove unneeded cast.
6504 2008-07-15  Pavel Roskin  <proski@gnu.org>
6506         * kern/i386/ieee1275/init.c: Include grub/cache.h.
6508         * term/ieee1275/ofconsole.c: Disable code unused on i386.
6510         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6511         Fix comparison between signed and unsigned.
6513         * include/grub/i386/ieee1275/console.h: Declare
6514         grub_console_init() and grub_console_fini().
6516         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6517         It's empty and unused.
6519         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6520         beginning to avoid warnings with some compilers.
6522         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6523         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6525 2008-07-14  Pavel Roskin  <proski@gnu.org>
6527         * kern/env.c (grub_register_variable_hook): Don't copy empty
6528         string, it leaks memory.  Pass "" to grub_env_set(), it should
6529         handle constant strings.
6531         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6532         * commands/cmp.c (grub_cmd_cmp): Likewise.
6533         * kern/dl.c (grub_dl_flush_cache): Likewise.
6534         (grub_dl_load_core): Likewise.
6535         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6536         (grub_elf64_load_phdrs): Likewise.
6538 2008-07-13  Pavel Roskin  <proski@gnu.org>
6540         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6541         between signed and unsigned.
6542         (LzmaEnc_Finish): Fix warning about an unused parameter.
6544 2008-07-13  Bean  <bean123ch@gmail.com>
6546         * Makefile.in (enable_lzo): New rule.
6548         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6550         * configure.ac (ENABLE_LZO): New option --enable-lzo.
6552         * boot/i386/pc/lnxboot.S: #include <config.h>.
6554         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6555         its value according to the compression algorithm used, lzo or lzma.
6557         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6558         compression algorithm according to configure macro.
6560         * kern/i386/pc/startup.S (codestart): Likewise.
6562         * kern/i386/pc/lzma_decode.S: New file.
6564         * include/grub/lib/LzFind.h: Likewise.
6566         * include/grub/lib/LzHash.h: Likewise.
6568         * include/grub/lib/LzmaDec.h: Likewise.
6570         * include/grub/lib/LzmaEnc.h: Likewise.
6572         * include/grub/lib/LzmaTypes.h: Likewise.
6574         * lib/LzFind.c: Likewise.
6576         * lib/LzmaDec.c: Likewise.
6578         * lib/LzmaEnc.c: Likewise.
6580 2008-07-13  Bean  <bean123ch@gmail.com>
6582         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6583         (grub_ext4_extent_header): New structure.
6584         (grub_ext4_extent): Likewise.
6585         (grub_ext4_extent_idx): Likewise.
6586         (grub_ext4_find_leaf): New function.
6587         (grub_ext2_read_block): Handle extents.
6589 2008-07-12  Robert Millan  <rmh@aybabtu.com>
6591         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6593 2008-07-11  Robert Millan  <rmh@aybabtu.com>
6595         * util/grub.d/40_custom.in: New file. Example on how to add custom
6596         entries to /etc/grub.d.
6597         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6598         40_custom (implicitly, by merging all the grub.d rules).
6600 2008-07-11  Pavel Roskin  <proski@gnu.org>
6602         * commands/read.c (grub_getline): Fix invalid memory access.
6603         Don't add newline to the variable value.
6605         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6606         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6607         (serial_hw_get_port): Check validity of the port number.
6608         (grub_cmd_serial): Check return value of serial_hw_get_port().
6610 2008-07-07  Pavel Roskin  <proski@gnu.org>
6612         * boot/i386/pc/diskboot.S (notification_string): Replace
6613         "Loading kernel" with just "loading".  This is shorter, less
6614         confusing and saves a few bytes for possible future changes.
6616 2008-07-05  Pavel Roskin  <proski@gnu.org>
6618         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6619         size for ATAPI devices, they are undefined.  Output sector
6620         number in decimal form.
6622         * disk/ata.c: Use named constants for status bits.
6624 2008-07-04  Pavel Roskin  <proski@gnu.org>
6626         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6627         grub_addr_t before casting it to the void pointer to fix a
6628         warning.  Non-addressable regions are discarded earlier.
6629         (grub_arch_modules_addr): Cast _end to grub_addr_t.
6630         * kern/i386/linuxbios/table.c: Include grub/misc.h.
6631         (check_signature): Don't shadow table_header.
6632         (grub_linuxbios_table_iterate): Cast numeric constants to
6633         grub_linuxbios_table_header_t.
6634         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6635         grub_stop().
6637         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6638         prevent warnings.
6640         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6641         pointer, which can cause warnings.  Support 64-bit addresses.
6643         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6644         of sizeof(long).  This fixes PowerPC image generation on x86_64.
6646 2008-07-04  Robert Millan  <rmh@aybabtu.com>
6648         This fixes a performance issue when pc & gpt partmap iterators
6649         didn't abort iteration even after our hook found what it was
6650         looking for (often causing expensive probes of non-existent drives).
6652         Some callers relied on previous buggy behaviour, since they would
6653         raise an error when their own hooks caused early abortion of its
6654         iteration.
6656         * kern/device.c (grub_device_open): Improve error message.
6657         * disk/lvm.c (grub_lvm_open): Likewise.
6658         * disk/raid.c (grub_raid_open): Likewise.
6660         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6661         when hook requests it, independently of grub_errno.
6662         (pc_partition_map_probe): Do not fail when find_func() caused
6663         early abortion of pc_partition_map_iterate().
6665         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6666         when hook requests it, independently of grub_errno.
6667         (gpt_partition_map_probe): Do not fail when find_func() caused
6668         early abortion of gpt_partition_map_iterate().
6670         * kern/partition.c (grub_partition_iterate): Abort parent iteration
6671         when hook requests it, independently of grub_errno.  Do not fail when
6672         part_map_iterate_hook() caused early abortion of p->iterate().
6674         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6675         when grub_partition_iterate() returned with non-zero.
6677 2008-07-03  Pavel Roskin  <proski@gnu.org>
6679         * disk/ata.c (grub_ata_pio_write): Check status before writing,
6680         like we do in grub_ata_pio_read().
6681         (grub_ata_readwrite): Always write individual sectors.  Fix the
6682         sector count for the remainder.
6683         (grub_ata_write): Enable writing to ATA devices.  Correctly
6684         report error for ATAPI devices.
6686 2008-07-02  Pavel Roskin  <proski@gnu.org>
6688         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6689         warning.
6691         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6692         for every read sector, we already increment it for the whole
6693         batch.  This fixes reading more than 256 sectors at once.
6695         * util/grub-editenv.c (cmd_info): Cast argument to long
6696         explicitly.  ptrdiff_t reduces to int on i386.
6698         * util/grub-editenv.c (main): Be specific which parameter is
6699         missing.
6701         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6702         (memdisk): Make memdisk_orig_addr a pointer.
6704         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6705         for file offsets, use grub_off_t instead.  Fix printf format
6706         warnings.
6708         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6709         there.  Real unexpected warnings should not drown in the noise
6710         about known problems.
6712         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6713         grub_disk_addr_t for memory addresses.
6715         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6716         explicitly to fix a warning.
6718         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6720         * Makefile.in (MODULE_LDFLAGS): New variable.
6721         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
6722         the linker accepts --build-id=none.
6723         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
6724         MODULE_LDFLAGS.
6725         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6727         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6728         those in Linux XFS code.  Provide a way to access 64-bit parent
6729         inode.
6730         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
6731         the end of struct grub_xfs_dir_header.
6733 2008-07-02  Bean  <bean123ch@gmail.com>
6735         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6736         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6737         and GRUB_IEEE1275_FLAG_NO_ANSI.
6739         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6740         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6741         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6743         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6744         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6746         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6747         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6749         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6750         esc sequence on non ANSI terminal.
6751         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6753         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6754         beginning of file.
6756 2008-07-02  Bean  <bean123ch@gmail.com>
6758         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6759         (grub_editenv_SOURCES): New variable.
6760         (pkglib_MODULES): Add loadenv.mod.
6761         (loadenv_mod_SOURCES): New variable.
6762         (loadenv_mod_CFLAGS): Likewise.
6763         (loadenv_mod_LDFLAGS): Likewise.
6765         * include/grub/envblk.h: New file.
6767         * util/envblk.c: New file.
6769         * util/grub-editenv.c: New file.
6771         * commands/loadenv.c: New file.
6773 2008-07-01  Pavel Roskin  <proski@gnu.org>
6775         * include/multiboot2.h (struct multiboot_tag_module): Use char,
6776         not unsigned char.  This fixes warnings and is consistent with
6777         other tags.
6779         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6781         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6783         * term/tparm.c (analyze): Always set *popcount.
6785         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6786         cast to fix a warning.
6788         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6789         cast to suppress a warning.
6791         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6792         grub_fshelp_read_file() expects.
6794         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
6795         write uuid as a 32-bit value in CPU byte order, so declare and
6796         use it as such.
6798         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6799         long if the format specifier expects it.
6800         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6801         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6802         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6803         long to fix a warning.
6804         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6805         grub_dprintf() arguments to fix warnings.
6807 2008-06-30  Pavel Roskin  <proski@gnu.org>
6809         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6810         install_bsd_part immediately before core.img is embedded or
6811         modified on disk.  This fixes core.img verification if core.img
6812         cannot be embedded.
6814         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6815         core_path to calculate the blocklist.
6816         Patch from Javier Martín <lordhabbit@gmail.com>
6818 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6820         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
6821         block to disk block.
6822         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6823         Patch from Niels Böhm <bitbucket@arcor.de>
6825 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6827         * util/update-grub_lib.in (font_path): Search for fonts in
6828         /boot/grub first, which is more likely to be readable (we aren't
6829         deciding where fonts live, just looking for them).
6831 2008-06-26  Pavel Roskin  <proski@gnu.org>
6833         * util/biosdisk.c (read_device_map): Don't leave dead map
6834         entries for devices failing stat() check.
6836         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6837         core_path_dev for the core.img path on the target device.
6839 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6841         * disk/fs_uuid.c: New file.
6842         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6843         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6844         (fs_uuid_mod_LDFLAGS): New variables.
6845         * include/grub/disk.h (grub_disk_dev_id): Add
6846         `GRUB_DISK_DEVICE_UUID_ID'.
6847         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6848         implement iterate().
6850 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6852         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6853         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6854         Linux image includes no initrd.
6856 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
6858         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6859         call to resolve the core image location that effectively appended the
6860         name twice.
6862 2008-06-21  Robert Millan  <rmh@aybabtu.com>
6864         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6865         call from here ...
6867         * util/grub.d/10_hurd.in: ... to here ...
6868         * util/grub.d/10_linux.in: ... and here.
6870 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6872         * kern/main.c (grub_main): Export `prefix' variable immediately
6873         after it has been set by grub_machine_set_prefix().
6875 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6877         * commands/search.c (search_label, search_fs_uuid, search_file): Print
6878         search result when not saving to variable, not the other way around.
6879         When saving to variable, abort iteration as soon as a match is found.
6881 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6883         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6884         check for partition that provides /boot/grub.  Its logic is flawed,
6885         as it prevents prepare_grub_to_access_device() from being called
6886         multiple times.
6888 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6890         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6891         "insmod" command directly when abstraction modules are needed,
6892         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6893         since it had already been processed).
6895 2008-06-19  Pavel Roskin  <proski@gnu.org>
6897         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6898         changed.  This is needed in case GRUB_LIBDIR changes.
6899         * conf/i386-ieee1275.rmk: Likewise.
6900         * conf/i386-linuxbios.rmk: Likewise.
6901         * conf/i386-pc.rmk: Likewise.
6902         * conf/powerpc-ieee1275.rmk: Likewise.
6904 2008-06-18  Pavel Roskin  <proski@gnu.org>
6906         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6907         kernel_elf_symlist.c to symlist.c for consistency with other
6908         architectures.  Update all users.
6909         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6911 2008-06-18  Robert Millan  <rmh@aybabtu.com>
6913         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6914         it in prefix.
6916         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
6917         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
6918         a RAID device, run setup() for all members independently on whether
6919         LVM abstraction is being used.
6920         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6921         If grub-mkimage has set `*install_dos_part == -2', don't override this
6922         value.
6923         Perform *install_dos_part adjustments independently on whether
6924         we're embedding or not.
6925         Clarify error message when image is too big for embedding.
6926         Remove duplicate *install_dos_part stanza.
6928 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6930         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6931         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6932         variables.
6933         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6934         values in grub_ofconsole_normal_color and
6935         grub_ofconsole_highlight_color (they're not directly related to
6936         background and foreground).
6937         (grub_ofconsole_setcolorstate): Extract background and foreground
6938         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6940 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6942         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6943         /boot/grub for the check in last commit, not /boot (they could be
6944         different partitions).
6946 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6948         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6949         asked to setup access for the same partition that provides /boot,
6950         don't bother using UUIDs since our root already has the value we
6951         want.
6953 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6955         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6956         I2O devices.
6957         Patch from Sven Mueller <sven@debian.org>.
6959 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6961         * util/update-grub.in: Check for $EUID instead of $UID.
6962         Reported by Vincent Zweije.
6964 2008-06-16  Bean  <bean123ch@gmail.com>
6966         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6967         (grub_ext2_read_block): Likewise.
6968         (grub_ext2_read_inode): Likewise.
6969         (grub_ext2_mount): Likewise.
6970         (grub_ext2_close): Likewise.
6971         (grub_ext3_get_journal): Removed.
6973         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6974         (grub_reiserfs_read_symlink): Likewise.
6975         (grub_reiserfs_mount): Likewise.
6976         (grub_reiserfs_open): Likewise.
6977         (grub_reiserfs_read): Likewise.
6978         (grub_reiserfs_close): Likewise.
6979         (grub_reiserfs_get_journal): Removed.
6981         * fs/fshelp.c (grub_fshelp_read): Removed.
6982         (grub_fshelp_map_block): Likewise.
6984         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6985         (grub_fshelp_journal): Likewise.
6986         (grub_fshelp_read): Likewise.
6987         (grub_fshelp_map_block): Likewise.
6989 2008-06-16  Pavel Roskin  <proski@gnu.org>
6991         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6992         floating point anymore.
6993         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6995 2008-06-15  Pavel Roskin  <proski@gnu.org>
6997         * commands/ls.c (grub_ls_list_files): Use integer calculations
6998         for human readable format, avoid floating point use.
6999         * kern/misc.c (grub_ftoa): Remove.
7000         (grub_vsprintf): Remove floating point support.
7002 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7004         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7005         devices.
7006         Reported by Max Vozeler.
7008 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7010         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7011         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7012         skipped later.
7013         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7014         the beginning of the prefix.
7016         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7017         It is assumed that if we have a memdisk, grub-mkimage has set
7018         grub_prefix to include the "(memdisk)" drive in it.
7020 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7022         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7023         Initialize keyboard controller after registering the terminal, so that
7024         grub_printf() can be called from grub_keyboard_controller_init().
7026 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7028         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7029         extent-btree which is written as big endian on disk.
7030         Reported by Alain Greppin  <al@chilibi.org>.
7032 2008-06-14  Robert Millan  <rmh@aybabtu.com>
7034         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7035         * util/i386/pc/grub-install.in (modules): Likewise.
7037 2008-06-13  Pavel Roskin  <proski@gnu.org>
7039         * commands/ls.c (grub_ls_list_files): Fix format warnings.
7041 2008-06-13  Bean  <bean123ch@gmail.com>
7043         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7045         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7047         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7048         to indicate sparse block.
7050 2008-06-12  Pavel Roskin  <proski@gnu.org>
7052         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7053         number, grub_fshelp_read() does it for us.
7055         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
7056         linear disk read with journal translation.
7057         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7058         * include/grub/fshelp.h: Declare grub_fshelp_read().
7060 2008-06-09  Pavel Roskin  <proski@gnu.org>
7062         * fs/minix.c (grub_minix_mount): Handle error reading
7063         superblock.
7065 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7067         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7068         don't append the RAID prefix afterwards.
7069         Reported by Clint Adams.
7071 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7073         Based on description from Pavel:
7074         * kern/disk.c (grub_disk_check_range): Rename to ...
7075         (grub_disk_adjust_range): ... this.  Add a comment explaining the
7076         tasks performed by this function.
7078 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7080         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7081         `num_serial' (for consistency with other variables).
7082         (struct grub_ntfs_data): Add `uuid' member.
7083         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7084         (grub_ntfs_uuid): New function.
7085         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7087 2008-06-07  Pavel Roskin  <proski@gnu.org>
7089         * util/biosdisk.c (open_device): Revert last change to the
7090         function, it broke installation.  The sector needs to be
7091         different dependent on which device is opened.
7093 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7095         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7096         rest of GRUB, and breakage doesn't happen if its value were modified.
7098         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7099         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7100         a constant (same value).
7101         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7102         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7104 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7106         * util/biosdisk.c (open_device): Do not modify sector offset when
7107         accessing a partition.  kern/disk.c already handles this for us.
7109 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7111         * util/grub-emu.c (grub_machine_init): Move code in this function from
7112         here ...
7113         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7114         segfault in case grub_printf() is called).
7116         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7117         grub_probe.  Update all users not to explicitly add it again.
7118         (grub_device): New variable; contains corresponding device for grubdir.
7119         (fs_module, partmap_module, devabstraction_module): Pass
7120         `--device ${grub_device}' to grub_probe to avoid traversing /dev
7121         every time.
7123 2008-06-05  Robert Millan  <rmh@aybabtu.com>
7125         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7126         is found, print it (same layout as with labels).
7128 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7130         * util/biosdisk.c (get_drive): Rename to ...
7131         (find_grub_drive): ... this.  Update all users.
7133         (get_os_disk): Rename to ...
7134         (convert_system_partition_to_system_disk): ... this.  Update all users.
7136         (find_drive): Rename to ...
7137         (find_system_device): ... this.  Update all users.
7139 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7141         * util/biosdisk.c (get_os_disk): Handle IDA devices.
7142         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7143         (make_device_map): Likewise.
7145 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7147         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7148         before dereferencing it.
7150         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7151         union with fat12/fat16-specific ones.  Add some new fields, including
7152         `num_serial' for both versions.
7153         (struct grub_fat_data): Add `uuid' member.
7154         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7155         names.  Initialize `data->uuid' using `num_serial'.
7156         (grub_fat_uuid): New function.
7157         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7159         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7160         (grub_reiserfs_uuid): New function.
7161         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7162         member.
7164         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7165         (grub_xfs_uuid): New function.
7166         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7168 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7170         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7171         code that is backward compatible with pre-uuid search command.
7173 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7175         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7176         floppies after everything else, to ensure floppy drive isn't accessed
7177         unnecessarily (patch from Bean).
7179 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7181         * commands/search.c (search_label, search_fs_uuid, search_file): Do
7182         not print device names when we were asked to set a variable.
7184 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7186         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7187         using "cursor-on" and "cursor-off" commands (understood at least by
7188         the Open Firmware flavour on OLPC).
7190 2008-05-31  Michael Gorven  <michael@gorven.za.net>
7192         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7193         on and off sequences.
7195 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7197         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7198         * util/update-grub.in: Likewise.
7200 2008-05-30  Pavel Roskin  <proski@gnu.org>
7202         * util/biosdisk.c (linux_find_partition): Simplify logic and
7203         make the code more universal.  Keep special processing for
7204         devfs, but use a simple rule for all other devices.  If the
7205         device ends with a number, append 'p' and the partition number.
7206         Otherwise, append only the partition number.
7208 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7210         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7211         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7212         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7213         the `root' parameter to Linux.
7215 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7217         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7218         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7219         --fs_uuid with --fs-uuid.
7220         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7221         all filesystems support them).
7223 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7225         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7226         grub_printf() flags, since we're printing in units of 2 bytes.
7228 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7230         * util/grub.d/00_header.in: Remove obsolete comment referencing
7231         convert_system_path_to_grub_path().
7232         * util/update-grub.in: Likewise.
7233         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7234         (convert_system_path_to_grub_path): Add a warning message explaining
7235         that this function is deprecated.  Rely on is_path_readable_by_grub()
7236         for the readability checks.
7237         (font_path): Use is_path_readable_by_grub() for the readability
7238         check rather than convert_system_path_to_grub_path().
7240 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7242         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7243         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7244         converting it first.
7245         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7246         grub.cfg for access to font file, and afterwards call it again to set
7247         the root device.
7249 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7251         * commands/search.c (options): Add --fs_uuid option.
7252         (search_fs_uuid): New function.
7253         (grub_cmd_search): Fix --set argument passing.
7254         Use search_fs_uuid() when requested via --fs_uuid.
7255         (grub_search_init): Update help message.
7256         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7257         and redeclare it as an array of 16-bit words.
7258         (grub_ext2_uuid): New function.
7259         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7260         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7261         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7262         (GRUB_DEVICE_BOOT_UUID): New variables.
7263         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7264         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7265         whenever possible.
7266         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
7267         just assume `root' variable has the right value.
7268         * util/grub.d/10_linux.in: Likewise.
7269         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7270         via PRINT_FS_UUID.
7271         (main): Recognise `-t fs_uuid' argument.
7273 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7275         * util/biosdisk.c (map): Redefine structure to hold information
7276         about GRUB drive name.
7277         (get_drive): Reimplement without assuming (and verifying) BIOS-like
7278         drive names.
7279         (call_hook): Remove.
7280         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7281         member.  Assume drive has partitions.
7282         (grub_util_biosdisk_open): Access device names via `.device' struct
7283         member.
7284         (open_device): Likewise.
7285         (find_drive): Likewise.
7286         (read_device_map): Adjust map[] usage to match the new struct
7287         definition.  Don't check for duplicates (still possible, but not cheap
7288         anymore).
7289         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7290         (make_device_name): Remove assumption of BIOS-like drive names.
7292 2008-05-30  Pavel Roskin  <proski@gnu.org>
7294         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7295         compiling execute.c doesn't need grub_script.tab.h anymore.
7296         (normal/command.c_DEPENDENCIES): Likewise.
7297         (normal/function.c_DEPENDENCIES): Likewise.
7298         * conf/i386-ieee1275.rmk: Likewise.
7299         * conf/i386-linuxbios.rmk: Likewise.
7300         * conf/i386-pc.rmk: Likewise.
7301         * conf/powerpc-ieee1275.rmk: Likewise.
7302         * conf/sparc64-ieee1275.rmk: Likewise.
7304 2008-05-29  Pavel Roskin  <proski@gnu.org>
7306         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7307         when scanning metadata for volume group name.
7309         * include/grub/script.h: Don't include grub_script.tab.h.  It's
7310         a generated file, which may only be included from the files with
7311         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
7312         use union YYSTYPE, as the later allows forward declaration.
7313         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7315 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7317         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7318         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7319         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7320         (grub_console_checkkey): Add grub_dprintf() call to report unknown
7321         scan codes.
7323 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7325         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7326         control key combinations.
7328 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7330         * util/powerpc/ieee1275/grub-install.in: Move from here ...
7331         * util/ieee1275/grub-install.in: ... to here.
7332         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7333         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7334         (grub_install_SOURCES): Likewise.
7336 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7338         * fs/affs.c: Update copyright year.
7339         * fs/ext2.c: Likewise.
7340         * fs/fshelp.c: Likewise.
7341         * fs/hfsplus.c: Likewise.
7342         * fs/ntfs.c: Likewise.
7343         * fs/xfs.c: Likewise.
7344         * include/grub/fshelp.h: Likewise.
7345         * util/grub-mkdevicemap.c: Likewise.
7347 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7349         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7350         might need to be fatfs to support some firmware implementations
7351         (e.g. OFW or EFI).
7353 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7355         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7356         devices.
7357         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7358         (make_device_map): Likewise.
7360 2008-05-20  Bean  <bean123ch@gmail.com>
7362         * fs/fshelp.c (grub_fshelp_map_block): New function.
7363         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7364         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7366         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7367         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7368         (grub_fshelp_journal): New structure.
7369         (grub_fshelp_map_block): New function prototype.
7370         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7371         (grub_fshelp_map_block): Likewise.
7373         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7374         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7375         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7376         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7377         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7378         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7379         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7380         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7381         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7382         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7383         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7384         (grub_ext2_sblock): New members for journal support.
7385         (grub_ext3_journal_header): New structure.
7386         (grub_ext3_journal_revoke_header): Likewise.
7387         (grub_ext3_journal_block_tag): Likewise.
7388         (grub_ext3_journal_sblock): Likewise.
7389         (grub_fshelp_node): New members logfile and journal.
7390         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7391         grub_fshelp_map_block to get real block number.
7392         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7393         number.
7394         (grub_ext2_read_inode): Likewise.
7395         (grub_ext3_get_journal): New function.
7396         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7397         (grub_ext2_close): Release memory used by journal.
7399         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7400         (REISERFS_MAGIC_DESC_BLOCK): New macro.
7401         (grub_reiserfs_transaction_header): Renamed to
7402         grub_reiserfs_description_block, replace field data with real_blocks.
7403         (grub_reiserfs_commit_block): New structure.
7404         (grub_reiserfs_data): New member journal.
7405         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7406         number.
7407         (grub_reiserfs_read_symlink): Likewise.
7408         (grub_reiserfs_iterate_dir): Likewise.
7409         (grub_reiserfs_open): Likewise.
7410         (grub_reiserfs_read): Likewise.
7411         (grub_reiserfs_get_journal): New function.
7412         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7413         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7414         using grub_reiserfs_get_journal.
7415         (grub_reiserfs_close): Release memory used by journal.
7417         * fs/affs.c (grub_affs_read_block): Change block type to
7418         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7420         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7422         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7424         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7426         * fs/udf.c (grub_udf_read_block): Change block type to
7427         grub_disk_addr_t. Use type cast to avoid warning.
7429         * fs/xfs.c (grub_xfs_read_block): Likewise.
7431 2008-05-16  Christian Franke  <franke@computer.org>
7433         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7434         to ensure that break with ESC will always work.
7435         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7436         Remove ESC from keyboard queue.
7438 2008-05-16  Christian Franke  <franke@computer.org>
7440         * util/biosdisk.c: [__CYGWIN__] Add includes.
7441         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7442         (get_os_disk): Move variable declarations to OS specific
7443         parts to avoid warning.
7444         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7445         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7446         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7447         Cygwin.
7448         * util/getroot.c: [__CYGWIN__] Add includes.
7449         (strip_extra_slashes): Fix "/" case.
7450         [__CYGWIN__] (get_win32_path): New function.
7451         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7452         [__CYGWIN__] (find_root_device): Disable.
7453         [__CYGWIN__] (get_bootsec_serial): New function.
7454         [__CYGWIN__] (find_cygwin_root_device): Likewise.
7455         [__linux__] (grub_guess_root_device): Add early returns to simplify
7456         structure.
7457         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7458         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7459         check for Linux only.
7461 2008-05-15  Bean  <bean123ch@gmail.com>
7463         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7464         keyboard hang problem in apple's intel mac.
7466 2008-05-09  Robert Millan  <rmh@aybabtu.com>
7468         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7469         devices.
7470         * util/grub-mkdevicemap.c (get_virtio_disk_name)
7471         (make_device_map): Likewise.
7472         Reported by Aurelien Jarno <aurel32@debian.org>
7474 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
7476         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7477         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7478         (make_device_map): Output entries for xvd type disks.
7480 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7482         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7483         devices.
7484         * util/grub-mkdevicemap.c (get_cciss_disk_name)
7485         (make_device_map): Likewise.
7486         Reported by Roland Dreier <rdreier@cisco.com>
7488 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7490         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7491         grub_strstr() call.  Correct a few mistakes in failure path handling.
7493 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7495         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7496         Do not print a trailing slash (therefore, the root directory is an
7497         empty string).
7498         (convert_system_path_to_grub_path): Do not remove trailing slash
7499         from make_system_path_relative_to_its_root() output.
7501         * util/i386/pc/grub-install.in: Add trailing slash to output from
7502         make_system_path_relative_to_its_root().
7504 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7506         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
7507         ensures that output lines aren't intermangled with those sent to
7508         stderr (via grub_util_info()).
7509         * util/grub-probe.c (grub_refresh): Likewise.
7510         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7512 2008-05-05  Christian Franke  <franke@computer.org>
7514         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7515         Add Cygwin device names.
7516         (get_ide_disk_name) [__CYGWIN__]: Likewise.
7517         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7518         (check_device): Return error instead of success on empty name.
7519         (make_device_map): Move label inside linux specific code to
7520         prevent compiler warning.
7522 2008-04-30  Robert Millan  <rmh@aybabtu.com>
7524         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7525         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7526         first boot option.
7527         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7529 2008-04-29  Robert Millan  <rmh@aybabtu.com>
7531         * docs/grub.cfg: New file (example GRUB configuration).
7533 2008-04-26  Robert Millan  <rmh@aybabtu.com>
7535         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
7536         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7537         and `disk/ieee1275/nand.c'.
7539 2008-04-25  Bean  <bean123ch@gmail.com>
7541         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7542         i386-linuxbios.
7544         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7545         change the buffer size to 4096 for cdrom device.
7547         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7548         and nand.mod.
7549         (_linux_mod_SOURCES): New variable.
7550         (_linux_mod_CFLAGS): Likewise.
7551         (_linux_mod_LDFLAGS): Likewise.
7552         (linux_mod_SOURCES): Likewise.
7553         (linux_mod_CFLAGS): Likewise.
7554         (linux_mod_LDFLAGS): Likewise.
7555         (nand_mod_SOURCES): Likewise.
7556         (nand_mod_CFLAGS): Likewise.
7557         (nand_mod_LDFLAGS): Likewise.
7559         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7560         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7561         type property. (nand device in olpc don't have this property)
7563         * include/grub/disk.h (grub_disk_dev_id): New macro
7564         GRUB_DISK_DEVICE_NAND_ID.
7566         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7567         function prototype.
7568         (grub_rescue_cmd_initrd): Likewise.
7570         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7571         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7572         ofw_cif_handler and ofw_idt, adjust padding number.
7574         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7575         GRUB_MACHINE_IEEE1275 is defined.
7577         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7578         Use NESTED_FUNC_ATTR attribute on the hook parameter.
7580         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7581         on nested function heap_init.
7582         (grub_upper_mem): New variable for i386-ieee1275.
7583         (grub_get_extended_memory): New function for i386-ieee1275.
7584         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7586         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7587         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7588         property.
7590         * loader/i386/ieee1275/linux.c: New file.
7592         * loader/i386/ieee1275/linux_normal.c: New file.
7594         * disk/ieee1275/nand.c: New file.
7596 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
7598         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7599         value.
7600         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7602 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7604         Restructures early code path on ieee1275 to unify grub_main() as
7605         the first C function that is executed in every platform.
7607         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7608         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7609         cmain().
7610         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7611         * kern/ieee1275/cmain.c (cmain): Rename to ...
7612         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7613         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7614         at the beginning.
7616 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7618         * util/update-grub.in: Fix syntax error when setting
7619         `GRUB_PRELOAD_MODULES'.
7620         Reported by Stephane Chazelas <stephane@artesyncp.com>
7622 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
7624         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7625         section into account, newer toolchains generate unique build ids
7626         * configure.ac: remove the test for --build-id=none acceptance,
7627         we want build ids to be preserved
7628         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7629         far from other sections don't cause the raw binary images grow
7630         size
7632 2008-04-15  Robert Millan  <rmh@aybabtu.com>
7634         * disk/lvm.c: Update copyright year.
7635         * kern/misc.c: Likewise.
7637 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7639         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7640         there is no memory left for physical volume name.
7642 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7644         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7645         volume name mapping to support bigger than 9 character names properly.
7647 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7649         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7650         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7652 2008-04-13  Christian Franke  <franke@computer.org>
7654         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7655         to create a floppy emulation boot CD when non emulation mode
7656         does not work.
7657         Enable Joliet CD filesystem extension.
7659 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7661         * kern/misc.c (grub_strncat): Fix off-by-one error.
7662         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7664         * kern/env.c (grub_env_context_close): Clear current context, not
7665         previous one.
7666         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7668         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7670 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7672         Improve robustness when handling LVM.
7674         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7675         (and leave `*p' unmodified).
7676         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7677         through it.
7678         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7679         iterating through it.
7680         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7681         through it.
7682         (grub_lvm_scan_device): Check the return value (and fail gracefully
7683         when due) on each grub_lvm_getvalue() or grub_strstr() call.
7684         Don't assume `vg->pvs != NULL' when iterating through it.
7686 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7688         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7689         * genmk.rb (partmap): New variable.
7690         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7691         (#{partmap}): New target rule.
7692         * genpartmaplist.sh: New file.
7693         * Makefile.in (pkglib_DATA): Add partmap.lst.
7694         (partmap.lst): New target rule.
7695         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7696         modules (including all partition maps), instead of preloading them.
7698 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
7700         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7701         `linux-boot-prober' (if installed) to detect other operating
7702         systems which are installed on the computer and add them to
7703         the boot menu.
7704         * conf/common.rmk: Build and install 30_os-prober.
7706 2008-04-12  Robert Millan  <rmh@aybabtu.com>
7708         * kern/powerpc/ieee1275/init.c: Move from here ...
7709         * kern/ieee1275/init.c: ... to here.  Update all users.
7711         * kern/powerpc/ieee1275/cmain.c: Move from here ...
7712         * kern/ieee1275/cmain.c: ... to here.  Update all users.
7714         * kern/powerpc/ieee1275/openfw.c: Move from here ...
7715         * kern/ieee1275/openfw.c: ... to here.  Update all users.
7717         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7718         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
7720 2008-04-10  Pavel Roskin  <proski@gnu.org>
7722         * configure.ac: Always use "_cv_" in cache variables for
7723         compatibility with Autoconf 2.62.
7725 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7727         Revert grub/machine/init.h addition by Pavel (since it breaks on
7728         i386-ieee1275 and others):
7729         * util/i386/pc/misc.c: Remove grub/machine/init.h.
7730         * util/powerpc/ieee1275/misc.c: Likewise.
7732 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7734         * util/grub-probe.c (probe): Improve error message.
7736 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7738         * util/biosdisk.c (read_device_map): Skip devices that don't exist
7739         (this prevents the presence of a bogus entry from ruining the whole
7740         thing).
7742 2008-04-06  Pavel Roskin  <proski@gnu.org>
7744         * util/biosdisk.c: Include grub/util/biosdisk.h.
7745         * util/grub-fstest.c (execute_command): Make static.
7746         * util/grub-mkdevicemap.c (check_device): Likewise.
7747         * util/i386/pc/misc.c: Include grub/machine/init.h.
7748         * util/powerpc/ieee1275/misc.c: Likewise.
7749         * util/lvm.c: Include grub/util/lvm.h.
7750         * util/misc.c: Include grub/kernel.h, grub/misc.h and
7751         grub/cache.h.
7752         * util/raid.c: Include grub/util/raid.h.
7753         (grub_util_getdiskname): Make static.
7755         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7756         grub_hostfs_fini(), as they are called from grub_init_all() and
7757         grub_fini_all() respectively.  This fixes an infinite loop in
7758         grub-fstest due to double registration of hostfs.
7759         Reported by Christian Franke <Christian.Franke@t-online.de>
7761 2008-04-05  Pavel Roskin  <proski@gnu.org>
7763         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7764         all 8 functions.  Otherwise, probe function 0 only.
7766 2008-04-04  Pavel Roskin  <proski@gnu.org>
7768         * commands/lspci.c (grub_lspci_iter): Print the bus number
7769         correctly.
7771         * commands/lspci.c (grub_pci_classes): Fix typos.
7772         (grub_lspci_iter): Don't print func twice.  Print vendor ID
7773         before device ID, as it's normally done.
7775         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7776         Fix signedness warnings.
7777         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7778         Likewise.
7779         * util/ieee1275/get_disk_name.c: Include config.h so that
7780         _GNU_SOURCE is defined and getline() is declared.  Mark an
7781         unused argument as such.  Fix a signedness warning.
7783 2008-04-02  Pavel Roskin  <proski@gnu.org>
7785         * genkernsyms.sh.in: Use more robust assignments for CC and
7786         srcdir.  Quote srcdir.
7787         * gensymlist.sh.in: Likewise.  Assert at the compile time that
7788         the symbol table is not empty.
7790         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7791         * fs/cpio.c (grub_cpio_read): Likewise.
7793 2008-04-01  Pavel Roskin  <proski@gnu.org>
7795         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7796         * disk/host.c (grub_host_open): Likewise.
7797         * disk/loopback.c (grub_loopback_open): Likewise.
7798         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7799         disk->id as in disk/host.c, not a multi-character constant.
7801         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
7802         later is obsolete, potentially dangerous and sets a bad example.
7803         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7804         * util/misc.c (grub_util_get_image_size): Likewise.
7806         * disk/loopback.c (options): Improve help for "--partitions".
7808         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7809         options to align them with the short options, e.g. "echo -e".
7811 2008-03-31  Bean  <bean123ch@gmail.com>
7813         * video/reader/png.c (grub_png_data): New member is_16bit and
7814         image_data.
7815         (grub_png_decode_image_header): Detect 16 bit png image.
7816         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7817         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7818         (grub_video_reader_png): Release memory occupied by image_data.
7820         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7821         4096 bytes.
7822         (grub_nfs_mount): Skip the test for sector per cluster.
7824         * include/grub/ntfs.h (MAX_SPC): Removed.
7826 2008-03-31  Bean  <bean123ch@gmail.com>
7828         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7829         (grub_probe_SOURCES): Add fs/afs.c.
7830         (grub_fstest_SOURCES): Likewise.
7831         (afs_mod_SOURCES): New variable.
7832         (afs_mod_CFLAGS): Likewise.
7833         (afs_mod_LDFLAGS): Likewise.
7835         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7836         (grub_emu_SOURCES): Likewise.
7838         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7840         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7842         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7844         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7846         * fs/afs.c: New file.
7848 2008-03-30  Pavel Roskin  <proski@gnu.org>
7850         * disk/host.c: Include grub/misc.h to fix a warning.
7851         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7852         warnings about implicit declarations.
7854         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7855         variable.
7856         * include/grub/i386/loader.h: Change declaration of
7857         grub_linux_boot() to match what grub_loader_set() expects.
7858         * util/getroot.c (grub_guess_root_device): Return const char* to
7859         fix a warning.
7860         * util/grub-probe.c (probe): Fix a warning about uninitialized
7861         abstraction_name variable.
7862         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7863         second argument as unused to fix a warning.
7865         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7866         missing grub_error() call.
7868         * util/update-grub_lib.in: Define datarootdir, since Autoconf
7869         2.60 and newer uses it to define datadir.
7871         * commands/sleep.c: Fix warning about implicit declaration.
7872         * disk/memdisk.c: Likewise.
7873         * loader/aout.c: Likewise.
7874         * loader/i386/bsd_normal.c: Likewise.
7875         * util/grub-probe.c: Likewise.
7877         * commands/i386/cpuid.c (has_longmode): Make static.
7878         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7879         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7881         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7882         GDT.  This is more robust, as %ds can change.
7883         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7884         calling real_to_prot().
7885         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7887 2008-03-28  Pavel Roskin  <proski@gnu.org>
7889         * kern/i386/pc/startup.S: Assert that uncompressed functions
7890         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7891         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7892         code, as they push parts of the code (error handlers) beyond
7893         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
7894         code as correctness and size.
7896 2008-03-28  Pavel Roskin  <proski@gnu.org>
7898         * kern/i386/pc/startup.S
7899         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7900         data block address to the real mode, keep offset minimal.  This
7901         works around a bug in AWARD BIOS on old Athlon systems, which
7902         makes CD detection hang.
7904 2008-03-26  Pavel Roskin  <proski@gnu.org>
7906         * normal/color.c (grub_parse_color_name_pair): Make `name' a
7907         const.
7908         * include/grub/normal.h: Add grub_parse_color_name_pair()
7909         declaration.
7911 2008-03-24  Bean  <bean123ch@gmail.com>
7913         * disk/i386/pc/biosdisk.c (cd_start): Removed.
7914         (cd_count): Removed.
7915         (cd_drive): New variable.
7916         (grub_biosdisk_get_drive): Don't check for (cdN) device.
7917         (grub_biosdisk_call_hook): Likewise.
7918         (grub_biosdisk_iterate): Change cdrom detection method.
7919         (grub_biosdisk_open): Replace cd_start with cd_drive.
7920         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7921         detect cdrom device.
7923         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7924         Removed.
7925         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7926         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7927         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7928         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7929         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7930         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7931         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7932         (grub_biosdisk_cdrp): New structure.
7933         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7935         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7937         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7938         device.
7940         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7941         New function.
7943 2008-03-20  Robert Millan  <rmh@aybabtu.com>
7945         Remove 2 TiB limit in ata.mod.
7946         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7947         (grub_ata_dumpinfo): Print sector count with 0x%llx.
7948         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7949         grub_uint64_t instead of grub_uint32_t.
7951 2008-03-05  Bean  <bean123ch@gmail.com>
7953         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7954         (grub_multiboot): Set boot device.
7956         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7958 2008-03-02  Bean  <bean123ch@gmail.com>
7960         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7961         symlink_buffer.
7963 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
7965         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7966         texinfo.tex.
7968         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7969         modified.
7971         * docs/fdl.texi: New file.
7973         * docs/mdate-sh: New file. Copied from gnulib.
7974         * docs/texinfo.tex: Likewise.
7976         * config.guess: Updated from gnulib.
7977         * install-sh: Likewise.
7979 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7981         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7982         (aout_mod_SOURCES): New variable.
7983         (aout_mod_CFLAGS): Likewise.
7984         (aout_mod_LDFLAGS): Likewise.
7986         * conf/i386-ieee1275.rmk: Likewise.
7988 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7990         * util/update-grub.in: Reorganise terminal validity check.  Accept
7991         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7992         Based on suggestion by Franklin PIAT.
7994 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
7996         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7997         function.
7998         * util/getroot.c (grub_util_check_block_device): New function that
7999         returns the given argument if it is a block device and returns NULL else.
8000         * util/grub-probe.c (argument_is_device): New variable.
8001         (probe): Promote device_name from a variable to an argument. Receive
8002         device_name from grub_util_check_block_device() if path is NULL and from
8003         grub_guess_root_device() else. Do not free() device_name anymore.
8004         (options): Introduce new parameter '-d, --device'.
8005         (main): Add description of the new parameter to the help screen.
8006         Rename path variable to argument. Set argument_is_device if the '-d'
8007         option is given. Pass argument to probe() depending on
8008         argument_is_device.
8010 2008-02-24  Bean  <bean123ch@gmail.com>
8012         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8013         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8014         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8015         (GRUB_ISO9660_VOLDESC_PART): Likewise.
8016         (GRUB_ISO9660_VOLDESC_END): Likewise.
8017         (grub_iso9660_primary_voldesc): New member escape.
8018         (grub_iso9660_data): New member joliet.
8019         (grub_iso9660_convert_string): New function.
8020         (grub_iso9660_mount): Detect joliet extension.
8021         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8022         (grub_iso9660_iso9660_label): Likewise.
8024         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8025         (grub_setup_SOURCES): Add fs/udf.c.
8026         (grub_fstest_SOURCES): Likewise.
8027         (udf_mod_SOURCES): New variable.
8028         (udf_mod_CFLAGS): Likewise.
8029         (udf_mod_LDFLAGS): Likewise.
8031         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8032         (grub_emu_SOURCES): Likewise.
8034         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8036         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8038         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8040         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8042         * fs/udf.c: New file.
8044 2008-02-24  Robert Millan  <rmh@aybabtu.com>
8046         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8047         (normal/lexer.c_DEPENDENCIES): New variables.
8048         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8049         (normal/lexer.c_DEPENDENCIES): Likewise.
8050         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8051         (normal/lexer.c_DEPENDENCIES): Likewise.
8052         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8053         (normal/lexer.c_DEPENDENCIES): Likewise.
8054         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8055         (normal/lexer.c_DEPENDENCIES): Likewise.
8056         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8057         (normal/lexer.c_DEPENDENCIES): Likewise.
8059 2008-02-23  Robert Millan  <rmh@aybabtu.com>
8061         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8062         since they were intended to be in hex.  This didn't break previously
8063         because of a bug in gpt_partition_map_iterate() (see below).
8065         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8066         when checking the validity of GPT header.
8067         Remove `partno', since it always provides the same information as `i'.
8069 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
8071         * include/grub/efi/time.h: Fix a wrong comment.
8073 2008-02-19  Pavel Roskin  <proski@gnu.org>
8075         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8076         message.
8078 2008-02-19  Bean  <bean123ch@gmail.com>
8080         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8081         (aout_mod_SOURCES): New variable.
8082         (aout_mod_CFLAGS): Likewise.
8083         (aout_mod_LDFLAGS): Likewise.
8084         (_bsd_mod_SOURCES): New variable.
8085         (_bsd_mod_CFLAGS): Likewise.
8086         (_bsd_mod_LDFLAGS): Likewise.
8087         (bsd_mod_SOURCES): New variable.
8088         (bsd_mod_CFLAGS): Likewise.
8089         (bsd_mod_LDFLAGS): Likewise.
8091         * include/grub/aout.h: New file.
8093         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8095         * include/grub/i386/bsd.h: New file.
8097         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8098         to make it public.
8100         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8101         function is called, so that it's possible to change it inside the hook.
8102         (grub_elf64_load): Likewise.
8103         (grub_elf_file): Don't close the file if elf header is not found.
8104         (grub_elf_close): Close the file if grub_elf_file fails (The new
8105         grub_elf_file won't close it).
8106         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8107         (grub_elf64_size): Likewise.
8109         * kern/i386/loader.S (grub_unix_real_boot): New function.
8111         * loader/aout.c: New file.
8113         * loader/i386/bsd.c: New file.
8115         * loader/i386/bsd_normal.c: New file.
8117         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8119         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8120         can test other formats.
8122 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8124         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8125         (grub_gpt_partition_type_empty): Redefine with macro from
8126         `<grub/gpt_partition.h>'.
8127         (gpt_partition_map_iterate): Adjust partition type comparison.
8129         Export `entry' as partmap-specific `part.data' struct.
8130         (grub_gpt_header, grub_gpt_partentry): Move from here ...
8132         * include/grub/gpt_partition.h (grub_gpt_header)
8133         (grub_gpt_partentry): ... to here (new file).
8135         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8137         (grub_gpt_partition_type_bios_boot): New const variable, defined
8138         with macro from `<grub/gpt_partition.h>'.
8140         (setup): Replace `first_start' with `embed_region', which keeps
8141         track of the embed region (and is partmap-agnostic).
8143         Replace find_first_partition_start() with find_usable_region(),
8144         which finds a usable region for embedding using partmap-specific
8145         knowledge (supports PC/MSDOS and GPT).
8147         Fix all assumptions that the embed region start at sector 1, using
8148         `embed_region.start' from now on.  Similarly, use `embed_region.end'
8149         rather than `first_start' to calculate available size.
8151         In grub_util_info() message, replace "into after the MBR" with an
8152         indication of the specific sector our embed region starts at.
8154 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8156         * DISTLIST: Replace `commands/ieee1275/halt.c' and
8157         `commands/ieee1275/reboot.c' with `commands/halt.c' and
8158         `commands/reboot.c'.
8159         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8160         (halt_mod_SOURCES): Likewise.
8161         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8162         (halt_mod_SOURCES): Likewise.
8164 2008-02-17  Christian Franke  <franke@computer.org>
8166         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8168 2008-02-17  Robert Millan  <rmh@aybabtu.com>
8170         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8171         set `first_start' to 0 for non-PC/MSDOS partition maps.
8173 2008-02-16  Robert Millan  <rmh@aybabtu.com>
8175         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8176         do not assume partition map is PC/MSDOS before performing checks that
8177         are specific to that layout.
8179 2008-02-13  Robert Millan  <rmh@aybabtu.com>
8181         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8182         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8183         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8185 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
8187         * configure.ac: Only a cosmetic change on the handling of
8188         -fno-stack-protector.
8190 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
8192         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8193         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8194         reboot.c.
8195         (grub_install_SOURCES): Add halt.mod and reboot.mod.
8196         (halt_mod_SOURCES): New variable.
8197         (halt_mod_CFLAGS): Likewise.
8198         (halt_mod_LDFLAGS): Likewise.
8199         (reboot_mod_SOURCES): Likewise.
8200         (reboot_mod_CFLAGS): Likewise.
8201         (reboot_mod_LDFLAGS): Likewise.
8203         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8204         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8205         reboot.c.
8206         (halt_mod_SOURCES): Likewise.
8207         (reboot_mod_SOURCES): Likewise.
8209         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8210         commands/i386/pc/reboot.c by commands/reboot.c.
8211         (reboot_mod_SOURCES): Likewise.
8213         * commands/i386/pc/reboot.c: merge this file ...
8215         * commands/ieee1275/reboot.c: ... and this file ...
8217         * commands/reboot.c: ... to this file.
8218         Add some precompiler directive to include the correct header for
8219         each machine.
8221         * commands/ieee1275/halt.c: move this file ...
8223         * commands/halt.c: ... to here.
8224         Add some precompiler directive to include the correct header for
8225         each machine.
8227         * include/grub/efi/efi.h (grub_reboot): New function declaration.
8228         (grub_halt): Likewise.
8230         * kern/efi/efi.c (grub_reboot): New function.
8231         (grub_halt): Likewise.
8233 2008-02-12  Robert Millan  <rmh@aybabtu.com>
8235         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8236         /dev (like it is done for /dev/mapper).  This doesn't provide support
8237         for EVMS, but at least it is now easy to identify the problem when it
8238         arises.
8240 2008-02-11  Robert Millan  <rmh@aybabtu.com>
8242         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8243         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8244         comparing it with -1, not 0.
8246 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8248         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8249         `disk/lvm.c'.
8250         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8251         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8253         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8254         `disk/lvm.c' to the end of the list.
8255         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8256         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8258 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8260         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
8261         grub_print_error() instead.  This will let user know why we're entering
8262         rescue mode.
8263         Based on suggestions from Sam Morris.
8265 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
8267         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8268         on remaining N args, instead of "--" arg N times.
8270 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
8272         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8273         (fill_with_default_glyph): Changed to use unknown_glyph for fill
8274         pattern for unknown glyphs.
8276 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8278         * configure.ac: Probe for `help2man'.
8279         * Makefile.in (builddir): New variable.
8280         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
8281         or otherwise add a few flags/options to it.
8282         (install-local): For every executable utility or script that is
8283         installed, invoke $(HELP2MAN) to install a manpage based on --help
8284         output.
8286         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8287         that it doesn't prevent --help from working in build tree.
8289         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8290         with `bug-grub@gnu.org'.
8291         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8292         * util/update-grub.in (usage): New function.
8293         Implement proper argument check, with support for --help and --version
8294         (as well as existing -y).
8296 2008-02-09  Christian Franke  <franke@computer.org>
8298         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8299         avoid overwriting previous output.
8300         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8302 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8304         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8305         drawing the menu.
8307 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8309         * commands/sleep.c: New file.
8310         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8311         (sleep_mod_SOURCES): New variable.
8312         (sleep_mod_CFLAGS): Likewise.
8313         (sleep_mod_LDFLAGS): Likewise.
8315 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8317         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8318         situations in which we can deduce the RAID size and the superblock
8319         doesn't match it.
8321 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8323         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
8324         and return a grub_diskmemberlist_t composed of LVM physical volumes.
8325         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8327         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
8328         and return a grub_diskmemberlist_t composed of physical array members.
8329         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8331         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8332         prototype.
8333         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8334         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8335         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8337         * util/grub-probe.c (probe): Move partmap probing code from here ...
8338         (probe_partmap): ... to here.
8339         (probe): Use probe_partmap() once for the disk we're probing, and
8340         additionally, when such disk contains a memberlist() struct member,
8341         once for each disk that is contained in the structure returned by
8342         memberlist().
8344 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8346         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8347         environment variable to 'all' in order to obtain debug output from
8348         non-util/ code.
8349         * util/i386/pc/grub-setup.c (main): Likewise.
8351 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8353         * disk/raid.c (grub_raid_scan_device): Check for
8354         `array->device[sb.this_disk.number]' rather than for
8355         `array->device[sb.this_disk.number]->name', since the latter is not
8356         guaranteed to be accessible.
8358 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8360         * disk/raid.c: Update copyright.
8361         * fs/cpio.c: Likewise.
8362         * include/grub/raid.h: Likewise.
8363         * loader/i386/pc/multiboot.c: Likewise.
8364         * util/hostfs.c: Likewise.
8366 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8368         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8369         to a grub_disk_t array.
8370         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8371         `device[x]'.
8372         (grub_raid_scan_device): Replace `device[x].name' accesses with
8373         `device[x]->name'.  Simplify initialization of `array->device[x]'.
8375 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8377         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8378         grub_dprintf() calls.
8379         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8380         error message.
8382 2008-02-07  Christian Franke  <franke@computer.org>
8384         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8385         instead of fseek and ftell to support large files.
8386         (grub_hostfs_read): Likewise.
8388 2008-02-07  Robert Millan  <rmh@aybabtu.com>
8390         Patch from Jeroen Dekkers.
8391         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8392         failure, since successfully reading all array members might not be
8393         required.
8395 2008-02-06  Robert Millan  <rmh@aybabtu.com>
8397         * util/grub-probe.c (probe): Simplify partmap probing (with the
8398         assumption that the first word up to the underscore equals to
8399         the module name).
8401 2008-02-06  Christian Franke  <franke@computer.org>
8403         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8404         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8405         last block of a cpio or tar stream.
8406         Check for "TRAILER!!!" instead of any empty data
8407         block to detect last block of a cpio stream.
8408         (grub_cpio_dir): Fix constness of variable np.
8409         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8410         cpio or tar trailer is detected.  This fixes a crash
8411         on open of a non existing file.
8413 2008-02-05  Bean  <bean123ch@gmail.com>
8415         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8416         address of entry.
8417         (grub_multiboot_load_elf64): Likewise.
8418         (grub_multiboot): Initialize mbi structure.
8420         * util/grub-fstest.c: Don't include unused header file script.h.
8422         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8423         of file.
8424         (grub_fstest_SOURCES): Likewise.
8426 2008-02-05  Robert Millan  <rmh@aybabtu.com>
8428         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8429         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8430         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8431         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8433         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8434         (translation_table): Replace hardcoded values with macros
8435         provided by `<grub/term.h>'.
8437         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8438         (keyboard_map): Correct/add a few values, with macros provided
8439         by `<grub/term.h>'.
8440         (keyboard_map_shift): Zero values that don't differ from their
8441         `keyboard_map' equivalents.
8442         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8443         Discard the second scan code that is always sent by Caps lock.
8444         Only use `keyboard_map_shift' when it provides a non-zero value,
8445         otherwise fallback to `keyboard_map'.
8447 2008-02-04  Bean  <bean123ch@gmail.com>
8449         * Makefile.in (enable_grub_fstest): New variable.
8451         * conf/common.rmk (grub_fstest_init.lst): New rule.
8452         (grub_fstest_init.h): Likewise.
8453         (grub_fstest_init.c): Likewise.
8454         (util/grub-fstest.c_DEPENDENCIES): New variable.
8455         (grub_fstest_SOURCES): Likewise.
8457         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8459         * util/grub-fstest.c: New file.
8461 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8463         Make grub-setup handle a separate root device.
8465         * util/i386/pc/grub-setup.c (setup): Always open the root device,
8466         so that the root device can be compared with the destination
8467         device.
8468         When embedding the core image, if the root and destination devices
8469         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8470         0xFF.
8471         When not embedding, set ROOT_DRIVE to 0xFF.
8473 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8475         Add support for having a grub directory in a different drive. This
8476         is still only the data handling part.
8478         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8479         (codestart): Save %dh in GRUB_ROOT_DRIVE.
8480         (grub_root_drive): New variable.
8482         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8483         instead of GRUB_BOOT_DRIVE to construct a device name. Set
8484         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8485         as it was.
8487         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8489         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8490         macro.
8491         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8493         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8494         is bogus, because PXE booting does not specify any drive
8495         correctly.
8497         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8498         am not sure if this is really correct.
8500         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8501         is always identical to the boot drive when booting from a CD.
8503         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8504         longer.
8505         (root_drive): New variable.
8506         (real_start): Unconditionally set %dh to ROOT_DRIVE.
8507         (setup_sectors): Push %dx right after popping it, because %dh will
8508         be modified later.
8509         (copy_buffer): Restore %dx.
8511 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8513         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8514         use `cdboot.img' for cdrom images.
8516 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8518         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8519         only setup gfxterm when `font' command has succeeded.
8521 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8523         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8524         (grub_rescue_cmd_multiboot_loader)
8525         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8527 2008-02-03  Pavel Roskin  <proski@gnu.org>
8529         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8530         %edx and %esi from stack only after grub_gate_a20() is called.
8531         grub_gate_a20() clobbers %edx.
8533 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8535         * configure.ac (AC_INIT): Bumped to 1.96.
8537         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8538         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8539         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8540         video/readers/png.c.
8542 2008-02-03  Bean  <bean123ch@gmail.com>
8544         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8545         (cdboot_img_SOURCES): New variable.
8546         (cdboot_img_ASFLAGS): New variable.
8547         (cdboot_img_LDFLAGS): New variable.
8549         * boot/i386/pc/cdboot.S: New file.
8551         * disk/i386/pc/biosdisk.c (cd_start): New variable.
8552         (cd_count): Likewise.
8553         (grub_biosdisk_get_drive): Add support for cd device.
8554         (grub_biosdisk_call_hook): Likewise.
8555         (grub_biosdisk_iterate): Likewise.
8556         (grub_biosdisk_open): Likewise.
8557         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8558         (grub_biosdisk_rw): Support reading from cd device.
8559         (GRUB_MOD_INIT): Iterate cd devices.
8561         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8562         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8563         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8565         * kern/i386/pc/init.c (make_install_device): Check for cd device.
8567 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8569         * commands/read.c: New file.
8570         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8571         (read_mod_SOURCES): New variable.
8572         (read_mod_CFLAGS): Likewise.
8573         (read_mod_LDFLAGS): Likewise.
8575 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8577         * normal/main.c (grub_normal_execute): Check for `menu->size' when
8578         determining whether menu has to be displayed.
8580 2008-02-02  Marco Gerards  <marco@gnu.org>
8582         * bus/pci.c: New file.
8584         * include/grub/pci.h: Likewise.
8586         * include/grub/i386/pc/pci.h: Likewise.
8588         * commands/lspci.c: Likewise.
8590         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8591         `lspci.mod'.
8592         (pci_mod_SOURCES): New variable.
8593         (pci_mod_CFLAGS): Likewise.
8594         (pci_mod_LDFLAGS): Likewise.
8595         (lspci_mod_SOURCES): Likewise.
8596         (lspci_mod_CFLAGS): Likewise.
8597         (lspci_mod_LDFLAGS): Likewise.
8599 2008-02-02  Bean  <bean123ch@gmail.com>
8601         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8602         (grub_ufs_get_file_block): Fix indirect block calculation problem.
8604         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8605         (grub_xfs_btree_node): New structure.
8606         (grub_xfs_btree_root): New structure.
8607         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8608         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8609         (GRUB_XFS_EXTENT_BLOCK): Likewise.
8610         (GRUB_XFS_EXTENT_SIZE): Likewise.
8611         (grub_xfs_read_block): Support btree format type.
8612         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8613         Use directory block as basic unit.
8615         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8617         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8618         __attribute__ ((__regparm__ (1))).
8620 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8622         Correct a mistake in previous commit.
8624         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8625         top.
8626         (normal/command.c_DEPENDENCIES): New variable.
8628 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8630         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8631         top.
8632         (normal/command.c_DEPENDENCIES): New variable.
8633         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8634         * conf/i386-ieee1275.rmk: Likewise.
8635         * conf/i386-linuxbios.rmk: Likewise.
8636         * conf/i386-pc.rmk: Likewise.
8637         * conf/sparc64-ieee1275.rmk: Likewise.
8638         * conf/powerpc-ieee1275.rmk: Likewise.
8639         (grub_emu_SOURCES): Add `fs/fshelp.c'.
8641         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8643 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8645         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8646         call at beginning of function.
8648 2008-01-31  Pavel Roskin  <proski@gnu.org>
8650         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8651         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8652         (grub_mkrescue_SOURCES): Likewise.
8653         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8655 2008-01-30  Robert Millan  <rmh@aybabtu.com>
8657         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8658         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8659         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8660         (grub_probe_SOURCES): ... to here.
8662         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8663         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8664         * conf/i386-ieee1275.rmk: Likewise.
8665         * conf/i386-linuxbios.rmk: Likewise.
8666         * conf/powerpc-ieee1275.rmk: Likewise.
8668 2008-01-30  Tristan Gingold  <gingold@free.fr>
8670         * kern/rescue.c: Silently accept empty lines.
8672 2008-01-29  Bean  <bean123ch@gmail.com>
8674         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8675         (real_code_2): Code cleanup and change comment style.
8676         (move_memory): Avoid using 32-bit address mode.
8678 2008-01-29  Bean  <bean123ch@gmail.com>
8680         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8681         (png_mod_SOURCES): New variable.
8682         (png_mod_CFLAGS): Likewise.
8683         (png_mod_LDFLAGS): Likewise.
8685         * video/readers/png.c: New file.
8687 2008-01-28  Robert Millan  <rmh@aybabtu.com>
8689         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8690         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8691         `ifndef GRUB_MOD_GAP' hack.
8692         * util/elf/grub-mkimage.c (add_segments): Likewise.
8694 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8696         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8697         `GRUB_MOD_GAP' for platforms in which it's not defined.
8698         * util/elf/grub-mkimage.c (add_segments): Likewise.
8700 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8702         Get grub-emu to build again (including parallel builds).
8704         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8705         Split into ...
8706         (util/grub-emu.c_DEPENDENCIES): ... this, ...
8707         (normal/execute.c_DEPENDENCIES): ... this, ...
8708         (grub-emu_DEPENDENCIES): ... and this.
8710         * conf/i386-efi.rmk: Likewise.
8711         * conf/i386-linuxbios.rmk: Likewise.
8712         * conf/i386-ieee1275.rmk: Likewise.
8713         * conf/powerpc-ieee1275.rmk: Likewise.
8714         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8716 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8718         * NEWS: Add a few items.
8720 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8722         Fix parallel builds with grub-emu.  Based on earlier commit for
8723         grub-probe and grub-setup.
8725         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8726         (util/grub-emu.c_DEPENDENCIES): ... this.
8727         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8728         (util/grub-emu.c_DEPENDENCIES): ... this.
8729         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8730         (util/grub-emu.c_DEPENDENCIES): ... this.
8731         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8732         (util/grub-emu.c_DEPENDENCIES): ... this.
8733         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8734         (util/grub-emu.c_DEPENDENCIES): ... this.
8736 2008-01-27  Pavel Roskin  <proski@gnu.org>
8738         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8739         to create a gap between _end and the modules added to the image
8740         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
8741         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8742         * util/elf/grub-mkimage.c (add_segments): Likewise.
8744 2008-01-26  Pavel Roskin  <proski@gnu.org>
8746         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8747         just return an error.
8749 2008-01-26  Bean  <bean123ch@gmail.com>
8751         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8752         (grub_reiserfs_get_item): Save offset of the next item.
8753         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8755 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8757         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8758         make all filesystem sources appear together (possibly fixing omissions
8759         while at it).
8760         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8761         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8762         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8763         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8765         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
8766         add `kern/file.c'.
8767         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8768         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8769         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8770         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8772         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8773         (probe): Add a sanity check to make sure of our ability to read
8774         requested files when probing for filesystem type.
8776         * genmk.rb: Update copyright year (2007).
8778         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8779         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8780         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8781         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8782         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8783         : Remove function prototypes.
8785 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8787         Revert my previous commits (based on wrong assumption of how grub_errno
8788         works).
8790         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8791         * kern/file.c (grub_file_open): Likewise.
8793 2008-01-24  Pavel Roskin  <proski@gnu.org>
8795         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8796         that hang if GRUB tries to setup colors.
8797         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8798         colors for firmwares that don't support it.
8799         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8800         Recognize Open Hack'Ware, set flags to work around its
8801         limitations.
8803 2008-01-24  Robert Millan  <rmh@aybabtu.com>
8805         * kern/file.c (grub_file_open): Do not account previous failures of
8806         unrelated functions when grub_errno is checked for.
8807         Reported by Oleg Strikov.
8809 2008-01-24  Bean  <bean123ch@gmail.com>
8811         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8812         (grub_ufs_sblock): New member volume name.
8813         (grub_ufs_find_file): Fix string copy bug.
8814         (grub_ufs_label): Implement this function properly.
8816         * fs/hfs.c (grub_hfs_cnid_type): New enum.
8817         (grub_hfs_iterate_records): Use the correct file number for extents
8818         and catalog file. Fix problem in next index calculation.
8819         (grub_hfs_find_node): Replace recursive function call with loop.
8820         (grub_hfs_iterate_dir): Replace recursive function call with loop.
8822 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8824         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8825         `<grub/symbol.h>' and `<grub/multiboot.h>'.
8826         (grub_multiboot2_real_boot): New function prototype.
8828         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8829         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8831         * kern/i386/ieee1275/init.c (grub_os_area_addr)
8832         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8834 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8836         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8837         #ifdef'ed out grub_printf().
8839 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8841         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8842         grub_dprintf calls, since they make "debug=all" mode unusable.
8843         (grub_console_checkkey): Likewise.
8845 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8847         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8848         `term/i386/pc/at_keyboard.c'.
8849         (pkglib_MODULES): Add `serial.mod'.
8850         (serial_mod_SOURCES): New variable.
8851         (serial_mod_CFLAGS): Likewise.
8852         (serial_mod_LDFLAGS): Likewise.
8854         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
8855         `<grub/powerpc/ieee1275/console.h>'.
8856         (grub_keyboard_controller_init): New function prototype.
8857         (grub_console_checkkey): Likewise.
8858         (grub_console_getkey): Likewise.
8860         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8861         keyboard on i386.
8863         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8864         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8866 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8868         * kern/i386/pc/init.c (make_install_device): When memdisk image is
8869         present, "(memdisk)/boot/grub" becomes the default prefix.
8871         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8872         a memdisk tarball with all the modules.  Add --overlay=DIR option that
8873         allows users to overlay additional files into the image.
8875 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8877         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8878         and `machine/memory.h'.
8879         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8880         (_multiboot_mod_SOURCES): New variable.
8881         (_multiboot_mod_CFLAGS): Likewise.
8882         (_multiboot_mod_LDFLAGS): Likewise.
8883         (multiboot_mod_SOURCES): Likewise.
8884         (multiboot_mod_CFLAGS): Likewise.
8885         (multiboot_mod_LDFLAGS): Likewise.
8887         * include/grub/i386/ieee1275/loader.h: New file.
8889         * include/grub/i386/ieee1275/machine.h: Likewise.
8891         * include/grub/i386/ieee1275/memory.h: Likewise.
8893         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8894         variable declaration.
8895         (grub_os_area_size): Likewise.
8897         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8898         (grub_lower_mem, grub_upper_mem): New variables.
8899         (grub_stop_floppy): New function (just to make
8900         grub_multiboot2_real_boot() happy).
8902         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8903         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8904         (grub_stop): New function.
8905         Include `"../realmode.S"' and `"../loader.S"'.
8907         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8908         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8910         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8911         rely on grub_multiboot2_real_boot() for final boot.
8913 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8915         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8916         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8917         device that doesn't look like an SD card.
8918         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8919         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8920         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8921         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8922         found.
8924 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8926         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8927         avoid claiming over our own code.
8929 2008-01-22  Bean  <bean123ch@gmail.com>
8931         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8932         (jpeg_mod_SOURCES): New variable.
8933         (jpeg_mod_CFLAGS): Likewise.
8934         (jpeg_mod_LDFLAGS): Likewise.
8936         * video/readers/jpeg.c : New file.
8938 2008-01-22  Bean  <bean123ch@gmail.com>
8940         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8941         there are no more items.
8943 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8945         * kern/mm.c (grub_mm_init_region): Improve debug message.
8947 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8949         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8950         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8951         address.
8952         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8953         a C macro.
8954         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8955         Indicates start of upper memory.
8956         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8957         (generate_image): Abort when image size is big enough to corrupt
8958         upper memory.
8960         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8961         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8962         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8963         instead of hardcoding 0xA0000.
8964         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8965         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8966         instead of hardcoding 0xA0000.
8968 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8970         * disk/memdisk.c (memdisk_size): New variable.
8971         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8972         `memdisk_size'.
8973         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
8974         image to dynamic memory.
8975         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8976         `memdisk_size'.  Free memdisk block.
8978 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8980         Fix detection of very small filesystems (like tar).
8982         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8983         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8984         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8985         a problem with this disk).
8987 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8989         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8990         on grub_biosdisk_rw_standard() error.
8992 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8994         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8995         recent changes.
8996         * kern/elf.c: Likewise.
8997         * kern/ieee1275/ieee1275.c: Likewise.
8998         * kern/powerpc/ieee1275/openfw.c: Likewise.
8999         * term/ieee1275/ofconsole.c: Likewise.
9001 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9003         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9005         * include/grub/kernel.h (grub_arch_memdisk_addr)
9006         (grub_arch_memdisk_size): Moved from here ...
9008         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9009         (grub_arch_memdisk_size): ... to here.
9011 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9013         Mostly based on bugfix from Bean.
9015         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9016         attribute with hook() parameter.
9017         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9018         declaration.
9019         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9020         attribute with hook() parameter.
9021         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9022         declaration.
9024 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9026         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9027         (pkglib_MODULES): Add `memdisk.mod'.
9028         (memdisk_mod_SOURCES): New variable.
9029         (memdisk_mod_CFLAGS): Likewise.
9030         (memdisk_mod_LDFLAGS): Likewise.
9032         * disk/memdisk.c: New file.
9034         * include/grub/disk.h (grub_disk_dev_id): Add
9035         `GRUB_DISK_DEVICE_MEMDISK_ID'.
9037         * include/grub/i386/pc/kernel.h
9038         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9039         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9040         (grub_kernel_image_size): New variable declaration.
9041         (grub_total_module_size): Likewise.
9042         (grub_memdisk_image_size): Likewise.
9044         * include/grub/i386/pc/memory.h
9045         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9047         * include/grub/kernel.h: Include `<grub/symbol.h>'.
9048         (grub_arch_memdisk_addr): New variable declaration.
9049         (grub_arch_memdisk_size): Likewise.
9051         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9052         (grub_arch_memdisk_size): Likewise.
9054         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9055         (codestart): Replace hardcoded `0x100000' with
9056         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9058         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9059         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
9060         not NULL, append the contents of the file it refers to, at the end of
9061         the compressed kernel image.  Initialize `grub_memdisk_image_size'
9062         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9063         (options): Add "memdisk"|'m' option.
9064         (main): Parse --memdisk|-m option, and pass user-provided path as
9065         parameter to generate_image().
9067 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9069         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9070         grub_dprintf() calls from here ...
9071         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9073 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9075         Fix detection of "real mode" when /options/real-mode? doesn't exist.
9077         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9078         declaration.
9079         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9080         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9081         `GRUB_IEEE1275_FLAG_REAL_MODE'.
9082         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9083         property).
9084         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9085         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9087 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9089         Get rid of confusing function (superseded by
9090         `grub_ieee1275_get_integer_property')
9091         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9092         prototype.
9093         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9094         function.
9095         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9096         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9097         in native endianness from grub_ieee1275_get_integer_property().
9099 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9101         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9102         command after "shut-down", since implementations differ on which
9103         the command for halt is.
9105 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9107         * include/grub/i386/linuxbios/console.h: Add header protection.
9108         (grub_keyboard_controller_init): New function prototype.
9109         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9110         (KEYBOARD_COMMAND_READ): Likewise.
9111         (KEYBOARD_COMMAND_WRITE): Likewise.
9112         (KEYBOARD_SCANCODE_SET1): Likewise.
9113         (grub_keyboard_controller_write): New function.
9114         (grub_keyboard_controller_read): Likewise.
9115         (grub_keyboard_controller_init): Likewise.
9117         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9118         (grub_console_init): On coreboot/LinuxBIOS, call
9119         grub_keyboard_controller_init().
9121 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9123         PowerPC changes provided by Pavel Roskin.
9125         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9126         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9127         don't rely on cmain() doing it.
9128         * kern/i386/ieee1275/startup.S (_start): Store %eax in
9129         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9131 2008-01-16  Robert Millan  <rmh@aybabtu.com>
9133         * include/grub/i386/linuxbios/memory.h
9134         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9135         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9136         receive `table_header' as argument.  Instead, probe for it in the
9137         known memory ranges where it can be present.
9138         (grub_available_iterate): Do not pass a fixed `table_header' address
9139         to grub_linuxbios_table_iterate().
9141 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9143         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9144         * conf/i386-ieee1275.rmk: New file.
9145         * include/grub/i386/ieee1275/console.h: Likewise.
9146         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9147         * include/grub/i386/ieee1275/kernel.h: Likewise.
9148         * include/grub/i386/ieee1275/time.h: Likewise.
9149         * kern/i386/ieee1275/init.c: Likewise.
9150         * kern/i386/ieee1275/startup.S: Likewise.
9152 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9154         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9155         when pointers are 32-bit (but still do set it to one when they are
9156         64-bit).
9158 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9160         * include/grub/ieee1275/ieee1275.h
9161         (grub_ieee1275_get_integer_property): New function prototype.
9163         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9164         (grub_ieee1275_get_integer_property): New function.  Wraps around
9165         grub_ieee1275_get_property() to handle endianness.
9167         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9168         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9169         where appropriate.
9170         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9171         (grub_map): Likewise.
9172         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9174 2008-01-15  Bean  <bean123ch@gmail.com>
9176         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9177         (grub_script_execute_cmdline): Reset grub_errno.
9179         * normal/main.c (read_config_file): Reset grub_errno.
9181         * normal/parse.y (script_init): New.
9182         (script): Move function and menuentry here.
9183         (delimiter): New.
9184         (command): Add delimiter at the end of command.
9185         (commands): Adjust to match the new command.
9186         (commandblock): Remove grub_script_lexer_record_start.
9187         (menuentry): Add grub_script_lexer_record_start, use the new commands.
9188         (if): Use the new commands.
9190         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9192 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9194         * normal/menu.c (run_menu): Move timeout message from here ...
9195         (print_timeout): ... to here.
9196         (run_menu): Use print_timeout() once during initial draw to print
9197         the whole message, and again in every clock tick to update only
9198         the number of seconds.
9200 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9202         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9203         actual size of `available' from grub_ieee1275_get_property(), and
9204         restrict parsing to that bound.
9206 2008-01-15  Christian Franke  <franke@computer.org>
9208         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9209         (argp_program_version): Remove variable.
9210         (argp_program_bug_address): Likewise.
9211         (options): Convert from struct argp_option to struct option.
9212         (struct arguments): Remove.
9213         (parse_opt): Remove.
9214         (usage): New function.
9215         (main): Replace struct args members by simple variables.
9216         Replace argp_parse() by getopt_long().
9217         Add switch to evaluate options.
9218         Add missing "(...)" around root_dev in prefix string.
9220 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9222         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9223         for grub_ieee1275_exit(), in order to improve portability.
9225 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9227         * util/grub.d/10_linux.in (prefix): Define.
9228         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
9230 2008-01-13  Pavel Roskin  <proski@gnu.org>
9232         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9233         grub_errno if no errors have been detected.
9235 2008-01-12  Robert Millan  <rmh@aybabtu.com>
9237         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9238         (grub_util_get_dev_abstraction): New function prototype.
9240         * util/getroot.c: Include `<grub/util/getroot.h>'
9241         (grub_util_get_grub_dev): Move detection of abstraction type to ...
9242         (grub_util_get_dev_abstraction): ... here (new function).
9244         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
9245         `PRINT_ABSTRACTION'.
9246         (probe): Probe for abstraction type when requested.
9247         (main): Understand `--target=abstraction'.
9249         * util/i386/efi/grub-install.in: Add abstraction module to core
9250         image when it is found to be necessary.
9251         * util/i386/pc/grub-install.in: Likewise.
9252         * util/powerpc/ieee1275/grub-install.in: Likewise.
9254         * util/update-grub_lib.in (font_path): Return system path without
9255         converting to GRUB path.
9256         * util/update-grub.in: Convert system path returned by font_path()
9257         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
9258         abstraction module is needed for loading fonts (if any).  Export
9259         that as `GRUB_PRELOAD_MODULES'.
9260         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9261         insmod commands).
9263 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
9265         Remove some unused code from reiserfs.
9267         * fs/reiserfs.c (struct grub_reiserfs_key)
9268         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9269         (struct grub_reiserfs_node_body): Removed.
9270         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9271         Likewise.
9272         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9273         Likewise.
9274         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9275         Likewise.
9276         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9277         Likewise.
9278         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9279         Likewise.
9280         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9281         Likewise.
9282         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9283         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9284         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9286 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9288         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9289         Determines if a file is garbage left by packaging systems, etc.
9290         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9291         for processing /etc/grub.d scripts.
9292         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9293         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
9294         as a condition for processing Linux images.
9296 2008-01-10  Pavel Roskin  <proski@gnu.org>
9298         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
9299         to compile reiserfs.c on PowerPC.
9301 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9303         * kern/device.c (grub_device_iterate): Do not abort device iteration
9304         when one of the devices cannot be opened.
9305         * kern/disk.c (grub_disk_open): Do not account previous failures of
9306         unrelated functions when grub_errno is checked for.
9308 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9310         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9311         `! grub_linux_is_bzimage', change order of address comparison to make
9312         it more intuitive, and improve "too big zImage" error message.
9314 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9316         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9317         `$(update-grub_DATA)'.
9318         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9319         targets.
9321 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9323         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9324         which instruction is modified by grub-setup during installation
9325         (since it wasn't obvious by only looking at this file).
9327 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9329         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
9330         listing actual TODO items.
9332 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9334         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9335         correctly.
9336         (grub_reiserfs_get_key_offset): Likewise.
9337         (grub_reiserfs_set_key_offset): Likewise.
9338         (grub_reiserfs_set_key_type): Likewise.
9339         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9341         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9342         better to remove the bitfield version completely.
9344 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9346         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9347         allocated from the heap, due to the fshelp implementation.
9348         (grub_reiserfs_dir): Free NODE, due to the same reason.
9350 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9352         Mostly from Vincent Pelletier:
9354         * fs/reiserfs.c: New file.
9356         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9357         (reiserfs_mod_SOURCES): New variable.
9358         (reiserfs_mod_CFLAGS): Likewise.
9359         (reiserfs_mod_LDFLAGS): Likewise.
9361         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9362         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9363         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9364         normal/color.c.
9366 2008-01-06  Robert Millan  <rmh@aybabtu.com>
9368         * normal/color.c: Remove `<grub/env.h>'.
9370 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
9372         * include/grub/normal.h: Include <grub/env.h>.
9374 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9376         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9377         usage example with `(hd0,1)'.
9378         Reported by Samuel Thibault.
9380 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9382         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9383         (grub_linux_boot_zimage): Rename to ...
9384         (grub_linux_boot): ... this.
9385         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9386         (grub_linux_boot_zimage): Conditionalize zImage copy.
9388         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9389         (grub_linux_boot_bzimage): Remove prototype.
9390         (grub_linux_boot_zimage): Rename to ...
9391         (grub_linux_boot): ... this.
9393         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9394         (grub_linux_boot): Remove function.
9396 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9398         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9399         (grub_env_write_color_highlight): Likewise.
9400         (grub_wait_after_message): Likewise.
9402         * normal/color.c: New file.
9404         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9405         (normal_mod_DEPENDENCIES): Likewise.
9407         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9408         (normal_mod_DEPENDENCIES): Likewise.
9410         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9411         (normal_mod_DEPENDENCIES): Likewise.
9413         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9414         (normal_mod_DEPENDENCIES): Likewise.
9416         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9417         for waiting after a message is printed.
9418         * normal/main.c (read_config_file): Likewise.
9419         (grub_normal_init): Register grub_env_write_color_normal() and
9420         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
9421         `color_highlight' variables as global.
9423         * normal/menu.c (grub_wait_after_message): New function.
9424         (grub_color_menu_normal): New variable.  Replaces ...
9425         (GRUB_COLOR_MENU_NORMAL): ... this macro.
9426         (grub_color_menu_highlight): New variable.  Replaces ...
9427         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9428         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9429         `GRUB_TERM_COLOR_STANDARD'.
9430         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
9431         `normal_code' and `highlight_code' to `old_color_normal' and
9432         `old_color_highlight', respectively.
9433         (grub_menu_init_page): Update colors when drawing the menu, based on
9434         `menu_color_normal' and `menu_color_highlight' variables.
9435         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9436         a message is printed.
9438 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9440         * kern/env.c (grub_env_context_open): Propagate hooks for global
9441         variables to new context.
9443         * kern/main.c (grub_set_root_dev): Export `root' variable.
9445 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9447         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9448         discs unconditionally, since udev and others have options to provide
9449         them.
9451 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9453         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9455 2008-01-04  Christian Franke  <franke@computer.org>
9457         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9458         of eisa_mmap.
9460 2008-01-03  Pavel Roskin  <proski@gnu.org>
9462         * kern/i386/linuxbios/init.c: Put "void" to all function
9463         declarations with no arguments.
9464         * kern/powerpc/ieee1275/init.c: Likewise.
9465         * term/i386/pc/at_keyboard.c: Likewise.
9466         * term/i386/pc/vga_text.c: Likewise.
9467         * util/grub-mkdevicemap.c: Likewise.
9469 2008-01-02  Robert Millan  <rmh@aybabtu.com>
9471         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9472         message when loaded image is out of bounds.
9473         (grub_multiboot_load_elf64): Likewise.
9475 2008-01-02  Pavel Roskin  <proski@gnu.org>
9477         * util/grub.d/10_linux.in: Try version without ".old" when
9478         looking for initrd.  It's better to use initrd from the newer
9479         kernel of the same version than no initrd at all.
9481 2008-01-01  Robert Millan  <rmh@aybabtu.com>
9483         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9485 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
9487         * include/grub/video.h: Added grub_video_unmap_color and
9488         grub_video_get_active_render_target.
9489         (grub_video_adapter): Added unmap_color and get_active_render_target.
9491         * video/video.c: Added grub_video_unmap_color and
9492         grub_video_get_active_render_target.
9493         (grub_video_get_info): Changed method to accept NULL pointer as an
9494         argument to allow detection of active video adapter.
9496         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9497         grub_video_vbe_unmap_color_int.
9498         Added grub_video_vbe_unmap_color and
9499         grub_video_vbe_get_active_render_target.
9500         (grub_video_vbe_adapter): Added unmap_color and
9501         get_active_render_target.
9503         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9504         with grub_video_vbe_unmap_color_int.
9506         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9507         (DEFAULT_NORMAL_COLOR): Likewise.
9508         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9509         (DEFAULT_FG_COLOR): Removed.
9510         (DEFAULT_BG_COLOR): Likewise.
9511         (DEFAULT_CURSOR_COLOR): Changed value.
9512         (grub_virtual_screen): Added standard_color_setting,
9513         normal_color_setting, highlight_color_setting and term_color.
9514         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9515         (bitmap_width): Added.
9516         (bitmap_height): Likewise.
9517         (bitmap): Likewise.
9518         (set_term_color): Likewise.
9519         (grub_virtual_screen_setup): Changed to use new terminal coloring
9520         settings.
9521         (grub_gfxterm_init): Added init for bitmap.
9522         (grub_gfxterm_fini): Added destroy for bitmap.
9523         (redraw_screen_rect): Updated to use background bitmap and new
9524         terminal coloring.
9525         (scroll_up): Added optimization for case when there is no bitmap.
9526         (grub_gfxterm_cls): Fixed to use correct background color.
9527         (grub_virtual_screen_setcolorstate): Changed to use new terminal
9528         coloring.
9529         (grub_virtual_screen_setcolor): Likewise.
9530         (grub_virtual_screen_getcolor): Added.
9531         (grub_gfxterm_background_image_cmd): Likewise.
9532         (grub_video_term): Added setcolor and getcolor.
9533         (MOD_INIT): Added registration of background_image command.
9534         (MOD_TERM): Added unregistration for background_image command.
9536 2007-12-30  Pavel Roskin  <proski@gnu.org>
9538         * loader/multiboot_loader.c: Fix multiboot command
9539         unregistration.  Fix all typos in the word "multiboot".
9541 2007-12-29  Pavel Roskin  <proski@gnu.org>
9543         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
9544         support for initrd names used in Fedora.
9546 2007-12-26  Bean  <bean123ch@gmail.com>
9548         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9549         (cpio_mod_SOURCES): New variable.
9550         (cpio_mod_CFLAGS): Likewise.
9551         (cpio_mod_LDFLAGS): Likewise.
9553         * fs/cpio.c: New file.
9555         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9557         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9559         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9561         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9563 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9565         * include/grub/term.h (struct grub_term): Add `getcolor' function.
9566         (grub_getcolor): New function.
9568         * kern/term.c (grub_getcolor): New function.
9569         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9570         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9571         (print_entry): Set normal and highlight colors to
9572         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9573         respectively, before printing and restore them to old
9574         values afterwards.
9575         (grub_menu_init_page): Likewise.  Fill an additional colored space
9576         that would otherwise be left blank.
9578         * term/efi/console.c (grub_console_getcolor): New function.
9579         (struct grub_console_term.getcolor): New variable.
9580         * term/i386/pc/console.c (grub_console_getcolor): New function.
9581         (struct grub_console_term.getcolor): New variable.
9582         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9583         (struct grub_console_term.getcolor): New variable.
9585         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9586         (struct grub_console_term.setcolor): Remove variable.
9587         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9588         (struct grub_console_term.setcolor): Remove variable.
9589         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9590         (struct grub_console_term.setcolor): Remove variable.
9591         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9592         (struct grub_console_term.setcolor): Remove variable.
9594 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9596         * configure.ac: Search for possible unifont.hex locations, and
9597         define UNIFONT_HEX if found.
9599         * Makefile.in (UNIFONT_HEX): Define variable.
9600         (DATA): Rename to ...
9601         (PKGLIB): ... this.  Update all users.
9602         (PKGDATA): New variable.
9603         (pkgdata_IMAGES): Rename to ...
9604         (pkglib_IMAGES): ... this. Update all users.
9605         (pkgdata_MODULES): Rename to ...
9606         (pkglib_MODULES): ... this. Update all users.
9607         (pkgdata_PROGRAMS): Rename to ...
9608         (pkglib_PROGRAMS): ... this. Update all users.
9609         (pkgdata_DATA): Rename to ...
9610         (pkglib_DATA): ... this. Update all users.
9611         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9612         (unicode.pff, ascii.pff): New rules.
9613         (all-local): Add `$(PKGDATA)' dependency.
9614         (install-local): Process `$(PKGDATA)'.
9616         * util/update-grub_lib.in (font_path): Search for *.pff files in
9617         a few more locations, including `${pkgdata}'.
9619 2007-12-23  Robert Millan  <rmh@aybabtu.com>
9621         Patch from Bean  <bean123ch@gmail.com>:
9622         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9623         `size'.
9625 2007-12-21  Bean  <bean123ch@gmail.com>
9627         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9628         (ntfscomp_mod_SOURCES): New variable.
9629         (ntfscomp_mod_CFLAGS): Likewise.
9630         (ntfscomp_mod_LDFLAGS): Likewise.
9632         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9633         (grub_probe_SOURCES): Likewise.
9634         (grub_emu_SOURCES): Likewise.
9636         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9637         (grub_emu_SOURCES): Likewise.
9639         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9640         (grub_emu_SOURCES): Likewise.
9642         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9643         (grub_emu_SOURCES): Likewise.
9645         * fs/ntfs.c (grub_ntfscomp_func): New variable.
9646         (read_run_list): Renamed to grub_ntfs_read_run_list.
9647         (decomp_nextvcn): Moved to ntfscomp.c.
9648         (decomp_getch): Likewise.
9649         (decomp_get16): Likewise.
9650         (decomp_block): Likewise.
9651         (read_block): Likewise.
9652         (read_data): Partially moved to ntfscomp.c.
9653         (fixup): Change unsigned to grub_uint16_t.
9654         (read_mft): Change unsigned long to grub_uint32_t.
9655         (read_attr): Likewise.
9656         (read_data): Likewise.
9657         (read_run_data): Likewise.
9658         (read_run_list): Likewise.
9659         (read_mft): Likewise.
9661         * fs/ntfscomp.c: New file.
9663         * include/grub/ntfs.h: New file.
9665 2007-12-16  Robert Millan  <rmh@aybabtu.com>
9667         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9668         IDE disk check, since Linux is known to support 20 IDE disks.
9669         Reported by Colin Watson.
9671 2007-12-15  Bean  <bean123ch@gmail.com>
9673         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9674         (lnxboot_img_SOURCES): New variable.
9675         (lnxboot_img_ASFLAGS): Likewise.
9676         (lnxboot_img_LDFLAGS): Likewise.
9678         * boot/i386/pc/lnxboot.S: New file.
9680 2007-11-24  Pavel Roskin  <proski@gnu.org>
9682         * configure.ac: Test if '--build-id=none' is supported by the
9683         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
9684         objcopy to generate incorrect binary files (binutils
9685         2.17.50.0.18-1 as shipped by Fedora 8).
9686         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9687         linking, so that build ID doesn't break the test.
9689 2007-11-24  Pavel Roskin  <proski@gnu.org>
9691         * include/grub/i386/time.h: use "void" in the argument list
9692         of grub_cpu_idle().
9693         * include/grub/powerpc/time.h: Likewise.
9694         * include/grub/sparc64/time.h: Likewise.
9696 2007-11-18  Christian Franke  <franke@computer.org>
9698         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9699         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9700         This fixes the problem that function keys did not work in grub-emu.
9702 2007-11-18  Christian Franke  <franke@computer.org>
9704         * disk/host.c (grub_host_open): Remove attribute unused from
9705         name parameter. Add check for "host". This fixes the problem
9706         that grub-emu does not find partitions.
9708 2007-11-18  Christian Franke  <franke@computer.org>
9710         * util/hostfs.c (is_dir): New function.
9711         (grub_hostfs_dir):  Handle missing dirent.d_type case.
9712         (grub_hostfs_read): Add missing fseek().
9713         (grub_hostfs_label): Clear label pointer.  This fixes a crash
9714         of grub-emu on "ls (host)".
9716 2007-11-18  Christian Franke  <franke@computer.org>
9718         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9719         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9720         to 64 bit boundary by default.
9722 2007-11-18  Bean  <bean123ch@gmail.com>
9724         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9725         (hexdump_mod_SOURCES): New variable.
9726         (hexdump_mod_CFLAGS): Likewise.
9727         (hexdump_mod_LDFLAGS): Likewise.
9729         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9731         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9733         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9735         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9737         * include/grub/hexdump.h: New file.
9739         * commands/hexdump.c: New file.
9741 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9743         * commands/i386/pc/play.c (beep_off): Switch order of arguments
9744         in grub_outb() calls.
9745         (beep_on): Likewise.
9747 2007-11-10  Christian Franke  <franke@computer.org>
9749         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9750         (grub_menu_run): Likewise.
9752 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9754         * include/grub/i386/efi/machine.h: New file.
9755         * include/grub/i386/linuxbios/machine.h: Likewise.
9756         * include/grub/i386/pc/machine.h: Likewise.
9757         * include/grub/powerpc/ieee1275/machine.h: Likewise.
9758         * include/grub/sparc64/ieee1275/machine.h: Likewise.
9760         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9761         (serial_hw_io_addr): New variable.
9762         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9763         instead of `(unsigned short *) 0x400'.
9765 2007-11-10  Bean  <bean123ch@gmail.com>
9767         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9769 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9771         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9772         (vga_mod_SOURCES): Added.
9773         (vga_mod_CFLAGS): Likewise.
9774         (vga_mod_LDFLAGS): Likewise.
9776         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9777         grub_outb() calls.
9778         (set_map_mask): Likewise.
9779         (set_read_map): Likewise.
9780         (set_read_address): Likewise.
9781         (vga_font): Removed variable.
9782         (get_vga_glyph): Removed function.
9783         (invalidate_char): Likewise.
9784         (write_char): Changed to use grub_font_get_glyph() for font
9785         information.
9786         (grub_vga_putchar): Likewise.
9787         (grub_vga_getcharwidth): Likewise.
9789 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9791         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9792         flags.
9793         (pxeboot_img_LDFLAGS): Likewise.
9794         (diskboot_img_LDFLAGS): Likewise.
9795         (kernel_img_LDFLAGS): Likewise.
9797 2007-11-06  Robert Millan  <rmh@aybabtu.com>
9799         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9800         in grub_outb() calls.
9801         (serial_hw_init): Likewise.
9803 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9805         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9806         spaces.  Skip non-regular files.
9808 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9810         * kern/disk.c (grub_disk_firmware_fini)
9811         (grub_disk_firmware_is_tainted): New variables.
9813         * include/grub/disk.h (grub_disk_firmware_fini)
9814         (grub_disk_firmware_is_tainted): Likewise.
9816         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9817         (grub_disk_biosdisk_fini): ... to here.
9818         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9819         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9820         is set.  Register grub_disk_biosdisk_fini() in
9821         `grub_disk_firmware_fini'.
9823         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9824         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9825         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9826         to finish existing firmware disk interface.
9828         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9829         (ata_mod_SOURCES): New variable.
9830         (ata_mod_CFLAGS): Likewise.
9831         (ata_mod_LDFLAGS): Likewise.
9833 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9835         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
9836         (grub_ata_wait): Reimplement using grub_millisleep().
9838         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9839         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9841 2007-11-03  Marco Gerards  <marco@gnu.org>
9843         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9844         (CRTC_ADDR_PORT): New macro.
9845         (CRTC_DATA_PORT): Likewise.
9846         (CRTC_CURSOR): Likewise.
9847         (CRTC_CURSOR_ADDR_HIGH): Likewise.
9848         (CRTC_CURSOR_ADDR_LOW): Likewise.
9849         (update_cursor): New function.
9850         (grub_console_real_putchar): Call `update_cursor'.
9851         (grub_console_gotoxy): Likewise.
9852         (grub_console_cls): Set the default color when clearing the
9853         screen.
9854         (grub_console_setcursor): Implemented.
9856 2007-11-03  Marco Gerards  <marco@gnu.org>
9858         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9859         become activate.
9860         (grub_ata_pio_write): Likewise.
9862         (grub_atapi_identify): Wait after issuing an ATA command.
9863         (grub_atapi_packet): Likewise.
9864         (grub_ata_identify): Likewise.
9865         (grub_ata_readwrite): Likewise.
9867 2007-11-03  Marco Gerards  <marco@gnu.org>
9869         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9870         (grub_ata_pio_write): Likewise.
9871         (grub_ata_readwrite): Use `grub_error', instead of
9872         returning `grub_errno'.
9874 2007-11-03  Marco Gerards  <marco@gnu.org>
9876         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9877         grub_ata_pio_write once for every single sector, instead of for
9878         multiple sectors.
9880 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9882         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9884         * conf/i386-linuxbios.rmk: New file.
9886         * kern/i386/pc/hardware.c: Likewise.
9887         * term/i386/pc/at_keyboard.c: Likewise.
9888         * term/i386/pc/vga_text.c: Likewise.
9890         * include/grub/i386/linuxbios/boot.h: Likewise.
9891         * include/grub/i386/linuxbios/console.h: Likewise.
9892         * include/grub/i386/linuxbios/init.h: Likewise.
9893         * include/grub/i386/linuxbios/kernel.h: Likewise.
9894         * include/grub/i386/linuxbios/loader.h: Likewise.
9895         * include/grub/i386/linuxbios/memory.h: Likewise.
9896         * include/grub/i386/linuxbios/serial.h: Likewise.
9897         * include/grub/i386/linuxbios/time.h: Likewise.
9899         * kern/i386/linuxbios/init.c: Likewise.
9900         * kern/i386/linuxbios/startup.S: Likewise.
9901         * kern/i386/linuxbios/table.c: Likewise.
9903 2007-10-31  Marco Gerards  <marco@gnu.org>
9905         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9906         (ata_mod_SOURCES): New variable.
9907         (ata_mod_CFLAGS): Likewise.
9908         (ata_mod_LDFLAGS): Likewise.
9910         * disk/ata.c: New file.
9912         * include/grub/disk.h (grub_disk_dev_id): Add
9913         `GRUB_DISK_DEV_ATA_ID'.
9915 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9917         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9918         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9920         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9921         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9923         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9924         `<grub/types.h>'.
9926         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9928 2007-10-27  Robert Millan  <rmh@aybabtu.com>
9930         * include/grub/types.h (ULONG_MAX): Define macro.
9932 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9934         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
9935         `"../realmode.S"'.
9936         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
9938 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9940         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9941         (pkgdata_MODULES): Add `biosdisk.mod'.
9942         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9943         variables.
9945         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9946         (grub_biosdisk_init): Replace with ...
9947         (GRUB_MOD_INIT(biosdisk)): ... this.
9948         (grub_biosdisk_fini): Replace with ...
9949         (GRUB_MOD_FINI(biosdisk)): ... this.
9951         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9952         (grub_machine_init): Remove call to grub_biosdisk_init().
9953         (grub_machine_fini): Remove call to grub_machine_fini().
9955         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9957 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9959         * include/grub/time.h: New file.
9960         * include/grub/i386/time.h: Likewise.
9961         * include/grub/powerpc/time.h: Likewise.
9962         * include/grub/sparc64/time.h: Likewise.
9964         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9965         instances to ...
9966         (KERNEL_MACHINE_TIME_HEADER): ... this.
9967         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9968         instances to ...
9969         (KERNEL_MACHINE_TIME_HEADER): ... this.
9970         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9971         instances to ...
9972         (KERNEL_MACHINE_TIME_HEADER): ... this.
9974         * kern/i386/efi/init.c: Include `<grub/time.h>'.
9975         (grub_millisleep): New function.
9976         * kern/i386/pc/init.c: Include `<grub/time.h>'.
9977         (grub_millisleep): New function.
9978         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9979         Remove `grub/machine/time.h' include.
9980         (grub_millisleep): New function.
9981         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9982         Remove `grub/machine/time.h' include.
9983         (grub_millisleep): New function.
9985         * include/grub/misc.h (grub_div_roundup): New function.
9987         * kern/misc.c: Include `<grub/time.h>'.
9988         (grub_millisleep_generic): New function.
9990         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9991         Add `time.h'.
9992         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9993         Add `time.h'.
9994         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9995         `machine/time.h'.  Add `time.h'.
9996         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9998 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10000         * include/grub/misc.h (grub_max): New function.
10002 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10004         * util/misc.c (grub_util_info): Call fflush() before returning.
10006 2007-10-20  Robert Millan  <rmh@aybabtu.com>
10008         * genmk.rb (Image): Copy `extra_flags' from here ...
10009         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
10011         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10012         to `argc' and `args' arguments.
10014 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10016         * kern/i386/loader.S: New file.
10018         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10019         * kern/i386/loader.S (grub_linux_prot_size)... to here.
10020         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10021         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10022         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10023         * kern/i386/loader.S (grub_linux_real_addr)... to here.
10024         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10025         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10026         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10027         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10028         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10029         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10030         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10031         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10033         * kern/i386/realmode.S: New file.
10035         * kern/i386/pc/startup.S (protstack): Moved from here ...
10036         * kern/i386/realmode.S (protstack)... to here.
10037         * kern/i386/pc/startup.S (gdt): Moved from here ...
10038         * kern/i386/realmode.S (gdt)... to here.
10039         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10040         * kern/i386/realmode.S (prot_to_real)... to here.
10042         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10043         `kern/i386/realmode.S'.
10045 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10047         * include/grub/i386/loader.h: New file.
10049         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10050         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10051         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10052         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10053         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10054         * include/grub/i386/loader.h (grub_linux_prot_size)
10055         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10056         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10057         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10058         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10060         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10062 2007-10-15  Robert Millan  <rmh@aybabtu.com>
10064         * normal/misc.c (grub_normal_print_device_info): Do not probe for
10065         filesystem when dev->disk is unset.
10066         Do probe for filesystem even when dev->disk->has_partitions is set.
10067         In case a filesystem is found, always report it.
10068         In case it isn't, if dev->disk->has_partitions is set, report that
10069         a partition table was found instead of reporting that no filesystem
10070         could be identified.
10072 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10074         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10075         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10077         * include/grub/types.h (grub_host_to_target16): New macro.
10078         (grub_host_to_target32): Likewise.
10079         (grub_host_to_target64): Likewise.
10080         (grub_target_to_host16): Likewise.
10081         (grub_target_to_host32): Likewise.
10082         (grub_target_to_host64): Likewise.
10084         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10085         Renamed from to ...
10086         (GRUB_MOD_ALIGN): ...this.  Update all users.
10088         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10089         grub_host_to_target32.
10090         Replace grub_be_to_cpu32 with grub_target_to_host32.
10091         (load_modules): Likewise.
10092         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10093         Replace grub_be_to_cpu32 with grub_target_to_host32.
10094         Replace grub_cpu_to_be16 with grub_host_to_target16.
10095         Replace grub_cpu_to_be32 grub_host_to_target32.
10097 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10099         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10100         * util/elf/grub-mkimage.c: ... here.
10102         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
10103         `util/powerpc/ieee1275/grub-mkimage.c'.
10105 2007-10-07  Robert Millan  <rmh@aybabtu.com>
10107         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10108         and make it easier to figure out.
10109         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10110         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10111         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10112         leave us with less than HEAP_MIN_SIZE total heap.
10113         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10115 2007-10-03  Robert Millan  <rmh@aybabtu.com>
10117         * include/grub/i386/io.h: New file.
10118         * commands/i386/pc/play.c (inb): Removed.
10119         (outb): Removed.
10120         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10121         with grub_outb().
10122         * term/i386/pc/serial.c  (inb): Removed.
10123         (outb): Removed.
10124         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10125         with grub_outb().
10126         * term/i386/pc/vga.c  (inb): Removed.
10127         (outb): Removed.
10128         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10129         with grub_outb().
10131 2007-10-02  Robert Millan  <rmh@aybabtu.com>
10133         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10134         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10135         Reported by Marcin Kurek.
10137 2007-09-07  Robert Millan  <rmh@aybabtu.com>
10139         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10140         SmartFirmware version updates (as released by Sven Luther), and avoid
10141         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10142         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10143         known broken.
10145 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10147         From Hitoshi Ozeki:
10148         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10149         when merging two regions.
10151 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10153         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10154         * normal/completion.c (grub_normal_do_completion): Likewise.
10155         Reported by Hitoshi Ozeki.
10157 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10159         Do not use devices at boot in chainloading.
10161         * loader/i386/pc/chainloader.c (boot_drive): New variable.
10162         (boot_part_addr): Likewise.
10163         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10164         with BOOT_DRIVE and BOOT_PART_ADDR.
10165         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10166         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10168 2007-08-29  Robert Millan  <rmh@aybabtu.com>
10170         Patch from Simon Peter <dn.tlp@gmx.net>:
10171         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10172         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10173         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
10174         util/i386/pc/grub-setup.c_DEPENDENCIES.
10175         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10176         util/grub-probe.c_DEPENDENCIES.
10177         * conf/powerpc-ieee1275.rmk: Likewise.
10179 2007-08-28  Robert Millan  <rmh@aybabtu.com>
10181         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
10182         to tell grub-mkdevicemap how to name devices.
10183         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10184         feature).
10186         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10187         util/i386/get_disk_name.c.
10188         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10189         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10190         util/ieee1275/get_disk_name.c.
10192         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10194         * DISTLIST: Add util/i386/get_disk_name.c and
10195         util/ieee1275/get_disk_name.c.
10197         * util/grub-mkdevicemap.c: Replace device naming logic with
10198         grub_util_get_disk_name() calls.
10200 2007-08-20  Robert Millan  <rmh@aybabtu.com>
10202         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10203         (so that it works for both plural and singular quantities).
10205 2007-08-05  Robert Millan  <rmh@aybabtu.com>
10207         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10208         so that [xz] isn't taken into account when determining order.
10210 2007-08-02  Marco Gerards  <marco@gnu.org>
10212         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10213         `include/multiboot2.h', `include/grub/elfload.h',
10214         `include/multiboot.h', `include/grub/multiboot.h',
10215         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10216         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10217         `kern/elf.c', `loader/multiboot_loader.c',
10218         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10219         `loader/i386/pc/multiboot2.c',
10220         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10221         `util/i386/pc/grub-mkrescue.in'.  Remove
10222         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10223         `include/grub/i386/pc/util/biosdisk.h' and
10224         `include/grub/powerpc/ieee1275/multiboot.h'.
10226 2007-08-02  Bean  <bean123ch@gmail.com>
10228         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10229         (ntfs_mod_SOURCES): New variable.
10230         (ntfs_mod_CFLAGS): Likewise.
10231         (ntfs_mod_LDFLAGS): Likewise.
10233         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10234         (grub_probe_SOURCES): Likewise.
10235         (grub_emu_SOURCES): Likewise.
10237         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10238         (grub_emu_SOURCES): Likewise.
10240         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10241         (grub_emu_SOURCES): Likewise.
10243         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10245         * fs/ntfs.c: New file.
10247 2007-08-02  Bean  <bean123ch@gmail.com>
10249         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10251         * file.h (grub_file): Likewise.
10253         * fshelp.h (grub_fshelp_read_file): Likewise.
10255         * util/i386/pc/grub-setup.c (setup): Likewise.
10256         (save_first_sector): Likewise.
10257         (save_blocklists): Likewise.
10259         * fs/affs.c (grub_affs_read_file): Likewise.
10261         * fs/ext2.c (grub_ext2_read_file): Likewise.
10263         * fs/fat.c (grub_fat_read_data): Likewise.
10265         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10267         * fs/hfs.c (grub_hfs_read_file): Likewise.
10269         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10271         * fs/jfs.c (grub_jfs_read_file): Likewise.
10273         * fs/minix.c (grub_minix_read_file): Likewise.
10275         * fs/sfs.c (grub_sfs_read_file): Likewise.
10277         * fs/ufs.c (grub_ufs_read_file): Likewise.
10279         * fs/xfs.c (grub_xfs_read_file): Likewise.
10281         * command/blocklist.c (read_blocklist): Likewise.
10282         (print_blocklist): Likewise.
10284 2007-08-02  Marco Gerards  <marco@gnu.org>
10286         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10287         `util/hostfs.c'.
10289         * disk/host.c: New file.
10291         * util/hostfs.c: Likewise.
10293         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10294         return `GRUB_ERR_BAD_FS'.
10295         * fs/sfs.c (grub_sfs_mount): Likewise.
10296         * fs/xfs.c (grub_xfs_mount): Likewise.
10298         * include/grub/disk.h (enum grub_disk_dev_id): Add
10299         `GRUB_DISK_DEVICE_HOST_ID'.
10301         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10303 2007-07-24  Jerone Young  <jerone@gmail.com>
10305         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10306         modules for compilation.
10307         * conf/powerpc-ieee1275.rmk: Likewise.
10309         * include/multiboot.h: Move multiboot definitions to one file. Rename
10310         many definitions to not get grub specific.
10311         * include/multiboot2.h: Create header with multiboot 2 definitions.
10312         * include/grub/multiboot.h: Header for grub specific function
10313         prototypes and definitions.
10314         * include/grub/multiboot2.h: Likewise.
10315         * include/grub/multiboot_loader.h: Likewise.
10316         * include/grub/i386/pc/multiboot.h: Removed.
10317         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10319         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10320         and 2 to allow for one multiboot and module commands.
10321         * loader/multiboot2.c: Add multiboot2 functionality.
10322         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10323         and definition names.
10324         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10325         2 functions.
10326         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10327         ieee1275 specific multiboot2 code.
10329         * kern/i386/pc/startup.S: Change headers and definition names for
10330         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10332 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10334         * geninitheader.sh: Process file specified in first parameter rather
10335         than hardcoding grub_modules_init.lst.
10336         * geninit.sh: Likewise.  Also, construct header name dynamically rather
10337         than hardcoding grub_modules_init.h.
10339         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10340         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
10341         grub_probe_init.[ch] and grub_setup_init.[ch].
10343         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10344         grub_modules_init.h with grub_emu_init.h.
10345         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10346         grub_probe_init.[ch] files.
10347         * conf/i386-efi.rmk: Likewise.
10348         * conf/i386-pc.rmk: Likewise.
10349         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10350         grub_setup_init.[ch] files.
10352         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10353         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
10354         to initialize modules rather than a list of hardcoded functions.
10355         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
10356         grub_init_all() to initialize modules rather than a list of hardcoded
10357         functions.
10359 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10361         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10362         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10364 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10366         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10367         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10368         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10369         flag when running on SmartFirmware.
10370         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10371         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10372         was set.
10374         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10375         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10376         rather than decreasing it.
10378         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10379         there's not enough space to do it, fail in the same way as when it
10380         can't be done because there are no partitions.
10382         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10383         when nvsetenv failed.
10385 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10387         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10388         because this rule is automatically generated.
10389         (grub-mkrescue): Removed for the same reason as above.
10391 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10393         Migrate to GNU General Public License Version 3.
10395         * COPYING: Replaced with the plain text version of GPLv3.
10397         * config.guess: Updated from gnulib.
10398         * config.sub: Likewise.
10400         * geninit.sh: Output a GPLv3 copyright notice.
10401         * geninitheader.sh: Likewise.
10402         * genmodsrc.sh: Likewise.
10403         * gensymlist.sh.in: Likewise.
10405         * boot/i386/pc/boot.S: Upgraded to GPLv3.
10406         * boot/i386/pc/diskboot.S: Likewise.
10407         * boot/i386/pc/pxeboot.S: Likewise.
10408         * commands/blocklist.c: Likewise.
10409         * commands/boot.c: Likewise.
10410         * commands/cat.c: Likewise.
10411         * commands/cmp.c: Likewise.
10412         * commands/configfile.c: Likewise.
10413         * commands/echo.c: Likewise.
10414         * commands/help.c: Likewise.
10415         * commands/ls.c: Likewise.
10416         * commands/search.c: Likewise.
10417         * commands/terminal.c: Likewise.
10418         * commands/test.c: Likewise.
10419         * commands/videotest.c: Likewise.
10420         * commands/i386/cpuid.c: Likewise.
10421         * commands/i386/pc/halt.c: Likewise.
10422         * commands/i386/pc/play.c: Likewise.
10423         * commands/i386/pc/reboot.c: Likewise.
10424         * commands/i386/pc/vbeinfo.c: Likewise.
10425         * commands/i386/pc/vbetest.c: Likewise.
10426         * commands/ieee1275/halt.c: Likewise.
10427         * commands/ieee1275/reboot.c: Likewise.
10428         * commands/ieee1275/suspend.c: Likewise.
10429         * disk/loopback.c: Likewise.
10430         * disk/lvm.c: Likewise.
10431         * disk/raid.c: Likewise.
10432         * disk/efi/efidisk.c: Likewise.
10433         * disk/i386/pc/biosdisk.c: Likewise.
10434         * disk/ieee1275/ofdisk.c: Likewise.
10435         * font/manager.c: Likewise.
10436         * fs/affs.c: Likewise.
10437         * fs/ext2.c: Likewise.
10438         * fs/fat.c: Likewise.
10439         * fs/fshelp.c: Likewise.
10440         * fs/hfs.c: Likewise.
10441         * fs/hfsplus.c: Likewise.
10442         * fs/iso9660.c: Likewise.
10443         * fs/jfs.c: Likewise.
10444         * fs/minix.c: Likewise.
10445         * fs/sfs.c: Likewise.
10446         * fs/ufs.c: Likewise.
10447         * fs/xfs.c: Likewise.
10448         * hello/hello.c: Likewise.
10449         * include/grub/acorn_filecore.h: Likewise.
10450         * include/grub/arg.h: Likewise.
10451         * include/grub/bitmap.h: Likewise.
10452         * include/grub/boot.h: Likewise.
10453         * include/grub/cache.h: Likewise.
10454         * include/grub/device.h: Likewise.
10455         * include/grub/disk.h: Likewise.
10456         * include/grub/dl.h: Likewise.
10457         * include/grub/elfload.h: Likewise.
10458         * include/grub/env.h: Likewise.
10459         * include/grub/err.h: Likewise.
10460         * include/grub/file.h: Likewise.
10461         * include/grub/font.h: Likewise.
10462         * include/grub/fs.h: Likewise.
10463         * include/grub/fshelp.h: Likewise.
10464         * include/grub/gzio.h: Likewise.
10465         * include/grub/hfs.h: Likewise.
10466         * include/grub/kernel.h: Likewise.
10467         * include/grub/loader.h: Likewise.
10468         * include/grub/lvm.h: Likewise.
10469         * include/grub/misc.h: Likewise.
10470         * include/grub/mm.h: Likewise.
10471         * include/grub/net.h: Likewise.
10472         * include/grub/normal.h: Likewise.
10473         * include/grub/parser.h: Likewise.
10474         * include/grub/partition.h: Likewise.
10475         * include/grub/pc_partition.h: Likewise.
10476         * include/grub/raid.h: Likewise.
10477         * include/grub/rescue.h: Likewise.
10478         * include/grub/script.h: Likewise.
10479         * include/grub/setjmp.h: Likewise.
10480         * include/grub/symbol.h: Likewise.
10481         * include/grub/term.h: Likewise.
10482         * include/grub/terminfo.h: Likewise.
10483         * include/grub/tparm.h: Likewise.
10484         * include/grub/types.h: Likewise.
10485         * include/grub/video.h: Likewise.
10486         * include/grub/efi/api.h: Likewise.
10487         * include/grub/efi/chainloader.h: Likewise.
10488         * include/grub/efi/console.h: Likewise.
10489         * include/grub/efi/console_control.h: Likewise.
10490         * include/grub/efi/disk.h: Likewise.
10491         * include/grub/efi/efi.h: Likewise.
10492         * include/grub/efi/pe32.h: Likewise.
10493         * include/grub/efi/time.h: Likewise.
10494         * include/grub/i386/linux.h: Likewise.
10495         * include/grub/i386/setjmp.h: Likewise.
10496         * include/grub/i386/types.h: Likewise.
10497         * include/grub/i386/efi/kernel.h: Likewise.
10498         * include/grub/i386/efi/loader.h: Likewise.
10499         * include/grub/i386/efi/time.h: Likewise.
10500         * include/grub/i386/pc/biosdisk.h: Likewise.
10501         * include/grub/i386/pc/boot.h: Likewise.
10502         * include/grub/i386/pc/chainloader.h: Likewise.
10503         * include/grub/i386/pc/console.h: Likewise.
10504         * include/grub/i386/pc/init.h: Likewise.
10505         * include/grub/i386/pc/kernel.h: Likewise.
10506         * include/grub/i386/pc/loader.h: Likewise.
10507         * include/grub/i386/pc/memory.h: Likewise.
10508         * include/grub/i386/pc/multiboot.h: Likewise.
10509         * include/grub/i386/pc/serial.h: Likewise.
10510         * include/grub/i386/pc/time.h: Likewise.
10511         * include/grub/i386/pc/vbe.h: Likewise.
10512         * include/grub/i386/pc/vbeblit.h: Likewise.
10513         * include/grub/i386/pc/vbefill.h: Likewise.
10514         * include/grub/i386/pc/vbeutil.h: Likewise.
10515         * include/grub/i386/pc/vga.h: Likewise.
10516         * include/grub/ieee1275/ieee1275.h: Likewise.
10517         * include/grub/ieee1275/ofdisk.h: Likewise.
10518         * include/grub/powerpc/libgcc.h: Likewise.
10519         * include/grub/powerpc/setjmp.h: Likewise.
10520         * include/grub/powerpc/types.h: Likewise.
10521         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10522         * include/grub/powerpc/ieee1275/console.h: Likewise.
10523         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10524         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10525         * include/grub/powerpc/ieee1275/loader.h: Likewise.
10526         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10527         * include/grub/powerpc/ieee1275/time.h: Likewise.
10528         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10529         * include/grub/sparc64/libgcc.h: Likewise.
10530         * include/grub/sparc64/setjmp.h: Likewise.
10531         * include/grub/sparc64/types.h: Likewise.
10532         * include/grub/sparc64/ieee1275/console.h: Likewise.
10533         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10534         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10535         * include/grub/sparc64/ieee1275/time.h: Likewise.
10536         * include/grub/util/biosdisk.h: Likewise.
10537         * include/grub/util/getroot.h: Likewise.
10538         * include/grub/util/lvm.h: Likewise.
10539         * include/grub/util/misc.h: Likewise.
10540         * include/grub/util/raid.h: Likewise.
10541         * include/grub/util/resolve.h: Likewise.
10542         * io/gzio.c: Likewise.
10543         * kern/device.c: Likewise.
10544         * kern/disk.c: Likewise.
10545         * kern/dl.c: Likewise.
10546         * kern/elf.c: Likewise.
10547         * kern/env.c: Likewise.
10548         * kern/err.c: Likewise.
10549         * kern/file.c: Likewise.
10550         * kern/fs.c: Likewise.
10551         * kern/loader.c: Likewise.
10552         * kern/main.c: Likewise.
10553         * kern/misc.c: Likewise.
10554         * kern/mm.c: Likewise.
10555         * kern/parser.c: Likewise.
10556         * kern/partition.c: Likewise.
10557         * kern/rescue.c: Likewise.
10558         * kern/term.c: Likewise.
10559         * kern/efi/efi.c: Likewise.
10560         * kern/efi/init.c: Likewise.
10561         * kern/efi/mm.c: Likewise.
10562         * kern/i386/dl.c: Likewise.
10563         * kern/i386/efi/init.c: Likewise.
10564         * kern/i386/efi/startup.S: Likewise.
10565         * kern/i386/pc/init.c: Likewise.
10566         * kern/i386/pc/lzo1x.S: Likewise.
10567         * kern/i386/pc/startup.S: Likewise.
10568         * kern/ieee1275/ieee1275.c: Likewise.
10569         * kern/powerpc/cache.S: Likewise.
10570         * kern/powerpc/dl.c: Likewise.
10571         * kern/powerpc/ieee1275/cmain.c: Likewise.
10572         * kern/powerpc/ieee1275/crt0.S: Likewise.
10573         * kern/powerpc/ieee1275/init.c: Likewise.
10574         * kern/powerpc/ieee1275/openfw.c: Likewise.
10575         * kern/sparc64/cache.S: Likewise.
10576         * kern/sparc64/dl.c: Likewise.
10577         * kern/sparc64/ieee1275/init.c: Likewise.
10578         * kern/sparc64/ieee1275/openfw.c: Likewise.
10579         * loader/efi/chainloader.c: Likewise.
10580         * loader/efi/chainloader_normal.c: Likewise.
10581         * loader/i386/efi/linux.c: Likewise.
10582         * loader/i386/efi/linux_normal.c: Likewise.
10583         * loader/i386/pc/chainloader.c: Likewise.
10584         * loader/i386/pc/chainloader_normal.c: Likewise.
10585         * loader/i386/pc/linux.c: Likewise.
10586         * loader/i386/pc/linux_normal.c: Likewise.
10587         * loader/i386/pc/multiboot.c: Likewise.
10588         * loader/i386/pc/multiboot_normal.c: Likewise.
10589         * loader/powerpc/ieee1275/linux.c: Likewise.
10590         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10591         * normal/arg.c: Likewise.
10592         * normal/cmdline.c: Likewise.
10593         * normal/command.c: Likewise.
10594         * normal/completion.c: Likewise.
10595         * normal/execute.c: Likewise.
10596         * normal/function.c: Likewise.
10597         * normal/lexer.c: Likewise.
10598         * normal/main.c: Likewise.
10599         * normal/menu.c: Likewise.
10600         * normal/menu_entry.c: Likewise.
10601         * normal/misc.c: Likewise.
10602         * normal/parser.y: Likewise.
10603         * normal/script.c: Likewise.
10604         * normal/i386/setjmp.S: Likewise.
10605         * normal/powerpc/setjmp.S: Likewise.
10606         * normal/sparc64/setjmp.S: Likewise.
10607         * partmap/acorn.c: Likewise.
10608         * partmap/amiga.c: Likewise.
10609         * partmap/apple.c: Likewise.
10610         * partmap/gpt.c: Likewise.
10611         * partmap/pc.c: Likewise.
10612         * partmap/sun.c: Likewise.
10613         * term/gfxterm.c: Likewise.
10614         * term/terminfo.c: Likewise.
10615         * term/efi/console.c: Likewise.
10616         * term/i386/pc/console.c: Likewise.
10617         * term/i386/pc/serial.c: Likewise.
10618         * term/i386/pc/vesafb.c: Likewise.
10619         * term/i386/pc/vga.c: Likewise.
10620         * term/ieee1275/ofconsole.c: Likewise.
10621         * util/biosdisk.c: Likewise.
10622         * util/console.c: Likewise.
10623         * util/genmoddep.c: Likewise.
10624         * util/getroot.c: Likewise.
10625         * util/grub-emu.c: Likewise.
10626         * util/grub-mkdevicemap.c: Likewise.
10627         * util/grub-probe.c: Likewise.
10628         * util/lvm.c: Likewise.
10629         * util/misc.c: Likewise.
10630         * util/raid.c: Likewise.
10631         * util/resolve.c: Likewise.
10632         * util/update-grub.in: Likewise.
10633         * util/update-grub_lib.in: Likewise.
10634         * util/grub.d/00_header.in: Likewise.
10635         * util/grub.d/10_hurd.in: Likewise.
10636         * util/grub.d/10_linux.in: Likewise.
10637         * util/i386/efi/grub-install.in: Likewise.
10638         * util/i386/efi/grub-mkimage.c: Likewise.
10639         * util/i386/pc/grub-install.in: Likewise.
10640         * util/i386/pc/grub-mkimage.c: Likewise.
10641         * util/i386/pc/grub-mkrescue.in: Likewise.
10642         * util/i386/pc/grub-setup.c: Likewise.
10643         * util/i386/pc/misc.c: Likewise.
10644         * util/powerpc/ieee1275/grub-install.in: Likewise.
10645         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10646         * util/powerpc/ieee1275/misc.c: Likewise.
10647         * video/bitmap.c: Likewise.
10648         * video/video.c: Likewise.
10649         * video/i386/pc/vbe.c: Likewise.
10650         * video/i386/pc/vbeblit.c: Likewise.
10651         * video/i386/pc/vbefill.c: Likewise.
10652         * video/i386/pc/vbeutil.c: Likewise.
10653         * video/readers/tga.c: Likewise.
10655 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10657         * conf/i386-efi.rmk: Replace obsolete reference to
10658         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10659         with util/getroot.c.
10660         * conf/powerpc-ieee1275.rmk: Likewise.
10661         * conf/sparc64-ieee1275.rmk: Likewise.
10663         * util/grub-emu.c (main): Fix unchecked pointer handling.
10665 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10667         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10668         invocation to fail, in order to support partition-less media.
10670         * util/i386/pc/grub-install.in: Likewise.
10672         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10673         which fs or partmap modules are needed (akin to its sister scripts).
10675         Also use grub-probe to get rid of unportable /proc/mounts check.
10677         Print the same informational message that the other scripts do, before
10678         exiting.
10680 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10682         * util/update-grub_lib.in (font_path): New function.  Determine whether
10683         a font file can be found and, if so, echo the GRUB path to it.
10685         * util/update-grub.in: Handle multiple terminals depending on user
10686         input, platform availability and font file presence.  Propagate
10687         variables of our findings to /etc/grub.d/ children.
10689         * util/grub.d/00_header.in: Handle multiple terminals, based on
10690         environment setup by update-grub.
10692 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10694         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10696 2007-06-21  Robert Millan  <rmh@aybabtu.com>
10698         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10699         indicate end of data section in kernel image.
10700         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10701         GRUB_KERNEL_MACHINE_DATA_END.
10703         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10704         space for it.
10705         * kern/i386/efi/startup.S: Likewise.
10707         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10708         during image generation.  Implement --prefix option to override this
10709         patch.
10710         * util/i386/efi/grub-mkimage.c: Likewise.
10712         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10713         code to make path relative to its root into a separate function.
10715         * util/i386/pc/grub-install.in: Use newly provided
10716         make_system_path_relative_to_its_root() to convert ${grubdir}, then
10717         pass the result to grub-install --prefix.
10719 2007-06-13  Robert Millan  <rmh@aybabtu.com>
10721         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10722         DEFAULT_DEVICE_MAP.
10723         * util/grub-emu.c: Use above definitions from misc.h instead of
10724         defining them.
10725         * util/grub-mkdevicemap.c: Likewise.
10726         * util/i386/pc/grub-setup.c: Likewise.
10727         * util/grub-probe.c: Likewise.
10728         (probe): Abort with grub_util_error() when either
10729         grub_guess_root_device or grub_util_get_grub_dev fails.
10731 2007-06-12  Robert Millan  <rmh@aybabtu.com>
10733         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10734         "pager" assignment.
10735         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10736         "pcdata".
10737         * util/grub-probe.c (probe): Likewise for "drive_name".
10739 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10741         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10742         not just the cdrom one.
10744 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10746         * util/i386/pc/grub-mkrescue.in: Add "set -e".
10747         Add --pkglibdir=DIR option to override pkglibdir.
10748         Mention --image-type=TYPE in help output.
10749         Fix --grub-mkimage (it was a no-op).
10750         Abort gracefully when no parameter is given.
10752 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10754         * util/i386/pc/grub-mkrescue.in: New file.
10755         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
10756         * Makefile.in: Handle bin_SCRIPTS.
10758 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
10760         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10761         list of video modes.
10763 2007-06-06  Robert Millan  <rmh@aybabtu.com>
10765         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10766         file doesn't exist, or if it is in a filesystem grub can't read.
10768         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
10769         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
10770         header comment to fit in 80 columns when the variables are resolved.
10772         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10773         could be identified by update-grub.  Remove redundant check for
10774         unifont.pff existence (since convert_system_path_to_grub_path now
10775         handles that).
10777 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10779         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10781         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10783         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10785 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10787         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10789         * include/grub/partition.h: Declare grub_apple_partition_map_init and
10790         grub_apple_partition_map_fini.
10792         * util/biosdisk.c
10793         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10794         to access >2 TiB disks).
10796         Print disk->total_sectors with %llu instead of %lu, since this
10797         variable is always 64-bit (prevents wrong disk size from being displayed
10798         on either >2 TiB disk or big-endian CPU).
10800         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10801         into a generic case that supports all (sane) partition maps.
10803         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10804         breaks big-endian.
10806         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10807         and grub_apple_partition_map_fini() after that.
10809 2007-06-01  Robert Millan  <rmh@aybabtu.com>
10811         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10813         * util/grub.d/00_header.in: Only enable gfxterm when
10814         convert_system_path_to_grub_path() succeeds.
10816 2007-05-20  Robert Millan  <rmh@aybabtu.com>
10818         * util/update-grub_lib.in: New file.
10819         * DISTLIST: Add update-grub_lib.in.
10820         * conf/common.rmk: Generate update-grub_lib and install it in
10821         $(lib_DATA).
10822         * Makefile.in: Add install routine for $(lib_DATA).
10824         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10825         function provided by update-grub_lib to support arbitrary paths of
10826         unifont.pff.
10827         * util/update-grub.in: Use convert_system_path_to_grub_path() to
10828         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10830 2007-05-19  Robert Millan  <rmh@aybabtu.com>
10832         * commands/i386/cpuid.c: New module.
10833         * DISTLIST: Add it.
10834         * conf/i386-efi.rmk: Enable cpuid.mod.
10835         * conf/i386-pc.rmk: Likewise.
10837 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10839         * kern/disk.c (grub_disk_read): Check return value of
10840         grub_realloc().
10842 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10844         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10845         arrays.
10846         * disk/raid.c (grub_raid_open): Likewise.
10848 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10850         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10851         stack instead of on the heap.
10853         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10854         before doing a read on it.
10856         * configure.ac: Only use -fno-stack-protector for the target
10857         environment.
10859 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10861         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10862         __attribute_ ((unused)) to mode_type argument.
10864         * util/getroot.c (grub_guess_root_device): Fix #endif.
10866         * kern/misc.c (memcmp): Fix prototype.
10868         * include/grub/partition.h [GRUB_UTIL]
10869         (grub_gpt_partition_map_init): Add prototype.
10870         (grub_gpt_partition_map_fini): Likewise.
10872         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10873         at the right place.
10875         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10876         (grub_fat_read_data): Likewise.
10877         (grub_fat_find_dir): Likewise.
10879         * font/manager.c (find_glyph): Make table a const.
10880         (grub_font_get_glyph): Remove bitmap from if statement.
10882 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
10884         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10885         code, first search for device in /dev/mapper, then in /dev.
10886         (grub_util_get_grub_dev): New function.
10887         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10888         prototype.
10889         * util/grub-probe.c (probe): Remove check for RAID, call
10890         grub_util_get_grub_dev() instead of
10891         grub_util_biosdisk_get_grub_dev().
10892         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10893         grub_util_biosdisk_get_grub_dev().
10894         * util/i386/pc/grub-setup.c (main): Likewise.
10896 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10898         * DISTLIST: Update for the latest changes.
10899         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10900         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10901         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10902         grub/util/biosdisk.h.
10903         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10904         grub/util/biosdisk.h.
10906 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10908         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10910 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10912         * util/i386/efi/grub-install.in: New.
10913         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10914         newly added grub-install.
10915         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10916         include.
10917         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10918         grub/util/biosdisk.h.
10919         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10920         grub/util/biosdisk.h.
10922 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10924         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10925         * include/grub/util/biosdisk.h: ... here.
10926         * util/i386/pc/biosdisk.c: Moved to ...
10927         * util/biosdisk.c: ... here.
10928         * util/i386/pc/getroot.c: Moved to ...
10929         * util/getroot.c: ... here.
10930         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10931         * util/grub-mkdevicemap.c: ... here.
10932         * util/i386/pc/grub-probe.c: Moved to ...
10933         * util/grub-probe.c: ... here.
10935 2007-05-15  Robert Millan  <rmh@aybabtu.com>
10937         * util/update-grub.in: Remove duplicated line in grub.cfg header
10938         message.
10940 2007-05-13  Robert Millan  <rmh@aybabtu.com>
10942         * util/update-grub.in: Fix a few assumptions about the devices holding
10943         /, /boot and /boot/grub being the same.
10944         * util/grub.d/00_header.in: Likewise.
10945         * util/grub.d/10_hurd.in: Likewise.
10946         * util/grub.d/10_linux.in: Likewise.
10948         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10949         patterns.  Use that to define the `.old' suffix as older than `'.
10951         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10953         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10954         the grub.cfg header message.
10956 2007-05-11  Robert Millan  <rmh@aybabtu.com>
10958         * util/update-grub.in: Create device.map if it doesn't already exist,
10959         before attempting to run grub-probe.
10960         Check for grub-probe and grub-mkdevicemap with the same code
10961         grub-install is using.
10962         Remove test mode.
10964 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10966         * Makefile.in: Add the datarootdir autoconf variable.
10968 2007-05-09  Robert Millan  <rmh@aybabtu.com>
10970         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10971         fail gracefully if dev->disk->partition == NULL.
10973 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10975         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10976         determine partition map module.
10977         * util/i386/pc/grub-install.in: Use this feature to decide which
10978         partition module to load, instead of hardcoding pc and gpt.
10980 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10982         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10983         source directory differs from build directory.
10985 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10987         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10988         initialisation.
10990 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10992         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10994 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10996         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10997         command-line arguments via ${GRUB_CMDLINE_LINUX}.
10999 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11001         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11002         (grub_probe_SOURCES): Likewise.
11003         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11004         GPT and initialize dos_part and bsd_part accordingly.
11005         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11006         install_bsd_part.
11007         (main): Activate gpt module for use during partition identification,
11008         and deactivate it afterwards.
11009         * util/i386/pc/grub-install.in: Add gpt module to core.img.
11010         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11011         partition identification, and deactivate it afterwards.
11013 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11015         * term/i386/pc/console.c (grub_console_fini): Call
11016         grub_term_set_current() before grub_term_unregister().
11018 2007-05-04  Robert Millan  <rmh@aybabtu.com>
11020         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11021         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11022         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
11023         and update-grub_DATA.
11024         * conf/common.rmk: Build and install update-grub components.
11025         * conf/common.mk: Regenerate.
11026         * util/update-grub.in: New.  Core of update-grub.
11027         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
11028         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
11029         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
11030         * util/grub.d/README: New.  Document grub.d directory layout.
11032 2007-05-01  Robert Millan  <rmh@aybabtu.com>
11034         * util/grub-emu.c: Move initialization functions
11035         grub_util_biosdisk_init() and grub_init_all() before
11036         grub_util_biosdisk_get_grub_dev(), which relies on them.
11038 2007-04-19  Robert Millan  <rmh@aybabtu.com>
11040         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11041         it is used later.
11043 2007-04-18  Jerone Young  <jerone@gmail.com>
11045         * kernel/elf.c: Add missing parenthesis for conditional statement
11046         stanza.
11048 2007-04-10  Jerone Young  <jerone@gmail.com>
11050         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11051         continue on and look for device node with real device name.
11053 2007-04-10  Jerone Young  <jerone@gmail.com>
11055         * configure.ac: Add argument for autoconf to use transformation
11056         ability.
11057         * Makefile.in: Add autoconf package transformation code.
11058         * util/i386/pc/grub-install.in: Likewise.
11059         * util/powerpc/ieee1275/grub-install.in: Likewise.
11061 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
11063         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11064         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11065         (EXT2_REVISION): Likewise.
11066         (EXT2_INODE_SIZE): Likewise.
11067         (struct grub_ext2_block_group): Added a missing member
11068         "used_dirs".
11069         (grub_ext2_read_inode): Divide by the inode size in a superblock
11070         instead of 128 to obtain INODES_PER_BLOCK.
11071         Use the macro EXT2_INODE_SIZE instead of directly using
11072         SBLOCK->INODE_SIZE.
11074 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
11076         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11077         superblock instead of the structure size to compute an
11078         offset. This fixes the problem that GRUB could not read a
11079         filesystem when inode size is different from 128-byte.
11081 2007-03-05  Marco Gerards  <marco@gnu.org>
11083         * normal/main.c (read_config_file): When "menu" is not set, create
11084         an initial context.
11086 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11088         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11089         (HEAP_LIMIT): New macro.
11090         (grub_claim_heap): Claim memory up to `heaplimit'.
11092 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11094         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11095         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11096         (_start): Likewise.
11097         (grub_arch_modules_addr): Return address after `_end'.
11098         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11099         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11100         (add_segments): Calculate `_end' from phdr size and location.
11101         (ALIGN_UP): Moved to ...
11102         * include/grub/misc.h: here.
11103         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11104         New macro.
11105         (GRUB_IEEE1275_MODULE_BASE): Removed.
11107 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11109         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11110         loop boundary.
11112 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11114         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11115         All users updated.
11116         (grub_elf64_load_hook_t): Likewise.
11117         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11118         debug output.
11120 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11122         * kern/mm.c: Update copyright.
11123         (grub_mm_debug): Correct syntax error.
11124         (grub_mm_dump_free): New function.
11125         (grub_debug_free): Call `grub_free'.
11126         * include/grub/mm.h: Update copyright.
11127         (grub_mm_dump_free): Add declaration.
11129 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11131         * include/grub/ieee1275/ieee1275.h: Update copyright.
11132         * kern/powerpc/ieee1275/init.c: Likewise.
11133         * kern/powerpc/ieee1275/openfw.c: Likewise.
11135         * loader/powerpc/ieee1275/linux.c: Likewise.
11136         * include/grub/elfload.h: Likewise.
11137         * kern/elf.c: Likewise.
11138         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
11139         callers.
11140         (grub_elf64_load): Likewise.
11141         (grub_elf32_load_segment): Move to a nested function.
11142         (grub_elf64_load_segment): Likewise.
11144 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11146         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11147         prototype.
11148         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11149         (grub_heap_len): Likewise.
11150         (HEAP_SIZE): New macro.
11151         (grub_claim_heap): New function.
11152         (grub_machine_init): Don't claim heap directly.  Call
11153         `grub_claim_heap'.
11154         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11155         (grub_available_iterate): New function.
11157 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
11159         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11160         * configure.ac: Use it for testing the HOST and TARGET compilers.
11162 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
11164         * Makefile.in (enable_grub_emu): New variable.
11165         * configure.ac (--enable-grub-emu): New option.
11166         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11167         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11168         * conf/i386-pc.rmk: Likewise.
11169         * conf/powerpc-ieee1275.rmk: Likewise.
11170         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11172 2006-12-12  Marco Gerards  <marco@gnu.org>
11174         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11176         * kern/env.c (grub_env_unset): Don't free the member `value' when
11177         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11178         pointer.
11180         * normal/main.c (current_menu): Removed.
11181         (free_menu): Unset the `menu' environment variable.
11182         (grub_normal_menu_addentry): Make use of the environment variable
11183         `menu', instead of using the global `current_menu'.  Allocate
11184         memory for the sourcecode of this entry.
11185         (read_config_file): New argument `nested', changed all callers.
11186         Only in the case of a new context, initialize a new menu.  Set the
11187         `menu' environment variable.
11188         (grub_normal_execute): Don't set and unset the environment
11189         variable `menu' here anymore.  Only free the menu when leaving the
11190         context.
11192         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11193         leak.
11195 2006-12-11  Marco Gerards  <marco@gnu.org>
11197         * normal/menu_entry.c (run): Fix off by one bug so the last line
11198         is executed.  Move the loader check to outside the loop.
11200 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
11202         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11204 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
11206         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11207         the number of sectors.  Reported by Andrey Shuvikov
11208         <mr_hyro@yahoo.com>.
11210 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
11212         * kern/disk.c (grub_disk_read): When there is a read error, always
11213         try to read only the necessary data.
11215         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11216         disk/raid.c.
11217         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11218         prototype.
11219         [GRUB_UTIL] (grub_raid_fini): Likewise.
11220         [GRUB_UTIL] (grub_lvm_init): Likewise.
11221         [GRUB_UTIL] (grub_lvm_fini): Likewise.
11222         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11223         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11224         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11225         and grub_raid_fini().
11227 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11229         * include/grub/types.h (__unused): Rename to UNUSED.
11230         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11231         (grub_elf64_size): Likewise.
11233 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11235         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11236         grub_error_push and grub_error_pop in the error-handling path.
11237         (grub_elf32_load_segment): Only call grub_file_read with non-zero
11238         length.
11240 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11242         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11243         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11244         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11245         (kernel_elf_SOURCES): Likewise.
11246         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11247         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11248         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11249         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11250         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11251         (elf_mod_SOURCES): New variable.
11252         (elf_mod_CFLAGS): Likewise.
11253         (elf_mod_LDFLAGS): Likewise.
11254         * include/grub/types.h (__unused): New macro.
11255         * include/grub/elfload.h: New file.
11256         * kern/elf.c: Likewise.
11257         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11258         (ELF32_LOADMASK): New macro.
11259         (ELF64_LOADMASK): Likewise.
11260         (vmlinux): Removed.
11261         (grub_linux_load32): New function.
11262         (grub_linux_load64): Likewise.
11263         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11264         Use grub_elf_t instead of grub_file_t.
11266 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11268         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11269         `catch_result' to struct set_color_args.
11271 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
11273         * normal/menu.c: Include grub/script.h.
11274         * normal/menu_entry.c: Likewise.
11275         * include/grub/normal.h: Do not include grub/script.h.
11277 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11279         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11281 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11283         * kern/disk.c (grub_disk_open): Print debug messages when opening a
11284         disk.
11285         (grub_disk_close): Print debug messages when closing a disk.
11286         (grub_disk_read): Print debug messages when disk read fails.
11287         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11288         filesystem type.
11289         * kern/partition.c: Include misc.h.
11290         (grub_partition_iterate): Print debug messages when detecting
11291         partition type.
11293 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11295         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11296         is negative.
11297         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11299 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
11301         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11302         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11304 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
11306         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11307         instead of sizeof(lv). Patch by Michael Guntsche.
11309 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11311         * disk/lvm.c: Rename VGS to VG_LIST.
11312         (grub_lvm_iterate): Change VGS->LV to VG-LV.
11313         (grub_lvm_open): Likewise.
11314         Thanks to Michael Guntsche for finding this bug.
11316 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11318         * configure.ac (AC_INIT): Bumped to 1.95.
11320 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11322         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11323         with "/dev/.static/dev/md".
11325 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11327         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11328         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11329         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11330         DRIVE_NAME are always freed.
11332         * util/i386/pc/biosdisk.c (make_device_name): Add one into
11333         DOS_PART, as a DOS partition is counted from one instead of zero
11334         now. Reported by Robert Millan.
11336 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11338         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11339         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11340         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11341         string returned by grub_guess_root_device.
11342         * util/i386/pc/grub-setup.c: Likewise.
11343         * util/i386/pc/grub-probefs.c: Likewise.
11345         * util/i386/pc/grub-probefs.c: Rename to ...
11346         * util/i386/pc/grub-probe.c: ... this.
11347         * DISTLIST: Remove grub-probefs, add grub-probe.
11348         * conf/i386-efi.rmk: Likewise.
11349         * conf/i386-pc.rmk: Likewise.
11350         * util/i386/pc/grub-install.in: Likewise.
11352         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11353         choose which information we want to print.
11355 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11357         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11358         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11359         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11360         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11361         video/readers/tga.c and video/i386/pc/vbeutil.c.
11363 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11365         Added support for RAID and LVM.
11367         * disk/lvm.c: New file.
11368         * disk/raid.c: Likewise.
11369         * include/grub/lvm.h: Likewise.
11370         * include/grub/raid.h: Likewise.
11371         * include/grub/util/lvm.h: Likewise.
11372         * include/grub/util/raid.h: Likewise.
11373         * util/lvm.c: Likewise.
11374         * util/raid.c: Likewise.
11376         * include/grub/disk.h (grub_disk_dev_id): Add
11377         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11378         (grub_disk_get_size): New prototype.
11379         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11380         returns a partition.
11381         (grub_disk_get_size): New function.
11383         * kern/i386/pc/init.c (make_install_device): Copy the prefix
11384         verbatim if grub_install_dos_part is -2.
11386         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11387         and LVM devices.
11389         * util/i386/pc/grub-setup.c (setup): New argument
11390         MUST_EMBED. Force embedding of GRUB when the argument is
11391         true. Close FILE before returning.
11392         (main): Add support for RAID and LVM.
11394         * conf/common.rmk: Add RAID and LVM modules.
11395         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11396         util/lvm.c.
11397         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11399         * kern/misc.c (grub_strstr): New function.
11400         * include/grub/misc.h (grub_strstr): New prototype.
11402 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
11404         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11406 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
11408         * kern/misc.c (grub_strtoull): Guess the base only if not
11409         specified.
11411 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11413         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11414         PowerMac support.
11416 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11418         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11420         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11421         Remove `flags' argument.  All callers changed.
11422         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11423         (IEEE1275_IHANDLE_INVALID): New variable.
11424         (IEEE1275_CELL_INVALID): New variable.
11425         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11426         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11427         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11428         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11429         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11430         codes from Open Firmware.  All callers updated.
11431         (grub_ieee1275_next_property): Directly return Open Firmware return
11432         code.
11433         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11434         Standardize error checking from `grub_ieee1275_get_property'.
11435         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11436         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
11438 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11440         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11441         `instance_to_package_args' to `instance_to_path_args'.
11443         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11444         `grub_ieee1275_chosen'.
11446         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11447         `grub_ieee1275_interpret'.
11449 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11451         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11453 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11455         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11456         (__cmpdi): Likewise.
11458         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11459         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
11460         `grub_ssize_t'.
11462         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11464         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11465         to type `grub_ssize_t'.
11466         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11468 2006-09-22  Marco Gerards  <marco@gnu.org>
11470         * normal/script.c (grub_script_create_cmdmenu): Skip leading
11471         newlines.
11473 2006-09-22  Marco Gerards  <marco@gnu.org>
11475         * commands/echo.c: New file.
11477         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11479         * conf/common.rmk (echo_mod_SOURCES): New variable.
11480         (echo_mod_CFLAGS): Likewise.
11481         (echo_mod_LDFLAGS): Likewise.
11483 2006-09-22  Marco Gerards  <marco@gnu.org>
11485         * normal/main.c (get_line): Malloc memory instead of using
11486         preallocated memory.  Removed the arguments `cmdline' and
11487         `max_len'.  Updated all callers.
11489 2006-09-22  Marco Gerards  <marco@gnu.org>
11491         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11492         (normal_mod_DEPENDENCIES): Likewise.
11494         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11495         (normal_mod_DEPENDENCIES): Likewise.
11497         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11499 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
11501         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11502         programs.
11503         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11504         (normal_mod_DEPENDENCIES): Likewise.
11505         * conf/i386-pc.mk: Regenerate.
11506         * conf/i386-efi.mk: Likewise
11507         * conf/common.mk: Likewise.
11508         * conf/powerpc-ieee1275.mk: Likewise.
11509         * conf/sparc64-ieee1275.mk: Likewise.
11511 2006-09-22  Robert Millan  <rmh@aybabtu.com>
11513         Sync with i386 version.
11514         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11515         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11517 2006-09-21  Robert Millan  <rmh@aybabtu.com>
11519         Import from GRUB Legacy (lib/device.c):
11520         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11521         (init_device_map) [__linux__]: Add support for I2O devices.
11523 2006-09-14  Marco Gerards  <marco@gnu.org>
11525         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11526         `-melf_i386'.
11528 2006-09-14  Robert Millan  <rmh@aybabtu.com>
11530         * util/i386/pc/grub-install.in: Skip menu.lst when removing
11531         /boot/grub/*.lst.
11533         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11535         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11536         before adding it to device.map.
11538 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
11540         * genmk.rb: Let GCC generate dependencies the first time it
11541         compiles a file; using the -MD option.
11542         * conf/common.mk: Regenerate.
11543         * conf/i386-pc.mk: Likewise.
11544         * conf/i386-efi.mk: Likewise.
11545         * conf/powerpc-ieee1275.mk: Likewise.
11546         * conf/sparc64-ieee1275.mk: Likewise.
11548 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
11550         Move the prototypes of grub_setjmp and grub_longjmp to
11551         cpu/setjmp.h, so that each architecture may specify different
11552         attributes.
11554         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11555         (grub_longjmp): Likewise.
11556         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11557         (grub_longjmp): Likewise.
11558         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11559         (grub_longjmp): Likewise.
11561         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11562         [!GRUB_UTIL] (grub_longjmp): Removed.
11564 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
11566         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11567         "color!" method does not return any value.
11569 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11571         * include/grub/bitmap.h: New file.
11573         * include/grub/i386/pc/vbeutil.h: Likewise.
11575         * video/bitmap.c: Likewise.
11577         * video/readers/tga.c: Likewise.
11579         * video/i386/pc/vbeutil.c: Likewise.
11581         * commands/videotest.c: Code cleanup and updated to reflect to new
11582         video API.
11584         * term/gfxterm.c: Likewise.
11586         * video/video.c: Likewise.
11588         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11589         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11590         (bitmap_mod_SOURCES): New entry.
11591         (bitmap_mod_CFLAGS): Likewise.
11592         (bitmap_mod_LDFLAGS): Likewise.
11593         (tga_mod_SOURCES): Likewise.
11594         (tga_mod_CFLAGS): Likewise.
11595         (tga_mod_LDFLAGS): Likewise.
11597         * include/grub/video.h (grub_video_blit_operators): New enum type.
11598         (grub_video_render_target): Changed as forward declaration and moved
11599         actual definition to be video driver specific.
11600         (grub_video_adapter.blit_bitmap): Added blitting operator.
11601         (grub_video_adapter.blit_render_target): Likewise.
11602         (grub_video_blit_bitmap): Likewise.
11603         (grub_video_blit_render_target): Likewise.
11605         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11606         driver specific render target definition.
11607         (grub_video_vbe_map_rgba): Added driver internal helper.
11608         (grub_video_vbe_unmap_color): Updated to use
11609         grub_video_i386_vbeblit_info.
11610         (grub_video_vbe_get_video_ptr): Likewise.
11612         * include/grub/i386/pc/vbeblit.h
11613         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11614         grub_video_i386_vbeblit_info.
11615         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11616         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11617         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11618         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11619         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11620         (grub_video_i386_vbeblit_index_index): Likewise.
11621         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11622         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11623         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11624         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11625         operator.
11626         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11627         operator.
11629         * video/i386/pc/vbeblit.c: Updated to reflect changes on
11630         include/grub/i386/pc/vbeblit.h.
11632         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11633         Updated to use grub_video_i386_vbeblit_info.
11634         (grub_video_i386_vbefill_R8G8B8): Likewise.
11635         (grub_video_i386_vbefill_index): Likewise.
11636         (grub_video_i386_vbefill): Added generic filler.
11638         * video/i386/pc/vbefill.c: Updated to reflect changes on
11639         include/grub/i386/pc/vbefill.h.
11641         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11642         grub_video_i386_vbeblit_info.
11643         (grub_video_vbe_unmap_color): Likewise.
11644         (grub_video_vbe_blit_glyph): Likewise.
11645         (grub_video_vbe_scroll): Likewise.
11646         (grub_video_vbe_draw_pixel): Removed function.
11647         (grub_video_vbe_get_pixel): Likewise.
11648         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11649         updated code to use it.
11650         (common_blitter): Added common blitter for render target and bitmap.
11651         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11652         (grub_video_vbe_blit_render_target): Likewise.
11654 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
11656         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11657         is in text mode if there is no console control protocol instance
11658         available.
11660 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11662         * include/grub/video.h: Code cleanup.
11664         * include/grub/i386/pc/vbe.h: Likewise.
11666         * video/i386/pc/vbe.c: Likewise.
11668         * video/i386/pc/vbeblit.c: Likewise.
11670         * video/i386/pc/vbefill.c: Likewise.
11672         * video/video.c: Likewise.  Also added more comments.
11674 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11676         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11677         (struct grub_biosdisk_dap): Likewise.
11679         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
11680         linkage settings for all functions.
11682 2006-07-12  Marco Gerards  <marco@gnu.org>
11684         * configure.ac (--enable-mm-debug): Fix typo.
11686         * genkernsyms.sh.in: Use proper quoting for `CC'.
11688 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
11690         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11691         (normal_mod_ASFLAGS): Remove "-m32".
11693 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
11695         * util/misc.c: Include config.h.
11696         [!HAVE_MEMALIGN]: Do not include malloc.h.
11697         (grub_memalign): Use posix_memalign, if present. Then, use
11698         memalign, if present. Otherwise, emit an error.
11700         * util/grub-emu.c: Do not include malloc.h.
11702         * include/grub/util/misc.h: Include unistd.h. This is required for
11703         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11704         D. Eades III <hde@foobar-qux.org>.
11706         * configure.ac (AC_GNU_SOURCE): Added.
11707         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11708         type.
11710 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
11712         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11713         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11715 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
11717         * include/grub/types.h (grub_host_addr_t): Rename to
11718         grub_target_addr_t.
11719         (grub_host_off_t): Rename to grub_target_off_t.
11720         (grub_host_size_t): Rename to grub_target_size_t.
11721         (grub_host_ssize_t): Rename to grub_target_ssize_t.
11722         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11724         * include/grub/kernel.h (struct grub_module_header): Change type
11725         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11726         (grub_module_info): Likewise.
11728 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11730         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11731         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11732         Velazquez <jesus.velazquez@gmail.com>.
11734 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11736         Count partitions from 1 instead of 0 in the string representation
11737         of partitions. Still use 0-based internally.
11739         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11740         (sun_partition_map_iterate): Use grub_partition_t instead of
11741         struct grub_partition *. Cast DESC->START_CYLINDER to
11742         grub_uint64_t after converting the endian.
11743         (sun_partition_map_probe): Subtract 1 for PARTNUM.
11744         (sun_partition_map_get_name): Add 1 to P->INDEX.
11746         * partmap/pc.c (grub_partition_parse): Subtract 1 for
11747         PCDATA->DOS_PART.
11748         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11750         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11751         zero instead of one.
11752         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11753         (gpt_partition_map_get_name): Add 1 into P->INDEX.
11755         * partmap/apple.c (apple_partition_map_iterate): Change the type
11756         of POS to unsigned.
11757         (apple_partition_map_probe): Subtract 1 for PARTNUM.
11758         (apple_partition_map_get_name): Add 1 into P->INDEX.
11760         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11761         of POS to unsigned.
11762         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11763         calculate the offset of a partition.
11764         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11765         (amiga_partition_map_get_name): Add 1 into P->INDEX.
11767         * partmap/acorn.c (acorn_partition_map_find): Change the type of
11768         SECTOR to grub_disk_addr_t.
11769         (acorn_partition_map_iterate): Likewise.
11770         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11771         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11772         top.
11773         (acorn_partition_map_get_name): Add 1 into P->INDEX.
11775         * kern/i386/pc/init.c (make_install_device): Add 1 into
11776         GRUB_INSTALL_DOS_PART.
11778         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11779         conditional.
11781 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11783         Clean up the code to support 64-bit addressing in disks and
11784         files. This change is not enough for filesystems yet.
11786         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11787         type of "start" to grub_uint64_t.
11788         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11789         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11790         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11791         convert addresses.
11793         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11794         to grub_disk_addr_t.
11796         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11797         string.
11799         * partmap/pc.c (pc_partition_map_iterate): Likewise.
11801         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11802         to char *.
11804         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11806         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11808         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11810         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11811         to grub_off_t, to detect an error from grub_file_seek.
11812         (grub_multiboot_load_elf32): Likewise.
11814         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11815         maximum unsigned long value when an overflow is detected.
11816         (grub_strtoull): New function.
11817         (grub_divmod64): Likewise.
11818         (grub_lltoa): use grub_divmod64.
11820         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11821         grub_disk_addr_t.
11822         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11823         the pointer to next character. Use grub_strtoull instead of
11824         grub_strtoul.
11825         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11826         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11827         respectively.
11829         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11830         return value is signed.
11831         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11832         test if OFFSET is less than zero, as OFFSET is unsigned now.
11834         * kern/disk.c (struct grub_disk_cache): Change the type of
11835         "sector" to grub_disk_addr_t.
11836         (grub_disk_cache_get_index): Change the type of SECTOR to
11837         grub_disk_addr_t. Calculate the hash with SECTOR casted to
11838         unsigned after shifting.
11839         (grub_disk_cache_invalidate): Change the type of SECTOR to
11840         grub_disk_addr_t.
11841         (grub_disk_cache_unlock): Likewise.
11842         (grub_disk_cache_store): Likewise.
11843         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11844         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11845         grub_disk_addr_t and grub_uint64_t, respectively.
11846         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11847         body, as the value of OFFSET is tweaked by
11848         grub_disk_check_range. Change the types of START_SECTOR, LEN and
11849         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11850         respectively.
11851         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11852         body, as the value of OFFSET is tweaked by
11853         grub_disk_check_range. Change the types of LEN and N to
11854         grub_size_t.
11856         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11857         and "saved_offset" to grub_off_t.
11858         (test_header): Cast BUF to char *.
11859         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11860         to char *.
11861         (grub_gzio_read): Change the types of OFFSET and SIZE to
11862         grub_off_t and grub_size_t, respectively.
11864         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11865         Removed.
11866         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11867         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11868         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11869         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11870         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11872         * include/grub/types.h (grub_off_t): Unconditionally set to
11873         grub_uint64_t.
11874         (grub_disk_addr_t): Changed to grub_uint64_t.
11876         * include/grub/partition.h (struct grub_partition): Change the
11877         types of "start", "len" and "offset" to grub_disk_addr_t,
11878         grub_uint64_t and grub_disk_addr_t, respectively.
11879         (grub_partition_get_start): Return grub_disk_addr_t.
11880         (grub_partition_get_len): Return grub_uint64_t.
11882         * include/grub/misc.h (grub_strtoull): New prototype.
11883         (grub_divmod64): Likewise.
11885         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11886         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11887         grub_off_t, respectively.
11888         All callers and references changed.
11890         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11891         grub_size_t in "read".
11892         All callers and references changed.
11894         * include/grub/file.h (struct grub_file): Change the types of
11895         "offset" and "size" to grub_off_t and grub_off_t,
11896         respectively. Change the type of SECTOR to grub_disk_addr_t in
11897         "read_hook".
11898         (grub_file_read): Change the type of LEN to grub_size_t.
11899         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11900         grub_off_t.
11901         (grub_file_size): Return grub_off_t.
11902         (grub_file_tell): Likewise.
11903         All callers and references changed.
11905         * include/grub/disk.h (struct grub_disk_dev): Change the types of
11906         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11907         "write".
11908         (struct grub_disk): Change the type of "total_sectors" to
11909         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11910         "read_hook".
11911         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11912         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11913         (grub_disk_write): Likewise.
11914         All callers and references changed.
11916         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11917         char * for grub_strncmp to silence gcc.
11918         (grub_iso9660_mount): Likewise.
11919         (grub_iso9660_mount): Likewise.
11920         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11921         return statement.
11922         (grub_iso9660_iterate_dir): Likewise.
11923         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11925         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11926         LEN to grub_disk_addr_t and grub_size_t, respectively.
11928         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11930         * fs/jfs.c (grub_jfs_read_file): Likewise.
11932         * fs/minix.c (grub_jfs_read_file): Likewise.
11934         * fs/sfs.c (grub_jfs_read_file): Likewise.
11936         * fs/ufs.c (grub_jfs_read_file): Likewise.
11938         * fs/xfs.c (grub_jfs_read_file): Likewise.
11940         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11941         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11942         respectively.
11944         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11945         BLKNR to -1 instead of returning GRUB_ERRNO.
11946         (grub_ext2_read_file): Change the types of SECTOR and
11947         LEN to grub_disk_addr_t and grub_size_t, respectively.
11949         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11950         LEN to grub_disk_addr_t and grub_size_t, respectively.
11952         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11953         grub_file_read.
11955         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11956         string. Do not cast SECTOR explicitly.
11958         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11959         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11960         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11961         grub_disk_addr_t and grub_size_t, respectively. If the sector is
11962         over 2TB and LBA mode is not supported, raise an error.
11963         (get_safe_sectors): New function.
11964         (grub_biosdisk_read): Use get_safe_sectors.
11965         (grub_biosdisk_write): Likewise.
11967         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11968         (grub_efidisk_write): Likewise.
11970         * disk/loopback.c (delete_loopback): Cosmetic changes.
11971         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11972         correctly.
11973         (grub_loopback_open): Likewise.
11974         (grub_loopback_read): Likewise. Also, change the type of POS to
11975         grub_off_t, and fix the usage of grub_memset.
11977         * commands/i386/pc/play.c: Include grub/machine/time.h.
11979         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11980         print FILE->SIZE.
11982         * commands/configfile.c: Include grub/env.h.
11984         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11985         GRUB_ERRNO directly instead. Change the type of POS to
11986         grub_off_t. Follow the coding standard.
11988         * commands/blocklist.c: Include grub/partition.h.
11989         (grub_cmd_blocklist): Return an error if the underlying device is
11990         not a disk. Take the starting sector of a partition into account,
11991         if a partition is used.
11993         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11994         a length field.
11995         (lba_mode): Support 64-bit addresses.
11996         (chs_mode): Likewise.
11997         (copy_buffer): Adapted to the new offsets of a length field and a
11998         segment field.
11999         (blocklist_default_start): Allocate 64-bit space.
12001         * boot/i386/pc/boot.S (force_lba): Removed.
12002         (boot_drive): Moved to under KERNEL_SECTOR.
12003         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12004         space.
12005         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12006         is useless.
12007         (lba_mode): Refactored to support a 64-bit address. More size
12008         optimization.
12009         (setup_sectors): Likewise.
12011 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12013         * DISTLIST: Added include/grub/i386/linux.h. Removed
12014         include/grub/i386/pc/linux.h
12016         * configure.ac (AC_INIT): Bumped to 1.94.
12018         * config.guess: Updated from gnulib.
12019         * config.sub: Likewise.
12020         * install-sh: Likewise.
12021         * mkinstalldirs: Likewise.
12023 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12025         * conf/common.rmk (grub_modules_init.lst): Depended on
12026         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12027         MODSRCFILES.
12029         * genmk.rb (PModule::rule): Reverted the previous change.
12031 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12033         * conf/common.rmk (grub_modules_init.lst): Depends on
12034         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12035         that the target does not exist before producing.
12036         (grub_modules_init.h): Remove the target before generating.
12037         (grub_emu_init.c): Likewise.
12039         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12041 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
12043         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12044         for the target-specific tests. Make sure that we also have the
12045         up-to-date target variables for those tests.
12047 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12049         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12050         (PModule::rule): Likewise.
12052 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12054         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12055         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12056         target-specific flags should be prefixed.
12057         (PModule::rule): Likewise.
12059 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
12061         * configure.ac (CMP): Check if cmp is available explicitly.
12063 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
12065         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12066         (target_cpu): New variable.
12067         (pkglibdir): Use target_cpu instead of host_cpu.
12069         * util/i386/pc/grub-install.in (host_cpu): Removed.
12070         (target_cpu): New variable.
12071         (pkglibdir): Use target_cpu instead of host_cpu.
12073         * util/genmoddep.c: Removed.
12075         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12076         instead of GRUB_HOST_SIZEOF_VOID_P.
12077         * kern/dl.c: Likewise.
12079         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12080         ...
12081         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12082         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12083         (GRUB_TARGET_SIZEOF_LONG): ... this.
12084         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12085         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12086         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12087         to ...
12088         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12089         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12090         (GRUB_TARGET_SIZEOF_LONG): ... this.
12091         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12092         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12093         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12094         to ...
12095         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12096         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12097         (GRUB_TARGET_SIZEOF_LONG): ... this.
12098         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12099         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12101         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12102         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12103         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12104         instead of GRUB_HOST_SIZEOF_LONG.
12105         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12106         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12107         GRUB_CPU_WORDS_BIGENDIAN.
12108         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12109         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12110         grub_host_ssize_t.
12112         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12113         (genmoddep_SOURCES): Likewise.
12114         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12115         (genmoddep_SOURCES): Likewise.
12116         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12117         (genmoddep_SOURCES): Likewise.
12118         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12119         Likewise.
12120         (genmoddep_SOURCES): Likewise.
12122         * genmoddep.awk: New file.
12124         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12125         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12126         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12127         (PModule::rule): Likewise.
12128         (Program::rule): Likewise.
12129         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12130         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12131         respectively.
12133         * configure.ac: Rewritten intensively to use host and target
12134         instead of build and host, respectively.
12136         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12137         (host_cpu): Removed.
12138         (target_cpu): New variable.
12139         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12140         (BUILD_CC): Removed.
12141         (BUILD_CFLAGS): Likewise.
12142         (BUILD_CPPFLAGS): Likewise.
12143         (TARGET_CC): New variable.
12144         (TARGET_CFLAGS): Likewise.
12145         (TARGET_CPPFLAGS): Likewise.
12146         (TARGET_LDFLAGS): Likewise.
12147         (AWK): Likewise.
12148         (include): Use target_cpu instead of host_cpu.
12149         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12151         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12153 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
12155         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12156         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
12157         field 'false' to 'exec_on_false'.
12158         (grub_script_create_cmdif): Renamed argument names to reflect above
12159         changes.
12161         * normal/execute.c (grub_script_execute_cmdif): Likewise.
12163         * normal/script.c (grub_script_create_cmdif): Likewise.
12165 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
12167         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12168         top.
12169         (grub_hfsplus_btree_recptr): Likewise.
12170         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12171         FILEBLOCK both to pass a block number and store next block
12172         number.
12173         (grub_hfsplus_read_block): Rewritten heavily to support an extent
12174         overflow file correctly. Specify errors appropriately, because
12175         fshelp expects that GRUB_ERRNO is set when fails. Reuse
12176         grub_hfsplus_btree_recptr to get the pointer to a found key.
12177         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12178         is found.
12180         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12181         linux.mod.
12182         (_linux_mod_SOURCES): New variable.
12183         (_linux_mod_CFLAGS): Likewise.
12184         (_linux_mod_LDFLAGS): Likewise.
12185         (linux_mod_SOURCES): Likewise.
12186         (linux_mod_CFLAGS): Likewise.
12187         (linux_mod_LDFLAGS): Likewise.
12189         * DISTLIST: Added loader/i386/efi/linux.c,
12190         loader/i386/efi/linux_normal.c and
12191         include/grub/i386/efi/loader.h.
12193         * loader/i386/efi/linux.c: New file.
12194         * loader/i386/efi/linux_normal.c: Likewise.
12195         * include/grub/i386/efi/loader.h: Likewise.
12197 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
12199         * commands/blocklist.c: New file.
12201         * DISTLIST: Added commands/blocklist.c.
12203         * term/efi/console.c (grub_console_highlight_color): Use a lighter
12204         color for the background, and a darker color for the foreground.
12205         (grub_console_checkkey): Return READ_KEY.
12206         (grub_console_cls): Set the background to
12207         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12209         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12211         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12212         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12214         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12215         prototype.
12217         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12218         BG. The spec is wrong again.
12220         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12221         prototype.
12222         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12224         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12225         commands/blocklist.c.
12226         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12228         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12229         (blocklist_mod_SOURCES): New variable.
12230         (blocklist_mod_CFLAGS): Likewise.
12231         (blocklist_mod_LDFLAGS): Likewise.
12233 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
12235         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12236         duplication.
12237         (lba_mode): Use %eax more intensively to reduce the code size.
12239 2006-05-20  Marco Gerards  <marco@gnu.org>
12241         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12243         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
12244         for `menuentry'.
12245         (script): Accept leading newlines.
12246         (newlines): New rule to describe 0 or more newlines.
12247         (commands): Accept `command' with trailing newline.  Fixed the
12248         order in which arguments were passed to `grub_script_add_cmd'.
12249         Accept commands separated by newlines.
12250         (function): Changed to accept newlines.
12251         (menuentry) Rewritten.
12253         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12254         front of the list, instead of to the end.
12256 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
12258         * util/i386/pc/grub-install.in (bindir): New variable.
12259         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12260         Shaver <lbgwjl@gmail.com>.
12262 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
12264         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12265         grub/machine/linux.h
12266         * loader/i386/pc/linux.c: Likewise.
12268         * include/grub/i386/pc/linux.h: Moved to ...
12269         * include/grub/i386/linux.h: ... here.
12271         * include/grub/i386/linux.h (struct linux_kernel_params): New
12272         struct.
12274 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
12276         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12277         checking.
12278         (grub_video_vbe_blit_glyph): Likewise.
12279         (grub_video_vbe_blit_bitmap): Likewise.
12280         (grub_video_vbe_blit_render_target): Likewise.
12282 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
12284         * configure.ac (--with-platform): Properly quote the square
12285         brackets.
12287 2006-05-08  Marco Gerards  <marco@gnu.org>
12289         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12290         this...
12291         (kernel_elf_HEADERS): ...to this.  Updated all users.
12292         (grubof_symlist.c): Renamed from this...
12293         (kernel_elf_symlist.c): ...to this.  Updated all users.
12294         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12295         (grubof_SOURCES): Renamed from this...
12296         (kernel_elf_SOURCES): ...to this.
12297         (grubof_HEADERS): Renamed from this...
12298         (kernel_elf_HEADERS): ...to this.
12299         (grubof_CFLAGS): Renamed from this...
12300         (kernel_elf_CFLAGS): ...to this.
12301         (grubof_ASFLAGS): Renamed from this...
12302         (kernel_elf_ASFLAGS): ...to this.
12303         (grubof_LDFLAGS): Renamed from this...
12304         (kernel_elf_LDFLAGS): ...to this.
12306         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12307         this...
12308         (kernel_elf_HEADERS): ...to this.  Updated all users.
12309         (grubof_symlist.c): Renamed from this...
12310         (kernel_elf_symlist.c): ...to this.  Updated all users.
12311         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12312         (grubof_SOURCES): Renamed from this...
12313         (kernel_elf_SOURCES): ...to this.
12314         (grubof_HEADERS): Renamed from this...
12315         (kernel_elf_HEADERS): ...to this.
12316         (grubof_CFLAGS): Renamed from this...
12317         (kernel_elf_CFLAGS): ...to this.
12318         (grubof_ASFLAGS): Renamed from this...
12319         (kernel_elf_ASFLAGS): ...to this.
12320         (grubof_LDFLAGS): Renamed from this...
12321         (kernel_elf_LDFLAGS): ...to this.
12323         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12324         `kernel.elf' instead of `grubof'.
12326 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
12328         Add --with-platform to configure. Use pkglibdir instead of
12329         pkgdatadir. This is reported by Roger Leigh.
12331         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12332         (host_vendor): Likewise.
12333         (host_os): Likewise.
12334         (pkgdatadir): Likewise.
12335         (platform): New variable.
12336         (pkglibdir): Likewise.
12337         Use PKGLIBDIR instead of PKGDATADIR.
12339         * util/i386/pc/grub-install.in (datadir): Removed.
12340         (host_vendor): Likewise.
12341         (host_os): Likewise.
12342         (pkgdatadir): Likewise.
12343         (platform): New variable.
12344         (pkglibdir): Likewise.
12345         Use PKGLIBDIR instead of PKGDATADIR.
12347         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12348         instead of GRUB_DATADIR.
12349         (main): Likewise.
12350         * util/i386/pc/grub-mkimage.c (usage): Likewise.
12351         (main): Likewise.
12352         * util/i386/efi/grub-mkimage.c (usage): Likewise.
12353         (main): Likewise.
12355         * configure.ac (--with-platform): New option.
12356         Use PLATFORM instead of HOST_VENDOR to specify a platform.
12358         * Makefile.in: Include a makefile based on PLATFORM instead of
12359         HOST_VENDOR.
12360         (pkgdatadir): Not appended by the machine type.
12361         (pkglibdir): Appended by the machine type.
12362         (host_vendor): Removed.
12363         (platform): New variable.
12364         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12365         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12366         (uninstall): Likewise.
12368 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
12370         Use the environment context in the menu. Remove the commands
12371         "default" and "timeout", and use variables instead.
12373         * normal/menu.c: Include grub/env.h.
12374         (print_entry): Cast TITLE to silence gcc.
12375         (get_timeout): New function.
12376         (set_timeout): Likewise.
12377         (get_entry_number): Likewise.
12378         (run_menu): Use a default entry, a fallback entry and a timeout
12379         in the environment variables "default", "fallback" and
12380         "timeout". Also, tweak the default entry if it is not within the
12381         current menu entries.
12382         (grub_menu_run): Use a fallback entry in the environment variable
12383         "fallback".
12385         * normal/main.c (read_config_file): Do not initialize
12386         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12387         NEWMENU->TIMEOUT.
12388         (grub_normal_execute): Use a data slot to store the menu.
12390         * include/grub/normal.h (struct grub_menu): Removed default_entry,
12391         fallback_entry and timeout.
12392         (struct grub_menu_list): Removed.
12393         (grub_menu_list_t): Likewise.
12394         (struct grub_context): Likewise.
12395         (grub_context_t): Likewise.
12396         (grub_context_get): Likewise.
12397         (grub_context_get_current_menu): Likewise.
12398         (grub_context_push_menu): Likewise.
12399         (grub_context_pop_menu): Likewise.
12400         (grub_default_init): Likewise.
12401         (grub_default_fini): Likewise.
12402         (grub_timeout_init): Likewise.
12403         (grub_timeout_fini): Likewise.
12405         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12406         and timeout.mod.
12407         (normal_mod_SOURCES): Removed normal/context.c.
12409         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12410         commands/default.c, commands/timeout.c and normal/context.c.
12411         (normal_mod_SOURCES): Removed normal/context.c.
12413         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12414         commands/timeout.c and normal/context.c.
12415         (normal_mod_SOURCES): Removed normal/context.c.
12417         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12418         commands/default.c, commands/timeout.c and normal/context.c.
12419         (normal_mod_SOURCES): Removed normal/context.c.
12421         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12422         timeout.mod.
12423         (default_mod_SOURCES): Removed.
12424         (default_mod_CFLAGS): Likewise.
12425         (default_mod_LDFLAGS): Likewise.
12426         (timeout_mod_SOURCES): Removed.
12427         (timeout_mod_CFLAGS): Likewise.
12428         (timeout_mod_LDFLAGS): Likewise.
12430         * DISTLIST: Removed commands/default.c, commands/timeout.c and
12431         normal/context.c.
12433         * commands/default.c: Removed.
12434         * commands/timeout.c: Likewise.
12435         * normal/context.c: Likewise.
12437 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
12439         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12441 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
12443         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12444         "next" to "prev" for readability.
12445         (struct grub_env_sorted_var): New struct.
12446         (grub_env_context): Renamed to ...
12447         (initial_context): ... this.
12448         (grub_env_var_context): Renamed to ...
12449         (current_context): ... this.
12450         (grub_env_find): Look only at CURRENT_CONTEXT.
12451         (grub_env_context_open): Rewritten to copy exported variables from
12452         previous context.
12453         (grub_env_context_close): Rewritten according to the new
12454         scheme. Also, add an assertion to prevent the initial context from
12455         removed.
12456         (grub_env_insert): Removed the code for the sorted list.
12457         (grub_env_remove): Likewise.
12458         (grub_env_export): Simply mark the variable with
12459         GRUB_ENV_VAR_GLOBAL.
12460         (grub_env_set): A cosmetic change for naming consistency.
12461         (grub_env_get): Likewise.
12462         (grub_env_unset): Likewise.
12463         (grub_env_iterate): Rewritten to sort variables within this
12464         function.
12465         (grub_register_variable_hook): Fixed for naming consistency. Call
12466         grub_env_find again, only if NAME is not found at the first time.
12467         (mangle_data_slot_name): New function.
12468         (grub_env_set_data_slot): Likewise.
12469         (grub_env_get_data_slot): Likewise.
12470         (grub_env_unset_data_slot): Likewise.
12472         * include/grub/env.h (grub_env_var_type): New enum.
12473         (GRUB_ENV_VAR_LOCAL): New constant.
12474         (GRUB_ENV_VAR_GLOBAL): Likewise.
12475         (GRUB_ENV_VAR_DATA): Likewise.
12476         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12477         "type".
12478         (grub_env_set): Replace VAR with NAME for consistency.
12479         (grub_register_variable_hook): Likewise.
12480         (grub_env_export): Specify the name of the argument.
12481         (grub_env_set_data_slot): New prototype.
12482         (grub_env_get_data_slot): Likewise.
12483         (grub_env_unset_data_slot): Likewise.
12485 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12487         Extend the loader so that GRUB can accept a loader which comes
12488         back to GRUB when a loaded image exits. Also, this change adds
12489         support for a chainloader on EFI.
12491         * term/efi/console.c: Include grub/misc.h.
12492         (grub_console_checkkey): Display a scan code on the top for
12493         debugging. This will be removed once the EFI port gets stable.
12494         Correct the scan code mapping.
12496         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12497         allocate memory from larger regions, in order to reduce the number
12498         of allocated regions. Otherwise, the MacOSX loader panics.
12499         (filter_memory_map): Avoid less than 1MB for compatibility with
12500         other loaders.
12501         (add_memory_regions): Allocate from the tail of a region, if
12502         possible, to avoid allocating a region near to 1MB, for the MacOSX
12503         loader.
12505         * kern/efi/init.c (grub_efi_set_prefix): Specify
12506         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12508         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12509         argument IMAGE_HANDLE and specify it to get a loaded image.
12510         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12511         grub_efi_get_loaded_image.
12512         (grub_efi_get_filename): Divide the length by the size of
12513         grub_efi_char16_t.
12514         (grub_efi_get_device_path): New function.
12515         (grub_efi_print_device_path): Print End Device Path nodes. Divide
12516         the length by the size of grub_efi_char16_t for a file path device
12517         path node.
12519         * kern/loader.c (grub_loader_noreturn): New variable.
12520         (grub_loader_set): Accept a new argument NORETURN. Set
12521         GRUB_LOADER_NORETURN to NORETURN.
12522         All callers changed.
12523         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12524         grub_machine_fini.
12526         * include/grub/efi/efi.h (grub_efi_get_device_path): New
12527         prototype.
12528         (grub_efi_get_loaded_image): Take an argument to specify an image
12529         handle.
12531         * include/grub/loader.h (grub_loader_set): Added one more argument
12532         NORETURN.
12534         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12535         instead of grub_efi_open_protocol.
12536         (grub_efidisk_get_device_name): Likewise.
12537         (grub_efidisk_close): Print a newline.
12538         (grub_efidisk_get_device_handle): Fixed to use
12539         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12540         GRUB_EFI_DEVICE_PATH_TYPE.
12542         * disk/efi/efidisk.c (device_path_guid): Moved to ...
12543         * kern/efi/efi.c (device_path_guid): ... here.
12545         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12546         chain.mod.
12547         (kernel_mod_HEADERS): Added efi/disk.h.
12548         (_chain_mod_SOURCES): New variable.
12549         (_chain_mod_CFLAGS): Likewise.
12550         (_chain_mod_LDFLAGS): Likewise.
12551         (chain_mod_SOURCES): Likewise.
12552         (chain_mod_CFLAGS): Likewise.
12553         (chain_mod_LDFLAGS): Likewise.
12555         * DISTLIST: Added include/grub/efi/chainloader.h,
12556         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12558         * include/grub/efi/chainloader.h: New file.
12559         * loader/efi/chainloader.c: Likewise.
12560         * loader/efi/chainloader_normal.c: Likewise.
12562 2006-04-30  Marco Gerards  <marco@gnu.org>
12564         * commands/configfile.c (grub_cmd_source): New function.
12565         (GRUB_MOD_INIT): Register the commands `source' and `.'.
12566         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12568 2006-04-30  Marco Gerards  <marco@gnu.org>
12570         * normal/execute.c (grub_script_execute_cmd): Change the return
12571         type to `grub_err_t'.  Correctly return the error.
12572         (grub_script_execute_cmdline): In case a command line is not a
12573         command or a function, try to interpret it as an assignment.
12575 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12577         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12578         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12579         skip a node whose name is obviously invalid as UTF-16,
12580         i.e. contains a NUL character. Stop the iteration when the last
12581         directory entry is found. Instead of using the return value of
12582         grub_hfsplus_btree_iterate_node, store the value in RET and use
12583         it, because the iterator can be stopped by the last directory
12584         entry.
12586 2006-04-30  Marco Gerards  <marco@gnu.org>
12588         * include/grub/env.h (grub_env_export): New prototype.  Reported
12589         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12591 2006-04-30  Marco Gerards  <marco@gnu.org>
12593         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12594         size of the extents in a catalog file record.
12596 2006-04-29  Marco Gerards  <marco@gnu.org>
12598         * commands/configfile.c (grub_cmd_configfile): Execute the
12599         configfile within its own context.
12601         * include/grub/env.h (grub_env_context_open): New prototype.
12602         (grub_env_context_close): Likewise.
12604         * kern/env.c (grub_env): Removed.
12605         (grub_env_sorted): Likewise.
12606         (grub_env_context): New variable.
12607         (grub_env_var_context): Likewise.
12608         (grub_env_find): Search both the active context and the global
12609         context.
12610         (grub_env_context_open): New function.
12611         (grub_env_context_close): Likewise.
12612         (grub_env_insert): Likewise.
12613         (grub_env_remove): Likewise.
12614         (grub_env_export): Likewise.
12615         (grub_env_set): Changed to use helper functions to avoid code
12616         duplication.
12617         (grub_env_iterate): Rewritten so both the current context and the
12618         global context are being used.
12620         * normal/command.c (export_command): New function.
12621         (grub_command_init): Register the `export' function.
12623 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
12625         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12626         explicitly to suppress gcc's warnings.
12627         * fs/fat.c (grub_fat_find_dir): Likewise.
12628         (grub_fat_label): Likewise.
12629         * fs/xfs.c (grub_xfs_read_inode): Likewise.
12630         (grub_xfs_mount): Likewise.
12631         (grub_xfs_label): Likewise.
12632         * fs/affs.c (grub_affs_mount): Likewise.
12633         (grub_affs_label): Likewise.
12634         (grub_affs_iterate_dir): Likewise.
12635         * fs/sfs.c (grub_sfs_mount): Likewise.
12636         (grub_sfs_iterate_dir): Likewise.
12637         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12638         * fs/hfs.c (grub_hfs_mount): Likewise.
12639         (grub_hfs_cmp_catkeys): Likewise.
12640         (grub_hfs_find_dir): Likewise.
12641         (grub_hfs_dir): Likewise.
12642         (grub_hfs_label): Likewise.
12643         * fs/jfs.c (grub_jfs_mount): Likewise.
12644         (grub_jfs_opendir): Likewise.
12645         (grub_jfs_getent): Likewise.
12646         (grub_jfs_lookup_symlink): Likewise.
12647         (grub_jfs_label): Likewise.
12648         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12649         (grub_hfsplus_iterate_dir): Likewise.
12650         (grub_hfsplus_btree_iterate_node): Made static.
12652         * util/grub-emu.c (prefix): New variable.
12653         (grub_machine_set_prefix): New function.
12654         (main): Do not set the environment variable "prefix" here. Only
12655         set PREFIX, which is used later by grub_machine_set_prefix.
12657         * include/grub/video.h: Do not include grub/symbol.h.
12658         (grub_video_register): Not exported. This symbol is not defined in
12659         the kernel.
12660         (grub_video_unregister): Likewise.
12661         (grub_video_iterate): Likewise.
12662         (grub_video_setup): Likewise.
12663         (grub_video_restore): Likewise.
12664         (grub_video_get_info): Likewise.
12665         (grub_video_get_blit_format): Likewise.
12666         (grub_video_set_palette): Likewise.
12667         (grub_video_get_palette): Likewise.
12668         (grub_video_set_viewport): Likewise.
12669         (grub_video_get_viewport): Likewise.
12670         (grub_video_map_color): Likewise.
12671         (grub_video_map_rgb): Likewise.
12672         (grub_video_map_rgba): Likewise.
12673         (grub_video_fill_rect): Likewise.
12674         (grub_video_blit_glyph): Likewise.
12675         (grub_video_blit_bitmap): Likewise.
12676         (grub_video_blit_render_target): Likewise.
12677         (grub_video_scroll): Likewise.
12678         (grub_video_swap_buffers): Likewise.
12679         (grub_video_create_render_target): Likewise.
12680         (grub_video_delete_render_target): Likewise.
12681         (grub_video_set_active_render_target): Likewise.
12683         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12684         Undefined.
12685         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12687         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12688         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12689         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12690         instead of $(srcdir)/genkernsyms.sh.
12692         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12693         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12694         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12695         instead of $(srcdir)/genkernsyms.sh.
12697         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12698         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12699         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12700         instead of $(srcdir)/genkernsyms.sh.
12702         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12703         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12704         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12705         instead of $(srcdir)/genkernsyms.sh.
12707         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12708         genkernsyms.sh.
12710         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12711         genkernsyms.sh.
12712         (gensymlist.sh): New target.
12713         (genkernsyms.sh): Likewise.
12715         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12716         genkernsyms.sh.in and gensymlist.sh.in.
12718         * genkernsyms.sh: Removed.
12719         * gensymlist.sh: Likewise.
12721         * genkernsyms.sh.in: New file.
12722         * gensymlist.sh.in: Likewise.
12724 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12726         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12727         clobber "prefix", since we may have already set it manually.
12729 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12731         * kern/misc.c (abort): New alias for grub_abort.
12733 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
12735         A new machine-specific function "grub_machine_set_prefix" is
12736         defined. This is called after loading modules, so that a prefix
12737         initialization can use modules. Also, this change adds an
12738         intensive debugging feature for the memory manager via the
12739         configure option "--enable-mm-debug".
12741         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12742         PART.LEN.
12744         * kern/sparc64/ieee1275/init.c (abort): Removed.
12745         (grub_stop): Likewise.
12746         (grub_exit): New function.
12747         (grub_set_prefix): Renamed to ...
12748         (grub_machine_set_prefix): ... this.
12749         (grub_machine_init): Do not call grub_set_prefix.
12751         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12752         (grub_machine_set_prefix): ... this.
12753         (grub_machine_init): Do not call grub_set_prefix.
12755         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12756         (grub_machine_init): Do not set the prefix here.
12758         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12760         * kern/efi/init.c: Include grub/mm.h.
12761         (grub_efi_set_prefix): New function.
12763         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12764         (grub_efi_get_filename): New function.
12765         (grub_print_device_path): Renamed to ...
12766         (grub_efi_print_device_path): ... this.
12768         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12769         [MM_DEBUG] (grub_realloc): Likewise.
12770         [MM_DEBUG] (grub_free): Likewise.
12771         [MM_DEBUG] (grub_memalign): Likewise.
12772         [MM_DEBUG] (grub_mm_debug): New variable.
12773         [MM_DEBUG] (grub_debug_malloc): New function.
12774         [MM_DEBUG] (grub_debug_free): New function.
12775         [MM_DEBUG] (grub_debug_realloc): New function.
12776         [MM_DEBUG] (grub_debug_memalign): New function.
12778         * kern/misc.c (grub_abort): Print a newline to distinguish
12779         the message.
12781         * kern/main.c (grub_main): Call grub_machine_set_prefix and
12782         grub_set_root_dev after loading modules. This is necessary when
12783         setting a prefix depends on modules.
12785         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12786         (grub_efi_print_device_path): ... this.
12787         (grub_efi_get_filename): New prototype.
12788         (grub_efi_set_prefix): Likewise.
12790         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12791         and grub/disk.h.
12792         (grub_efidisk_get_device_handle): New prototype.
12793         (grub_efidisk_get_device_name): Likewise.
12795         * include/grub/mm.h: Include config.h.
12796         (MM_DEBUG): Removed.
12797         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12798         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12799         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12800         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12801         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12802         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12803         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12804         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12805         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12807         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12809         * disk/efi/efidisk.c: Include grub/partition.h.
12810         (iterate_child_devices): New function.
12811         (add_device): First, compare only last device path nodes, so that
12812         devices are sorted by the types.
12813         (grub_efidisk_get_device_handle): New function.
12814         (grub_efidisk_get_device_name): Likewise.
12816         * configure.ac (--enable-mm-debug): New option to enable the
12817         memory manager debugging feature. This makes the binary much
12818         bigger, so is disabled by default.
12820 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
12822         Use grub_abort instead of grub_stop, and grub_exit must be
12823         define in each architecture now. Also, this change adds support
12824         for EFI disks.
12826         * util/i386/pc/grub-probefs.c: Include grub/term.h.
12827         (grub_getkey): New function.
12828         (grub_term_get_current): Likewise.
12830         * util/i386/pc/grub-setup.c: Include grub/term.h.
12831         (grub_getkey): New function.
12832         (grub_term_get_current): Likewise.
12834         * util/misc.c (grub_stop): Renamed to ...
12835         (grub_exit): ... this.
12837         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12838         (grub_exit): ... this.
12839         (grub_machine_init): Use grub_abort instead of abort.
12840         (grub_stop): Removed.
12842         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12843         abort.
12845         * kern/i386/pc/startup.S (grub_exit): New function.
12846         (cold_reboot): New label.
12848         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12849         (grub_efi_init): Call grub_efidisk_init.
12850         (grub_efi_fini): Call grub_efidisk_fini.
12852         * kern/efi/efi.c: Include grub/mm.h.
12853         (grub_efi_console_control_guid): Renamed to ...
12854         (console_control_guid): ... this.
12855         (grub_efi_loaded_image_guid): Renamed to ...
12856         (loaded_image_guid): ... this.
12857         (grub_efi_locate_handle): New function.
12858         (grub_efi_open_protocol): Likewise.
12859         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12860         GRUB_EFI_CONSOLE_CONTROL_GUID.
12861         (grub_efi_exit): Removed.
12862         (grub_stop): Likewise.
12863         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12864         (grub_exit): New function.
12865         (grub_print_device_path): Likewise.
12867         * kern/rescue.c (grub_rescue_cmd_exit): New function.
12868         (grub_enter_rescue_mode): Register "exit".
12870         * kern/misc.c (grub_real_dprintf): A cosmetic change.
12871         (grub_abort): New function.
12873         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12875         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12877         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12879         * include/grub/efi/efi.h (grub_efi_exit): Removed.
12880         (grub_print_device_path): New prototype.
12881         (grub_efi_locate_handle): Likewise.
12882         (grub_efi_open_protocol): Likewise.
12884         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12885         * disk/efi/efidisk.c: Likewise.
12887         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12889         * include/grub/efi/console_control.h
12890         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12892         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12893         last 8 bytes as an array.
12894         (GRUB_EFI_DISK_IO_GUID): New macro.
12895         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12896         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12897         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12898         grub_uint8_t.
12899         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12900         (struct grub_efi_device_path): Rename the member "sub_type" to
12901         "subtype".
12902         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12903         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12904         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12905         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12906         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12907         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12908         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12909         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12910         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12911         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12912         (struct grub_efi_pci_device_path): New structure.
12913         (grub_efi_pci_device_path_t): New type.
12914         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12915         (struct grub_efi_pccard_device_path): New structure.
12916         (grub_efi_pccard_device_path_t): New type.
12917         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12918         (struct grub_efi_memory_mapped_device_path): New structure.
12919         (grub_efi_memory_mapped_device_path_t): New type.
12920         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12921         (struct grub_efi_vendor_device_path): New structure.
12922         (grub_efi_vendor_device_path_t): New type.
12923         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12924         (struct grub_efi_controller_device_path): New structure.
12925         (grub_efi_controller_device_path_t): New type.
12926         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12927         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12928         (struct grub_efi_acpi_device_path): New structure.
12929         (grub_efi_acpi_device_path_t): New type.
12930         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12931         (struct grub_efi_expanded_acpi_device_path): New structure.
12932         (grub_efi_expanded_acpi_device_path_t): New type.
12933         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12934         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12935         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12936         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12937         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12938         (struct grub_efi_atapi_device_path): New structure.
12939         (grub_efi_atapi_device_path_t): New type.
12940         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12941         (struct grub_efi_fibre_channel_device_path): New structure.
12942         (grub_efi_fibre_channel_device_path_t): New type.
12943         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12944         (struct grub_efi_1394_device_path): New structure.
12945         (grub_efi_1394_device_path_t): New type.
12946         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12947         (struct grub_efi_usb_device_path): New structure.
12948         (grub_efi_usb_device_path_t): New type.
12949         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12950         (struct grub_efi_usb_class_device_path): New structure.
12951         (grub_efi_usb_class_device_path_t): New type.
12952         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12953         (struct grub_efi_i2o_device_path): New structure.
12954         (grub_efi_i2o_device_path_t): New type.
12955         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12956         (struct grub_efi_mac_address_device_path): New structure.
12957         (grub_efi_mac_address_device_path_t): New type.
12958         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12959         (struct grub_efi_ipv4_device_path): New structure.
12960         (grub_efi_ipv4_device_path_t): New type.
12961         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12962         (struct grub_efi_ipv6_device_path): New structure.
12963         (grub_efi_ipv6_device_path_t): New type.
12964         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12965         (struct grub_efi_infiniband_device_path): New structure.
12966         (grub_efi_infiniband_device_path_t): New type.
12967         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12968         (struct grub_efi_uart_device_path): New structure.
12969         (grub_efi_uart_device_path_t): New type.
12970         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12971         (struct grub_efi_vendor_messaging_device_path): New structure.
12972         (grub_efi_vendor_messaging_device_path_t): New type.
12973         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12974         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12975         (struct grub_efi_hard_drive_device_path): New structure.
12976         (grub_efi_hard_drive_device_path_t): New type.
12977         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12978         (struct grub_efi_cdrom_device_path): New structure.
12979         (grub_efi_cdrom_device_path_t): New type.
12980         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12981         (struct grub_efi_vendor_media_device_path): New structure.
12982         (grub_efi_vendor_media_device_path_t): New type.
12983         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12984         (struct grub_efi_file_path_device_path): New structure.
12985         (grub_efi_file_path_device_path_t): New type.
12986         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12987         (struct grub_efi_protocol_device_path): New structure.
12988         (grub_efi_protocol_device_path_t): New type.
12989         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12990         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12991         (struct grub_efi_bios_device_path): New structure.
12992         (grub_efi_bios_device_path_t): New type.
12993         (struct grub_efi_disk_io): New structure.
12994         (grub_efi_disk_io_t): New type.
12995         (struct grub_efi_block_io_media): New structure.
12996         (grub_efi_block_io_media_t): New type.
12997         (struct grub_efi_block_io): New structure.
12998         (grub_efi_block_io_t): New type.
13000         * include/grub/misc.h (grub_stop): Removed.
13001         (grub_exit): New prototype.
13002         (grub_abort): Likewise.
13004         * include/grub/disk.h (enum grub_disk_dev_id): Added
13005         GRUB_DISK_DEVICE_EFIDISK_ID.
13007         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13008         disk/efi/efidisk.c.
13009         (kernel_syms.lst): Remove the target if an error occurs.
13011 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
13013         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13014         as it was simply too buggy.
13016 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
13018         * kern/misc.c (grub_lltoa): New function.
13019         (grub_vsprintf): Added support for the long long suffix,
13020         i.e. "ll".
13022 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
13024         * Makefile.in (LDFLAGS): Add variable.
13025         (LD): Remove variable.
13026         * configure.ac: Add -m32 to LDFLAGS.
13027         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13028         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13029         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13030         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13031         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13032         variables.
13033         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13034         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13035         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13037 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
13039         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13040         length for unknown glyph.
13042 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13044         Add support for pre-loaded modules into the EFI port.
13046         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13047         completely. Accept one more argument DIR. The caller has changed.
13049         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13051         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13052         (grub_efi_loaded_image_guid): New variable.
13053         (grub_efi_get_loaded_image): New function.
13054         (grub_arch_modules_addr): Likewise.
13056         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13057         prototype.
13059         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13060         (struct grub_efi_loaded_image): New structure.
13061         (grub_efi_loaded_image_t): New type.
13063 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13065         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13066         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13067         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13069 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
13071         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13073 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
13075         * DISTLIST: Added include/grub/efi/console.h,
13076         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13077         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13079         * include/grub/efi/console.h: New file.
13080         * include/grub/efi/time.h: Likewise.
13081         * include/grub/i386/efi/kernel.h: Likewise.
13082         * kern/efi/init.c: Likewise.
13083         * kern/efi/mm.c: Likewise.
13084         * term/efi/console.c: Likewise.
13086         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13087         (grub_stop): Removed.
13088         (grub_get_rtc): Likewise.
13089         (grub_machine_init): Simply call grub_efi_init.
13090         (grub_machine_fini): Call grub_efi_fini.
13092         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13093         (grub_efi_output_string): Removed.
13094         (grub_efi_stall): New function.
13095         (grub_stop): Likewise.
13096         (grub_get_rtc): Likewise.
13098         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13099         (grub_efi_stall): New prototype.
13100         (grub_efi_allocate_pages): Likewise.
13101         (grub_efi_free_pages): Likewise.
13102         (grub_efi_get_memory_map): Likewise.
13103         (grub_efi_mm_init): Likewise.
13104         (grub_efi_mm_fini): Likewise.
13105         (grub_efi_init): Likewise.
13106         (grub_efi_fini): Likewise.
13108         * include/grub/i386/efi/time.h: Do not include
13109         grub/symbol.h. Include grub/efi/time.h.
13110         (GRUB_TICKS_PER_SECOND): Removed.
13111         (grub_get_rtc): Likewise.
13113         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13114         Added padding. The EFI spec is buggy.
13115         (GRUB_EFI_BLACK): New macro.
13116         (GRUB_EFI_BLUE): Likewise.
13117         (GRUB_EFI_GREEN): Likewise.
13118         (GRUB_EFI_CYAN): Likewise.
13119         (GRUB_EFI_RED): Likewise.
13120         (GRUB_EFI_MAGENTA): Likewise.
13121         (GRUB_EFI_BROWN): Likewise.
13122         (GRUB_EFI_LIGHTGRAY): Likewise.
13123         (GRUB_EFI_BRIGHT): Likewise.
13124         (GRUB_EFI_DARKGRAY): Likewise.
13125         (GRUB_EFI_LIGHTBLUE): Likewise.
13126         (GRUB_EFI_LIGHTGREEN): Likewise.
13127         (GRUB_EFI_LIGHTCYAN): Likewise.
13128         (GRUB_EFI_LIGHTRED): Likewise.
13129         (GRUB_EFI_LIGHTMAGENTA): Likewise.
13130         (GRUB_EFI_YELLOW): Likewise.
13131         (GRUB_EFI_WHITE): Likewise.
13132         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13133         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13134         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13135         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13136         (GRUB_EFI_BACKGROUND_RED): Likewise.
13137         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13138         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13139         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13140         (GRUB_EFI_TEXT_ATTR): Likewise.
13142         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13143         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13144         (kernel_mod_HEADERS): Added efi/time.h.
13146 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
13148         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13149         include/grub/efi/api.h, include/grub/efi/console_control.h,
13150         include/grub/efi/efi.h, include/grub/efi/pe32.h,
13151         include/grub/i386/efi/time.h, kern/efi/efi.c,
13152         kern/i386/efi/init.c, kern/i386/efi/startup.S,
13153         and util/i386/efi/grub-mkimage.c.
13155         * Makefile.in (RMKFILES): Added i386-efi.rmk.
13157         * genmk.rb (PModule#rule): Do not export symbols if
13158         #{prefix}_EXPORTS is set to "no".
13160         * conf/i386-efi.mk: New file.
13161         * conf/i386-efi.rmk: Likewise.
13162         * include/grub/efi/api.h: Likewise.
13163         * include/grub/efi/console_control.h: Likewise.
13164         * include/grub/efi/efi.h: Likewise.
13165         * include/grub/efi/pe32.h: Likewise.
13166         * include/grub/i386/efi/time.h: Likewise.
13167         * kern/efi/efi.c: Likewise.
13168         * kern/i386/efi/init.c: Likewise.
13169         * kern/i386/efi/startup.S: Likewise.
13170         * util/i386/efi/grub-mkimage.c: Likewise.
13172 2006-04-17  Marco Gerards  <marco@gnu.org>
13174         * include/grub/script.h: Include <grub/parser.h> and
13175         "grub_script.tab.h".
13176         (struct grub_lexer_param): New struct.
13177         (struct grub_parser_param): Likewise.
13178         (grub_script_create_arglist): Pass the state in an argument.
13179         (grub_script_add_arglist): Likewise.
13180         (grub_script_create_cmdline): Likewise.
13181         (grub_script_create_cmdblock): Likewise.
13182         (grub_script_create_cmdif): Likewise.
13183         (grub_script_create_cmdmenu): Likewise.
13184         (grub_script_add_cmd): Likewise.
13185         (grub_script_arg_add): Likewise.
13186         (grub_script_lexer_ref): Likewise.
13187         (grub_script_lexer_deref): Likewise.
13188         (grub_script_lexer_record_start): Likewise.
13189         (grub_script_lexer_record_stop): Likewise.
13190         (grub_script_mem_record): Likewise.
13191         (grub_script_mem_record_stop): Likewise.
13192         (grub_script_malloc): Likewise.
13193         (grub_script_yylex): Likewise.
13194         (grub_script_yyparse): Likewise.
13195         (grub_script_yyerror): Likewise.
13196         (grub_script_yylex): Likewise.
13197         (grub_script_lexer_init): Return the state.
13199         * normal/lexer.c (grub_script_lexer_state): Removed variable.
13200         (grub_script_lexer_done): Likewise.
13201         (grub_script_lexer_getline): Likewise.
13202         (grub_script_lexer_refs): Likewise.
13203         (script): Likewise.
13204         (newscript): Likewise.
13205         (record): Likewise.
13206         (recording): Likewise.
13207         (recordpos): Likewise.
13208         (recordlen): Likewise.
13209         (grub_script_lexer_init): Return the state instead of setting
13210         global variables.
13211         (grub_script_lexer_ref): Use the newly added argument for state
13212         instead of globals.
13213         (grub_script_lexer_deref): Likewise.
13214         (grub_script_lexer_record_start): Likewise.
13215         (grub_script_lexer_record_stop): Likewise.
13216         (recordchar): Likewise.
13217         (nextchar): Likewise.
13218         (grub_script_yylex2): Likewise.
13219         (grub_script_yylex): Likewise.
13220         (grub_script_yyerror): Likewise.
13222         * normal/parser.y (func_mem): Removed variable.
13223         (menu_entry): Likewise.
13224         (err): Likewise.
13225         (%lex-param): New parser option.
13226         (%parse-param): Likewise.
13227         (script): Always return the AST.
13228         (argument): Pass the state around.
13229         (arguments): Likewise.
13230         (grubcmd): Likewise.
13231         (commands): Likewise.
13232         (function): Likewise.
13233         (menuentry): Likewise.
13234         (if_statement): Likewise.
13235         (if): Likewise.
13237         * normal/script.c (grub_script_memused): Removed variable.
13238         (grub_script_parsed): Likewise.
13239         (grub_script_malloc): Added a state argument.  Use that instead of
13240         global variables.
13241         (grub_script_mem_record): Likewise.
13242         (grub_script_mem_record_stop): Likewise.
13243         (grub_script_arg_add): Likewise.
13244         (grub_script_add_arglist): Likewise.
13245         (grub_script_create_cmdline): Likewise.
13246         (grub_script_create_cmdif): Likewise.
13247         (grub_script_create_cmdmenu): Likewise.
13248         (grub_script_add_cmd): Likewise.
13249         (grub_script_parse): Setup the state before calling the parser.
13251 2006-04-16  Marco Gerards  <marco@gnu.org>
13253         * normal/command.c (grub_command_init): Remove the title command.
13255         * normal/lexer.c (grub_script_yylex): Renamed from this...
13256         (grub_script_yylex2): ... to this.
13257         (grub_script_yylex): New function.  Temporary
13258         introduced to filter some tokens.
13259         (grub_script_yyerror): Print a newline.
13261         * normal/main.c (read_config_file): Output information about the
13262         lines that contain errors.  Wait for a key after all lines have
13263         been processed.  Don't return an empty menu.
13265         * normal/parser.y (func_mem): Don't initialize.
13266         (menu_entry): Likewise.
13267         (err): New variable.
13268         (script): Don't return anything when an error was encountered.
13269         (ws, returns): Removed rules.
13270         (argument): Disabled concatenated variable support.
13271         (arguments): Remove explicit separators.
13272         (grubcmd): Likewise.
13273         (function): Likewise.
13274         (menuentry): Likewise.
13275         (if): Likewise.
13276         (commands): Likewise.  Add error handling.
13278         * normal/script.c (grub_script_create_cmdline): If
13279         `grub_script_parsed' is 0, assume the parser encountered an error.
13281 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
13283         * configure.ac: Add support for EFI. Fix the typo
13284         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13286 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13288         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
13289         foreign multibyte characters should be shown correctly.
13291 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13293         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13294         calculation.
13295         (read_config_file): Made it to close file before returning.
13297 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
13299         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13300         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13301         video/i386/pc/vbefill.c.
13303         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13304         video/i386/pc/vbefill.c.
13306         * include/grub/video.h (grub_video_blit_format): New enum.
13307         (grub_video_mode_info): Added new member blit_format.
13308         (grub_video_get_blit_format): New function prototype.
13310         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13311         function prototype.
13312         (grub_video_vbe_map_rgb): Likewise.
13313         (grub_video_vbe_unmap_color): Likewise.
13315         * include/grub/i386/pc/vbeblit.h: New file.
13317         * include/grub/i386/pc/vbefill.h: New file.
13319         * video/video.c (grub_video_get_blit_format): New function.
13320         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13321         (grub_video_vbe_map_rgb): Likewise.
13322         (grub_video_vbe_unmap_color): Likewise.
13324         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13325         optimized fills.
13326         (grub_video_vbe_blit_render_target): Changed to use more optimized
13327         blits.
13328         (grub_video_vbe_setup): Added detection for optimized settings.
13329         (grub_video_vbe_create_render_target): Likewise.
13331         * video/i386/pc/vbeblit.c: New file.
13333         * video/i386/pc/vbefill.c: New file.
13335 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
13337         * font/manager.c (grub_font_get_glyph): Removed font fixup from
13338         here...
13340         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
13341         parsing to support both hex and dec ranges.  If filename was missing
13342         show usage information.
13344 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
13346         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13347         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
13349         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13350         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
13351         (video_mod_SOURCES): Added.
13352         (video_mod_CFLAGS): Likewise.
13353         (video_mod_LDFLAGS): Likewise.
13354         (gfxterm_mod_SOURCES): Likewise.
13355         (gfxterm_mod_CFLAGS): Likewise.
13356         (gfxterm_mod_LDFLAGS): Likewise.
13357         (videotest_mod_SOURCES): Likewise.
13358         (videotest_mod_CFLAGS): Likewise.
13359         (videotest_mod_LDFLAGS): Likewise.
13360         (vesafb_mod_SOURCES): Removed.
13361         (vesafb_mod_CFLAGS): Likewise.
13362         (vesafb_mod_LDFLAGS): Likewise.
13363         (vga_mod_SOURCES): Likewise.
13364         (vga_mod_CFLAGS): Likewise.
13365         (vga_mod_LDFLAGS): Likewise.
13367         * commands/videotest.c: New file.
13369         * font/manager.c (fill_with_default_glyph): Modified to use
13370         grub_font_glyph.
13371         (grub_font_get_glyph): Likewise.
13372         (fontmanager): Renamed from this...
13373         (font_manager): ... to this.
13375         * include/grub/font.h (grub_font_glyph): Added new structure.
13376         (grub_font_get_glyph): Modified to use grub_font_glyph.
13378         * include/grub/misc.h (grub_abs): Added as inline function.
13380         * include/grub/video.h: New file.
13382         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13383         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13384         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13385         (grub_vbe_get_controller_info): Renamed from this...
13386         (grub_vbe_bios_get_controller_info): ... to this.
13387         (grub_vbe_get_mode_info): Renamed from this...
13388         (grub_vbe_bios_get_mode_info): ... to this.
13389         (grub_vbe_set_mode): Renamed from this...
13390         (grub_vbe_bios_set_mode): ... to this.
13391         (grub_vbe_get_mode): Renamed from this...
13392         (grub_vbe_bios_get_mode): ... to this.
13393         (grub_vbe_set_memory_window): Renamed from this...
13394         (grub_vbe_bios_set_memory_window): ... to this.
13395         (grub_vbe_get_memory_window): Renamed from this...
13396         (grub_vbe_bios_get_memory_window): ... to this.
13397         (grub_vbe_set_scanline_length): Renamed from this...
13398         (grub_vbe_set_scanline_length): ... to this.
13399         (grub_vbe_get_scanline_length): Renamed from this...
13400         (grub_vbe_bios_get_scanline_length): ... to this.
13401         (grub_vbe_set_display_start): Renamed from this...
13402         (grub_vbe_bios_set_display_start): ... to this.
13403         (grub_vbe_get_display_start): Renamed from this...
13404         (grub_vbe_bios_get_display_start): ... to this.
13405         (grub_vbe_set_palette_data): Renamed from this...
13406         (grub_vbe_bios_set_palette_data): ... to this.
13407         (grub_vbe_set_pixel_rgb): Removed.
13408         (grub_vbe_set_pixel_index): Likewise.
13410         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13411         from this...
13412         (grub_vbe_bios_get_controller_info): ... to this.
13413         (grub_vbe_get_mode_info): Renamed from this...
13414         (grub_vbe_bios_get_mode_info): ... to this.
13415         (grub_vbe_set_mode): Renamed from this...
13416         (grub_vbe_bios_set_mode): ... to this.
13417         (grub_vbe_get_mode): Renamed from this...
13418         (grub_vbe_bios_get_mode): ... to this.
13419         (grub_vbe_set_memory_window): Renamed from this...
13420         (grub_vbe_bios_set_memory_window): ... to this.
13421         (grub_vbe_get_memory_window): Renamed from this...
13422         (grub_vbe_bios_get_memory_window): ... to this.
13423         (grub_vbe_set_scanline_length): Renamed from this...
13424         (grub_vbe_set_scanline_length): ... to this.
13425         (grub_vbe_get_scanline_length): Renamed from this...
13426         (grub_vbe_bios_get_scanline_length): ... to this.
13427         (grub_vbe_set_display_start): Renamed from this...
13428         (grub_vbe_bios_set_display_start): ... to this.
13429         (grub_vbe_get_display_start): Renamed from this...
13430         (grub_vbe_bios_get_display_start): ... to this.
13431         (grub_vbe_set_palette_data): Renamed from this...
13432         (grub_vbe_bios_set_palette_data): ... to this.
13433         (grub_vbe_bios_get_controller_info): Fixed problem with registers
13434         getting corrupted after calling it.  Added more pushes and pops.
13435         (grub_vbe_bios_set_mode): Likewise.
13436         (grub_vbe_bios_get_mode): Likewise.
13437         (grub_vbe_bios_get_memory_window): Likewise.
13438         (grub_vbe_bios_set_scanline_length): Likewise.
13439         (grub_vbe_bios_get_scanline_length): Likewise.
13440         (grub_vbe_bios_get_display_start): Likewise.
13441         (grub_vbe_bios_set_palette_data): Likewise.
13443         * normal/cmdline.c (cl_set_pos): Refresh the screen.
13444         (cl_insert): Likewise.
13445         (cl_delete): Likewise.
13447         * term/gfxterm.c: New file.
13449         * term/i386/pc/vesafb.c: Removed file.
13451         * video/video.c: New file.
13453         * video/i386/pc/vbe.c (real2pm): Added new function.
13454         (grub_video_vbe_draw_pixel): Likewise.
13455         (grub_video_vbe_get_video_ptr): Likewise.
13456         (grub_video_vbe_get_pixel): Likewise
13457         (grub_video_vbe_init): Likewise.
13458         (grub_video_vbe_fini): Likewise.
13459         (grub_video_vbe_setup): Likewise.
13460         (grub_video_vbe_get_info): Likewise.
13461         (grub_video_vbe_set_palette): Likewise.
13462         (grub_video_vbe_get_palette): Likewise.
13463         (grub_video_vbe_set_viewport): Likewise.
13464         (grub_video_vbe_get_viewport): Likewise.
13465         (grub_video_vbe_map_color): Likewise.
13466         (grub_video_vbe_map_rgb): Likewise.
13467         (grub_video_vbe_map_rgba): Likewise.
13468         (grub_video_vbe_unmap_color): Likewise.
13469         (grub_video_vbe_fill_rect): Likewise.
13470         (grub_video_vbe_blit_glyph): Likewise.
13471         (grub_video_vbe_blit_bitmap): Likewise.
13472         (grub_video_vbe_blit_render_target): Likewise.
13473         (grub_video_vbe_scroll): Likewise.
13474         (grub_video_vbe_swap_buffers): Likewise.
13475         (grub_video_vbe_create_render_target): Likewise.
13476         (grub_video_vbe_delete_render_target): Likewise.
13477         (grub_video_vbe_set_active_render_target): Likewise.
13478         (grub_vbe_set_pixel_rgb): Remove function.
13479         (grub_vbe_set_pixel_index): Likewise.
13480         (index_color_mode): Remove static variable.
13481         (active_mode): Likewise.
13482         (framebuffer): Likewise.
13483         (bytes_per_scan_line): Likewise.
13484         (grub_video_vbe_adapter): Added new static variable.
13485         (framebuffer): Likewise.
13486         (render_target): Likewise.
13487         (initial_mode): Likewise.
13488         (mode_in_use): Likewise.
13489         (mode_list): Likewise.
13491 2006-03-10  Marco Gerards  <marco@gnu.org>
13493         * configure.ac (AC_INIT): Bumped to 1.93.
13495         * DISTLIST: Added `include/grub/hfs.h'.
13497 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
13499         * boot/i386/pc/boot.S (general_error): Before looping, try INT
13500         18H, which might help the BIOS falling back to next boot media.
13502 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
13504         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13505         Poe Chen <poe.poechen@gmail.com>.
13507 2006-01-17  Marco Gerards  <marco@gnu.org>
13509         * include/grub/normal.h: Include <grub/script.h>.
13510         (grub_command_list): Removed struct.
13511         (grub_command_list_t): Removed type.
13512         (grub_menu_entry): Remove members `num' and `command_list'.  Add
13513         members `commands' and `sourcecode'.
13514         * include/grub/script.h: Add inclusion guards.
13515         (grub_script_cmd_menuentry): New struct.
13516         (grub_script_execute_menuentry): New prototype.
13517         (grub_script_lexer_record_start): Likewise.
13518         (grub_script_lexer_record_stop): Likewise.
13519         * normal/execute.c (grub_script_execute_menuentry): New function.
13520         * normal/lexer.c (record, recording, recordpos, recordlen): New
13521         variables.
13522         (grub_script_lexer_record_start): New function.
13523         (grub_script_lexer_record_stop): Likewise.
13524         (recordchar): Likewise.
13525         (nextchar): Likewise.
13526         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
13527         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
13528         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13529         (current_menu): New variable.
13530         (free_menu): Mainly rewritten.
13531         (grub_normal_menu_addentry): New function.
13532         (read_config_file): Rewritten.
13533         * normal/menu.c (run_menu_entry): Mainly rewritten.
13534         * normal/menu_entry.c (make_screen): Rewritten the code to insert
13535         the menu entry.
13536         (run): Mainly rewritten.
13537         * normal/parser.y (menu_entry): New variable.
13538         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13539         (menuentry): New rule.
13540         (command): Add `menuentry'.
13541         (if_statement): Allow additional returns before `fi'.
13542         * normal/script.c (grub_script_create_cmdmenu): New function.
13544 2006-01-03  Marco Gerards  <marco@gnu.org>
13546         * INSTALL: GNU Bison is required.
13547         * configure.ac: Rewritten the test to detect Bison.
13548         * Makefile.in (YACC): New variable.  Reported by Xun Sun
13549         <xun.sun.cn@gmail.com>.
13551 2006-01-03  Marco Gerards  <marco@gnu.org>
13553         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13554         the HFS+ filesystem to filesystem blocks.
13555         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13556         GCC warning is silenced.
13558 2006-01-03  Marco Gerards  <marco@gnu.org>
13560         * partmap/apple.c (apple_partition_map_iterate): Convert the data
13561         read from disk from big endian to host byte order.
13563 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13565         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
13566         documentation.
13567         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13568         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13569         embedded HFS+ filesystem.
13570         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13571         (grub_hfs_sblock): Move from here...
13572         * include/grub/hfs.h: To here...  New file.
13573         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
13574         documentation.
13575         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13576         New macros.
13577         (grub_hfsplus_volheader): Change type of member `magic' to
13578         `grub_uint16_t'.
13579         (grub_hfsplus_data): Add new member `embedded_offset'.
13580         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13581         returned block.
13582         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13583         Calculate the offset.
13585 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13587         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13588         Removed.
13589         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13591 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13593         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13594         ENV->NAME is NULL after allocating ENV->VALUE.
13596 2005-12-25  Marco Gerards  <marco@gnu.org>
13598         * kern/env.c (grub_env_set): Rewritten the error handling code.
13600 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13602         * geninit.sh: Made more robust, and more portable.
13604 2005-12-25  Marco Gerards  <marco@gnu.org>
13606         Add support for Apple HFS+ filesystems.
13608         * fs/hfsplus.c: New file.
13610         * DISTLIST: Added `fs/hfsplus.c'.
13612         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13613         (hfsplus_mod_SOURCES): New variable.
13614         (hfsplus_mod_CFLAGS): Likewise.
13615         (hfsplus_mod_LDFLAGS): Likewise.
13616         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13617         (grub_setup_SOURCES): Likewise.
13618         (grub_mkdevicemap_SOURCES): Likewise.
13619         (grub_emu_SOURCES): Likewise.
13620         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13622         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13624         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13626 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13628         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13629         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13630         include/grub/parser.h, include/grub/script.h, kern/parser.c,
13631         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13632         normal/lexer.c, normal/parser.y, normal/script.c, and
13633         partmap/gpt.c.
13634         Removed kern/sparc64/cache.c.
13636         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13637         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13638         grub_emu_init.c.
13640         * configure.ac (AC_INIT): Bumped to 1.92.
13642 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
13644         * kern/err.c (grub_error_push): Added new function to support error
13645         stacks.
13646         (grub_error_pop): Likewise.
13647         (grub_error_stack_items): New local variable to support error stacks.
13648         (grub_error_stack_pos): Likewise.
13649         (grub_error_stack_assert): Likewise.
13650         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13651         stack depth.
13652         (grub_print_error): Added support to print errors from error stack.
13654         * include/grub/err.h (grub_error_push): Added function prototype.
13655         (grub_error_pop): Likewise.
13657 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
13659         * configure.ac: Accept `powerpc64' as host_cpu.
13660         (amd64): Rename to `biarch32'.
13662         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13663         non-cacheline-aligned addresses.
13665         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13666         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
13667         if `size' is non-zero.
13669 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
13671         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13672         and `cd' to make sure the filename is not prefixed with a
13673         directory name.
13674         (pkgdata_MODULES): Add `gpt.mod'.
13675         (gpt_mod_SOURCES): New variable.
13676         (gpt_mod_CFLAGS): Likewise.
13677         (gpt_mod_LDFLAGS): Likewise.
13679         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13681         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13682         New macro.
13684         * partmap/gpt.c: New file.
13686         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13687         GPT partition map is detected.
13689 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
13691         * commands/i386/pc/play.c: New file.
13692         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13693         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13694         macros.
13696 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
13698         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13699         ((unused))' to silence gcc warning.
13701 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
13703         * configure.ac: Correct `AC_PROG_YACC' test.
13705 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13707         * util/powerpc/ieee1275/grub-install.in: Run the mount point
13708         check before installing files.
13710 2005-11-22  Mike Small  <smallm@panix.com>
13712         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13713         number regex so multidigit numbers are recognized correctly.
13715 2005-11-22  Mike Small  <smallm@panix.com>
13717         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13718         debugging message before attempting to claim memory.
13719         (grub_rescue_cmd_initrd): Add a claim debugging message and try
13720         multiple addresses in case of failure.
13722 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13724         * term/tparm.c (get_space): Remove empty `if' statement.
13726         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13728         * kern/parser.c (check_varstate): Rename `state' to 's'.
13730 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13732         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
13733         variable definitions to the beginning of each function.  Sort stack
13734         variables by size.
13735         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
13736         `buf' argument to `char *'.
13738 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13740         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13741         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13742         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13743         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13744         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13745         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13746         configfile.mod, search.mod, gzio.mod and test.mod.
13747         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13748         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13749         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13750         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13751         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13752         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13753         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13754         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13755         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13756         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13757         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13758         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13759         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13760         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13761         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13762         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13763         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13764         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13765         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13766         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13767         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13768         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13769         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13771         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13772         `grep --include'.
13773         (pkgdata_MODULES): Add test.mod.
13775 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13777         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
13778         appending to variables with "+=".
13779         (PModule): Use full pathname to generate *.lst filenames.
13781         * Makefile.in: Fixed list rules moved from genmk.rb.
13782         (.DELETE_ON_ERROR): New special target.
13783         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13785         * conf/i386-pc.rmk: Include conf/common.mk.
13786         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13787         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13788         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13789         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13790         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13791         configfile.mod, search.mod, gzio.mod and test.mod.
13792         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13793         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13794         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13795         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13796         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13797         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13798         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13799         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13800         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13801         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13802         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13803         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13804         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13805         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13806         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13807         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13808         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13809         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13810         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13811         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13812         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13813         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13814         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13815         here...
13816         * conf/common.rmk: ... to here.  New file.
13818         * conf/common.mk: New file.
13820 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
13822         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13823         (grub_script.tab.c): ... here.
13825         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13826         (grub_script.tab.c): ... here.
13828         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13829         (grub_script.tab.c): ... here.
13831         * normal/command.c (grub_command_find): Fixed a memory leak of
13832         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13834 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13836         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13837         "@" which marks the start of a comment on ARM.
13838         (VARIABLE): Likewise.
13840 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13842         Add support for Linux/ADFS partition tables.
13844         * partmap/acorn.c: New file.
13846         * include/grub/acorn_filecore.h: Likewise.
13848         * DISTLIST: Added `partmap/acorn.c' and
13849         `include/grub/acorn_filecore.h'.
13851         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13852         `partmap/acorn.c'.
13853         (pkgdata_MODULES): Add `acorn.mod'.
13854         (acorn_mod_SOURCES): New variable.
13855         (acorn_mod_CFLAGS): Likewise.
13857         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13858         `partmap/acorn.c'.
13859         (pkgdata_MODULES): Add `acorn.mod'.
13860         (acorn_mod_SOURCES): New variable.
13861         (acorn_mod_CFLAGS): Likewise.
13863         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13864         (pkgdata_MODULES): Add `acorn.mod'.
13865         (acorn_mod_SOURCES): New variable.
13866         (acorn_mod_CFLAGS): Likewise.
13867         (acorn_mod_LDFLAGS): Likewise.
13869         * include/types.h (grub_disk_addr_t): New typedef.
13871 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
13873         * geninit.sh: New file.
13875         * geninitheader.sh: Likewise.
13877         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13878         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13879         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13880         * commands/configfile.c (grub_configfile_init)
13881         (grub_configfile_fini): Likewise.
13882         * commands/default.c (grub_default_init, grub_default_fini):
13883         Likewise.
13884         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13885         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13886         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13887         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13888         Likewise.
13889         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13890         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13891         Likewise.
13892         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13893         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13894         Likewise.
13895         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13896         Likewise.
13897         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13898         Likewise.
13899         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13900         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13901         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13902         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13903         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13904         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13905         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13906         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13907         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13908         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13909         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13910         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13911         * partmap/amiga.c (grub_amiga_partition_map_init)
13912         (grub_amiga_partition_map_fini): Likewise.
13913         * partmap/apple.c (grub_apple_partition_map_init)
13914         (grub_apple_partition_map_fini): Likewise.
13915         * partmap/pc.c (grub_pc_partition_map_init)
13916         (grub_pc_partition_map_fini): Likewise.
13917         * partmap/sun.c (grub_sun_partition_map_init,
13918         grub_sun_partition_map_fini): Likewise.
13919         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13920         Likewise.
13922         * util/grub-emu.c: Include <grub_modules_init.h>.
13923         (main): Don't initialize and de-initialize any modules directly,
13924         use `grub_init_all' and `grub_fini_all' instead.
13926         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13927         `grub_vesafb_mod_init'.
13928         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
13929         all users.
13930         * term/i386/pc/vga.c (grub_vga_init): Renamed to
13931         `grub_vga_mod_init'.  Updated all users.
13932         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13934         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13935         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13936         rules.
13938         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13939         Generate a function to initialize the module in utilities.
13940         Updated all callers.
13941         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
13942         initialize the module in utilities.  Updated all callers.
13944 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13946         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13947         escape sequence and a literal ^L to clear the screen.
13949         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13950         when returning from Open Firmware.
13952 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13954         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13955         (grub_ofconsole_height): Likewise.
13956         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13957         manually insert a '\n'.
13958         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13959         `grub_ofconsole_height'.  Return early if these are already set.
13961 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
13963         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13964         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13965         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13966         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13967         and `normal/script.c'.
13968         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13969         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13970         (test_mod_SOURCES): New variable.
13971         (test_mod_CFLAGS): Likewise.
13972         (test_mod_LDFLAGS): Likewise.
13973         (pkgdata_MODULES): Add `test.mod'.
13974         (grub_script.tab.c): New rule.
13975         (grub_script.tab.h): Likewise.
13977 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
13979         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13980         `commands/test.c', `normal/execute.c', `normal/lexer.c',
13981         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13982         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13983         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13984         (test_mod_SOURCES): New variable.
13985         (test_mod_CFLAGS): Likewise.
13986         (pkgdata_MODULES): Add `test.mod'.
13987         (grub_script.tab.c): New rule.
13988         (grub_script.tab.h): Likewise.
13990 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
13992         Add initial scripting support.
13994         * commands/test.c: New file.
13995         * include/grub/script.h: Likewise.
13996         * normal/execute.c: Likewise.
13997         * normal/function.c: Likewise.
13998         * normal/lexer.c: Likewise.
13999         * normal/parser.y: Likewise.
14000         * normal/script.c: Likewise.
14002         * configure.ac: Add `AC_PROG_YACC' test.
14004         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14005         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14006         `normal/function.c' and `normal/script.c'.
14007         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14008         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14009         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14010         variables.
14011         (pkgdata_MODULES): Add `test.mod'.
14012         (grub_script.tab.c): New rule.
14013         (grub_script.tab.h): Likewise.
14015         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14017         * include/grub/normal.h (grub_test_init): New prototype.
14018         (grub_test_fini): Likewise.
14020         * normal/command.c: Include <grub/script.h>.
14021         (grub_command_execute): Rewritten.
14023         * util/grub-emu.c (main): Call `grub_test_init' and
14024         `grub_test_fini'.
14026 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14028         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14029         to 0.
14030         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14031         there are no pending characters.
14033 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14035         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14036         `grub_strndup' to drop device arguments. Replace unnecessary
14037         `grub_strndup' with `grub_strdup'.
14039 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14041         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14042         `debug' environment variable has been set.
14044 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
14046         * Makefile.in (install-local): Use $(DATA).
14047         (uninstall): Likewise.
14048         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14049         (sbin_UTILITIES): ... to here.
14050         (sbin_SCRIPTS): New variable.
14051         (grub_install_SOURCES): New variable.
14052         * util/powerpc/ieee1275/grub-install.in: New file.
14053         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14054         variable.
14055         (add_segments): Call `grub_util_get_path'.
14057 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
14059         From Timothy Baldwin:
14060         * commands/ls.c (grub_ls_list_files): Close FILE with
14061         grub_file_close.
14062         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14064 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
14066         * include/grub/parser.h: New file.
14068         * kern/parser.c: Likewise.
14070         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14071         (grub_setup_SOURCES): Likewise.
14072         (grub_probefs_SOURCES): Likewise.
14073         (grub_emu_SOURCES): Likewise.
14074         (kernel_img_HEADERS): Add `parser.h'.
14076         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14077         (grub_emu_SOURCES): Add `kern/parser.c'.
14078         (grubof_SOURCES): Likewise.
14080         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14081         (grubof_SOURCES): Add `kern/parser.c'.
14083         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14085         * kern/misc.c (grub_split_cmdline): Removed function.
14087         * kern/rescue.c: Include <grub/parser.h>.
14088         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14089         of `grub_split_cmdline'.
14091         * normal/command.c: Include <grub/parser.h>.
14092         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
14093         of `grub_split_cmdline'.
14095         * normal/completion.c: Include <grub/parser.h>.
14096         (cmdline_state): New variable.
14097         (iterate_dir): End the filename with a quote depending on the
14098         command line state.
14099         (get_state): new function.
14100         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14101         split the arguments and determine the current argument.  When the
14102         argument string is not quoted, escape all spaces.
14104 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14106         * normal/sparc64/setjmp.S: New file.
14108 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14110         * include/grub/sparc64/libgcc.h: New file.
14111         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14112         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14113         normal/sparc64/setjmp.c.
14115 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14117         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14118         * kern/sparc64/cache.S: New file.
14119         * kern/sparc64/cache.c: Removed.
14120         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14121         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
14122         -mtune=ultrasparc.
14123         (COMMON_LDFLAGS): Add -melf64_sparc.
14124         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14125         (grubof_SOURCES): Use cache.S instead of cache.c.
14126         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
14127         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14128         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14129         commented though.
14130         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14131         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14132         (linux_mod_CFLAGS): Commented out.
14133         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14134         out because module isn't built.
14135         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14136         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14137         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14138         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14139         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14140         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14141         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14142         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14143         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14144         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14145         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14146         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14147         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14148         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14150 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
14152         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14153         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14154         longer, because HFS should not be used on PC.
14156 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14158         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14159         consistently within the loop.
14161 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
14163         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14164         directory can not be read.
14166 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14168         * configure.ac (AC_INIT): Increase the version number to 1.91.
14170         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14171         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14172         term/i386/pc/serial.c.
14174 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14176         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14177         file size must be permitted.
14179         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14180         between %ah and %al.
14182 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14184         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14185         grub_uint64_t.
14186         Call the hook with a NUL-terminated filename.
14187         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14188         grub_cpu_to_be32.
14190         * kern/term.c (cursor_state): New variable.
14191         (grub_term_set_current): Reset the cursor state on a new
14192         terminal.
14193         (grub_setcursor): Rewritten to use CURSOR_STATE.
14194         (grub_getcursor): New function.
14196         * include/grub/term.h (grub_getcursor): New prototype.
14198         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14199         integers on ARM. Reported by Timothy Baldwin
14200         <T.E.Baldwin99@members.leeds.ac.uk>.
14202 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
14204         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14205         allocated.
14206         (grub_sfs_dir): Likewise.
14208 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
14210         Add support for the SFS filesystem.
14212         * fs/sfs.c: New file.
14214         * DISTLIST: Added `fs/sfs.c'.
14216         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14217         (grub_probefs_SOURCES): Likewise.
14218         (grub_emu_SOURCES): Likewise.
14219         (pkgdata_MODULES): Add `sfs.mod'.
14220         (sfs_mod_SOURCES): New variable.
14221         (sfs_mod_CFLAGS): Likewise.
14222         (sfs_mod_LDFLAGS): Likewise.
14224         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14225         (pkgdata_MODULES): Add `sfs.mod'.
14226         (sfs_mod_SOURCES): New variable.
14227         (sfs_mod_CFLAGS): Likewise.
14229         * util/grub-emu.c (main): Call `grub_sfs_init' and
14230         `grub_sfs_fini'.
14232         * include/grub/fs.h (grub_sfs_init): New prototype.
14233         (grub_sfs_fini): Likewise.
14235 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
14237         Add support for the AFFS filesystem.
14239         * fs/affs.c: New file.
14241         * DISTLIST: Added `fs/affs.c'.
14243         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14244         (grub_probefs_SOURCES): Likewise.
14245         (grub_emu_SOURCES): Likewise.
14246         (pkgdata_MODULES): Add `affs.mod'.
14247         (affs_mod_SOURCES): New variable.
14248         (affs_mod_CFLAGS): Likewise.
14249         (affs_mod_LDFLAGS): Likewise.
14251         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14252         (pkgdata_MODULES): Add `affs.mod'.
14253         (affs_mod_SOURCES): New variable.
14254         (affs_mod_CFLAGS): Likewise.
14256         * util/grub-emu.c (main): Call `grub_affs_init' and
14257         `grub_affs_fini'.
14259         * include/grub/fs.h (grub_affs_init): New prototype.
14260         (grub_affs_fini): Likewise.
14262 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14264         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14266 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14268         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
14269         `-m32' to CFLAGS.
14271         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14272         linking.
14274         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14275         (COMMON_LDFLAGS): New variable.
14276         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14277         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14278         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14279         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14280         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14281         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14282         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14283         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14284         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14285         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14286         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14287         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14288         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14289         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14290         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14291         variables.
14292         (normal_mod_ASFLAGS): Add `-m32'.
14294         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14295         (grub_host_size_t, grub_host_ssize_t): New types.
14296         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14297         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14298         `GRUB_HOST_SIZEOF_VOID_P'.
14300         * include/grub/kernel.h (struct grub_module_header): Type of
14301         member offset changed to `grub_host_off_t'.  Type of member size
14302         changed to `grub_host_size_t'.
14303         (struct grub_module_info): Type of member offset changed to
14304         `grub_host_off_t'.  Type of member size changed to
14305         `grub_host_size_t'.
14307 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
14309         Make GRUB's kernel compliant to Multiboot Specification.
14311         * kern/i386/pc/startup.S (multiboot_header): New label.
14312         (multiboot_entry): Likewise.
14313         (multiboot_trampoline): Likewise.
14315         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14316         Increased to 0x4A0.
14318         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14319         put parentheses after a question mark.
14320         [!GRUB_UTIL] (my_mod): New variable.
14322         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14324 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
14326         Adds support for the XFS filesystem.  Btrees are not supported
14327         yet.
14329         * fs/xfs.c: New file.
14331         * DISTLIST: Added `fs/xfs.c'.
14333         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14334         (grub_probefs_SOURCES): Likewise.
14335         (grub_emu_SOURCES): Likewise.
14336         (pkgdata_MODULES): Add `xfs.mod'.
14337         (xfs_mod_SOURCES): New variable.
14338         (xfs_mod_CFLAGS): Likewise.
14340         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14341         (pkgdata_MODULES): Add `xfs.mod'.
14342         (xfs_mod_SOURCES): New variable.
14343         (xfs_mod_CFLAGS): Likewise.
14345         * util/grub-emu.c (main): Call `grub_xfs_init' and
14346         `grub_xfs_fini'.
14348         * include/grub/fs.h (grub_xfs_init): New prototype.
14349         (grub_xfs_fini): Likewise.
14352 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
14354         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14355         color modes, allow greater than 16 colors to be configured as
14356         a default palette.
14358 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
14360         * normal/completion.c (complete_arguments): Add the qualifier
14361         const into OPTIONS.
14363         From Omniflux <omniflux+lists@omniflux.com>:
14364         * include/grub/terminfo.h: New file.
14365         * include/grub/tparm.h: Likewise.
14366         * include/grub/i386/pc/serial.h: Likewise.
14367         * term/terminfo.c: Likewise.
14368         * term/tparm.c: Likewise.
14369         * term/i386/pc/serial.c: Likewise.
14370         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14371         serial.mod.
14372         (terminfo_mod_SOURCES): New variable.
14373         (terminfo_mod_CFLAGS): Likewise.
14374         (serial_mod_SOURCES): Likewise.
14375         (serial_mod_CFLAGS): Likewise.
14377 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
14379         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14380         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14381         and kern/powerpc/ieee1275/cmain.c, respectively.
14383         * boot/powerpc/ieee1275/crt0.S: Moved to ...
14384         * kern/powerpc/ieee1275/crt0.S: ... here.
14386         * boot/powerpc/ieee1275/cmain.c: Moved to ...
14387         * kern/powerpc/ieee1275/cmain.c: ... here.
14389         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14390         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14391         instead of boot/powerpc/ieee1275/crt0.S and
14392         boot/powerpc/ieee1275/cmain.c, respectively.
14394         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14395         sectors. It was not used anyway.
14397 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14399         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14400         `unused parameter' warning.
14402 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14404         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14405         function.
14406         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14407         getcharwidth.
14409 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
14411         * include/grub/normal.h (enum grub_completion_type): Added
14412         `GRUB_COMPLETION_TYPE_ARGUMENT'.
14414         * normal/cmdline.c (print_completion): Handle
14415         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14416         * normal/menu_entry.c (store_completion): Likewise.
14418         * normal/completion.c (complete_arguments): New function.
14419         (grub_normal_do_completion): Call `complete_arguments' when the
14420         current words start with a dash.
14422 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
14424         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14425         `gzio.mod' instead of `io.mod').
14427 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
14429         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14430         (DISTDIRS): Added io and video.
14431         Rewrite the search routine to make an output consistently.
14433         * DISTLIST: Added conf/sparc64-ieee1275.mk,
14434         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14435         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14436         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14437         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14438         util/powerpc/ieee1275/misc.c.
14440         * include/grub/gzio.h: New file.
14441         * io/gzio.c: Likewise.
14443         * kern/file.c (grub_file_close): Call grub_device_close only if
14444         FILE->DEVICE is not NULL.
14446         * include/grub/mm.h [!NULL] (NULL): New macro.
14448         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14450         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14451         (pkgdata_MODULES): Added gzio.mod.
14452         (gzio_mod_SOURCES): New variable.
14453         (gzio_mod_CFLAGS): Likewise.
14455         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14456         (pkgdata_MODULES): Added gzio.mod.
14457         (gzio_mod_SOURCES): New variable.
14458         (gzio_mod_CFLAGS): Likewise.
14460         * commands/cat.c: Include grub/gzio.h.
14461         (grub_cmd_cat): Use grub_gzfile_open instead of
14462         grub_file_open.
14464         * commands/cmp.c: Include grub/gzio.h.
14465         (grub_cmd_cmp): Use grub_gzfile_open instead of
14466         grub_file_open.
14468         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14469         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14470         grub_file_open.
14471         (grub_rescue_cmd_module): Likewise.
14473 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14475         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14476         kern/sparc64/ieee1275/init.c because it contains _start.
14477         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14479 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14481         * configure.ac: Add support for sparc64 host with ieee1275
14482         firmware.
14483         * configure: Generated from configure.ac.
14484         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14485         instead of int.
14486         (grub_ofdisk_read): Likewise.
14487         (grub_ofdisk_open): Use %p to print pointer values, and cast the
14488         pointers as (void *) to remove a warning.
14489         (grub_ofdisk_close): Likewise.
14490         (grub_ofdisk_read): Likewise.
14491         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14492         returns, so make it return void to remove a warning.
14493         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14494         Corresponding prototype change.
14495         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14496         values, and cast the pointers as (void *) to remove a warning.
14497         (grub_mm_dump): Likewise.
14498         * conf/sparc64-ieee1275.mk: New file.
14499         * conf/sparc64-ieee1275.rmk: Likewise.
14500         * include/grub/sparc64/setjmp.h: Likewise.
14501         * include/grub/sparc64/types.h: Likewise.
14502         * include/grub/sparc64/ieee1275/console.h: Likewise.
14503         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14504         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14505         * include/grub/sparc64/ieee1275/time.h: Likewise.
14506         * kern/sparc64/cache.c: Likewise.
14507         * kern/sparc64/dl.c: Likewise.
14508         * kern/sparc64/ieee1275/init.c: Likewise.
14509         * kern/sparc64/ieee1275/openfw.c: Likewise.
14511 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
14513         * util/console.c (grub_ncurses_putchar): If C is greater than
14514         0x7f, set C to a question mark.
14515         (grub_ncurses_getcharwidth): New function.
14516         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14517         getcharwidth.
14519         * normal/menu.c (print_entry): Made aware of Unicode. First,
14520         convert TITLE to UCS-4, and predict the cursor position by
14521         grub_getcharwidth.
14523         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14524         const to SRC.
14525         * kern/misc.c (grub_utf16_to_utf8): Likewise.
14527 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14529         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14530         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14531         grub_strcat.
14533         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14534         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14535         grub_strcpy and grub_strlen. Take it into account that a space
14536         character is inserted as a delimiter.
14538 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14540         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14541         invalid magic in the error.
14543         * commands/search.c: New file.
14545         * util/grub-emu.c (main): Call grub_search_init and
14546         grub_search_fini.
14548         * kern/rescue.c (grub_rescue_print_disks): Removed.
14549         (grub_rescue_print_devices): New function.
14550         (grub_rescue_cmd_ls): Use grub_device_iterate with
14551         grub_rescue_print_devices instead of grub_disk_dev_iterate with
14552         grub_rescue_print_disks.
14554         * kern/partition.c (grub_partition_iterate): Return the result of
14555         PARTMAP->ITERATE instead of GRUB_ERRNO.
14557         * kern/device.c: Include grub/partition.h.
14558         (grub_device_iterate): New function.
14560         * include/grub/partition.h (grub_partition_iterate): Return int
14561         instead of grub_err_t.
14563         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14564         prototype.
14565         [GRUB_UTIL] (grub_search_fini): Likewise.
14567         * include/grub/device.h (grub_device_iterate): New prototype.
14569         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14570         commands/search.c.
14571         (pkgdata_MODULES): Added search.mod.
14572         (search_mod_SOURCES): New variable.
14573         (search_mod_CFLAGS): Likewise.
14575         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14576         (pkgdata_MODULES): Added search.mod.
14577         (search_mod_SOURCES): New variable.
14578         (search_mod_CFLAGS): Likewise.
14580         * commands/ls.c (grub_ls_list_disks): Renamed to ...
14581         (grub_ls_list_devices): ... this, and use grub_device_iterate.
14582         All callers changed.
14584         * DISTLIST: Added commands/search.c.
14586 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14588         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14589         conversion.
14590         (grub_getcharwidth): New function.
14592         * kern/misc.c (grub_utf8_to_ucs4): New function.
14594         * include/grub/term.h (struct grub_term): Added a new member
14595         "getcharwidth".
14596         (grub_getcharwidth): New prototype.
14598         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14600         * term/i386/pc/console.c (map_char): New function. Segregated from
14601         grub_console_putchar.
14602         (grub_console_putchar): Use map_char.
14603         (grub_console_getcharwidth): New function.
14604         (grub_console_term): Specified grub_console_getcharwidth as
14605         getcharwidth.
14607         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14608         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14610         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14611         GRUB_ERRNO.
14612         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14613         on grub_strtoul completely.
14614         (write_char): Declare local variables in the beginning of the
14615         function.
14616         (grub_vesafb_getcharwidth): New function.
14617         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14618         getcharwidth.
14620 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
14622         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14623         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14624         commands/i386/pc/vbetest.c.
14626         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14627         call grub_vbe_get_controller_info again, because the returned
14628         information is volatile.
14629         (grub_vbe_set_video_mode): Mostly rewritten.
14630         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14631         grub_vbe_status_t correctly.
14632         (grub_vbe_get_video_mode_info): Likewise.
14633         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14634         several if statements.
14636         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14637         * commands/i386/pc/vbeinfo.c: ... this.
14639         * commands/i386/pc/vbe_test.c: Renamed to ...
14640         * commands/i386/pc/vbetest.c: ... this.
14642         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14643         ...
14644         (grub_cmd_vbeinfo): ... this. Save video modes before
14645         iterating. Skip a video mode, if it is not available, not enough
14646         information is given or it is monochrome. Show the memory
14647         model. Leave the interpretation of MODEVAR to grub_strtoul
14648         completely.
14649         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14650         (GRUB_MOD_FINI): Likewise.
14652         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14653         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14654         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14655         duplicated grub_env_get. Leave the interpretation of MODEVAR to
14656         grub_strtoul completely.
14657         (real2pm): Removed.
14658         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14659         (GRUB_MOD_FINI): Likewise.
14661         * normal/misc.c: Include grub/mm.h.
14663         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14664         vbe_list_modes with vbetest.mod and vbeinfo.mod.
14665         (vbe_list_modes_mod_SOURCES): Removed.
14666         (vbe_list_modes_mod_CFLAGS): Likewise.
14667         (vbe_test_mod_SOURCES): Likewise.
14668         (vbe_test_mod_CFLAGS): Likewise.
14669         (vbeinfo_mod_SOURCES): New variable.
14670         (vbeinfo_mod_CFLAGS): Likewise.
14671         (vbetest_mod_SOURCES): Likewise.
14672         (vbetest_mod_CFLAGS): Likewise.
14674 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
14676         * normal/misc.c: New file.
14678         * DISTLIST: Added normal/misc.c.
14680         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14681         DISK to HOOK. Call HOOK with DISK.
14682         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14683         * partmap/pc.c (pc_partition_map_iterate): Likewise.
14684         * partmap/sun.c (sun_partition_map_iterate): Likewise.
14686         * normal/menu_entry.c (struct screen): Added a new member
14687         "completion_shown".
14688         (completion_buffer): New global variable.
14689         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14690         (store_completion): New function.
14691         (complete): Likewise.
14692         (clear_completions): Likewise.
14693         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14694         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14695         a tab, call complete.
14697         * normal/completion.c (disk_dev): Removed.
14698         (print_simple_completion): Likewise.
14699         (print_partition_completion): Likewise.
14700         (print_func): New global variable.
14701         (add_completion): Do not take the arguments WHAT or PRINT any
14702         longer. Added a new argument TYPE. Instead of printing directly,
14703         call PRINT_FUNC if not NULL.
14704         All callers changed.
14705         (complete_device): Use a local variable DEV instead of
14706         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14707         (grub_normal_do_completion): Take a new argument HOOK. Do not
14708         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14709         empty string, return NULL instead.
14710         All callers changed.
14712         * normal/cmdline.c (print_completion): New function.
14714         * kern/partition.c (grub_partition_iterate): Add an argument DISK
14715         to HOOK.
14716         All callers changed.
14718         * kern/disk.c (grub_print_partinfo): Removed.
14720         * include/grub/partition.h (struct grub_partition_map): Add a new
14721         argument DISK into HOOK of ITERATE.
14722         (grub_partition_iterate): Add a new argument DISK to HOOK.
14724         * include/grub/normal.h (enum grub_completion_type): New enum.
14725         (grub_completion_type_t): New type.
14726         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14727         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14728         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14729         (GRUB_COMPLETION_TYPE_FILE): Likewise.
14730         (grub_normal_do_completion): Added a new argument HOOK.
14731         (grub_normal_print_device_info): New prototype.
14733         * include/grub/disk.h (grub_print_partinfo): Removed.
14735         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14736         (normal_mod_SOURCES): Likewise.
14737         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14738         (normal_mod_SOURCES): Likewise.
14740         * commands/ls.c (grub_ls_list_disks): Use
14741         grub_normal_print_device_info instead of grub_print_partinfo. Free
14742         PNAME.
14743         (grub_ls_list_files): Use grub_normal_print_device_info instead of
14744         duplicating the code.
14746 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14748         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14749         follow GCS more precisely.
14750         * commands/i386/pc/vbe_test.c: Likewise.
14751         * include/grub/i386/pc/vbe.h: Likewise.
14752         * term/i386/pc/vesafb.c: Likewise.
14753         * video/i386/pc/vbe.c: Likewise.
14755 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14757         * DISTLIST: Added term/i386/pc/vesafb.c
14758         DISTLIST: Added video/i386/pc/vbe.c
14759         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14760         DISTLIST: Added commands/i386/pc/vbe_test.c.
14761         * commands/i386/pc/vbe_list_modes.c: New file.
14762         * commands/i386/pc/vbe_test.c: Likewise.
14763         * term/i386/pc/vesafb.c: Likewise.
14764         * video/i386/pc/vbe.c: Likewise.
14765         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14766         (grub_vbe_probe) Added prototype.
14767         (grub_vbe_set_video_mode) Likewise.
14768         (grub_vbe_get_video_mode) Likewise.
14769         (grub_vbe_get_video_mode_info) Likewise.
14770         (grub_vbe_set_pixel_rgb) Likewise.
14771         (grub_vbe_set_pixel_index) Likewise.
14772         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14773         (pkgdata_MODULES): Added vesafb.mod.
14774         (pkgdata_MODULES): Added vbe_list_modes.mod.
14775         (pkgdata_MODULES): Added vbe_test.mod.
14776         (vbe_mod_SOURCES): Added.
14777         (vbe_mod_CFLAGS): Likewise.
14778         (vesafb_mod_SOURCES): Likewise.
14779         (vesafb_mod_CFLAGS): Likewise.
14780         (vbe_list_modes_mod_SOURCES): Likewise.
14781         (vbe_list_modes_mod_CFLAGS): Likewise.
14782         (vbe_test_mod_SOURCES): Likewise.
14783         (vbe_test_mod_CFLAGS): Likewise.
14785 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
14787         * normal/command.c (grub_command_execute): If INTERACTIVE is
14788         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14789         CMDLINE. Disable the pager if INTERACTIVE is true.
14790         All callers are changed.
14792         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14793         before reading a config file.
14794         * normal/main.c (read_config_file): Even if a command is not
14795         found, register it if it is within an entry.
14797         * util/grub-emu.c: Include sys/types.h and unistd.h.
14798         (options): Added --hold.
14799         (struct arguments): Added a new member "hold".
14800         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14801         missing.
14802         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14803         cleared by a debugger, if it is not zero.
14805         * include/grub/normal.h (grub_command_execute): Add an argument
14806         INTERACTIVE.
14808 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
14810         * DISTLIST: Added include/grub/i386/pc/vbe.h.
14812 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
14814         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14815         program with another one, because the old one didn't detect a bug
14816         in gcc-3.4. Always use regparm 2, because the new test is still
14817         not enough for gcc-4.0. Someone must investigate a simple test
14818         case which detects a bug in gcc-4.0.
14820 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
14822         * DISTLIST: Added normal/completion.c.
14824         * normal/completion.c: New file.
14826         * term/i386/pc/console.c (grub_console_getwh): New function.
14827         (grub_console_term): Assign grub_console_getwh to getwh.
14829         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14830         function is defined in normal/completion.c as
14831         grub_normal_do_completion.
14832         (grub_cmdline_get): Use grub_normal_do_completion instead of
14833         grub_tab_complete.
14835         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14836         returns non-zero, otherwise return 0.
14837         (grub_partition_iterate): First, probe the partition map. Then,
14838         call ITERATE only for this partition map.
14840         * kern/misc.c (grub_strncmp): Rewritten.
14842         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14843         returns non-zero. Otherwise return 0.
14845         * include/grub/partition.h (grub_partition_map_iterate): Return
14846         int instead of void.
14848         * include/grub/normal.h (grub_normal_do_completion): New prototype.
14850         * include/grub/misc.h (grub_strncmp): Change the type of N to
14851         grub_size_t.
14853         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14854         of void.
14856         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14857         unsigned explicitly before comparing it with I.
14859         * kern/main.c (grub_env_write_root): Add the attribute unused into
14860         VAR.
14862         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14863         normal/completion.c.
14864         (normal_mod_SOURCES): Likewise.
14865         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14866         (normal_mod_SOURCES): Likewise.
14868         * normal/command.c (grub_iterate_commands): If ITERATE returns
14869         non-zero, return one immediately.
14871 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
14873         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14874         * kern/i386/pc/startup.S: Updated Global Descriptor table's
14875         descriptions.
14876         (grub_vbe_get_controller_info): New function.
14877         (grub_vbe_get_mode_info): Likewise.
14878         (grub_vbe_set_mode): Likewise.
14879         (grub_vbe_get_mode): Likewise.
14880         (grub_vbe_set_memory_window): Likewise.
14881         (grub_vbe_get_memory_window): Likewise.
14882         (grub_vbe_set_scanline_length): Likewise.
14883         (grub_vbe_get_scanline_length): Likewise.
14884         (grub_vbe_set_display_start): Likewise.
14885         (grub_vbe_get_display_start): Likewise.
14886         (grub_vbe_set_palette_data): Likewise.
14887         * include/grub/i386/pc/vbe.h: New file.
14889 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14891         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14892         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14893         * DISTLIST: Likewise.
14894         * kern/ieee1275/of.c: Moved to ...
14895         * kern/ieee1275/ieee1275.c: ... here.
14897 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14899         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14900         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14901         Pass 0 as `end' parameter to grub_strtoul().
14903 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14905         * include/grub/powerpc/ieee1275/console.h: Do not include
14906         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
14907         ifdef.
14908         (grub_console_cur_color): Remove i386-specific prototype.
14909         (grub_console_real_putchar): Likewise.
14910         (grub_console_checkkey): Likewise.
14911         (grub_console_getkey): Likewise.
14912         (grub_console_getxy): Likewise.
14913         (grub_console_gotoxy): Likewise.
14914         (grub_console_cls): Likewise.
14915         (grub_console_setcursor): Likewise.
14916         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14917         Include <grub/machine/console.h>.
14918         * term/ieee1275/ofconsole.c: Likewise.
14920 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
14922         * Makefile.in (LIBLZO): New variable.
14924         * configure.ac: Check for LZO version 2.
14926         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14927         lzo/lzo1x.h instead of lzo1x.h.
14929         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14930         of -llzo.
14932         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14933         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14935         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14936         copying the data from PARTITION to P.
14938 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14940         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14941         negative, unload the module.
14943         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14944         map is "pc_partition_map" but not "pc".
14945         (usage): Fix the description. The options are --boot-image and
14946         --core-image but not --boot-file or --core-file.
14947         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14948         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14949         DEFAULT_DIRECTORY.
14951         * util/i386/pc/grub-install.in: Do not specify --boot-file or
14952         --core-file. Specify INSTALL_DEVICE as an argument.
14954         * util/console.c: Include config.h.
14955         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14956         [HAVE_NCURSES_H]: Include ncurses.h.
14957         [HAVE_CURSES_H]: Include curses.h.
14958         [!A_NORMAL] (A_NORMAL): Defined as zero.
14959         [!A_STANDOUT] (A_STANDOUT): Likewise.
14961         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14962         -lncurses.
14963         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14965         * configure.ac: Check for curses libraries and headers.
14967         * Makefile.in (LIBCURSES): New variable.
14969         * genmk.rb (Script::rule): Set the executable bits.
14971         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14972         name of the PC partition map is "pc_partition_map" but not "pc".
14974 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14976         * util/i386/pc/grub-install.in (grub_probefs): New variable.
14977         (modules): Likewise.
14978         (usage): Added descriptions for --modules and --grub-probefs.
14979         Handle --modules and --grub-probefs. Save the arguments in MODULES
14980         and GRUB_PROBEFS, respectively.
14981         Auto-detect a filesystem module against GRUBDIR. If the result is
14982         empty and modules are not specified explicitly, abort the
14983         installation. Add the result to MODULES.
14985         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14986         disk/powerpc/ieee1275/ofdisk.c,
14987         include/grub/powerpc/ieee1275/init.h and
14988         term/powerpc/ieee1275/ofconsole.c.
14989         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14990         term/ieee1275/ofconsole.c.
14992         * include/grub/powerpc/ieee1275/console.h: Resurrected.
14994         * COPYING: Upgraded to the latest version. Only the address of the
14995         FSF office has changed.
14997 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14999         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15000         kern/ieee1275.c with kern/ieee1275/of.c.
15002         * kern/ieee1275.c: Moved to ...
15003         * kern/ieee1275/of.c: ... here.
15005 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
15007         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15008         readability.
15010         * config.guess: Updated to the latest version from gnulib.
15011         * config.sub: Likewise.
15012         * install.sh: Likewise.
15013         * mkinstalldirs: Likewise.
15015         * include/grub/console.h: Removed. This file is arch-specific. Do
15016         not put this in include/grub.
15018         * include/grub/i386/pc/console.h: Resurrected.
15020         * util/console.c: Include grub/machine/console.h instead of
15021         grub/console.h.
15022         * util/grub-emu.c: Likewise.
15024 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
15026         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15027         hardcoded value.
15029         From Vincent Pelletier  <subdino2004@yahoo.fr>
15030         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15031         Redefined to use grub_getwh.
15032         (grub_term): New member named getwh.
15033         (grub_getwh): New prototype.
15034         * kern/term.c (grub_getwh): New function.
15035         * term/i386/pc/console.c (grub_console_getwh): New function.
15036         (grub_console_term): New member `getwh'.
15037         * term/i386/pc/vga.c (grub_vga_getwh): New function.
15038         (grub_vga_term): New member `getwh'.
15039         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15040         grub_ssize_t.
15041         (grub_ofconsole_getw): New function.
15042         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15043         (grub_ofconsole_term): New field named getwh and new initial
15044         value.
15046 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
15048         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15049         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
15050         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15051         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15052         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15053         of <grub/machine/ieee1275.h>.
15054         * commands/ieee1275/reboot.c: Likewise.
15055         * boot/powerpc/ieee1275/ieee1275.c: Move ...
15056         * kern/ieee1275.c: ... to here.  All users updated.  Change all
15057         parameter structs to use new type `grub_ieee1275_cell_t'.
15058         * term/powerpc/ieee1275/ofconsole.c: Move ...
15059         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
15060         * disk/powerpc/ieee1275/ofdisk.c: Move ...
15061         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
15062         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15063         to return int.
15064         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15065         Remove unused prototypes.  All users updated.
15066         * include/grub/powerpc/ieee1275/console.h: Removed.
15067         * include/grub/powerpc/ieee1275/ieee1275.h: Define
15068         `grub_ieee1275_cell_t'.
15069         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15070         Cast comparisons with -1 to the correct type.
15071         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15072         type to match `grub_ieee1275_entry_fn'.
15074 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
15076         * DISTLIST: Added util/i386/pc/grub-probefs.c.
15078         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15079         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15080         partmap/sun.c.
15081         (grub_probefs_SOURCES): New variable.
15083         * util/i386/pc/grub-probefs.c: New file.
15085         * util/i386/pc/grub-setup.c (main): Call
15086         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15087         grub_hfs_init and grub_jfs_init to initialize the system. Call
15088         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15089         grub_pc_partition_map_fini to finish the system.
15091 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
15093         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15094         function.
15095         (grub_multiboot_load_elf32): Likewise.
15096         (grub_multiboot_is_elf64): Likewise.
15097         (grub_multiboot_load_elf64): Likewise.
15098         (grub_multiboot_load_elf): Likewise.
15099         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15100         an ELF32 or ELF64 file.
15101         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15103         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15104         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15105         NULL before calling FS->LABEL.
15106         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15107         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15108         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15109         before calling FS->LABEL.
15111 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
15113         * util/i386/pc/grub-install.in (datadir): New variable.
15114         (libdir): Removed.
15115         (pkgdatadir): New variable.
15116         (pkglibdir): Removed.
15118 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
15120         * DISTLIST: Added util/i386/pc/grub-install.in.
15122         * util/i386/pc/grub-install.in: New file.
15124         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15125         (grub_install_SOURCES): Likewise.
15127         * genmk.rb: Added support for scripts.
15128         (Script): New class.
15129         (scripts): New variable.
15131         * Makefile.in (install-local): Install sbin_SCRIPTS by
15132         INSTALL_SCRIPT.
15133         (uninstall): Remove sbin_SCRIPTS.
15135         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15136         device, try to get a GRUB device by
15137         grub_util_biosdisk_get_grub_dev.
15138         Free DEST_DEV.
15140         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15141         description for --device-map.
15143 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15145         Change the semantics of variable hooks. They now return strings
15146         instead of error values.
15148         * util/i386/pc/grub-setup.c: Include grub/env.h.
15149         (setup): Use grub_device_set_root instead of grub_env_set.
15151         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15152         grub_env_get instead of grub_device_set_root and
15153         grub_device_get_root, respectively.
15155         * kern/main.c (grub_env_write_root): New function.
15156         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15157         grub_env_set instead of grub_device_set_root.
15159         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15160         many variables.
15161         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15162         rather than calling ENV->WRITE_HOOK afterwards.
15163         (grub_env_get): Return the result of ENV->READ_HOOK rather than
15164         passing a pointer of a pointer.
15165         (grub_register_variable_hook): Change the types of "read_hook" and
15166         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15167         respectively.
15168         Allocate the default empty string on the heap, because this string
15169         may be freed later.
15171         * kern/device.c: Include grub/env.h.
15172         (grub_device_set_root): Removed.
15173         (grub_device_get_root): Likewise.
15174         (grub_device_open): Use grub_env_get instead of
15175         grub_device_get_root.
15177         * include/grub/env.h (grub_env_read_hook_t): New type.
15178         (grub_env_write_hook_t): Likewise.
15179         (grub_env_var): Change the types of "read_hook" and "write_hook"
15180         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15181         (grub_register_variable_hook): Likewise.
15183         * include/grub/device.h (grub_device_set_root): Removed.
15184         (grub_device_set_root): Likewise.
15186         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15187         make sure that DIRNAME terminates with '/', so that
15188         grub_fat_find_dir will fail if PATH is not a directory.
15190         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15191         from DIRNAME.
15192         Use the qualifier auto for print_files and print_files_long.
15193         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15194         as a regular file.
15195         Put a newline only if there is no error.
15196         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15197         used.
15199 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15201         * kern/partition.c (grub_partition_probe): Initialize PART to
15202         NULL. Otherwise, when no partition map is registered, this returns
15203         a garbage.
15205 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
15207         * partmap/apple.c (apple_partition_map_iterate): Check if POS
15208         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15209         valid.
15211 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
15213         * commands/ls.c (grub_ls_list_disks): Print the filesystem
15214         information on each device, if it does not have partitions. Print
15215         "Device" instead of "Disk", because this function is not specific
15216         to disk devices.
15218         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15219         static to ensure that it is put on the memory rather than a
15220         register.
15222 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15224         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15225         (grub_cat_init): Likewise.
15226         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15227         (options): Likewise.
15228         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15229         (grub_configfile_init): Likewise.
15230         * font/manager.c (GRUB_MOD_INIT): Likewise.
15231         * commands/help.c (GRUB_MOD_INIT): Likewise.
15232         (grub_help_init): Likewise.
15233         * normal/command.c (grub_command_init): Likewise.
15234         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15235         * disk/loopback.c (grub_loop_init): Likewise.
15236         (GRUB_MOD_INIT): Likewise.
15237         * commands/ls.c (grub_ls_init): Likewise.
15238         (GRUB_MOD_INIT): Likewise.
15239         (options): Likewise.
15240         * commands/boot.c (grub_boot_init): Likewise.
15241         (GRUB_MOD_INIT): Likewise.
15242         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15243         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15244         (GRUB_MOD_INIT): Likewise.
15245         * commands/cmp.c (grub_cmp_init): Likewise.
15246         (GRUB_MOD_INIT): Likewise.
15248         * normal/arg.c: Use <> instead of "" to include header files.
15249         (SHORT_ARG_HELP): New macro.
15250         (SHORT_ARG_USAGE): Likewise.
15251         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15252         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15253         descriptions.
15254         (find_short): Check if C is 'h' or 'u' explicitly.
15255         (grub_arg_show_help): Use space characters instead of tabs. Treat
15256         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15257         are shown with --help and --usage only if they are not used for
15258         the command itself.
15259         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15260         'h' and 'u'.
15262         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15263         const into "longarg". Change the type of "shortarg" to int.
15265 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15267         * boot/i386/pc/boot.S (boot_drive_check): New label.
15269         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15270         macro.
15272         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15273         which do not pass a boot drive correctly. Copied from GRUB Legacy.
15275 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15277         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15278         When turning off Gate A20, skip the check and return immediately,
15279         because this is not fatal usually.
15281 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15283         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15284         be 0x7C00 instead of 0x8000.
15286         * boot/i386/pc/pxeboot.S: Rewritten.
15288         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15289         EXT_C.
15290         (gate_a20_check_state): Read a byte from 0x108000. Invert the
15291         result.
15293 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
15295         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15296         robustness. This routine now supports a BIOS call and System
15297         Control Port A to modify the gate A20.
15299         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15300         Increased to 0x440.
15302 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
15304         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15305         device path and resulting ihandle.
15306         (grub_ofdisk_close): dprintf the ihandle being closed.
15307         (grub_ofdisk_read): dprintf function parameters.
15308         * kern/mm.c (grub_mm_init_region): Likewise.
15309         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15310         (grub_linux_boot): dprintf the Linux entry point, initrd address and
15311         size, and boot arguments.
15312         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15313         before loading into memory.
15314         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15315         before loading into memory.
15317 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
15319         * kern/mm.c: Added much documentation.
15320         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15321         8, set to 5 instead of 8.
15323 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15325         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15327         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15328         (grub_mkdevicemap_SOURCES): New variable.
15330         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15331         lib/device.c of GRUB Legacy.
15333 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15335         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15336         instead of PATH is NULL.
15338 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
15340         * commands/cmp.c (BUFFER_SIZE): New macro.
15341         (grub_cmd_cmp): Close the right file at the right time.  Compare
15342         only data just read.  Don't report files of different  size as
15343         identical.  Dynamically allocate buffers.  Move variable
15344         declarations at the beginning of function.
15346 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
15348         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15349         reverse.
15351 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
15353         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15354         when backspace is pressed at beginning of line.
15356 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
15358         * DISTLIST: Added genfslist.sh.
15360         * normal/main.c (fs_module_list): New variable.
15361         (autoload_fs_module): New function.
15362         (read_fs_list): Likewise.
15363         (grub_normal_execute): Call read_fs_list.
15365         * kern/fs.c (grub_fs_autoload_hook): New variable.
15366         (grub_fs_probe): Added support for auto-loading.
15368         * include/grub/normal.h (struct grub_fs_module_list): New struct.
15369         (grub_fs_module_list_t): New type.
15371         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15372         (grub_fs_autoload_hook): New prototype.
15374         * genfslist.sh: New file.
15376         * genmk.rb: Added a rule to generate a filesystem list.
15378 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
15380         * configure.ac: Fix the test for cross-compiling.
15382         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
15383         define GRUB_UTIL anymore.
15385         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15386         so this function works on other systems than just big endian.
15387         (load_modules): Likewise.
15388         (add_segments): Likewise.
15390 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
15392         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
15393         contains `l' modifier, get a long from va_arg().
15395 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
15397         * kern/mm.c (grub_free): If the next free block which is being
15398         merged is the first free block, set the first block to the block
15399         being freed.
15400         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15402 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15404         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15405         `grub_ieee1275_chosen'.
15407 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15409         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15410         (grub_ieee1275_chosen): New variable.
15411         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15412         `chosen'.
15413         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15414         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15415         Rename first argument to `phandle' for consistency.
15416         (grub_ieee1275_get_property_length): Likewise.
15417         (grub_ieee1275_next_property): Likewise.  Change type of first argument
15418         to grub_ieee1275_phandle_t.
15419         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15420         Move export next to declaration.
15421         (grub_ieee1275_chosen): New variable.
15422         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15423         Correct cosmetic typo.
15424         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15425         `grub_ieee1275_chosen'.
15426         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15427         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15428         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15429         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15430         `grub_ieee1275_chosen'.
15432 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
15434         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15435         /chosen/bootargs.
15436         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15437         /chosen/bootargs as "variable=value" pairs.
15439 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
15441         * include/grub/misc.h (grub_dprintf): New macro.
15442         (grub_real_dprintf): New prototype.
15443         (grub_strword): Likewise.
15444         (grub_iswordseparator): Likewise.
15445         * kern/misc.c (grub_real_dprintf): New function.
15446         (grub_strword): Likewise.
15447         (grub_iswordseparator): Likewise.
15449 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
15451         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15452         (roundup): Remove macro.
15453         (grub_ieee1275_flags): Make static.
15454         (grub_ieee1275_realmode): Remove.
15455         (grub_ieee1275_test_flag): New function.
15456         (grub_ieee1275_set_flag): Likewise.
15457         (find_options): Rename to `grub_ieee1275_find_options'; update
15458         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15459         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15460         (cmain): New prototype.
15461         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15462         `grub_ieee1275_flags' directly.
15463         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15464         machine/biosdisk.h.
15465         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15466         Don't include grub/machine/init.h.
15467         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15468         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15469         Remove prototype.
15470         (grub_ieee1275_realmode): Likewise.
15471         (grub_ieee1275_flag): New enum.
15472         (grub_ieee1275_test_flag): New prototype.
15473         (grub_ieee1275_set_flag): New prototype.
15474         * include/grub/powerpc/ieee1275/init.h: Remove file.
15475         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15476         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15477         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
15478         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
15479         comment.
15480         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15481         `grub_ieee1275_test_flag'.
15482         (grub_ieee1275_encode_devname): Likewise.
15484 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
15486         * include/grub/powerpc/ieee1275/ieee1275.h
15487         (grub_ieee1275_encode_devname): New prototype.
15488         (grub_ieee1275_get_filename): Likewise.
15489         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15490         function.
15491         (grub_set_prefix): Likewise.
15492         (grub_machine_init): Call grub_set_prefix.
15493         * kern/powerpc/ieee1275/openfw.c: Fix typos.
15494         (grub_parse_type): New enum.
15495         (grub_ieee1275_get_devargs): New function.
15496         (grub_ieee1275_get_devname): Likewise.
15497         (grub_ieee1275_parse_args): Likewise.
15498         (grub_ieee1275_get_filename): Likewise.
15499         (grub_ieee1275_encode_devname): Likewise.
15501 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
15503         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15504         `grub_loader_unset'.
15506 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
15508         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15509         instead of grub_ieee1275_interpret.
15510         (grub_halt_init): New function.
15511         (grub_halt_fini): Likewise.
15512         (GRUB_MOD_INIT): Correct message grammar.
15513         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15514         instead of grub_ieee1275_interpret.
15515         (grub_reboot_init): New function.
15516         (grub_reboot_fini): Likewise.
15517         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15518         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15519         util/i386/pc/misc.c with commands/ieee1275/halt.c,
15520         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15521         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15522         function.
15523         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15524         Add prototype.
15525         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15526         prototype.
15527         (grub_halt): Likewise.
15528         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15529         (cmain): Remove __attribute__((unused)).
15530         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15531         (grub_heap_len): Likewise.
15532         (grub_machine_fini): New function.
15533         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15534         (grub_halt): Likewise.
15535         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15536         function.
15537         * util/powerpc/ieee1275/misc.c: New file.
15539 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
15541         * DISTLIST: New file.
15542         * gendistlist.sh: Likewise.
15544         * Makefile.in (COMMON_DISTFILES): Removed.
15545         (BOOT_DISTFILES): Likewise.
15546         (CONF_DISTFILES): Likewise.
15547         (DISK_DISTFILES): Likewise.
15548         (FS_DISTFILES): Likewise.
15549         (INCLUDE_DISTFILES): Likewise.
15550         (KERN_DISTFILES): Likewise.
15551         (LOADER_DISTFILES): Likewise.
15552         (TERM_DISTFILES): Likewise.
15553         (UTIL_DISTFILES): Likewise.
15554         (DISTFILES): Likewise.
15555         (uninstall): Uninstall files in $(pkgdata_DATA).
15556         (DISTLIST): New target.
15557         (distdir): Use the contents of the file DISTLIST to get a list of
15558         distributed files.
15560 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
15562         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15563         descriptor. This is ported from GRUB Legacy.
15565         * gencmdlist.sh: Added an extra semicolon to make it work with
15566         old sed versions. Reported by Robert Bihlmeyer
15567         <robbe@orcus.priv.at>.
15569 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
15571         Automatic loading of commands is supported.
15573         * normal/main.c (read_command_list): New function.
15574         (grub_normal_execute): Call read_command_list.
15576         * normal/command.c (grub_register_command): Return zero or CMD.
15577         Allocate CMD->NAME from the heap.
15578         Initialize CMD->MODULE_NAME to zero.
15579         Find the same name as well. If the same command is found and it is
15580         a dummy command, overwrite members. If it is not a dummy command,
15581         return zero.
15582         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15583         (grub_command_find): If a dummy command is found, load a module
15584         and retry to find a command only once.
15586         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15587         make sure that each command is loaded.
15589         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15590         macro.
15591         (struct grub_command): Remove const from the member `name'.
15592         Add a new member `module_name'.
15593         (grub_register_command): Return grub_command_t.
15595         * commands/help.c (grub_cmd_help): Call grub_command_find to make
15596         sure that each command is loaded.
15598         * genmk.rb (PModule::rule): Specify a module name without the
15599         suffix ".mod" to gencmdlist.sh.
15601 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15603         * gencmdlist.sh: New file.
15605         * genmk.rb (PModule::rule): Generate a rule for a command list.
15606         Clean command.lst.
15607         Generate command.lst from $(COMMANDFILES).
15609         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15610         (DATA): Added $(pkgdata_DATA).
15611         (install-local): Install files in $(pkgdata_DATA).
15613 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15615         * term/i386/pc/vga.c (debug_command): Removed.
15616         (GRUB_MOD_INIT): Do not register the command "debug".
15618         From Hollis Blanchard:
15619         * commands/configfile.c: New file.
15620         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15621         commands/configfile.c.
15622         (pkgdata_MODULES): Added configfile.mod.
15623         (configfile_mod_SOURCES): New variable.
15624         (configfile_mod_CFLAGS): Likewise.
15625         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15626         commands/configfile.c.
15627         (pkgdata_MODULES): Added configfile.mod.
15628         (configfile_mod_SOURCES): New variable.
15629         (configfile_mod_CFLAGS): Likewise.
15630         * util/grub-emu.c (main): Call grub_configfile_init and
15631         grub_configfile_fini.
15632         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15633         prototype.
15634         [GRUB_UTIL] (grub_configfile_fini): Likewise.
15636 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15638         * normal/arg.c (grub_arg_show_help): Do not show the bug report
15639         address.
15641         * commands/help.c (grub_cmd_help): Do not print newlines after
15642         the last command in print_command_help.
15644 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15646         * commands/default.h: New file.
15647         * commands/timeout.h: Likewise.
15648         * normal/context.c: Likewise.
15650         * util/misc.c: Do not include sys/times.h.
15651         Include sys/time.h and grub/machine/time.h.
15652         (grub_get_rtc): Rewritten with gettimeofday.
15654         * util/grub-emu.c (main): Call grub_default_init and
15655         grub_timeout_init before grub_normal_init, and call
15656         grub_timeout_fini and grub_default_fini after grub_main.
15658         * util/console.c (grub_ncurses_checkkey): Return the read
15659         character or -1.
15661         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15662         timeouts.
15664         * normal/main.c (read_config_file): Push MENU. If this fails,
15665         print an error and wait for a user input.
15666         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15667         If a menu is empty or an error occurs, pop MENU.
15668         (grub_normal_execute): Pop and free MENU after grub_menu_run
15669         returns.
15671         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15673         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15674         include time.h.
15675         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15676         without GRUB_UTIL.
15677         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15678         time.h.
15679         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15680         without GRUB_UTIL.
15682         * include/grub/normal.h (struct grub_menu_list): New struct.
15683         (grub_menu_list_t): New type.
15684         (struct grub_context): New struct.
15685         (grub_context_t): New type.
15686         (grub_register_command): Got rid of EXPORT_FUNC.
15687         (grub_unregister_command): Likewise.
15688         (grub_context_get): New prototype.
15689         (grub_context_get_current_menu): Likewise.
15690         (grub_context_push_menu): Likewise.
15691         (grub_context_pop_menu): Likewise.
15692         [GRUB_UTIL] (grub_default_init): Likewise.
15693         [GRUB_UTIL] (grub_default_fini): Likewise.
15694         [GRUB_UTIL] (grub_timeout_init): Likewise.
15695         [GRUB_UTIL] (grub_timeout_fini): Likewise.
15697         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15698         commands/timeout.c and normal/context.c.
15699         (pkgdata_MODULES): Added default.mod and timeout.mod.
15700         (normal_mod_SOURCES): Added normal/context.c.
15701         (default_mod_SOURCES): New variable.
15702         (default_mod_CFLAGS): Likewise.
15703         (timeout_mod_SOURCES): Likewise.
15704         (timeout_mod_CFLAGS): Likewise.
15705         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15706         conf/i386-pc.rmk.
15707         (pkgdata_MODULES): Added default.mod and timeout.mod.
15708         (normal_mod_SOURCES): Added normal/context.c.
15709         (default_mod_SOURCES): New variable.
15710         (default_mod_CFLAGS): Likewise.
15711         (timeout_mod_SOURCES): Likewise.
15712         (timeout_mod_CFLAGS): Likewise.
15714         * Makefile.in (all-local): Added $(MKFILES).
15716 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15718         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15719         (grub_emu_SOURCES): Likewise.
15720         (pkgdata_MODULES): Add `sun.mod'.
15721         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15722         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15723         `partmap/sun.c'.
15724         (pkgdata_MODULES): Add `sun.mod'.
15725         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15726         * include/grub/partition.h (grub_sun_partition_map_init): New
15727         prototype.
15728         (grub_sun_partition_map_fini): Likewise.
15729         * partmap/sun.c: New file.
15730         * util/grub-emu.c (main): Initialize and de-initialize the sun
15731         partitionmap support.
15733 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
15735         This implements an Emacs-like menu entry editor.
15737         * normal/menu_entry.c: New file.
15739         * util/console.c (grub_ncurses_putchar): Translate some Unicode
15740         characters to ASCII.
15741         (saved_char): New variable.
15742         (grub_ncurses_checkkey): Rewritten completely.
15743         (grub_ncurses_getkey): Likewise.
15744         (grub_ncurses_init): Call raw instead of cbreak.
15746         * normal/menu.c (print_entry): Do not put a space.
15747         (init_page): Renamed to ...
15748         (grub_menu_init_page): ... this. All callers changed.
15749         (edit_menu_entry): Removed.
15750         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15752         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15754         * kern/misc.c (grub_vprintf): Call grub_refresh.
15756         * normal/menu.c (DISP_LEFT): Renamed to ...
15757         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15758         * normal/menu.c (DISP_UP): Renamed to ...
15759         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15760         * normal/menu.c (DISP_RIGHT): Renamed to ...
15761         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15762         * normal/menu.c (DISP_DOWN): Renamed to ...
15763         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15764         * normal/menu.c (DISP_HLINE): Renamed to ...
15765         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15766         * normal/menu.c (DISP_VLINE): Renamed to ...
15767         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15768         * normal/menu.c (DISP_UL): Renamed to ...
15769         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15770         * normal/menu.c (DISP_UR): Renamed to ...
15771         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15772         * normal/menu.c (DISP_LL): Renamed to ...
15773         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15774         * normal/menu.c (DISP_LR): Renamed to ...
15775         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15776         * normal/menu.c (TERM_WIDTH): Renamed to ...
15777         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15778         * normal/menu.c (TERM_HEIGHT): Renamed to ...
15779         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15780         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15781         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15782         * normal/menu.c (TERM_MARGIN): Renamed to ...
15783         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15784         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15785         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15786         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15787         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15788         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15789         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15790         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15791         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15792         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15793         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15794         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15795         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15796         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15797         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15798         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15799         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15800         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15801         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15802         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15803         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15804         All callers changed.
15806         * include/grub/normal.h: New prototype.
15808         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15809         normal/menu_entry.c.
15810         (normal_mod_SOURCES): Likewise.
15811         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15812         (normal_mod_SOURCES): Likewise.
15814 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
15816         * include/grub/normal.h (grub_halt_init): New prototype.
15817         (grub_halt_fini): Likewise.
15818         (grub_reboot_init): Likewise.
15819         (grub_reboot_fini): Likewise.
15821         * util/grub-emu.c: Include signal.h.
15822         (main_env): New global variable.
15823         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15824         catch C-c.
15825         (grub_machine_fini): New function.
15826         (main): Call grub_halt_init and grub_reboot_init before
15827         grub_main, and grub_reboot_fini and grub_halt_fini after it.
15828         Call setjmp with MAIN_ENV to go back afterwards.
15829         Call grub_machine_fini right before return.
15831         * include/grub/util/misc.h: Include setjmp.h.
15832         (main_env): New prototype.
15834         * include/grub/kernel.h (grub_machine_fini): New prototype.
15835         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15836         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15838         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15839         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15840         * term/i386/pc/console.c (grub_console_fini): Likewise.
15842         * util/i386/pc/misc.c: New file.
15844         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15845         util/i386/pc/misc.c, commands/i386/pc/halt.c and
15846         commands/i386/pc/reboot.c.
15848 2005-02-14  Guillem Jover  <guillem@hadrons.org>
15850         * include/grub/dl.h (grub_dl_check_header): New prototype.
15851         (grub_arch_dl_check_header): Change return type to grub_err_t,
15852         remove size parameter and export function.  Update all callers.
15853         * kern/dl.c (grub_dl_check_header): New function.
15854         (grub_dl_load_core): Use `grub_dl_check_header' instead of
15855         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
15856         are inside the core.
15857         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15858         independent ELF header checks.
15859         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15860         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15861         `grub_dl_check_header' instead of explicit checks.  Check for the
15862         ELF type.
15863         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15864         `grub_dl_check_header' instead of explicit checks.  Remove arch
15865         specific ELF header checks.
15867         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15868         argument SIZE.
15870 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
15872         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15873         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15875 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
15877         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15878         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15879         (part_map_iterate): Clear `grub_errno' and return 0 if
15880         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15881         * partmap/amiga.c (amiga_partition_map_iterate): Return
15882         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15883         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15885 2005-02-01  Guillem Jover  <guillem@hadrons.org>
15887         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15888         help info.
15890 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15892         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15893         Removed prototype.
15894         (grub_rescue_cmd_linux): New prototype.
15895         (grub_rescue_cmd_initrd): Likewise.
15896         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15897         `bi_rec'.
15898         (grub_linux_release_mem): Release the memory for the initrd.
15899         (grub_load_linux): Renamed from this...
15900         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
15901         Changed `entry' not to be static.  Loop over memory regions to
15902         find another one when the default fails.
15903         (grub_rescue_cmd_initrd): New function.
15904         (grub_linux_init): Remove function.
15905         (grub_linux_fini): Likewise.
15906         (GRUB_MOD_INIT): Register `initrd'.
15907         (GRUB_MOD_FINI): Unregister `initrd'.
15908         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15909         Function removed.
15910         (grub_linux_normal_fini): Likewise.
15911         (GRUB_MOD_INIT): Register `initrd'.
15912         (GRUB_MOD_FINI): Unregister `initrd'.
15914 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15916         * commands/help.c: New file.
15917         * normal/arg.c (show_help): Renamed to...
15918         (grub_arg_show_help): ... this.
15919         * commands/i386/pc/halt.c: New file.
15920         * commands/i386/pc/reboot.c: Likewise.
15921         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15922         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15923         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15924         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15925         variables.
15926         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15927         `commands/help.c'.
15928         (pkgdata_MODULES): Add `help.mod'.
15929         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15930         * grub/i386/pc/init.h (grub_reboot): New prototype.
15931         (grub_halt): Likewise.
15932         * include/grub/normal.h (grub_arg_show_help): New prototype.
15933         (grub_help_init): Likewise.
15934         (grub_help_fini): Likewise.
15935         * util/grub-emu.c (main): Initialize and deinitialize the help
15936         command.
15938         * normal/cmdline.c (grub_cmdline_get): Doc fix.
15940         * normal/command.c (grub_command_init): Fixed the description of
15941         the `set' and `unset' commands.
15943 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15945         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15946         function.
15947         * commands/ieee1275/halt.c: New file.
15948         * commands/ieee1275/reboot.c: Likewise.
15949         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15950         `__attribute__ ((unused))'.  Some GCS related fixed.
15951         (grub_suspend_init) [GRUB_UTIL]: Function removed.
15952         (grub_suspend_fini): Likewise.
15953         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15954         and `halt.mod'.
15955         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15956         (halt_mod_CFLAGS): New variables.
15957         * include/grub/powerpc/ieee1275/ieee1275.h
15958         (grub_ieee1275_interpret): New prototype.
15960 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
15962         * include/grub/misc.h (memmove): New prototype.
15963         (memcpy): Likewise.
15965 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
15967         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15968         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
15970 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
15972         * kern/misc.c (grub_strndup): Function rewritten.
15974 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
15976         * normal/menu.c (TERM_WIDTH): Macro redefined.
15977         (TERM_TOP_BORDER_Y): Likewise.
15978         (draw_border): Replaced while-loop by a for-loop.  Make the number
15979         of lines consistent with the number of lines displayed in
15980         print_entries.  Added a margin below the rectangle.
15981         (print_entry): Make the entry fit in the rectangle.
15982         (print_entries): Display the scroll arrows next to the right
15983         border.
15985 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15987         * fs/minix.c (grub_minix_find_file): Reserve more space for
15988         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
15989         `grub_strncpy' to copy `path' into it.
15991 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15993         Add the loopback device, a device via which files can be accessed
15994         as devices.
15996         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15997         (pkgdata_MODULES): Add loopback.mod.
15998         (loopback_mod_SOURCES): New variable.
15999         (loopback_mod_CFLAGS): Likewise.
16000         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16001         `disk/loopback.c'.
16002         (pkgdata_MODULES): Add loopback.mod.
16003         (loopback_mod_SOURCES): New variable.
16004         (loopback_mod_CFLAGS): Likewise.
16005         * disk/loopback.c: new file.
16006         * include/grub/normal.h (grub_loop_init): New prototype.
16007         (grub_loop_fini): New prototype.
16008         * util/grub-emu.c (main): Initialize and de-initialize loopback
16009         support.
16010         * include/grub/disk.h (grub_disk_dev_id): Add
16011         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16013 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
16015         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16016         function.
16017         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16018         (suspend_mod_SOURCES): New variable.
16019         (suspend_mod_CFLAGS): Likewise.
16020         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16021         New prototype.
16022         * commands/ieee1275/suspend.c: New file.
16024 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16026         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16027         ((unused))' to `__attribute__ ((used))'.
16028         (GRUB_MOD_FINI): Likewise.
16029         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16030         * genmk.rb (PModule): Assign space to common symbols when linking
16031         modules.
16033 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
16035         * include/grub/mm.h (grub_mm_init_region): Change the type of the
16036         `unsigned' arguments to `grub_size_t'.
16037         (grub_malloc): Likewise.
16038         (grub_realloc): Likewise.
16039         (grub_memalign): Likewise.
16040         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16041         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16042         * util/misc.c (grub_malloc): Likewise.
16043         (grub_realloc): Likewise.
16044         * kern/mm.c (get_header_from_pointer): Change the casts to
16045         `unsigned' into a cast to `grub_size_t'.
16047         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16048         point to `currnode' when `currnode' is changed.
16050         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
16051         Schottelius <nico-linux@schottelius.org>.
16053 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
16055         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16056         (note_path): Remove variable.
16057         (GRUB_IEEE1275_NOTE_NAME): New macro.
16058         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16059         (grub_ieee1275_note_hdr): New structure.
16060         (grub_ieee1275_note_desc): Likewise.
16061         (grub_ieee1275_note): Likewise.
16062         (load_note): Remove `dir' argument.  All callers updated.  Remove
16063         `note_img' and `path'.  Do not load a file from `note_path'.
16064         Initialize a struct grub_ieee1275_note and write that to `out'.
16065         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16067 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
16069         * util/misc.c (grub_util_read_image): Revert last change.  It
16070         called `grub_util_read_at', which seeks from the beginning of the
16071         file.
16073 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
16075         * TODO: Add note about endianness in grub-mkimage.
16076         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16077         section.
16078         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16079         (grub_mkimage_SOURCES): New target.
16080         * include/grub/kernel.h (grub_start_addr): Remove variable.
16081         (grub_end_addr): Likewise.
16082         (grub_total_module_size): Likewise.
16083         (grub_kernel_image_size): Likewise.
16084         (GRUB_MODULE_MAGIC): New constant.
16085         (grub_module_info): New structure.
16086         (grub_arch_modules_addr): New prototype.
16087         (grub_get_end_addr): Remove prototype.
16088         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16089         * include/grub/powerpc/ieee1275/kernel.h: New file.
16090         * include/grub/util/misc.h (grub_util_get_fp_size): New
16091         prototype.
16092         (grub_util_read_at): Likewise.
16093         (grub_util_write_image_at): Likewise.
16094         * kern/main.c (grub_get_end_addr): Remove function.
16095         (grub_load_modules): Call grub_arch_modules_addr instead of using
16096         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
16097         the grub_module_info fields instead of calling grub_get_end_addr
16098         as loop conditions.  Move grub_add_unused_region code here.
16099         (grub_add_unused_region): Remove function.
16100         * kern/i386/pc/init.c: Include grub/cache.h.
16101         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
16102         one call to add_mem_region.
16103         (grub_arch_modules_addr): New function.
16104         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16105         (grub_total_module_size): Likewise.
16106         Include grub/machine/kernel.h.
16107         (grub_arch_modules_addr): New function.
16108         * util/grub-emu.c (grub_end_addr): Remove variable.
16109         (grub_total_module_size): Likewise.
16110         (grub_arch_modules_addr): New function.
16111         * util/misc.c: Include unistd.h.
16112         (grub_util_get_fp_size): New function.
16113         (grub_util_read_at): Likewise.
16114         (grub_util_write_image_at): Likewise.
16115         (grub_util_read_image): Call grub_util_read_at.
16116         (grub_util_write_image): Call grub_util_write_image_at.
16117         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16118         additional memory in kernel_img for a struct grub_module_info.
16119         Fill in that grub_module_info.
16120         * util/powerpc/ieee1275/grub-mkimage.c: New file.
16122 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16124         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16125         New function.
16126         * include/grub/powerpc/ieee1275/ieee1275.h
16127         (grub_ieee1275_milliseconds): New prototype.
16128         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16129         Change to 1000.
16130         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16131         grub_ieee1275_milliseconds.
16133 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16135         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16136         variable.
16137         (find_options): New function.
16138         (cmain): Call find_options.
16139         * include/grub/powerpc/ieee1275/ieee1275.h
16140         (grub_ieee1275_realmode): New extern variable.
16141         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16142         grub_map if grub_ieee1275_realmode is false.
16144 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
16146         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16147         lines are inserted and make it work like readline.  Reported by
16148         Vincent Pelletier <subdino2004@yahoo.fr>.
16150 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
16152         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16154         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16155         `kern/powerpc/cache.S'.
16157 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
16159         * genmk.rb: Handle the `Program' class in the main loop.  Written
16160         by Johan Rydberg <jrydberg@gnu.org>.
16161         (Program): New class.
16162         (programs): New variable.
16163         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16164         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
16165         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
16166         (help_arch): Function removed.
16167         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16168         `powerpc/libgcc.h' and `loader.h'.
16169         (pkgdata_PROGRAMS): New variable.
16170         (sbin_UTILITIES): Variable removed.
16171         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16172         (grubof_SOURCES): Variable re-defined so it only includes the
16173         core functionality.
16174         (grubof_CFLAGS): Remove `-DGRUBOF'.
16175         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16176         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16177         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16178         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16179         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16180         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16181         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16182         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16183         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16184         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16185         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16186         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16187         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16188         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16189         (pc_mod_CFLAGS): New variables.
16190         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16191         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16192         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16193         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16194         Moved from here...
16195         * include/grub/i386/pc/init.h (grub_os_area_addr)
16196         (rub_os_area_size): ... to here.
16197         * include/grub/powerpc/ieee1275/ieee1275.h
16198         (grub_ieee1275_entry_fn): Export symbol.
16199         * include/grub/powerpc/ieee1275/init.h: New file.
16200         * include/grub/powerpc/libgcc.h: Likewise.
16201         * include/grub/cache.h: Likewise.
16202         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
16203         <hollis@penguinppc.org>.
16204         * kern/dl.c: Include <grub/cache.h>.
16205         (grub_dl_flush_cache): New function.
16206         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16207         for this module.
16208         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16209         (grub_console_init): Removed prototypes.
16210         (grub_machine_init): Don't initialize the modules anymore.
16211         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16212         static.
16213         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16214         Macro undef removed.
16215         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16216         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16217         relocation `R_PPC_REL32'.  Return an error when the relocation is
16218         unknown.
16219         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16220         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16221         * util/misc.c (grub_arch_sync_caches): Likewise.
16223 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
16225         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16226         `symlist.c', add `grubof_symlist.c'.
16227         (symlist.c): Variable removed.
16228         (grubof_HEADERS): Variable added.
16229         (grubof_symlist.c): New target.
16230         (kernel_syms.lst): Use `grubof_HEADERS' instead of
16231         `kernel_img_HEADERS'.
16232         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16233         * kern/powerpc/dl.c: New file.
16234         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16235         Function removed.
16236         (grub_arch_dl_relocate_symbols): Likewise.
16237         (grub_register_exported_symbols): Likewise.
16239 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
16241         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16242         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
16243         to fail instead.  Reported by Vincent Pelletier
16244         <subdino2004@yahoo.fr>.
16246         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16247         it is not allocated.  Reported by Vincent Pelletier
16248         <subdino2004@yahoo.fr>.
16250         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16251         output so the output looks better.
16253 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
16255         Modulize the partition map support and add support for the amiga
16256         partition map.
16258         * commands/ls.c: Include <grub/partition.h> instead of
16259         <grub/machine/partition.h>.
16260         * kern/disk.c: Likewise.
16261         * kern/rescue.c: Likewise.
16262         * loader/i386/pc/chainloader.c: Likewise.
16263         * normal/cmdline.c: Likewise.
16264         * kern/powerpc/ieee1275/init.c: Likewise.
16265         (grub_machine_init): Call `grub_pc_partition_map_init',
16266         `grub_amiga_partition_map_init' and
16267         `grub_apple_partition_map_init'.
16268         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16269         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
16270         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
16271         `partition.h' and `pc_partition.h'.
16272         (grub_setup_SOURCES): Remove
16273         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
16274         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16275         (grub_emu_SOURCES): Likewise.
16276         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16277         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16278         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16279         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16280         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
16281         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16282         (grubof_SOURCES): Likewise.
16283         * disk/i386/pc/partition.c: File removed.
16284         * disk/powerpc/ieee1275/partition.c: Likewise.
16285         * include/grub/powerpc/ieee1275/partition.h: Likewise.
16286         * include/grub/i386/pc/partition.h: Likewise.
16287         * kern/partition.c: New file.
16288         * partmap/amiga.c: Likewise.
16289         * partmap/apple.c: Likewise.
16290         * partmap/pc.c: Likewise.
16291         * include/grub/partition.h: Likewise..
16292         * include/grub/pc_partition.h: Likewise.
16293         * util/grub-emu.c: Include <grub/partition.h> instead of
16294         <grub/machine/partition.h>.
16295         (main): Call `grub_pc_partition_map_init',
16296         `grub_amiga_partition_map_init' and
16297         `grub_apple_partition_map_init' and deinitialize afterwards.
16298         * util/i386/pc/biosdisk.c: Include `#include
16299         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16300         `<grub/machine/partition.h>'.
16301         * util/i386/pc/grub-setup.c: Likewise.
16302         * util/i386/pc/biosdisk.c: Likewise.
16303         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16304         partition information in case of a PC partition.
16305         * util/i386/pc/grub-setup.c: Include `#include
16306         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16307         `<grub/machine/partition.h>'.
16308         (setup): Only access the PC specific partition information in case
16309         of a PC partition.
16311 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
16313         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16314         (grub_longjmp): Likewise.
16315         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16316         20.
16317         * normal/powerpc/setjmp.S: New file.
16318         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16319         `normal/powerpc/setjmp.S'.
16320         (grubof_CFLAGS): Add `-DGRUBOF'.
16321         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16322         [GRUB_UTIL && !GRUBOF].
16324 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
16326         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16327         property named `name'.  Correctly handle the error returned by
16328         `grub_ieee1275_finddevice' if a device can not be opened.
16330 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16332         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16333         `actual' for negativity.
16334         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16335         kern/fshelp.c.
16337 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16339         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16340         (PAGE_OFFSET): New macro.
16341         (CRTC_ADDR_PORT): Likewise.
16342         (CRTC_DATA_PORT): Likewise.
16343         (START_ADDR_HIGH_REGISTER): Likewise.
16344         (START_ADDR_LOW_REGISTER): Likewise.
16345         (GRAPHICS_ADDR_PORT): Likewise.
16346         (GRAPHICS_DATA_PORT): Likewise.
16347         (READ_MAP_REGISTER): Likewise.
16348         (INPUT_STATUS1_REGISTER): Likewise.
16349         (INPUT_STATUS1_VERTR_BIT): Likewise.
16350         (page): New variable.
16351         (wait_vretrace): New function.
16352         (set_read_map): Likewise.
16353         (set_start_address): Likewise.
16354         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
16355         the right page.
16356         (check_vga_mem): Take the page into account.
16357         (write_char): Likewise.
16358         (write_cursor): Likewise.
16359         (scroll_up): Likewise.  Copy the page to the page that is not
16360         shown and switch between both pages.
16361         (grub_vga_putchar): Fix off by one error.
16362         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
16363         account.
16365 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16367         Add support for iso9660 (including rockridge).
16369         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16370         (iso9660_mod_SOURCES): New variable.
16371         (iso9660_mod_CFLAGS): Likewise.
16372         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16373         * include/grub/fs.h (grub_iso9660_init): New prototype.
16374         * util/grub-emu.c (main): Call `grub_iso9660_init'.
16375         * fs/iso9660.c: New file.
16377         * include/grub/misc.h (grub_strncat): New prototype.
16378         * kern/misc.c (grub_strncat): New function.
16380         * fs/hfs.c (grub_hfs_mount): Translate the error
16381         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16382         * fs/jfs.c (grub_jfs_mount): Likewise.
16383         * fs/ufs.c (grub_ufs_mount): Likewise.
16385 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
16387         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16388         which initialized BAT registers.
16389         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16390         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16391         Move from here...
16392         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16393         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16394         ... to here.
16395         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16396         (grub_mapclaim): Likewise.
16397         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16398         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
16399         hand.
16401 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
16403         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16404         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16405         -ffreestanding and -msoft-float.
16407 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
16409         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16410         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16411         set in grub_ieee1275_flags.
16413 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
16415         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16416         prototype.
16417         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16418         grub_console_init first.
16419         Change the memory range used for grub_ieee1275_claim and
16420         grub_mm_init_region.
16421         Print an error message if the claim fails.
16422         Include <grub/misc.h>.
16424 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
16426         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16427         Call grub_children_iterate for device nodes of type `scsi',
16428         `ide', or `ata'.
16429         (grub_ofdisk_open): Remove manual device alias resolution.
16430         Fix memory leak when device cannot be opened.
16431         * include/grub/powerpc/ieee1275/ieee1275.h
16432         (grub_children_iterate): New prototype.
16433         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16434         New function.
16435         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16436         Return -1 if args.size was -1.
16438 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16440         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16441         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16442         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16443         Open Firmware's memory for it; claim memory from _start to _end.
16444         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16445         (_end): New extern.
16446         (_start): Zero BSS from __bss_start to _end.
16447         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16448         New extern.
16449         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16451 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16453         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16454         -1 if args.base was -1.
16456 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
16458         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16459         escape sequence instead of a literal ^L. Also call
16460         grub_ofconsole_gotoxy.
16462 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
16464         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16465         void *  arguments to grub_addr_t.  All callers updated.  Also make
16466         the `result' argument optional.
16467         (grub_ieee1275_release): change void * arguments to grub_addr_t.
16468         All callers updated.
16470 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
16472         * commands/ls.c (grub_ls_list_files): Use the string following the
16473         initial ')', if present, as the filesystem path.
16474         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16476         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16478 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
16480         Make the source code of the menu interface more readable.
16482         * normal/menu.c: Include grub/mm.h.
16483         (TERM_WIDTH): New macro.
16484         (TERM_HEIGHT): Likewise.
16485         (TERM_INFO_HEIGHT): Likewise.
16486         (TERM_MARGIN): Likewise.
16487         (TERM_SCROLL_WIDTH): Likewise.
16488         (TERM_TOP_BORDER_Y): Likewise.
16489         (TERM_LEFT_BORDER_X): Likewise.
16490         (TERM_BORDER_WIDTH): Likewise.
16491         (TERM_MESSAGE_HEIGHT): Likewise.
16492         (TERM_BORDER_HEIGHT): Likewise.
16493         (TERM_NUM_ENTRIES): Likewise.
16494         (TERM_FIRST_ENTRY_Y): Likewise.
16495         (TERM_ENTRY_WIDTH): Likewise.
16496         (TERM_CURSOR_X): Likewise.
16497         (draw_border): Use macros instead of magic numbers.
16498         (print_entry): Likewise.
16499         (print_entries): Likewise.
16500         (run_menu): Likewise. Also, handle the key 'e'.
16501         (run_menu_entry): Ignore empty command lines.
16502         (print_message): Added a new argument EDIT. If EDIT is true,
16503         print a different message.
16504         (init_page): Likewise.
16505         (edit_menu_entry): New function. Not implemented yet.
16507 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
16509         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16510         can be loaded from normal mode.
16512         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16513         `multiboot.mod'.
16514         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16515         (multiboot_mod_CFLAGS): New variables.
16516         * loader/i386/pc/linux_normal.c: New file.
16517         * loader/i386/pc/multiboot_normal.c: Likewise.
16519         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16520         attribute `unused'.
16522         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
16523         `fdiro' to read the mode information from instead of `diro'.
16525         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16526         looking up a symlink.
16528         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16529         macro.
16530         * normal/command.c (grub_command_execute): Don't parse the
16531         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16532         flags of the command.
16534         * normal/menu.c (grub_menu_run): Fix typo.
16536 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
16538         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16540         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16541         `y + 1' instead of `y - 1'.
16543         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16545 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
16547         From Hollis Blanchard <hollis@penguinppc.org>:
16548         * kern/misc.c (memmove): New alias for grub_memmove.
16549         (memcmp): New alias for grub_memcmp.
16550         (memset): New alias for grub_memset.
16551         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16552         Change "int handle" to "grub_ieee1275_phandle_t handle".
16553         * include/grub/powerpc/ieee1275/ieee1275.h
16554         (grub_ieee1275_get_property): Likewise.
16556 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
16558         Added normal mode command `chainloader' as module chain.mod, which
16559         depends on normal.mod and _chain.mod.
16561         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16562         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16563         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16564         Deleted prototype.
16565         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16566         but arguments parsing moved to ...
16567         (grub_chainloader_cmd): ... here.  New function.
16568         * include/grub/i386/pc/chainloader.h: New file.
16569         * loader/i386/pc/chainloader_normal.c: Likewise.
16571 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
16573         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16574         (grub_mkimage_LDFLAGS): Likewise.
16575         (grub_emu_SOURCES): Likewise.
16576         (kernel_img_HEADERS): Added fshelp.h.
16577         * fs/ext2.c: Include <grub/fshelp.h>.
16578         (FILETYPE_REG): New macro.
16579         (FILETYPE_INO_REG): Likewise.
16580         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16581         Changed all users.
16582         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
16583         all users.
16584         (grub_fshelp_node): New struct.
16585         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
16586         to a pointer.
16587         (grub_ext2_get_file_block): Removed function.
16588         (grub_ext2_read_block): New function.
16589         (grub_ext2_read_file): Replaced parameter `data' by `node'.
16590         This function was written.
16591         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
16592         (grub_ext2_find_file): Removed function.
16593         (grub_ext2_read_symlink): New function.
16594         (grub_ext2_iterate_dir): Likewise.
16595         (grub_ext2_open): Rewritten.
16596         (grub_ext2_dir): Rewritten.
16597         * include/grub/fshelp.h: New file.
16598         * fs/fshelp.c: Likewise.
16600 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
16602         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16603         (print_message): Add a missing newline.
16604         (run_menu): Added timeout support.
16605         (run_menu_entry): New local function.
16606         (grub_menu_run): Added support for booting.
16608         * kern/loader.c (grub_loader_is_loaded): New function.
16610         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16611         (grub_get_rtc): Exported.
16613         * include/grub/i386/pc/time.h: Include grub/symbol.h.
16614         (grub_get_rtc): Exported.
16616         * include/grub/normal.h (struct grub_command_list): Remove
16617         constant from the member `command'.
16619         * include/grub/loader.h (grub_loader_is_loaded): Declared.
16621         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16623         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16625 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
16627         Add support for the JFS filesystem.
16629         * fs/jfs.c: New file.
16630         * include/grub/fs.h (grub_jfs_init): New prototype.
16631         (grub_jfs_fini): New prototype.
16632         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16633         (grub_emu_SOURCES): Likewise.
16634         (pkgdata_MODULES): Add jfs.mod.
16635         (jfs_mod_SOURCES): New variable.
16636         (jfs_mod_CFLAGS): Likewise.
16637         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16638         (grubof_SOURCES): Likewise.
16639         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16641         * fs/fat.c (grub_fat_find_dir): Convert the filename little
16642         endian to the host endian.
16643         (grub_fat_utf16_to_utf8): Move function from there...
16644         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
16645         the endianness of the source string anymore.
16646         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16648 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
16650         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16651         (grub_boot_fini) [GRUB_UTIL]: Likewise.
16652         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16653         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16655         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16656         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
16657         for `node_found' and `it_dir'.
16658         (grub_hfs_dir): Add prototype for `dir_hook'.
16660         * fs/minix.c (grub_minix_get_file_block): Add prototype for
16661         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
16662         and `indir32' to silence a gcc warning.
16664         * include/grub/fs.h (grub_hfs_init): New prototype.
16665         (grub_hfs_fini): Likewise.
16668 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16670         Each disk device has its own id now. This is useful to make use
16671         of multiple disk devices.
16673         * include/grub/disk.h (grub_disk_dev_id): New enum.
16674         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16675         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16677         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16678         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16680         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16681         GRUB_DISK_DEVICE_OFDISK_ID as an id.
16683         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16684         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16686         * include/grub/disk.h (struct grub_disk_dev): Added a new member
16687         "id" which is used by the cache manager.
16689         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16690         of just "GRUB".
16692 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
16694         * fs/hfs.c: New file.
16695         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16696         (grub_emu_SOURCES): Likewise.
16697         (pkgdata_MODULES): Add hfs.mod.
16698         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16699         (grubof_SOURCES): Likewise.
16700         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16702         * include/grub/misc.h (grub_strncasecmp): Add prototype.
16703         * kern/misc.c (grub_strncasecmp): Add function.
16705 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
16707         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16708         with parentheses.
16710         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16711         (grub_ext2_dir): In case the directory entry type is unknown, read
16712         it from the inode.
16714 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
16716         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16717         grub_load_linux instead of grub_rescue_cmd_linux as second
16718         argument of grub_rescue_register_command.
16720         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16722 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
16724         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16725         function.
16726         * commands/boot.c: Remove the check for `GRUB_UTIL'.
16727         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16728         `loader/powerpc/ieee1275/linux.c',
16729         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16730         * include/grub/powerpc/ieee1275/ieee1275.h
16731         (grub_ieee1275_release): New prototype.
16732         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16733         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16734         normal, boot, linux and linux_normal.
16735         * loader/powerpc/ieee1275/linux.c: New file.
16736         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16738 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
16740         * normal/arg.c (grub_arg_parse): Correct error handling after
16741         reallocating the argumentlist (check if `argl' is not null instead
16742         of checking if `args' is not null).
16743         * kern/mm.c (grub_realloc): Return the same pointer when using the
16744         same region, instead of returning the header address.
16746 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16748         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16749         one block instead of two when looking for the initial partition.
16750         (grub_partition_probe): Initialize the local variable `p' with 0.
16751         Use base 10 for the grub_strtoul call.
16752         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
16753         need for one local variable.
16754         (grub_strtoul): Don't add the new value to `num', instead of that
16755         just assign it.
16757 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16759         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16760         (pxeboot_img_SOURCES): New variable.
16761         (pxeboot_img_ASFLAGS): Likewise.
16762         (pxeboot_img_LDFLAGS): Likewise.
16763         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
16764         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
16765         <lode_leroy@hotmail.com>.
16767 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16769         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16770         there was no input.
16772 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16774         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
16775         the history buffer logic.
16777 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16779         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16780         (FILETYPE_INO_SYMLINK): New macros.
16781         (grub_ext2_find_file): Check if the node is a directory using the
16782         inode stat information instead of using the filetype in the
16783         dirent.  Exclude the first character of an absolute symlink.
16784         (grub_ext2_dir): Mask out the filetype part of the mode member of
16785         the inode.
16787 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
16789         Add support for UFS version 1 and 2.  Add support for the minix
16790         filesystem version 1 and 2, both the variants with 14 and 30 long
16791         filenames.
16793         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16794         fs/minix.c.
16795         (grub_emu_SOURCES): Likewise.
16796         (pkgdata_MODULES): Add ufs.mod and minix.mod.
16797         (ufs_mod_SOURCES): New variable.
16798         (ufs_mod_CFLAGS): Likewise.
16799         (minix_mod_SOURCES): Likewise.
16800         (minix_mod_CFLAGS): Likewise.
16801         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16802         fs/minix.c.
16803         (grubof_SOURCES): Likewise.
16804         * fs/ufs.c: New file.
16805         * fs/minix.c: New file.
16806         * include/grub/fs.h (grub_ufs_init): New prototype.
16807         (grub_ufs_fini): Likewise.
16808         (grub_minix_init): Likewise.
16809         (grub_minix_fini): Likewise.
16810         * util/grub-emu.c (main): Initialize and deinitialize UFS and
16811         minix fs.
16813 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
16815         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16816         commands/ls.c, commands/terminal.c, commands/boot.c,
16817         commands/cmp.c and commands/cat.c.
16818         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16820         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16821         "env.h"
16823 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16825         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16826         and grub_, respectively. Because the conversion is trivial and
16827         mechanical, I omit the details here. Please refer to the CVS
16828         if you need more information.
16830 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16832         * include/pupa: Renamed to ...
16833         * include/grub: ... this.
16834         * util/i386/pc/pupa-mkimage.c: Renamed to ...
16835         * util/i386/pc/grub-mkimage.c: ... this.
16836         * util/i386/pc/pupa-setup.c: Renamed to ...
16837         * util/i386/pc/grub-setup.c: ... this.
16838         * util/pupa-emu.c: Renamed to ...
16839         * util/grub-emu.c: ... this.
16841 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
16843         Add support for the newworld apple macintosh (PPC).  This has been
16844         tested on the powerbook 2000 only.  It only adds support for
16845         generic ieee1275 functions, console and disk support.  This should
16846         be easy to port to other architectures with support for Open
16847         Firmware.
16849         * configure.ac: Accept the powerpc as host_cpu.  In the case of
16850         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
16851         specific tests are only executed while building for the i386.
16852         Inverse test for crosscompile.
16853         * genmk.rb (Utility): Allow assembler files.
16854         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16855         * conf/powerpc-ieee1275.rmk: New file.
16856         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16857         * disk/powerpc/ieee1275/partition.c: Likewise.
16858         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16859         * include/pupa/powerpc/ieee1275/console.h: Likewise.
16860         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16861         * include/pupa/powerpc/ieee1275/time.h: Likewise.
16862         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16863         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16864         * include/pupa/powerpc/ieee1275/loader.h
16865         * include/pupa/powerpc/setjmp.h: Likewise.
16866         * include/pupa/powerpc/types.h: Likewise.
16867         * kern/powerpc/ieee1275/init.c: Likewise.
16868         * kern/powerpc/ieee1275/openfw.c: Likewise.
16869         * term/powerpc/ieee1275/ofconsole.c: Likewise.
16871         These files were written by Johan Rydberg
16872         (jrydberg@night.trouble.net) and I only modified them slightly.
16874         * boot/powerpc/ieee1275/cmain.c: New file.
16875         * boot/powerpc/ieee1275/crt0.S: Likewise.
16876         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16877         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16879 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
16881         * Makefile.in: Update copyright.
16882         * genmodsrc.sh: Likewise.
16883         * gensymlist.sh: Likewise.
16884         * term/i386/pc/vga.c: Indent correctly.
16886         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16887         bugreporting address.
16888         * util/i386/pc/pupa-setup.c (usage): Likewise,
16889         (main): Call pupa_ext2_init and pupa_ext2_fini.
16891         * fs/fat.c (log2): Renamed to ...
16892         (fat_log2): ... this.
16893         All callers changed.
16894         * kern/misc.c (memcpy): Alias to pupa_memmove.
16895         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16896         lvalue cast.
16897         * util/console.c (pupa_ncurses_fini): Return 0.
16899         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16900         Move fail label here.
16901         [__GNU__]: Don't warn when using stat.
16902         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16903         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16904         long int. Use strtol instead of strtoul.
16906 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
16908         * commands/boot.c: New file.
16909         * commands/cat.c: Likewise.
16910         * commands/cmp.c: Likewise.
16911         * commands/ls.c: Likewise.
16912         * commands/terminal.c: Likewise.
16913         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16914         (pupa_register_command): Changed interface to match the new
16915         argument parser.
16916         (pupa_command_execute): Changed (almost rewritten) so it uses
16917         pupa_split_command.  Added support for setting variables using the
16918         syntax `foo=bar'.
16919         (rescue_command): Changed to work with the new argument parser.
16920         (terminal_command): Moved from here to commands/terminal.c.
16921         (set_command): New function.
16922         (unset_command): New function.
16923         (insmod_command): New function.
16924         (rmmod_command): New function.
16925         (lsmod_command): New function.
16926         (pupa_command_init): Don't initialize the command terminal
16927         anymore.  Initialize the commands set, unset, insmod, rmmod and
16928         lsmod.
16929         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16930         (kernel_img_HEADERS): Add arg.h and env.h.
16931         (pupa_mkimage_LDFLAGS): Add kern/env.c.
16932         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16933         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16934         normal/arg.c.
16935         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16936         terminal.mod.
16937         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16938         (boot_mod_SOURCES): New variable.
16939         (terminal_mod_SOURCES): Likewise.
16940         (ls_mod_SOURCES): Likewise.
16941         (cmp_mod_SOURCES): Likewise.
16942         (cat_mod_SOURCES): Likewise.
16944         * normal/arg.c: New file.
16945         * kern/env.c: Likewise.
16946         * include/pupa/arg.h: Likewise.
16947         * include/pupa/env.h: Likewise.
16948         * font/manager.c (font_command): Changed to match argument parsing
16949         interface changes.
16950         (PUPA_MOD_INIT): Likewise.
16951         * hello/hello.c (pupa_cmd_hello): Likewise.
16952         (PUPA_MOD_INIT): Likewise.
16953         * include/pupa/disk.h: Include <pupa/device.h>.
16954         (pupa_print_partinfo): New prototype.
16955         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16956         (pupa_dl_get_prefix): Likewise.
16957         * include/pupa/misc.h: Include <pupa/err.h>.
16958         (pupa_isgraph): New prototype.
16959         (pupa_isdigit): Likewise.
16960         (pupa_split_cmdline): Likewise.
16961         * include/pupa/normal.h: Include <pupa/arg.h>.
16962         (pupa_command): Changed the prototype of the member `func' to
16963         match the argument parsing interface.  Added member `options'.
16964         (pupa_register_command): Updated to match function.
16965         (pupa_arg_parse): New prototype.
16966         (pupa_hello_init) [PUPA_UTIL]: New prototype.
16967         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16968         (pupa_ls_init) [PUPA_UTIL]: Likewise.
16969         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16970         (pupa_cat_init) [PUPA_UTIL]: Likewise.
16971         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16972         (pupa_boot_init) [PUPA_UTIL]: Likewise.
16973         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16974         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16975         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16976         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16977         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16978         * kern/disk.c: Include <pupa/file.h>.
16979         (pupa_print_partinfo): New function.
16980         * kern/dl.c: Include <pupa/env.h>.
16981         (pupa_dl_dir): Variable removed.
16982         (pupa_dl_load): Use the environment variable `prefix' instead of
16983         the variable pupa_dl_dir.
16984         (pupa_dl_set_prefix): Function removed.
16985         (pupa_dl_get_prefix): Likewise.
16986         * kern/i386/pc/init.c: Include <pupa/env.h>.
16987         (pupa_machine_init): Use the environment variable `prefix' instead of
16988         using pupa_dl_set_prefix to set the prefix.
16989         * kern/main.c: Include <pupa/env.h>.
16990         (pupa_set_root_dev): Use the environment variable `prefix' instead of
16991         using pupa_dl_get_prefix to get the prefix.
16992         * kern/misc.c: Include <pupa/env.h>.
16993         (pupa_isdigit): New function.
16994         (pupa_isgraph): Likewise.
16995         (pupa_ftoa): Likewise.
16996         (pupa_vsprintf): Added support for printing values of the type
16997         `double'.  Make it possible to format variable output when using
16998         formatting like `%1.2%f'.
16999         (pupa_split_cmdline): New function.
17000         * kern/rescue.c: Include <pupa/env.h>.
17001         (next_word): Removed function.
17002         (pupa_rescue_cmd_prefix): Likewise.
17003         (pupa_rescue_cmd_set): New function.
17004         (pupa_rescue_cmd_unset): New function.
17005         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17006         split the command line instead of splitting it here.  Added
17007         support for setting variables using the syntax `foo=bar'.  Don't
17008         initialize the prefix command anymore.  Initialized the set and
17009         unset commands.
17010         * normal/cmdline.c: Include <pupa/env.h>.
17011         (pupa_tab_complete): Added prototypes for print_simple_completion,
17012         print_partition_completion, add_completion, iterate_commands,
17013         iterate_dev, iterate_part and iterate_dir. Moved code to print
17014         partition information from here to kern/disk.c.
17015         (pupa_cmdline_run): Don't check if the function exists anymore.
17016         * normal/main.c: Include <pupa/env.h>.
17017         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17018         instead of using pupa_dl_get_prefix to get the prefix.
17019         * term/i386/pc/vga.c: Include <pupa/arg.h>.
17020         (check_vga_mem): Cast pointers to `void *' to silence a gcc
17021         warning.
17022         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17023         (pupa_vga_setcolor): Declare unused variables with `__attribute__
17024         ((unused))' to silence a gcc warning.
17025         (pupa_vga_setcolor): Likewise.
17026         (debug_command): Changed to match argument parsing
17027         interface changes.
17028         * util/pupa-emu.c: Include <pupa/env.h>.
17029         (options): Added 0's for unused fields to silence a gcc warning.
17030         (argp): Likewise.
17031         (main): Use the environment variable `prefix' instead of using
17032         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
17033         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
17034         and terminal.
17036         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17037         * util/misc.c: Include <malloc.h>.
17038         (pupa_malloc): Rewritten so errors are correctly reported.
17039         (pupa_realloc): Likewise.
17040         (pupa_memalign): Likewise.
17041         (pupa_mm_init_region): Declare unused variables with
17042         `__attribute__ ((unused))' to silence a gcc warning.
17043         * normal/i386/setjmp.S: Remove tab at the end of the file to
17044         silence a gcc warning.
17045         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17046         variables with `__attribute__ ((unused))' to silence a gcc
17047         warning.
17048         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17049         local variable i unsigned to silence a gcc warning.
17051         * kern/term.c: Include <pupa/misc.h>.
17052         (pupa_more_lines): New variable.
17053         (pupa_more): Likewise.
17054         (pupa_putcode): When the pager is active pause at the end of every
17055         screen.
17056         (pupa_set_more): New function.
17057         * include/pupa/term.h (pupa_set_more): New prototype.
17060 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
17062         Now this project is GRUB 2 rather than PUPA. The location of
17063         the CVS repository was moved to GRUB's.
17065         * configure.ac: Use bug-grub as the reporting address.
17066         Use GRUB instead of PUPA.
17067         Change the version number to 1.90.
17069 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
17071         * genkernsyms.sh: Updated copyright information.
17072         * genmk.rb: Likewise.
17073         * genmodsrc.sh: Likewise.
17074         * gensymlist.sh: Likewise.
17075         * boot/i386/pc/boot.S: Likewise.
17076         * boot/i386/pc/diskboot.S: Likewise.
17077         * disk/i386/pc/biosdisk.c: Likewise.
17078         * disk/i386/pc/partition.c: Likewise.
17079         * font/manager.c: Likewise.
17080         * fs/ext2.c: Likewise.
17081         * fs/fat.c: Likewise.
17082         * include/pupa/boot.h: Likewise.
17083         * include/pupa/device.h: Likewise.
17084         * include/pupa/disk.h: Likewise.
17085         * include/pupa/dl.h: Likewise.
17086         * include/pupa/elf.h: Likewise.
17087         * include/pupa/err.h: Likewise.
17088         * include/pupa/file.h: Likewise.
17089         * include/pupa/font.h: Likewise.
17090         * include/pupa/fs.h: Likewise.
17091         * include/pupa/kernel.h: Likewise.
17092         * include/pupa/loader.h: Likewise.
17093         * include/pupa/misc.h: Likewise.
17094         * include/pupa/mm.h: Likewise.
17095         * include/pupa/net.h: Likewise.
17096         * include/pupa/normal.h: Likewise.
17097         * include/pupa/rescue.h: Likewise.
17098         * include/pupa/setjmp.h: Likewise.
17099         * include/pupa/symbol.h: Likewise.
17100         * include/pupa/term.h: Likewise.
17101         * include/pupa/types.h: Likewise.
17102         * include/pupa/i386/setjmp.h: Likewise.
17103         * include/pupa/i386/types.h: Likewise.
17104         * include/pupa/i386/pc/biosdisk.h: Likewise.
17105         * include/pupa/i386/pc/boot.h: Likewise.
17106         * include/pupa/i386/pc/console.h: Likewise.
17107         * include/pupa/i386/pc/init.h: Likewise.
17108         * include/pupa/i386/pc/kernel.h: Likewise.
17109         * include/pupa/i386/pc/linux.h: Likewise.
17110         * include/pupa/i386/pc/loader.h: Likewise.
17111         * include/pupa/i386/pc/memory.h: Likewise.
17112         * include/pupa/i386/pc/multiboot.h: Likewise.
17113         * include/pupa/i386/pc/partition.h: Likewise.
17114         * include/pupa/i386/pc/time.h: Likewise.
17115         * include/pupa/i386/pc/vga.h: Likewise.
17116         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17117         * include/pupa/util/getroot.h: Likewise.
17118         * include/pupa/util/misc.h: Likewise.
17119         * include/pupa/util/resolve.h: Likewise.
17120         * kern/device.c: Likewise.
17121         * kern/disk.c: Likewise.
17122         * kern/dl.c: Likewise.
17123         * kern/err.c: Likewise.
17124         * kern/file.c: Likewise.
17125         * kern/fs.c: Likewise.
17126         * kern/loader.c: Likewise.
17127         * kern/main.c: Likewise.
17128         * kern/misc.c: Likewise.
17129         * kern/mm.c: Likewise.
17130         * kern/rescue.c: Likewise.
17131         * kern/term.c: Likewise.
17132         * kern/i386/dl.c: Likewise.
17133         * kern/i386/pc/init.c: Likewise.
17134         * kern/i386/pc/lzo1x.S: Likewise.
17135         * kern/i386/pc/startup.S: Likewise.
17136         * loader/i386/pc/chainloader.c: Likewise.
17137         * loader/i386/pc/linux.c: Likewise.
17138         * loader/i386/pc/multiboot.c: Likewise.
17139         * normal/cmdline.c: Likewise.
17140         * normal/command.c: Likewise.
17141         * normal/main.c: Likewise.
17142         * normal/menu.c: Likewise.
17143         * normal/i386/setjmp.S: Likewise.
17144         * term/i386/pc/console.c: Likewise.
17145         * term/i386/pc/vga.c: Likewise.
17146         * util/console.c: Likewise.
17147         * util/genmoddep.c: Likewise.
17148         * util/misc.c: Likewise.
17149         * util/pupa-emu.c: Likewise.
17150         * util/resolve.c: Likewise.
17151         * util/unifont2pff.rb: Likewise.
17152         * util/i386/pc/biosdisk.c: Likewise.
17153         * util/i386/pc/getroot.c: Likewise.
17154         * util/i386/pc/pupa-mkimage.c: Likewise.
17155         * util/i386/pc/pupa-setup.c: Likewise.
17157 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
17159         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17160         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
17161         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
17162         reading and reset it after reading.
17163         (pupa_ext2_close): Return PUPA_ERR_NONE.
17165         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17166         Correct value.
17167         (struct linux_kernel_header): Add kernel_version and
17168         initrd_addr_max.
17169         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17170         pupa_file_read succeeds.
17171         (pupa_rescue_cmd_initrd): Implement.
17173 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
17175         * fs/ext2.c (pupa_ext2_label): New function.
17176         (pupa_ext2_fs): Added label.
17177         * fs/fat.c (pupa_fat_label): New function.
17178         (pupa_fat_fs): Added label.
17179         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17181         * kern/misc.c (pupa_strndup): New function.
17182         * include/pupa/misc.h (pupa_strndup): New prototype.
17184         * include/pupa/normal.h: Include <pupa/err.h>.
17185         (pupa_set_history): New prototype.
17186         (pupa_iterate_commands): New prototype.
17187         * normal/cmdline.c: Include <pupa/machine/partition.h>,
17188         <pupa/disk.h>, <pupa/file.h>.
17189         (hist_size): New variable.
17190         (hist_lines): Likewise.
17191         (hist_end): Likewise.
17192         (hist_used): Likewise.
17193         (pupa_set_history): New function.
17194         (pupa_history_get): Likewise.
17195         (pupa_history_add): Likewise.
17196         (pupa_history_replace): Likewise.
17197         (pupa_tab_complete): Likewise.
17198         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
17199         completion shows partitionnames while completing partitions, this
17200         feature was suggested by Jeff Bailey.
17201         * normal/command.c (pupa_iterate_commands): New function.
17202         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17203         (pupa_normal_init): Initialize history buffer.
17204         (PUPA_MOD_INIT): Likewise.
17205         (pupa_normal_fini): Free the history buffer.
17206         (PUPA_MOD_FINI): Likewise.
17208         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17209         key.
17211         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17212         * configure.ac [i386]: Check for regparam bug.
17213         (NESTED_FUNC_ATTR) [! i386]: Defined.
17215 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
17217         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17218         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17219         (pupa_emu_SOURCES): New variable.
17220         (pupa_emu_LDFLAGS): Likewise.
17221         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17222         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17223         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17224         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17225         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17226         (pupa_jmp_buf): New typedef.
17227         (pupa_setjmp) [PUPA_UTIL]: New macro.
17228         (pupa_longjmp) [PUPA_UTIL]: Likewise.
17229         * include/pupa/term.h (struct pupa_term): New member `refresh'.
17230         (pupa_refresh): New prototype.
17231         * include/pupa/util/getroot.h: New file.
17232         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17233         it.
17234         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17235         (pupa_rescue_cmd_cat): Likewise.
17236         (pupa_rescue_cmd_ls): Likewise.
17237         (pupa_rescue_cmd_testload): Likewise.
17238         (pupa_rescue_cmd_lsmod): Likewise.
17239         * normal/cmdline.c (pupa_cmdline_get): Likewise.
17240         * normal/menu.c (run_menu): Likewise.
17241         * kern/term.c (pupa_cls): Likewise.
17242         (pupa_refresh): New function.
17243         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17244         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17245         * util/console.c: New file.
17247         * util/i386/pc/getroot.c: New file.
17248         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17249         (pupa_putchar): New function.
17250         (pupa_refresh): Likewise.
17251         (xgetcwd): Function moved to ...
17252         (strip_extra_slashes): Likewise.
17253         (get_prefix): Likewise.
17254         * util/i386/pc/getroot.c: ... here.
17255         (find_root_device): Function moved and renamed to...
17256         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17257         Changed all callers.
17258         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17259         and renamed to...
17260         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17261         Changed all callers.
17262         * util/misc.c (pupa_memalign): New function.
17263         (pupa_mm_init_region): Likewise.
17264         (pupa_register_exported_symbols): Likewise.
17265         (pupa_putchar): Function removed.
17266         * util/pupa-emu.c: New file.
17268 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
17270         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17271         (_multiboot_mod_SOURCES): New variable.
17272         (_multiboot_mod_CFLAGS): Likewise.
17273         * loader/i386/pc/multiboot.c: New file.
17274         * include/pupa/i386/pc/multiboot.h: Likewise.
17275         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17276         (pupa_multiboot_real_boot): New function.
17277         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17278         (pupa_multiboot_real_boot): New prototype.
17279         (pupa_rescue_cmd_multiboot): Likewise
17280         (pupa_rescue_cmd_module): Likewise.
17282         * kern/loader.c (pupa_loader_set): Continue when
17283         pupa_loader_unload_func() fails.
17284         (pupa_loader_unset): New function.
17285         * include/pupa/loader.h (pupa_loader_unset): New prototype.
17287         * kern/misc.c (pupa_stpcpy): New function.
17288         * include/pupa/misc.h (pupa_stpcpy): New prototype.
17290 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
17292         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17293         for available extensions.
17295         * include/pupa/i386/pc/time.h: New file.
17296         * kern/disk.c: Include <pupa/machine/time.h>.
17297         (PUPA_CACHE_TIMEOUT): New macro.
17298         (pupa_last_time): New variable.
17299         (pupa_disk_open): Flush the cache when there was a timeout.
17300         (pupa_disk_close): Reset the timer.
17301         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17302         pupa_currticks.
17303         * util/misc.c: Include <sys/times.h>
17304         (pupa_get_rtc): New function.
17306 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
17308         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17309         as blocks.
17310         (pupa_ext2_get_file_block): Use blocks member.
17312         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17313         first block. Return -1 instead of pupa_errno on error.
17315 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
17317         * README: In the pupa-mkimage example use _chain instead of chain
17318         and ext2 instead of fat.
17319         * TODO: Replace ext2fs with jfs as an example.  Add an item for
17320         adding journal playback for ext2fs.
17321         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17322         (pkgdata_MODULES): Added ext2.mod.
17323         (ext2_mod_SOURCES): New variable.
17324         (ext2_mod_CFLAGS): Likewise.
17325         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17326         * include/pupa/misc.h (pupa_strncpy): New prototype.
17327         (pupa_strcat): Likewise.
17328         (pupa_strncmp): Likewise.
17329         * kern/misc.c (pupa_strcat): Enable function.
17330         (pupa_strncpy): New function.
17331         (pupa_strncmp): Likewise.
17332         * fs/ext2.c: New file.
17334         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17335         when the read failed before retrying.
17336         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17337         (_FILE_OFFSET_BITS): Likewise.
17338         * configure.ac: Added AC_SYS_LARGEFILE.
17340 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17342         * genmk.rb (PModule#rule): Make sure to get only symbol names
17343         from the output of nm.
17344         Reported by Robert Millan <zeratul2@wanadoo.es>.
17346 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17348         I forgot to check in these changes for a long time. This adds
17349         incomplete support for VGA console, and this is still very
17350         buggy. Also, a lot of consideration is required for I18N,
17351         UNICODE, and VGA font issues. Therefore, assume that this is
17352         such that "better than nothing".
17354         * font/manager.c: New file.
17355         * include/pupa/font.h: Likewise.
17356         * include/pupa/i386/pc/vga.h: Likewise.
17357         * term/i386/pc/vga.c: Likewise.
17358         * util/unifont2pff.rb: Likewise.
17360         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17361         (pkgdata_MODULES): Added vga.mod and font.mod.
17362         (vga_mod_SOURCES): New variables.
17363         (vga_mod_CFLAGS): Likewise.
17364         (font_mod_SOURCES): Likewise.
17365         (font_mod_CFLAGS): Likewise.
17367         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17369         * include/pupa/term.h: Include pupa/err.h.
17370         (struct pupa_term): Added init and fini.
17371         Changed the argument of putchar to pupa_uint32_t.
17373         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17374         (pupa_console_real_putchar): New prototype.
17375         (pupa_console_putchar): Removed.
17376         (pupa_console_checkkey): Exported.
17377         (pupa_console_getkey): Likewise.
17379         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17380         characters.
17382         * kern/term.c (pupa_term_set_current): Rewritten.
17383         (pupa_putchar): Likewise.
17384         (pupa_putcode): New function.
17386         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17387         (pupa_console_real_putchar): ... this.
17388         (pupa_vga_set_mode): New function.
17389         (pupa_vga_get_font): Likewise.
17391         * normal/command.c: Include pupa/term.h.
17392         (terminal_command): New function.
17393         (pupa_command_init): Register the command "terminal".
17395         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17396         (DISP_UP): Likewise.
17397         (DISP_RIGHT): Likewise.
17398         (DISP_DOWN): Likewise.
17399         (DISP_HLINE): Likewise.
17400         (DISP_VLINE): Likewise.
17401         (DISP_UL): Likewise.
17402         (DISP_UR): Likewise.
17403         (DISP_LL): Likewise.
17404         (DISP_LR): Likewise.
17406         * term/i386/pc/console.c (pupa_console_putchar): New function.
17408 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
17410         * util/resolve.c (pupa_util_resolve_dependencies): BUG
17411         FIX. Reverse the path_list.
17413         * include/pupa/normal.h: Export pupa_register_command and
17414         pupa_unregister_command.
17416         * hello/hello.c (pupa_cmd_hello): New module.
17417         * conf/i386-pc.rmk: Added hello.mod.
17419 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
17421         * kern/i386/pc/lzo1x.S: New file.
17423         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17424         (compress_kernel): New variable.
17425         (generate_image): Heavily modified to support compressing a
17426         large part of the core image.
17428         * util/misc.c (pupa_util_read_image): Fix a file descriptor
17429         leak.
17430         (pupa_util_load_image): New function.
17432         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17433         (pupa_compressed_size): New variable.
17434         (codestart): Enable Gate A20 here.
17435         Decompress the compressed part of the core image.
17436         Rearrange the code to put functions and variables which are
17437         required for initialization in the non-compressed part.
17438         Include lzo1x.S.
17440         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17441         here.
17443         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17445         * include/pupa/i386/pc/kernel.h
17446         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17447         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17448         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17449         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17450         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17452         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17454         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17455         (Utility#rule): Likewise.
17457         * configure.ac: Check if LZO is available.
17459 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
17461         * include/pupa/normal.h: New file.
17462         * include/pupa/setjmp.h: Likewise.
17463         * include/pupa/i386/setjmp.h: Likewise.
17464         * normal/cmdline.c: Likewise.
17465         * normal/command.c: Likewise.
17466         * normal/main.c: Likewise.
17467         * normal/menu.c: Likewise.
17468         * normal/i386/setjmp.S: Likewise.
17470         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17471         (pupa_rescue_cmd_initrd): Likewise.
17473         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17474         Likewise.
17476         * kern/i386/pc/startup.S (translation_table): New variable.
17477         (translate_keycode): New function.
17478         (pupa_console_getkey): Call translate_keycode.
17480         * kern/rescue.c (attempt_normal_mode): New function.
17481         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17482         it failed, print a message.
17484         * kern/mm.c (pupa_real_malloc): Print more information when a
17485         free magic is broken.
17486         (pupa_free): If the first free header is not free actually, set
17487         it to P.
17489         * kern/main.c (pupa_load_normal_mode): Just load the module
17490         "normal".
17491         (pupa_main): Don't print the message
17492         "Entering into rescue mode..." here.
17494         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17495         Declared.
17496         (pupa_rescue_cmd_initrd): Likewise.
17497         (pupa_rescue_cmd_initrd): Likewise.
17499         * include/pupa/symbol.h (FUNCTION): Specify the type.
17500         (VARIABLE): Likewise.
17502         * include/pupa/err.h (pupa_err_t): Added
17503         PUPA_ERR_UNKNOWN_COMMAND.
17505         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17506         (pupa_dl_get_prefix): Likewise.
17508         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17509         Added _chain.mod and _linux.mod instead of chain.mod and
17510         linux.mod.
17511         (chain_mod_SOURCES): Renamed to ...
17512         (_chain_mod_SOURCES): ... this.
17513         (chain_mod_CFLAGS): Renamed to ...
17514         (_chain_mod_CFLAGS): ... this.
17515         (linux_mod_SOURCES): Renamed to ...
17516         (_linux_mod_SOURCES): ... this.
17517         (linux_mod_CFLAGS): Renamed to ...
17518         (_linux_mod_CFLAGS): ... this.
17519         (normal_mod_SOURCES): New variable.
17520         (normal_mod_CFLAGS): Likewise.
17521         (normal_mod_ASFLAGS): Likewise.
17523 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
17525         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17526         possible.
17528         * kern/dl.c (pupa_dl_ref): Refer depending modules
17529         recursively.
17530         (pupa_dl_unref): Unrefer depending modules recursively.
17531         Don't call pupa_dl_unload implicitly, because PUPA can crash if
17532         a module is unloaded before one depending on that module is
17533         unloaded.
17534         (pupa_dl_unload): Unload depending modules explicitly,
17535         if possible.
17537 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
17539         * include/pupa/i386/pc/linux.h: New file.
17540         * loader/i386/pc/linux.c: Likewise.
17542         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17543         Removed.
17544         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17545         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17546         of PUPA_CHAINLOADER_BOOT_SECTOR.
17548         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17549         (pupa_linux_prot_size): New variable.
17550         (pupa_linux_tmp_addr): Likewise.
17551         (pupa_linux_real_addr): Likewise.
17552         (pupa_linux_boot_zimage): New function.
17553         (pupa_linux_boot_bzimage): Likewise.
17555         * kern/i386/pc/init.c (struct mem_region): New structure.
17556         (MAX_REGIONS): New macro.
17557         (mem_regions): New variable.
17558         (num_regions): Likewise.
17559         (pupa_os_area_addr): Likewise.
17560         (pupa_os_area_size): Likewise.
17561         (pupa_lower_mem): Likewise.
17562         (pupa_upper_mem): Likewise.
17563         (add_mem_region): New function.
17564         (compact_mem_regions): Likewise.
17565         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17566         the size of the conventional memory and that of so-called upper
17567         memory (before the first memory hole).
17568         Instead of adding each found region to free memory, use
17569         add_mem_region and add them after removing overlaps.
17570         Also, add only 1/4 of the upper memory to free memory. The rest
17571         is used for loading OS images. Maybe this is ad hoc, but this
17572         makes it much easier to relocate OS images when booting.
17574         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17575         (pupa_enter_rescue_mode): Don't register initrd and module.
17577         * kern/mm.c: Include pupa/dl.h.
17579         * kern/main.c: Include pupa/file.h and pupa/device.h.
17581         * kern/loader.c (pupa_loader_load_module_func): Removed.
17582         (pupa_loader_load_module): Likewise.
17584         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17585         ``.o''.
17587         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17588         (pupa_linux_tmp_addr): Likewise.
17589         (pupa_linux_real_addr): Likewise.
17590         (pupa_linux_boot_zimage): Likewise.
17591         (pupa_linux_boot_bzimage): Likewise.
17593         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17594         (pupa_upper_mem): Likewise.
17595         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17596         module is too dangerous.
17598         * include/pupa/loader.h (pupa_os_area_addr): Declared.
17599         (pupa_os_area_size): Likewise.
17600         (pupa_loader_set): Remove the first argument. Loader doesn't
17601         manage modules or initrd any longer.
17602         (pupa_loader_load_module): Removed.
17604         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17605         (linux_mod_SOURCES): New variable.
17606         (linux_mod_CFLAGS): Likewise.
17608 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
17610         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17611         the length of a blocklist correctly.
17613         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17614         Use ioctl only if the OS file is a block device.
17615         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17616         not very useful for normal files.
17618         * kern/main.c (pupa_set_root_dev): New function.
17619         (pupa_load_normal_mode): Likewise.
17620         (pupa_main): Call those above.
17622         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17623         pupa_uint16_t.
17625         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17627 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
17629         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17630         (setup): Configure the installed partition information and the
17631         dl prefix.
17633         * loader/i386/pc/chainloader.c (my_mod): New variable.
17634         (pupa_chainloader_unload): New function.
17635         (pupa_rescue_cmd_chainloader): Refer itself.
17636         (PUPA_MOD_INIT): Save its own module in MY_MOD.
17638         * kern/i386/pc/startup.S (install_partition): Removed.
17639         (version_string): Likewise.
17640         (config_file): Likewise.
17641         (pupa_install_dos_part): New variable.
17642         (pupa_install_bsd_part): Likewise.
17643         (pupa_prefix): Likewise.
17644         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17646         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17647         and pupa/misc.h.
17648         (make_install_device): New function.
17649         (pupa_machine_init): Set the dl prefix.
17651         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17652         (buf): Renamed to ...
17653         (linebuf): ... this.
17654         (pupa_rescue_cmd_prefix): New function.
17655         (pupa_rescue_cmd_insmod): Likewise.
17656         (pupa_rescue_cmd_rmmod): Likewise.
17657         (pupa_rescue_cmd_lsmod): Likewise.
17658         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17659         rmmod and lsmod.
17661         * kern/mm.c (pupa_memalign): If failed even after invalidating
17662         disk caches, unload unneeded modules and retry.
17664         * kern/misc.c (pupa_memmove): New function.
17665         (pupa_memcpy): Removed.
17666         (pupa_strcpy): New function.
17667         (pupa_itoa): Made static.
17669         * kern/dl.c (pupa_dl_iterate): New function.
17670         (pupa_dl_ref): Likewise.
17671         (pupa_dl_unref): Likewise.
17672         (pupa_dl_unload): Return if succeeded or not.
17673         (pupa_dl_unload_unneeded): New function.
17674         (pupa_dl_unload_all): Likewise.
17675         (pupa_dl_init): Renamed to ...
17676         (pupa_dl_set_prefix): ... this.
17677         (pupa_dl_get_prefix): New function.
17679         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17680         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17681         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17682         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17683         (pupa_install_dos_part): Declared.
17684         (pupa_install_bsd_part): Likewise.
17685         (pupa_prefix): Likewise.
17686         (pupa_boot_drive): Likewise.
17688         * include/pupa/types.h: Fix a typo.
17690         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17691         pupa_memmove.
17692         (pupa_memmove): Declared.
17693         (pupa_strcpy): Likewise.
17695         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17696         pupa_mod_init takes one argument, its own module.
17697         (pupa_dl_unload_unneeded): Declared.
17698         (pupa_dl_unload_all): Likewise.
17699         (pupa_dl_ref): Likewise.
17700         (pupa_dl_unref): Likewise.
17701         (pupa_dl_iterate): Likewise.
17702         (pupa_dl_init): Renamed to ...
17703         (pupa_dl_set_prefix): ... this.
17704         (pupa_dl_get_prefix): Declared.
17706         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17707         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17708         unloaded.
17709         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17710         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17712         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17713         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17715 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17717         * util/i386/pc/pupa-setup.c (setup): Define the internal
17718         function find_first_partition_start at the top level, because GCC
17719         3.0.x cannot compile internal functions in deeper scopes
17720         correctly.
17721         (find_root_device): Use lstat instead of stat.
17722         Don't follow symbolic links.
17723         Fix the path-constructing code.
17725         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17726         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17727         by a BLKGETSIZE ioctl first, because block devices don't fill
17728         the member st_mode of the structure stat on Linux.
17729         [__linux__] (linux_find_partition): Use a temporary buffer
17730         REAL_DEV for the working space. Copy it to DEV before returning.
17731         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17732         buffer cache consistent.
17733         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17734         strncmp. The previous value was merely wrong.
17735         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17737         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17738         FAT size is 12. The previous value was merely wrong.
17740         * kern/main.c (pupa_main): Don't split the starting message from
17741         newlines.
17743         * kern/term.c (pupa_putchar): Put CR after LF instead of before
17744         LF, because BIOS goes crazy about character attributes in this
17745         case.
17747 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17749         * include/i386/pc/util/biosdisk.h: New file.
17750         * util/i386/pc/biosdisk.c: Likewise.
17751         * util/i386/pc/pupa-setup.c: Likewise.
17753         * Makefile.in (INCLUDE_DISTFILES): Added
17754         include/pupa/i386/pc/util/biosdisk.h.
17755         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17756         directory util/i386/pc.
17757         (install-local): Added a rule for sbin_UTILITIES.
17758         (uninstall): Likewise.
17760         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17762         * util/misc.c (xrealloc): New function.
17763         (pupa_malloc): Likewise.
17764         (pupa_free): Likewise.
17765         (pupa_realloc): Likewise.
17766         (pupa_stop): Likewise.
17767         (pupa_putchar): Likewise.
17769         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17771         * include/pupa/util/misc.h (xrealloc): Declared.
17773         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17774         macro.
17775         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17776         (PUPA_BOOT_MACHINE_BPB_END): ... this.
17778         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17779         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17781         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17782         way should be implemented.
17783         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17785         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17786         the size of NAME for safety.
17787         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17788         0x88.
17790         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17791         (pupa_setup_SOURCES): Likewise.
17793         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17795 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17797         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17798         bunch of pushl's from pusha, because this destroys the return
17799         value.
17801 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17803         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17804         This means that any missing prototypes could be fatal. Also, you
17805         must take care when writing assembly code. See the comments at
17806         the beginning of startup.S, for more details.
17808         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17809         compilation mechanism.
17810         (pupa_chainloader_real_boot): Likewise.
17811         (pupa_biosdisk_rw_int13_extensions): Likewise.
17812         (pupa_biosdisk_rw_standard): Likewise.
17813         (pupa_biosdisk_check_int13_extensions): Likewise.
17814         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17815         (pupa_biosdisk_get_diskinfo_standard): Likewise.
17816         (pupa_get_memsize): Likewise.
17817         (pupa_get_mmap_entry): Likewise.
17818         (pupa_console_putchar): Likewise.
17819         (pupa_console_setcursor): Likewise.
17820         (pupa_getrtsecs): Use pushl instead of push.
17822         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17823         memory instead of the stack for a mmap entry, because some
17824         BIOSes may ignore the maximum size and overflow.
17826         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17828         * genmk.rb (PModule#rule): Compile automatically generated
17829         sources with module-specific CFLAGS as well as other sources.
17831 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17833         * configure.ac: Check ld.
17834         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17835         respectively, before checking endianness and sizes.
17837         * Makefile.in (LD): New variable.
17839 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17841         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17843 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17845         * Changelog: New file.