2009-07-15 Pavel Roskin <proski@gnu.org>
[grub2/jjazz.git] / ChangeLog
blob889bbd3caee4e4d956b62725935d01339d4a5ce1
1 2009-07-15  Pavel Roskin  <proski@gnu.org>
3         * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
4         the end of "Error" to make the message more readable.
6         * boot/i386/pc/boot.S (kernel_segment): Remove.
7         (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
8         for destination.
10         * boot/i386/pc/boot.S (boot_version): Remove.
11         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
12         Remove.
14         * include/grub/i386/pc/boot.h: Sort all offsets.
15         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
16         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
17         * boot/i386/pc/boot.S: Assert location of every offset listed in
18         include/grub/i386/pc/boot.h.
20 2009-07-13  Pavel Roskin  <proski@gnu.org>
22         * include/grub/i386/coreboot/machine.h: Rename
23         GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
24         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
25         multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
27         * kern/dl.c: Force native word size to suppress warnings when
28         compiling grub-emu.
30         * kern/device.c (grub_device_iterate): Change struct part_ent to
31         hold the name, not a pointer to it.  Use one grub_malloc() per
32         partition, not two.  Free partition_name if grub_malloc() fails.
33         Set ents to NULL only before grub_partition_iterate() is called.
35 2009-07-11  Bean  <bean123ch@gmail.com>
37         * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
38         childname.
40 2009-07-10  Bean  <bean123ch@gmail.com>
41 2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>
43         * kern/ieee1275/openfw.c (grub_children_iterate)
44         (grub_devalias_iterate): Fix size evaluation for property or path
45         strings, which was broken since r2132.
47 2009-07-07  Pavel Roskin  <proski@gnu.org>
49         * commands/search.c (search_file): Merge into ...
50         (search_fs): ... this.  Accept search type as argument.
51         (grub_cmd_search): Pass search type to search_fs().
53         * include/grub/util/console.h: New file.
54         * util/console.c: Use it instead of grub/machine/console.h.
55         * util/grub-emu.c: Likewise.
57         * lib/arg.c (find_long_option): Remove.
58         (find_long): Add `len' argument, make `s' const char *.
59         (grub_arg_parse): Parse long options in place, not in a
60         temporary buffer.
62 2009-07-06  Pavel Roskin  <proski@gnu.org>
64         * commands/search.c (search_fs): Fix potential NULL pointer
65         dereference.
67         * commands/search.c (search_fs): Replace QUID macro with quid_fn
68         function pointer.
70 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
72         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
73         comparison.
75 2009-07-05  Pavel Roskin  <proski@gnu.org>
77         * include/grub/i386/linux.h (struct linux_kernel_params):
78         Restore padding3, it's still needed.
80         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
81         FreeBSD.
82         * util/osdetect.lua: Likewise.
84 2009-07-05  Bean  <bean123ch@gmail.com>
86         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
88         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
89         (grub_lua_getenv): Likewise.
90         (grub_lua_setenv): Likewise.
91         (save_errno): New function.
92         (push_result): Likewise.
93         (grub_lua_enum_device): Likewise.
94         (grub_lua_enum_file): Likewise.
95         (grub_lua_file_open): Likewise.
96         (grub_lua_file_close): Likewise.
97         (grub_lua_file_seek): Likewise.
98         (grub_lua_file_read): Likewise.
99         (grub_lua_file_getline): Likewise.
100         (grub_lua_file_getsize): Likewise.
101         (grub_lua_file_getpos): Likewise.
102         (grub_lua_file_eof): Likewise.
103         (grub_lua_file_exist): Likewise.
104         (grub_lua_add_menu): Likewise.
106         * script/lua/grub_lua.h (isupper): New inline function.
107         (islower): Likewise.
108         (ispunct): Likewise.
109         (isxdigit): Likewise.
110         (strcspn): Change to normal function.
111         (strpbkr): New function declaration.
112         (memchr): Likewise.
114         * script/lua/grub_main.c (scan_str): New function.
115         (strcspn): Likewise.
116         (strpbrk): Likewise.
117         (memchr): Likewise.
119         * script/lua/linit.c (lualibs): Enable the string library.
121         * util/osdetect.lua: New file.
123 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
125         * include/grub/i386/linux.h (struct linux_kernel_params): Add
126         `capabilities' member.
128 2009-07-02  Pavel Roskin  <proski@gnu.org>
130         * genparttoollist.sh: Add missing newline at the end.
132 2009-07-01  Pavel Roskin  <proski@gnu.org>
134         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
136         * util/hostdisk.c (open_device): Remove `const' from
137         `sysctl_size', as sysctlbyname() can change it (in this case it
138         doesn't actually happen).
140         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
141         using signed long int constants.
143         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
144         constant to avoid a warning on FreeBSD.
146         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
147         where it's needed.
149         * Makefile.in: Install include/grub/machine symlink.
151         * Makefile.in: When installing symlinks, use "cp -fR", which
152         works on FreeBSD and MacOSX.
153         From Yves Blusseau <cl7m42e02@sneakemail.com>
155         * kern/dl.c (grub_dl_resolve_symbol): Make static.
156         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
158         * util/misc.c: Move grub_reboot() and grub_halt() ...
159         * util/grub-emu.c: ... here.  Make main_env static.
160         * include/grub/util/misc.h: Remove main_env.
162         * kern/mm.c: Use correct format to print size_t.
164         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
165         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
166         * kern/powerpc/dl.c: Likewise.
167         * kern/sparc64/dl.c: Likewise.
168         * kern/x86_64/dl.c: Likewise.
170 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
172         Fix grub-emu build on sparc64-ieee1275.
174         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Syncronize with ...
175         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
177 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
179         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
180         (grub_reboot, grub_halt): New functions.
182         * util/i386/pc/misc.c: Delete.  Update all users.
183         * util/sparc64/ieee1275/misc.c: Likewise.
184         * util/powerpc/ieee1275/misc.c: Likewise.
186 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
188         * conf/i386.rmk (setjmp_mod_SOURCES)
189         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
190         * conf/common.rmk (setjmp_mod_SOURCES)
191         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
192         to use $(target_cpu).
193         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
194         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
195         * conf/powerpc-ieee1275.rmk: Likewise.
196         * conf/sparc64-ieee1275.rmk: Likewise.
198         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
199         $(target_cpu) for kern/$(target_cpu)/dl.c.
200         * conf/i386-efi.rmk: Likewise.
201         * conf/i386-ieee1275.rmk: Likewise.
202         * conf/x86_64-efi.rmk: Likewise.
203         * conf/i386-coreboot.rmk: Likewise.
204         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
205         $(target_cpu) for kern/$(target_cpu)/dl.c and for
206         kern/$(target_cpu)/cache.S.
207         * conf/sparc64-ieee1275.rmk: Likewise.
209 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
211         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
212         type to `grub_uint8_t', and adjust `padding9' accordingly.
214 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
216         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
218         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
219         assembly in final jump, using register constraints.
221         (grub_linux_boot): For text mode, initialize `have_vga' using
222         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
224         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
225         right before the final jump.
227         Set `video_mode' to 0x3.
229         Document initialization of `video_page', `video_mode' and
230         `video_ega_bx'.
232 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
234         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
235         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
236         and set GRUB_LINUX_FLAG_QUIET appropiately.
238 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
240         Fix build on Debian / sparc.
242         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
244 2009-06-28  Pavel Roskin  <proski@gnu.org>
246         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
247         fix a warning.
249         * util/grub.d/10_linux.in: Match SUSE style initrd names.
251 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
253         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
254         `err'.
256 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
258         Revert r2338.
260         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
261         file can't be opened.  grub_file_open() is already supposed to set
262         grub_errno / grub_errmsg appropiately.
263         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
265 2009-06-27  Pavel Roskin  <proski@gnu.org>
266 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
268         * include/grub/dl.h: Include grub/elf.h.
269         (struct grub_dl): Add symtab field.
270         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
271         GRUB_MODULES_MACHINE_READONLY.
272         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
273         of the header for read-only modules.
274         (grub_dl_unload): Free mod->symtab for read-only modules.
275         * kern/i386/dl.c: Use mod->symtab.
276         * kern/powerpc/dl.c: Likewise.
277         * kern/sparc64/dl.c: Likewise.
278         * kern/x86_64/dl.c: Likewise.
280         * conf/i386-qemu.rmk: New file.
281         * kern/i386/qemu/startup.S: Likewise.
282         * kern/i386/qemu/mmap.c: Likewise.
283         * boot/i386/qemu/boot.S: Likewise.
284         * include/grub/i386/qemu/time.h: Likewise.
285         * include/grub/i386/qemu/serial.h: Likewise.
286         * include/grub/i386/qemu/kernel.h: Likewise.
287         * include/grub/i386/qemu/console.h: Likewise.
288         * include/grub/i386/qemu/boot.h: Likewise.
289         * include/grub/i386/qemu/init.h: Likewise.
290         * include/grub/i386/qemu/machine.h: Likewise.
291         * include/grub/i386/qemu/loader.h: Likewise.
292         * include/grub/i386/qemu/memory.h: Likewise.
294         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
295         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
296         [qemu] (pkglib_IMAGES): Add `boot.img'.
297         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
298         [qemu] (boot_img_FORMAT): New variables.
299         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
300         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
301         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
302         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
303         [qemu] (kernel_img_FORMAT): New variables.
305         * configure.ac: Recognise `i386-qemu'.
307         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
308         (for no compression).
309         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
310         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
311         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
312         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
313         ifdefs).
315 2009-06-27  Pavel Roskin  <proski@gnu.org>
317         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
318         read.
319         * efiemu/prepare32.c: Likewise.
320         * efiemu/prepare64.c: Likewise.
322 2009-06-26  Pavel Roskin  <proski@gnu.org>
324         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
325         * include/grub/elf.h: Define symbols without "32" or "64" based
326         on GRUB_TARGET_WORDSIZE.
327         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
328         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
329         ELF definitions.
330         * efiemu/loadcore64.c: Likewise.
331         * loader/i386/bsd32.c: Likewise.
332         * loader/i386/bsd64.c: Likewise.
333         * kern/dl.c: Remove own ELF definitions.
334         * util/i386/efi/grub-mkimage.c: Likewise.
336 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
338         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
339         segment 0x0 unconditionally, because the reference generated by
340         GAS is an absolute address.
342 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
344         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
345         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
347 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
349         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
350         indexes.  Check for -f explicitly.
351         (search_file): Improve error message.
352         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
354 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
356         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
357         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
359 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
361         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
362         * conf/i386-ieee1275.rmk: Likewise.
363         * conf/i386-coreboot.rmk: Likewise.
365         * kern/i386/pc/startup.S (grub_stop): Remove function.
366         * kern/i386/ieee1275/startup.S: Likewise.
367         * kern/i386/coreboot/startup.S: Likewise.
368         * kern/i386/misc.S (grub_stop): New function.
370 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
372         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
373         * kern/i386/realmode.S (real_to_prot): ... to here.
375 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
377         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
378         with `kernel.img'.
379         (kernel_elf_SOURCES): Rename to ...
380         (kernel_img_SOURCES): ... this.
381         (kernel_elf_HEADERS): Rename to ...
382         (kernel_img_HEADERS): ... this.  Update all users.
383         (kernel_elf_ASFLAGS): Rename to ...
384         (kernel_img_ASFLAGS): ... this.
385         (kernel_elf_CFLAGS): Rename to ...
386         (kernel_img_CFLAGS): ... this.
387         (kernel_elf_LDFLAGS): Rename to ...
388         (kernel_img_LDFLAGS): ... this.
389         * conf/i386-coreboot.rmk: Likewise.
390         * conf/powerpc-ieee1275.rmk: Likewise.
392         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
393         with "kernel.img".
395 2009-06-21  Pavel Roskin  <proski@gnu.org>
397         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
398         to match nested functions.
399         * loader/sparc64/ieee1275/linux.c: Likewise.
401         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
403 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
405         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
406         all i386 platforms.
408 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
410         Fix asm file handling on ELF, and remove workarounds.
412         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
413         and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
414         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
415         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
417 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
419         Load BSD ELF modules
421         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
422         and loader/i386/bsd64.c
423         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
424         (FREEBSD_MODTYPE_ELF_MODULE): New definition
425         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
426         (grub_freebsd_load_elfmodule32): New declaration
427         (grub_freebsd_load_elfmoduleobj64): Likewise
428         (grub_freebsd_load_elf_meta32): Likewise
429         (grub_freebsd_load_elf_meta64): Likewise
430         (grub_freebsd_add_meta): Likewise
431         (grub_freebsd_add_meta_module): Likewise
432         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
433         (grub_freebsd_add_meta_module): Likewise and move module-specific
434         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
435         (grub_cmd_freebsd): Add elf-kernel specific parts
436         based on grub_freebsd_add_meta_module
437         (grub_cmd_freebsd_module): Add type parsing moved from
438         grub_freebsd_add_meta_module
439         (grub_cmd_freebsd_module_elf): New function
440         (cmd_freebsd_module_elf): New variable
441         (GRUB_MOD_INIT): Register freebsd_module_elf
442         * loader/i386/bsd32.c: New file
443         * loader/i386/bsd64.c: Likewise
444         * loader/i386/bsdXX.c: Likewise
445         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
446         (grub_elf64_load): Likewise
447         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
448         All users updated
449         (grub_elf64_load_hook_t): Likewise
451 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
453         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
454         variable.
455         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
456         don't write a menu entry for recovery mode.
458 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
460         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
461         after it's no longer needed.
463 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
465         * include/grub/i386/loader.h (grub_linux_prot_size)
466         (grub_linux_tmp_addr, grub_linux_real_addr)
467         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
468         GRUB_MACHINE_PCBIOS.
469         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
470         common grub_util_info() call to ...
471         (generate_image): ... here.
472         Fix use of uninitialized memory, comparison of signed with
473         unsigned integers and memory leak.
474         Remove bogus module address message.
476 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
478         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
479         grub_raid_register
480         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
482 2009-06-19  Pavel Roskin  <proski@gnu.org>
484         * configure.ac: Remove stray AC_MSG_CHECKING.
486 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
488         * disk/scsi.c (grub_scsi_open): use continue instead of big if
490 2009-06-18  Pavel Roskin  <proski@gnu.org>
492         * conf/common.rmk: Add fs_file.mod.
493         * disk/fs_file.c: New file.
494         * include/grub/disk.h (enum grub_disk_dev_id): Add
495         GRUB_DISK_DEVICE_FILE_ID.
497 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
499         Fix build with Apple's toolchain. Part 2
501         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
502         a fake start
504 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
506         Fix build with Apple's toolchain. Part 1
508         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
509         for long calls
510         * configure.ac: remove a leftover AC_MSG_RESULT
511         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
512         Apple's toolchain
514 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
516         Fix warnings
518         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
519         (decomp_block): initialize ch
520         use grub_memcpy instead of memcpy
522 2009-06-17  Pavel Roskin  <proski@gnu.org>
524         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
525         version, use declarations needed to use vga_text as the startup
526         console.
528         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
529         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
530         the kernel.
531         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
532         and grub_at_keyboard_fini(), it's done on module load and
533         unload.
535 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
537         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
538         file can't be found.
539         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
541 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
543         Fix newline handling
545         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
546         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
547         (grub_script_yylex): don't segfault on unterminated script
548         newline terminates command and variable
550 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
552         avoid double grub_adjust_range call. Bug reported by David Simner
554         * kern/disk.c (grub_disk_write): change to raw disk access before
555         calling disk_read
557 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
559         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
560         spaces, for the benefit of help2man.
561         * util/i386/efi/grub-mkimage.c (usage): Likewise.
563 2009-06-16  Pavel Roskin  <proski@gnu.org>
565         * kern/i386/halt.c: Include grub/machine/init.h.
566         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
568 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
570         * util/grub.d/30_os-prober.in: Use ${root} in the generated
571         drivemap menuentry.
573 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
575         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
576         `echo' command.
578 2009-06-16  Pavel Roskin  <proski@gnu.org>
580         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
581         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
582         save %dx, we only need %dl and we never change it.
583         * boot/i386/pc/cdboot.S: Don't set the root drive.
584         * boot/i386/pc/pxeboot.S: Likewise.
585         * include/grub/i386/pc/boot.h: Remove
586         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
587         GRUB_BOOT_MACHINE_DRIVE_CHECK.
588         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
589         * kern/i386/pc/init.c (make_install_device): Remove references
590         to grub_root_drive.
591         * kern/i386/pc/startup.S: Likewise.
592         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
594 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
596         xnu_uuid command
598         * commands/xnu_uuid.c: new file
599         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
600         (xnu_uuid_mod_SOURCES): new variable
601         (xnu_uuid_mod_CFLAGS): likewise
602         (xnu_uuid_mod_LDFLAGS): likewise
603         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
604         * conf/i386-ieee1275.rmk: likewise
605         * conf/i386-pc.rmk: likewise
606         * conf/powerpc-ieee1275.rmk: likewise
607         * conf/sparc64-ieee1275.rmk: likewise
608         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
610 2009-06-16  Pavel Roskin  <proski@gnu.org>
612         * configure.ac: Avoid '==' in test command, it's not portable.
614 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
616         Probe command
618         * commands/probe.c: new file
619         * conf/common.rmk (pkglib_MODULES): add probe.mod
620         (probe_mod_SOURCES): new variable
621         (probe_mod_CFLAGS): likewise
622         (probe_mod_LDFLAGS): likewise
623         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
624         * conf/i386-ieee1275.rmk: likewise
625         * conf/i386-pc.rmk: likewise
626         * conf/powerpc-ieee1275.rmk: likewise
627         * conf/sparc64-ieee1275.rmk: likewise
629 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
631         Fix handling of string like \"hello\" and "a
632         b"
634         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
635         (grub_script_yylex): fix parsing of quoting, escaping and newline
637 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
639         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
640         handling
642 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
644         * util/grub-mkconfig.in: Fix parsing of --output option.
646 2009-06-12  Pavel Roskin  <proski@gnu.org>
648         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
649         genmk.rb don't need to be generated or installed.
651 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
653         * commands/i386/pc/drivemap_int13h.S: add more comments
655 2009-06-11  Pavel Roskin  <proski@gnu.org>
657         * Makefile.in (uninstall): Uninstall manuals.
659         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
660         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
661         and update-grub_lib in two places.
662         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
664         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
665         a compiler warning.
667         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
668         `entry_lo' to fix variable shadowing.
670 2009-06-11  Christian Franke  <franke@computer.org>
672         * kern/misc.c (__enable_execute_stack): Add missing return type
673         to prevent gcc warning.
675 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
677         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
679 2009-06-11  Pavel Roskin  <proski@gnu.org>
681         * Makefile.in: Don't rely on any scripts being executable.
682         Always use $(SHELL) to run shell scripts.
684         * configure.ac: Always define ___main if using -nostdlib.  This
685         fixes tests on Cygwin.
687 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
689         UDF fix
691         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
692         is in bytes and not in blocks
694 2009-06-11  Pavel Roskin  <proski@gnu.org>
696         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
697         warning.
699 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
701         * util/grub.d/30_os-prober.in: Fix a comment. Source
702         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
703         to set the root device.  Place drivemap command in the generated
704         chain entry.
706 2009-06-11  Pavel Roskin  <proski@gnu.org>
708         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
709         have long been resolved.
711 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
713         * util/grub.d/10_linux.in: Capitalise "Linux".
715         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
717 2009-06-11  Pavel Roskin  <proski@gnu.org>
719         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
720         fix a gcc warning and ensure that the function won't ever exit.
722         * kern/i386/ieee1275/init.c: Add missing prototype for
723         grub_stop_floppy().
725         * loader/ieee1275/multiboot2.c [__i386__]: Include
726         grub/cpu/multiboot.h.
728         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
729         casts to short - they are not portable and cause warnings.  Fix
730         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
732 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
734         Drivemap fixes
736         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
737         new function
738         (grub_get_root_biosnumber_saved): new variable
739         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
740         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
741         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
742         %dx after the call if necessary
743         * conf/common.rmk (pkglib_MODULES): remove boot.mod
744         (boot_mod_SOURCES): remove
745         (boot_mod_CFLAGS): remove
746         (boot_mod_LDFLAGS): remove
747         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
748         (boot_mod_SOURCES): new variable
749         (boot_mod_CFLAGS): likewise
750         (boot_mod_LDFLAGS): likewise
751         * conf/i386-efi.rmk: likewise
752         * conf/i386-ieee1275.rmk: likewise
753         * conf/i386-pc.rmk: likewise
754         * conf/powerpc-ieee1275.rmk: likewise
755         * conf/sparc64-ieee1275.rmk: likewise
756         * conf/x86_64-efi.rmk: likewise
757         * include/grub/i386/pc/biosnum.h: new file
758         * lib/i386/pc/biosnum.c: likewise
759         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
760         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
761         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
763 2009-06-10  Pavel Roskin  <proski@gnu.org>
765         * io/gzio.c (test_header): Don't reuse one buffer for all data.
766         Use separate variables.  Read only the file size at the end, but
767         not the checksum that we don't use.
769         * kern/file.c (grub_file_read): Use void pointer for the buffer.
770         Adjust all callers.
772         * kern/ieee1275/openfw.c: Remove libc includes.
773         * kern/ieee1275/cmain.c: Likewise.
774         * include/grub/ieee1275/ieee1275.h: Likewise.
776         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
777         compiler warnings.
779 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
781         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
782         `genparttoollist.sh'.
783         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
784         Add `*.sh' to the list find searches for and change `mdate.sh'
785         to `mdate-sh'.
787 2009-06-10  Pavel Roskin  <proski@gnu.org>
789         * include/grub/multiboot2.h: Provide compatibility defines for
790         multiboot2.h.
791         * include/multiboot2.h: Include stdint.h only if needed, using
792         angle brackets.
793         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
794         grub/multiboot2.h.
795         * loader/ieee1275/multiboot2.c: Likewise.
796         * loader/multiboot2.c: Likewise.
797         * loader/multiboot_loader.c: Likewise.
799         * configure.ac: Use -nostdlib when probing for the target.  It
800         should not be required to have libc for the target.
802         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
803         they fail without libc headers for the target.
804         * include/grub/powerpc/libgcc.h: Use weak attribute for all
805         exports.
806         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
807         preprocessor conditionals.
809         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
810         build system doesn't need to be aware of the tar.c internals.
812 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
814         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
816 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
818         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
819         disk limit to 26 for IDE, Virtio, Xen and SCSI.
821 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
823         * util/i386/pc/grub-install.in: Change the error message if UUIDs
824         aren't available if ata.mod gets used.
826 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
828         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
829         initialising controller.
830         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
832 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
834         * util/i386/pc/grub-install.in: Add a parameter --disk-module
835         to choose between ata and biosdisk module on i386-pc.
837 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
839         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
840         Subclass and Programming Interface fields in terms of the 3 byte
841         Class Code register.
842         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
844         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
845         interface is OHCI.  Add grub_dprintf for symmetry with
846         bus/usb/uhci.c.
847         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
848         interface is UHCI.  Add interf variable for programming
849         interface.  Print interface with class/subclass.
851         * bus/usb/ohci.c: Set interf with correct field.
853         * bus/usb/uhci.c: Remove unneeded doubled lines.
854         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
855         Remove whitespace inside comment.
857 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
859         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
860         as fallback an equivalent option without depth.
862 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
864         Not fail if unable to retrieve C/H/S on LBA disks
866         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
867         if unable to retrieve C/H/S on LBA disks
869 2009-06-08  Pavel Roskin  <proski@gnu.org>
871         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
872         about aliasing.
874 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
876         * Makefile.in (uninstall): Remove all $lib_DATA files.
878 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
880         Bugfix: install on partitionless device
882         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
883         is a whole disk
885 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
887         * Makefile.in (uninstall): Remove all $include_DATA files.
889 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
891         * commands/true.c: New file.  Implement the true and false commands.
892         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
893         (true_mod_SOURCES): New variable.
894         (true_mod_CFLAGS): Likewise.
895         (true_mod_LDFLAGS): Likewise.
897 2009-06-05  Colin D Bennett  <colin@gibibit.com>
899         Optimized font character lookup using binary search instead of linear
900         search.  Fonts now are required to have the character index ordered by
901         code point.
903         * font/font.c (load_font_index): Verify that fonts have ordered
904         character indices.
905         (find_glyph): Use binary search instead of linear search to find a
906         character in a font.
908 2009-06-05  Michael Scherer  <misc@mandriva.org>
910         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
911         uses case sensitive btree.
912         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
913         only for case insensitive filesystems.
915 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
917         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
918         * conf/common.rmk (search_mod_CFLAGS): likewise
920 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
922         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
923         compensate a compiler bug
925 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
927         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
928         instead of '\b'
930 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
932         Definitions for creating asm symbols with Apple's CC
934         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
935         [APPLE_CC] (VARIABLE): likewise
937 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
939         Disable lnxboot.img when compiled
940         with Apple's CC
942         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
943         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
944         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
945         [! APPLE_CC] (CODE_LENG): skip
946         [! APPLE_CC] (setup_sects): likewise
947         [! APPLE_CC]: skip filling
949 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
951         Address in trampolines based on 32-bit registers when compiled
952         with Apple's CC
954         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
955         for addresses
956         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
958 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
960         Avoid aliases when compiling with Apple's CC for PCBIOS machine
962         * kern/misc.c [APPLE_CC] (memcpy): new function
963         [APPLE_CC] (memmove): likewise
964         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
965         (memcpy): define alias conditionally on !APPLE_CC
966         (memset): likewise
967         (abort): likewise
968         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
969         APPLE_CC are defined
970         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
971         (grub_assert_fail): make prototype conditional
973 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
975         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
977         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
978         grub-macho2img
979         (CLEANFILES): add grub-macho2img
980         (grub_macho2img_SOURCES): new variable
981         * kern/i386/pc/startup.S (bss_start): new variable
982         (bss_end): likewise
983         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
984         * util/grub-macho2img.c: new file
986 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
988         Use objconv when compiling with Apple's CC
990         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
991         (efiemu64.o): likewise
992         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
993         when compiling with Apple's CC
994         (efiemu64_s.o): likewise
995         * configure.ac: check for objconv when compiling with Apple's CC
996         * genmk.rb: use objconv for modules when compiled with Apple's CC
998 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1000         Define segment as well as section when compiling with
1001         Apple's CC
1003         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1004         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1005         (efiemu_convert_pointer): likewise
1006         (efiemu_set_virtual_address_map): likewise
1007         (efiemu_convert_pointer): likewise
1008         (efiemu_getcrc32): likewise
1009         (init_crc32_table): likewise
1010         (reflect): likewise
1011         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1012         (GRUB_MOD_DEP): likewise
1014 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1016         Allow a compilation without -mcmodel=large
1018         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1019         when compiled without -mcmodel=large
1020         (filter_memory_map): remove memory post 4 GiB when compiled
1021         without -mcmodel=large
1022         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
1023         TARGET_CFLAGS when -mcmodel=large isn't supported
1025 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1027         Remove nested functions in efiemu core
1029         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
1031 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1033         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1035         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1036         temporary storage
1037         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1038         using Apple's CC
1039         (grub_cpu_is_tsc_supported): likewise
1040         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
1042 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1044         Absolute addressing through constant with Apple's cc
1046         * kern/i386/pc/startup.S: Define necessary constants
1047         and address through it when using ABS with Apple's CC
1048         * boot/i386/pc/diskboot.S: likewise
1049         * boot/i386/pc/boot.S: likewise
1050         * boot/i386/pc/lnxboot.S: likewise
1051         * boot/i386/pc/cdboot.S: likewise
1052         * mmap/i386/pc/mmap_helper.S: likewise
1053         * commands/i386/pc/drivemap_int13h.S: likewise
1055 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1057         Check if compiler is apple cc
1059         * Makefile.in (ASFLAGS): new variable
1060         (TARGET_ASFLAGS): likewise
1061         (TARGET_MODULE_FORMAT): likewise
1062         (TARGET_APPLE_CC): likewise
1063         (OBJCONV): likewise
1064         (TARGET_IMG_CFLAGS): likewise
1065         (TARGET_CPPFLAGS): add includedir
1066         * configure.ac: call grub_apple_cc and grub_apple_target_cc
1067         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1068         Check for linker script only if compiler isn't Apple's CC
1069         (TARGET_MODULE_FORMAT): set
1070         (TARGET_APPLE_CC): likewise
1071         (TARGET_ASFLAGS): likewise
1072         (ASFLAGS): likewise
1073         Check for objcopy only if compiler isn't Apple's CC
1074         Check for BSS symbol only if compiler isn't Apple's CC
1075         * genmk.rb: adapt nm options if we use Apple's utils
1076         * aclocal.m4 (grub_apple_cc): new test
1077         (grub_apple_target_cc): likewise
1079 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1081         Simplify sed expressions and improve awk
1083         * Makefile.in (install-local): simplify sed expression
1084         * gencmdlist.sh: likewise
1085         * genmoddep.awk: avoid adding module as a dependency of itself
1087 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1089         Add missing start symbols
1091         * boot/i386/pc/boot.S: add start
1092         * boot/i386/pc/pxeboot.S: likewise
1094 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1096         Fix wrong assumptions with grub-mkimage on EFI
1098         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1099         (relocate_addresses): consider both r_addend and value at offset
1100         (make_mods_section): zerofill modinfo and header
1101         (convert_elf): write prefix here
1103 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1105         Use .asciz instead of .string
1107         * i386/pc/diskboot.S: use .asciz instead of .string
1108         * i386/pc/boot.S: likewise
1109         * include/grub/dl.h (GRUB_MOD_DEP): likewise
1110         (GRUB_MOD_NAME): likewise
1112 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1114         gfxpayload support
1116         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1117         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1118         (grub_video_setup): remove
1119         (grub_video_set_mode): new prototype
1120         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1121         (vid_mode): remove
1122         (linux_vesafb_res): compile only on PCBIOS
1123         (grub_linux_boot): support gfxpayload
1124         * loader/i386/pc/xnu.c (video_hook): new function
1125         (grub_xnu_set_video): support gfxpayload
1126         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1127         (DEFAULT_VIDEO_HEIGHT): likewise
1128         (DEFAULT_VIDEO_FLAGS): likewise
1129         (DEFAULT_VIDEO_MODE): new definition
1130         (video_hook): new function
1131         (grub_gfxterm_init): use grub_video_set_mode
1132         * util/grub.d/30_os-prober.in: remove explicit modesetting before
1133         loading xnu
1134         * video/video.c (grub_video_setup): removed
1135         (grub_video_set_mode): new function based on grub_gfxterm_init and
1136         grub_video_setup
1138 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1140         Avoid calling biosdisk in drivemap
1142         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1143         (revparse_biosdisk): likewise
1144         (list_mappings): derive name from id directly
1145         (grub_cmd_drivemap): use tryparse_diskstring
1147 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1149         Script fixes
1151         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1152         (grub_lexer_param): add tokenonhold
1153         (grub_script_create_cmdline): remove cmdline. All callers updated
1154         (grub_script_function_create): make functionname
1155         grub_script_arg. All callers updated
1156         (grub_script_execute_argument_to_string): new prototype
1157         * kern/parser.c (state_transitions): reorder
1158         (grub_parser_cmdline_state): fix a bug and make more compact
1159         * script/sh/execute.c (grub_script_execute_argument_to_string):
1160         make global
1161         (grub_script_execute_cmdline): use new format
1162         * script/sh/function.c (grub_script_function_create): make functionname
1163         grub_script_arg. All callers updated
1164         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1165         (grub_script_yylex): remove
1166         (grub_script_yylex2): renamed to ...
1167         (grub_script_yylex): ...renamed
1168         parse the expressions like a${b}c
1169         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1170         (GRUB_PARSER_TOKEN_VAR): remove
1171         (GRUB_PARSER_TOKEN_NAME): likewise
1172         ("if"): declare as typeless
1173         ("while"): likewise
1174         ("function"): likewise
1175         ("else"): likewise
1176         ("then"): likewise
1177         ("fi"): likewise
1178         (text): remove
1179         (argument): likewise
1180         (script): accept empty scripts and make exit on error
1181         (arguments): use GRUB_PARSER_TOKEN_ARG
1182         (function): likewise
1183         (command): move error handling to script
1184         (menuentry): move grub_script_lexer_ref before
1185         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1186         argument. All callers updated
1188 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1190         Prevent GRUB from probing floppies during boot.
1192         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1193         * commands/search.c (options): Add --no-floppy.
1194         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1195         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1196         --no-floppy when searching for UUIDs.
1198 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1200         Simplify the code duplication in commands/search.c.
1202         * commands/search.c (search_label, search_fs_uuid): Merge into ...
1203         (search_fs): ... this.  Update all users.
1205 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
1207         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1209 2009-05-28  Pavel Roskin  <proski@gnu.org>
1211         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1212         Remove the original symlink explicitly.
1214         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1215         just one slash.  That's how grub_fshelp_find_file() does it.
1217 2009-05-26  Pavel Roskin  <proski@gnu.org>
1219         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1220         to `str'.
1222         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1223         possibly unused.
1225 2009-05-25  Christian Franke  <franke@computer.org>
1227         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1228         register.
1229         (grub_atapi_identify): Add wait after drive select.
1230         (grub_ata_identify): Do more strict status register check before
1231         calling grub_atapi_identify ().  Suppress error message if status
1232         register is 0x00 after command failure.  Add status register
1233         check after PIO read to avoid bogus identify due to stuck DRQ.
1234         Thanks to Pavel Roskin for testing.
1235         (grub_device_initialize): Remove unsafe status register check.
1236         Thanks to 'phcoder' for problem report and patch.
1237         Prevent sign extension in debug message.
1239 2009-05-23  Colin D Bennett  <colin@gibibit.com>
1241         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
1242         definition file, and functions defined in `normal/menu.c' have had
1243         their prototypes moved to `include/grub/menu.h' for consistency.
1245         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1246         from normal.h.
1247         (grub_menu_get_entry): Likewise.
1248         (grub_menu_get_timeout): Likewise.
1249         (grub_menu_set_timeout): Likewise.
1250         (grub_menu_execute_entry): Likewise.
1251         (grub_menu_execute_with_fallback): Likewise.
1252         (grub_menu_entry_run): Likewise.
1254         * include/grub/normal.h: Re-ordered and grouped function
1255         prototypes by file that the function is defined in.
1256         (grub_menu_execute_callback): Removed; moved to menu.h.
1257         (grub_menu_get_entry): Likewise.
1258         (grub_menu_get_timeout): Likewise.
1259         (grub_menu_set_timeout): Likewise.
1260         (grub_menu_execute_entry): Likewise.
1261         (grub_menu_execute_with_fallback): Likewise.
1262         (grub_menu_entry_run): Likewise.
1263         (grub_menu_addentry): Renamed from this ...
1264         (grub_normal_add_menu_entry): ... to this.
1266         * normal/main.c (grub_menu_addentry): Renamed from this ...
1267         (grub_normal_add_menu_entry): ... to this.
1269         * script/sh/execute.c (grub_script_execute_menuentry): Update
1270         reference to renamed grub_menu_addentry function.
1272 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
1274         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1276 2009-05-22  Pavel Roskin  <proski@gnu.org>
1278         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1279         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
1280         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
1281         compiling for the i386 targets, but not for the utilities.
1283         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1284         to grub_uint8_t.
1285         (grub_root_drive): Likewise.
1286         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1287         remove alignment.
1288         (grub_root_drive): Change size to byte.
1289         (grub_start_addr): Remove.
1290         (grub_end_addr): Likewise.
1291         (grub_apm_bios_info): Likewise.
1293 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
1295         * normal/i386: Remove.
1296         * normal/powerpc: Likewise.
1297         * normal/sparc64: Likewise.
1298         * normal/x86_64: Likewise.
1300 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
1302         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1303         * loader/i386/linux_trampoline.S: Fix indentation
1304         * loader/i386/xnu_helper.S: Likewise
1306 2009-05-18  Colin D Bennett  <colin@gibibit.com>
1308         Display error messages when parsing a Lua statement fails.
1309         Previously, executing a syntactically invalid statement like
1310         ")foo" or "bar;" would silently fail.
1312         * script/lua/grub_main.c (handle_lua_error): New function.
1313         (grub_lua_parse_line): Improved reporting of Lua parser and
1314         execution errors.
1316 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1318         Remove -Werror which causes build to fail on some systems
1320         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1321         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1322         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1324 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1326         trampoline for linux on 64-bit platform
1328         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1329         loader/i386/efi/linux_trampoline.S
1330         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1331         declaration
1332         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1333         here
1334         * loader/i386/linux_trampoline.S: moved here
1335         * loader/i386/efi/linux.c (allocate_pages): reserve space for
1336         trampoline
1337         (jumpvector): removed
1338         (grub_linux_trampoline_start): new declaration
1339         (grub_linux_trampoline_end): likewise
1340         (grub_linux_boot): use trampoline when on 64-bit platform
1341         * loader/i386/linux.c: likewise
1343 2009-05-16  Pavel Roskin  <proski@gnu.org>
1345         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1346         const to avoid a warning.
1347         (grub_lua_setenv): Likewise.
1348         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1349         lmsg to fix a warning.
1351 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1353         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1354         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1355         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1356         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1357         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1358         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1359         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1360         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1362 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1364         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1366 2009-05-16  Bean  <bean123ch@gmail.com>
1368         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1369         (lua_mod_SOURCES): New variable.
1370         (lua_mod_CFLAGS): Likewise.
1371         (lua_mod_LDFLAGS): Likewise.
1373         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1374         (setjmp_mod_SOURCES): New variable.
1375         (setjmp_mod_CFLAGS): Likewise.
1376         (setjmp_LDFLAGS): Likewise.
1378         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1379         (setjmp_mod_SOURCES): New variable.
1380         (setjmp_mod_CFLAGS): Likewise.
1381         (setjmp_LDFLAGS): Likewise.
1383         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1384         (setjmp_mod_SOURCES): New variable.
1385         (setjmp_mod_CFLAGS): Likewise.
1386         (setjmp_LDFLAGS): Likewise.
1388         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1389         (setjmp_mod_SOURCES): New variable.
1390         (setjmp_mod_CFLAGS): Likewise.
1391         (setjmp_LDFLAGS): Likewise.
1393         * normal/i386/setjmp.S: Moved from here ...
1394         * lib/i386/setjmp.S: ... Moved here
1395         * normal/x86_64/setjmp.S: Moved from here ...
1396         * lib/x86_64/setjmp.S: ... Moved here
1397         * normal/powerpc/setjmp.S: Moved from here ...
1398         * lib/powerpc/setjmp.S: ... Moved here
1399         * normal/sparc64/setjmp.S: Moved from here ...
1400         * lib/sparc64/setjmp.S: ... Moved here
1402         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1403         returns_twice in mingw.
1405         * script/lua/grub_lib.c: New file.
1406         * script/lua/grub_lib.h: Likewise.
1407         * script/lua/grub_lua.h: Likewise.
1408         * script/lua/grub_main.c: Likewise.
1409         * script/lua/lapi.c: Likewise.
1410         * script/lua/lapi.h: Likewise.
1411         * script/lua/lauxlib.c: Likewise.
1412         * script/lua/lauxlib.h: Likewise.
1413         * script/lua/lbaselib.c: Likewise.
1414         * script/lua/lcode.c: Likewise.
1415         * script/lua/lcode.h: Likewise.
1416         * script/lua/ldblib.c: Likewise.
1417         * script/lua/ldebug.c: Likewise.
1418         * script/lua/ldebug.h: Likewise.
1419         * script/lua/ldo.c: Likewise.
1420         * script/lua/ldo.h: Likewise.
1421         * script/lua/ldump.c: Likewise.
1422         * script/lua/lfunc.c: Likewise.
1423         * script/lua/lfunc.h: Likewise.
1424         * script/lua/lgc.c: Likewise.
1425         * script/lua/lgc.h: Likewise.
1426         * script/lua/linit.c: Likewise.
1427         * script/lua/liolib.c: Likewise.
1428         * script/lua/llex.c: Likewise.
1429         * script/lua/llex.h: Likewise.
1430         * script/lua/llimits.h: Likewise.
1431         * script/lua/lmathlib.c: Likewise.
1432         * script/lua/lmem.c: Likewise.
1433         * script/lua/lmem.h: Likewise.
1434         * script/lua/loadlib.c: Likewise.
1435         * script/lua/lobject.c: Likewise.
1436         * script/lua/lobject.h: Likewise.
1437         * script/lua/lopcodes.c: Likewise.
1438         * script/lua/lopcodes.h: Likewise.
1439         * script/lua/loslib.c: Likewise.
1440         * script/lua/lparser.c: Likewise.
1441         * script/lua/lparser.h: Likewise.
1442         * script/lua/lstate.c: Likewise.
1443         * script/lua/lstate.h: Likewise.
1444         * script/lua/lstring.c: Likewise.
1445         * script/lua/lstring.h: Likewise.
1446         * script/lua/lstrlib.c: Likewise.
1447         * script/lua/ltable.c: Likewise.
1448         * script/lua/ltable.h: Likewise.
1449         * script/lua/ltablib.c: Likewise.
1450         * script/lua/ltm.c: Likewise.
1451         * script/lua/ltm.h: Likewise.
1452         * script/lua/lua.h: Likewise.
1453         * script/lua/luaconf.h: Likewise.
1454         * script/lua/lualib.h: Likewise.
1455         * script/lua/lundump.c: Likewise.
1456         * script/lua/lundump.h: Likewise.
1457         * script/lua/lvm.c: Likewise.
1458         * script/lua/lvm.h: Likewise.
1459         * script/lua/lzio.c: Likewise.
1460         * script/lua/lzio.h: Likewise.
1462 2009-05-16  Bean  <bean123ch@gmail.com>
1464         * include/grub/kernel.h (grub_module_header_types): Add type
1465         OBJ_TYPE_CONFIG.
1467         * kern/main.c (grub_load_config): New function.
1468         (grub_main): Call grub_load_config to read boot config.
1470         * grub-mkimage (generate_image): New parameter config_path.
1471         (options): New option --config.
1472         (main): Parse --config option, and pass it to generate_image.
1474 2009-05-14  Christian Franke  <franke@computer.org>
1476         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1477         This fixes build on Cygwin.
1479 2009-05-14  Pavel Roskin  <proski@gnu.org>
1481         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1482         jump.  This saves two bytes, so the typical case of 2 swapped
1483         drives would fit 32 bytes.
1485 2009-05-13  Pavel Roskin  <proski@gnu.org>
1487         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1488         grub_uint32_t to avoid a warning.
1490         * loader/i386/linux.c (allocate_pages): When assigning
1491         real_mode_mem, cast through grub_size_t to fix a warning.  The
1492         code already makes sure that the value would fit a pointer.
1493         (grub_linux_setup_video): Cast render_target->data to
1494         grub_size_t to fix a warning.
1496 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
1498         * commands/i386/pc/drivemap.c: New file - implement drivemap
1499         command.
1500         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1501         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1503 2009-05-13  Pavel Roskin  <proski@gnu.org>
1505         * util/i386/pc/grub-setup.c (setup): Remove unused variable
1506         embedding_area_exists.
1508 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
1510         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1511         it easier to understand / work with.
1512         Improve warning messages for cases where there's no embedding area,
1513         or when it is too small (or core.img too large).
1515 2009-05-13  Pavel Roskin  <proski@gnu.org>
1517         * loader/i386/pc/multiboot2.c: Add necessary includes for
1518         grub_multiboot2_real_boot().
1520         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1521         PX record is always little-endian.  We only need the lower 2
1522         bytes of the mode.
1524         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1525         facilitate code reuse.
1526         (grub_cpio_mount): Use "struct head", not a char buffer.  This
1527         fixes a warning reported by gcc 4.4.
1529         * kernel/disk.c (grub_disk_read): Use void pointer for the
1530         buffer.
1531         (grub_disk_write): Use const void pointer for the buffer.
1532         Adjust all callers.  Remove unnecessary casts.
1534 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
1536         * util/i386/pc/grub-install.in: Update copyright year.
1538 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1540         gptsync
1542         * commands/gptsync.c: new file
1543         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1544         (gptsync_mod_SOURCES): new variable
1545         (gptsync_mod_CFLAGS): likewise
1546         (gptsync_mod_LDFLAGS): likewise
1547         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1548         new definition
1549         (GRUB_PC_PARTITION_TYPE_HFS): likewise
1550         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1551         * conf/i386-ieee1275.rmk: likewise
1552         * conf/i386-pc.rmk: likewise
1553         * conf/powerpc-ieee1275.rmk: likewise
1555 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1557         Fixed grub-emu
1559         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1560         (grub_dl_ref): likewise
1562 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
1564         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1565         split in two functions (one for msdos and one for gpt).
1567 2009-05-08  Pavel Roskin  <proski@gnu.org>
1569         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1570         not modified.
1572         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1573         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
1574         Initialize them with -1.  Add sanity check for bad1.  Eliminate
1575         nerr variable.
1577 2009-05-08  David S. Miller  <davem@davemloft.net>
1579         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1581 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
1583         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1584         existence.
1586 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
1588         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1589         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1591 2009-05-05  David S. Miller  <davem@davemloft.net>
1593         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1595 2009-05-05  Pavel Roskin  <proski@gnu.org>
1597         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1598         of grub_dl_ref() and grub_dl_unref().
1599         * commands/parttool.c: Remove preprocessor conditionals around
1600         grub_dl_ref() and grub_dl_unref().
1601         * fs/affs.c: Likewise.
1602         * fs/afs.c: Likewise.
1603         * fs/cpio.c: Likewise.
1604         * fs/ext2.c: Likewise.
1605         * fs/fat.c: Likewise.
1606         * fs/hfs.c: Likewise.
1607         * fs/hfsplus.c: Likewise.
1608         * fs/iso9660.c: Likewise.
1609         * fs/jfs.c: Likewise.
1610         * fs/minix.c: Likewise.
1611         * fs/ntfs.c: Likewise.
1612         * fs/reiserfs.c: Likewise.
1613         * fs/sfs.c: Likewise.
1614         * fs/udf.c: Likewise.
1615         * fs/ufs.c: Likewise.
1616         * fs/xfs.c: Likewise.
1617         * include/grub/dl.h: Likewise.
1618         * loader/xnu.c: Likewise.
1620 2009-05-04  Pavel Roskin  <proski@gnu.org>
1622         * commands/acpi.c: Remove unused variable my_mod.
1623         * partmap/amiga.c: Likewise.
1624         * partmap/apple.c: Likewise.
1625         * partmap/gpt.c: Likewise.
1626         * partmap/pc.c: Likewise.
1627         * partmap/sun.c: Likewise.
1628         * term/gfxterm.c: Likewise.
1629         * term/i386/pc/vesafb.c: Likewise.
1630         * term/i386/pc/vga.c: Likewise.
1632 2009-05-04  David S. Miller  <davem@davemloft.net>
1634         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1635         pointer args to grub_ieee1275_get_property().
1637         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1639         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1640         devices, and do not traverse down under controller nodes.
1642         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1643         (grub_ofdisk_open): Use it to un-escape "," characters.
1644         * kern/disk.c (find_part_sep): New.
1645         (grub_disk_open): Use it to find the first non-escaped ','
1646         character in the disk name.
1647         * util/ieee1275/devicemap.c (escape_of_path): New.
1648         (grub_util_emit_devicemap_entry): Use it.
1649         * util/sparc64/ieee1275/grub-install.in: Update script to
1650         strip partition specifiers properly by not triggering on
1651         '\' escaped ',' characters.
1653 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1655         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1656         to 0x300.
1657         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1658         resolutions.
1659         (linux_vesafb_modes): Add a lot of additional modes to the list (based
1660         on documentation from Wikipedia).
1662 2009-05-04  Pavel Roskin  <proski@gnu.org>
1664         * disk/ata.c: Spelling fixes.
1665         * disk/raid.c: Likewise.
1666         * disk/usbms.c: Likewise.
1667         * disk/dmraid_nvidia.c: Likewise.
1668         * kern/ieee1275/openfw.c: Likewise.
1669         * kern/ieee1275/init.c: Likewise.
1670         * kern/ieee1275/cmain.c: Likewise.
1671         * boot/i386/pc/cdboot.S: Likewise.
1672         * video/readers/png.c: Likewise.
1673         * video/i386/pc/vbe.c: Likewise.
1674         * fs/udf.c: Likewise.
1675         * fs/hfs.c: Likewise.
1676         * fs/reiserfs.c: Likewise.
1677         * efiemu/runtime/efiemu.c: Likewise.
1678         * efiemu/main.c: Likewise.
1679         * efiemu/mm.c: Likewise.
1680         * include/grub/elf.h: Likewise.
1681         * include/grub/xnu.h: Likewise.
1682         * include/grub/usbdesc.h: Likewise.
1683         * include/grub/usb.h: Likewise.
1684         * include/grub/script_sh.h: Likewise.
1685         * include/grub/lib/LzmaEnc.h: Likewise.
1686         * include/grub/efiemu/efiemu.h: Likewise.
1687         * include/grub/command.h: Likewise.
1688         * normal/menu.c: Likewise.
1689         * normal/main.c: Likewise.
1690         * normal/datetime.c: Likewise.
1691         * bus/usb/uhci.c: Likewise.
1692         * mmap/i386/uppermem.c: Likewise.
1693         * mmap/mmap.c: Likewise.
1694         * commands/acpi.c: Likewise.
1695         * commands/test.c: Likewise.
1696         * partmap/apple.c: Likewise.
1697         * font/font.c: Likewise.
1698         * loader/sparc64/ieee1275/linux.c: Likewise.
1699         * loader/macho.c: Likewise.
1700         * loader/i386/bsd_trampoline.S: Likewise.
1701         * loader/i386/bsd.c: Likewise.
1702         * loader/xnu.c: Likewise.
1703         * term/i386/pc/vesafb.c: Likewise.
1704         * term/usb_keyboard.c: Likewise.
1705         * util/resolve.c: Likewise.
1706         * util/getroot.c: Likewise.
1708 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1710         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1712 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1714         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1715         build error.
1717 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1719         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1720         parameter only available on BIOS.
1722 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1724         Removed wrong semicolon in declaration
1726         * grub/misc.h (grub_dprintf): remove semicolon
1728 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1730         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1731         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1732         is done by grub_cmd_linux() now).
1733         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1734         restore video to text mode.
1735         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1736         indicates lack of "vga=" parameter.  "vga=0" is mapped to
1737         `GRUB_LINUX_VID_MODE_NORMAL'.
1739 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1741         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1742         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1743         and `normal/script.c'.  Add `kern/rescue_reader.c',
1744         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1745         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1746         `grub_script.tab.c'.
1748         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1749         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1750         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1751         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1752         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1754         * Makefile.in: Remove duplicated 2008 in Copyright line.
1756 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1758         * util/misc.c (grub_util_warn): New function.  Emits a warning
1759         unconditionally.
1760         * include/grub/util/misc.h (grub_util_warn): New declaration.
1762         * util/i386/pc/grub-install.in: Understand --force and pass it down
1763         to grub-setup.
1765         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1766         down to setup().
1767         (setup): Improve error messages and add warnings when requested to
1768         install in odd layouts.  Refuse to install using blocklists unless
1769         --force was set.
1771 2009-05-04  martin f. krafft  <madduck@madduck.net>
1773         * disk/raid.c (grub_raid_scan_device): Improve debug message.
1775 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1777         Updated copyright year
1779         * fs/hfsplus.c: updated copyright year
1781 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1783         HFS+ UUID
1785         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1786         in the space previously used by unused3
1787         (grub_hfsplus_uuid): new function
1788         (grub_hfsplus_fs): added uuid field
1790 2009-05-03  Pavel Roskin  <proski@gnu.org>
1792         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1793         suppress warnings.  It's no longer needed.
1794         * disk/host.c: Likewise.
1795         * disk/ata_pthru.c: Likewise.
1796         * disk/loopback.c: Likewise.
1797         * hook/datehook.c: Likewise.
1798         * parttool/pcpart.c: Likewise.
1799         * fs/i386/pc/pxe.c: Likewise.
1800         * fs/ntfscomp.c: Likewise.
1801         * efiemu/main.c: Likewise.
1802         * mmap/mmap.c: Likewise.
1803         * commands/crc.c: Likewise.
1804         * commands/hexdump.c: Likewise.
1805         * commands/hdparm.c: Likewise.
1806         * commands/acpi.c: Likewise.
1807         * commands/echo.c: Likewise.
1808         * commands/minicmd.c: Likewise.
1809         * commands/blocklist.c: Likewise.
1810         * commands/memrw.c: Likewise.
1811         * commands/loadenv.c: Likewise.
1812         * commands/usbtest.c: Likewise.
1813         * commands/lsmmap.c: Likewise.
1814         * commands/boot.c: Likewise.
1815         * commands/parttool.c: Likewise.
1816         * commands/configfile.c: Likewise.
1817         * commands/search.c: Likewise.
1818         * commands/ieee1275/suspend.c: Likewise.
1819         * commands/cat.c: Likewise.
1820         * commands/i386/pc/pxecmd.c: Likewise.
1821         * commands/i386/pc/play.c: Likewise.
1822         * commands/i386/pc/halt.c: Likewise.
1823         * commands/i386/pc/vbeinfo.c: Likewise.
1824         * commands/i386/pc/vbetest.c: Likewise.
1825         * commands/lspci.c: Likewise.
1826         * commands/date.c: Likewise.
1827         * commands/handler.c: Likewise.
1828         * commands/ls.c: Likewise.
1829         * commands/test.c: Likewise.
1830         * commands/cmp.c: Likewise.
1831         * commands/efi/loadbios.c: Likewise.
1832         * commands/efi/fixvideo.c: Likewise.
1833         * commands/halt.c: Likewise.
1834         * commands/help.c: Likewise.
1835         * commands/reboot.c: Likewise.
1836         * hello/hello.c: Likewise.
1837         * script/sh/main.c: Likewise.
1838         * loader/xnu.c: Likewise.
1839         * term/terminfo.c: Likewise.
1840         * term/i386/pc/serial.c: Likewise.
1841         * term/usb_keyboard.c: Likewise.
1843 2009-05-03  David S. Miller  <davem@davemloft.net>
1845         * normal/menu.c: Include grub/parser.h
1847 2009-05-03  Pavel Roskin  <proski@gnu.org>
1849         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1850         not char*.
1851         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1852         Suggested by Javier Martín <lordhabbit@gmail.com>
1854         * util/i386/pc/grub-mkrescue.in: Allow for the case when
1855         efiemu??.o doesn't exist.
1856         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
1857         copying.
1859 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
1861         FreeBSD 64-bit support
1863         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1864         and loader/i386/bsd_trampoline.S
1865         (bsd_mod_ASFLAGS): new variable
1866         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1867         (FREEBSD_MODTYPE_KERNEL64): likewise
1868         (grub_bsd64_trampoline_start): likewise
1869         (grub_bsd64_trampoline_end): likewise
1870         (grub_bsd64_trampoline_selfjump): likewise
1871         (grub_bsd64_trampoline_gdt): likewise
1872         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1873         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1874         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1875         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1876         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1877         of "attrib" member
1878         * loader/i386/bsd_pagetable.c: new file
1879         * loader/i386/bsd_trampoline.S: likewise
1880         * loader/i386/bsd.c (ALIGN_QWORD): new macro
1881         (ALIGN_VAR): likewise
1882         (entry_hi): new variable
1883         (kern_end_mdofs): likewise
1884         (is_64bit): likewise
1885         (grub_freebsd_add_meta): use ALIGN_VAR
1886         (grub_e820_mmap): new declaration
1887         (grub_freebsd_add_mmap): new function
1888         (grub_freebsd_add_meta_module): support 64 bit kernels
1889         (grub_freebsd_list_modules): use ALIGN_VAR
1890         (gdt_descriptor): new declaration
1891         (grub_freebsd_boot): support 64 bit kernels
1892         (grub_bsd_elf64_hook): new function
1893         (grub_bsd_load_elf): support elf64
1895 2009-05-03  Bean  <bean123ch@gmail.com>
1897         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1898         after we get the result of if statement.
1900 2009-05-03  Bean  <bean123ch@gmail.com>
1902         * Makefile.in (enable_efiemu): New variable.
1904         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1905         set.
1906         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1907         path.
1908         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1909         path, add -mno-red-zone option.
1910         (efiemu64_s.o): Likewise.
1911         (efiemu64.o): Use macro $^ for source file.
1913         * configure.ac (--enable-efiemu): New option.
1915 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
1917         xnu support
1919         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1920         (pkglib_MODULES): add xnu.mod
1921         (xnu_mod_SOURCES): new variable
1922         (xnu_mod_CFLAGS): likewise
1923         (xnu_mod_LDFLAGS): likewise
1924         (xnu_mod_ASFLAGS): likewise
1925         * conf/i386-pc.rmk: likewise
1926         * conf/x86_64-efi.rmk: likewise
1927         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1928         new declaration
1929         * include/grub/i386/macho.h: new file
1930         * include/grub/i386/xnu.h: likewise
1931         * include/grub/macho.h: likewise
1932         * include/grub/machoload.h: likewise
1933         * include/grub/x86_64/macho.h: likewise
1934         * include/grub/x86_64/xnu.h: likewise
1935         * include/grub/xnu.h: likewise
1936         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1937         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1938         * loader/i386/efi/xnu.c: new file
1939         * loader/i386/pc/xnu.c: likewise
1940         * loader/i386/xnu.c: likewise
1941         * loader/i386/xnu_helper.S: likewise
1942         * loader/macho.c: likewise
1943         * loader/xnu.c: likewise
1944         * loader/xnu_resume.c: likewise
1945         * util/grub-dumpdevtree: likewise
1946         * include/grub/i386/pit.h: include grub/err.h
1947         (grub_pit_wait): export
1948         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1950 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1952         Efiemu
1954         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1955         _linux_efi, linux_efi.
1956         new files in grub-emu
1957         new targets efiemu32.o and efiemu64.o
1958         * loader/linux_normal_efiemu.c: likewise
1959         * loader/i386/efi/linux.c: added preliminary efiemu support
1960         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1961         files to copy
1962         * include/grub/autoefi.h: new file
1963         * include/grub/i386/efiemu.h: likewise
1964         * include/grub/i386/pc/efiemu.h: likewise
1965         * include/grub/efi/api.h: add LL suffix when necessary
1966         new definitions relating to tables
1967         * include/grub/efiemu/efiemu.h: new file
1968         * include/grub/efiemu/runtime.h: likewise
1969         * efiemu/prepare.c: likewise
1970         * efiemu/loadcore_common.c: likewise
1971         * efiemu/loadcore64.c: likewise
1972         * efiemu/runtime/efiemu.sh: likewise
1973         * efiemu/runtime/efiemu.S: likewise
1974         * efiemu/runtime/efiemu.c: likewise
1975         * efiemu/runtime/config.h: likewise
1976         * efiemu/prepare32.c: likewise
1977         * efiemu/main.c: likewise
1978         * efiemu/modules/pnvram.c: likewise
1979         * efiemu/modules/i386: likewise
1980         * efiemu/modules/i386/pc: likewise
1981         * efiemu/modules/acpi.c: likewise
1982         * efiemu/i386/pc/cfgtables.c: likewise
1983         * efiemu/i386/loadcore64.c: likewise
1984         * efiemu/i386/loadcore32.c: likewise
1985         * efiemu/prepare64.c: likewise
1986         * efiemu/loadcore.c: likewise
1987         * efiemu/symbols.c: likewise
1988         * efiemu/mm.c: likewise
1989         * efiemu/loadcore32.c: likewise
1991 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1993         ACPI spoofing
1995         * commands/acpi.c: new file
1996         * commands/i386/pc/acpi.c: likewise
1997         * commands/efi/acpi.c: likewise
1998         * include/grub/acpi.h: likewise
1999         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2000         (acpi_mod_SOURCES): new variable
2001         (acpi_mod_CFLAGS): likewise
2002         (acpi_mod_LDFLAGS): likewise
2003         * conf/i386-efi.rmk: likewise
2004         * conf/x86_64-efi.rmk: likewise
2006 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2008         Missing part from mmap patch
2010         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2011         (grub_mmap_unregister)
2012         (grub_mmap_free_and_unregister): use grub_mmap_register
2014 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2016         Mmap services
2018         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2019         * loader/i386/linux.c (find_mmap_size): likewise
2020         (allocate_pages): likewise
2021         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2022         (grub_fill_multiboot_mmap): likewise
2023         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2024         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2025         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2026         (OPENBSD_MMAP_RESERVED): likewise
2027         * include/grub/i386/pc/memory.h: include grub/memory.h
2028         (grub_lower_mem): removed
2029         (grub_upper_mem): likewise
2030         (GRUB_MACHINE_MEMORY_ACPI): new definition
2031         (GRUB_MACHINE_MEMORY_NVS): likewise
2032         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2033         (GRUB_MACHINE_MEMORY_HOLE): likewise
2034         (grub_machine_mmap_register): likewise
2035         (grub_machine_mmap_unregister): likewise
2036         (grub_machine_get_upper): likewise
2037         (grub_machine_get_lower): likewise
2038         (grub_machine_get_post64): likewise
2039         * include/grub/i386/efi/memory.h: new file
2040         * include/grub/x86_64/efi/memory.h: likewise
2041         * include/grub/efi/memory.h: likewise
2042         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2043         (mmap_mod_SOURCES): new variable
2044         (mmap_mod_LDFLAGS): likewise
2045         (mmap_mod_ASFLAGS): likewise
2046         * conf/i386-coreboot.rmk: likewise
2047         * conf/i386-ieee1275.rmk: likewise
2048         * conf/i386-efi.rmk: likewise
2049         * conf/x86_64-efi.rmk: likewise
2050         * include/grub/types.h (UINT_TO_PTR): new macro
2051         (PTR_TO_UINT32): likewise
2052         (PTR_TO_UINT64): likewise
2053         * include/grub/memory.h: new file
2054         * mmap/i386/pc/mmap.c: likewise
2055         * mmap/i386/pc/mmap_helper.S: likewise
2056         * mmap/i386/uppermem.c: likewise
2057         * mmap/mmap.c: likewise
2058         * mmap/efi/mmap.c: likewise
2059         * kern/i386/coreboot/init.c (grub_machine_init): don't use
2060         grub_upper_mem
2061         * kern/i386/pc/init.c (grub_lower_mem): removed variable
2062         (grub_upper_mem): likewise
2063         (grub_machine_init): don't use grub_upper_mem,
2064         make grub_lower_mem local
2065         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2066         grub_mmap_iterate and grub_mmap_get_upper
2067         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2069 2009-05-02  Bean  <bean123ch@gmail.com>
2071         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2072         script/sh/parser.y.
2073         (pkglib_MODULES): Add normal.mod and sh.mod.
2074         (normal_SOURCES): New variable.
2075         (normal_mod_CFLAGS): Likewise.
2076         (normal_mod_LDFLAGS): Likewise.
2077         (sh_mod_SOURCES): Likewise.
2078         (sh_mod_CFLAGS): Likewise.
2079         (sh_mod_LDFLAGS): Likewise.
2081         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2082         script/sh/lexer.c_DEPENDENCIES.
2083         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2084         kern/rescue_reader.c and kern/rescue_parser.c.
2085         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2086         (grub_emu_SOURCES): Change source files.
2087         (pkglib_MODULES): Remove normal.mod.
2088         (normal_SOURCES): Removed.
2089         (normal_mod_CFLAGS): Likewise.
2090         (normal_mod_LDFLAGS): Likewise.
2091         * conf/i386-coreboot.rmk: Likewise.
2092         * conf/i386-efi.rmk: Likewise.
2093         * conf/i386-ieee1276.rmk: Likewise.
2094         * conf/powerpc-ieee1275.rmk: Likewise.
2095         * conf/sparc64-ieee1275.rmk: Likewise.
2096         * conf/x86_64-efi.rmk: Likewise.
2098         * include/grub/command.h (grub_command_execute): New inline function.
2100         * include/grub/menu.h (grub_menu_entry): Removed commands field.
2102         * include/grub/normal.h: Remove <grub/setjmp.h>.
2103         (grub_fs_module_list): Moved to normal/autofs.c.
2104         (grub_exit_env): Removed.
2105         (grub_command_execute): Likewise.
2106         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2107         parameter script.
2108         (read_command_list): New function declaration.
2109         (read_fs_list): Likewise.
2111         * include/parser.h: Include <grub/reader.h>.
2112         (grub_parser_split_cmdline): Change type of getline parameter.
2113         (grub_parser): New structure.
2114         (grub_parser_class): New variable.
2115         (grub_parser_execute): New function declaration.
2116         (grub_register_rescue_parser): Likewise.
2117         (grub_parser_register): New inline function.
2118         (grub_parser_unregister): Likewise.
2119         (grub_parser_get_current): Likewise.
2120         (grub_parser_set_current): Likewise.
2122         * include/grub/reader.h: New file.
2123         * kern/reader.c: Likewise.
2124         * kern/rescue_parser.c: Likewise.
2125         * kern/rescue_reader.c: Likewise.
2126         * normal/autofs.c: Likewise.
2127         * normal/dyncmd.c: Likewise.
2129         * include/grub/rescue.h: Removed.
2130         * normal/command.h: Likewise.
2132         * include/grub/script.h: Moved to ...
2133         * include/grub/script_sh.h: ... Moved here.
2134         * normal/execute.c: Moved to ...
2135         * script/sh/execute.c: ... Moved here.
2136         * normal/function.c: Moved to ...
2137         * script/sh/function.c: ... Moved here.
2138         * normal/lexer.c: Moved to ...
2139         * script/sh/lexer.c: ... Moved here.
2140         * normal/parser.y: Moved to ...
2141         * script/sh/parser.y: ... Moved here.
2142         * normal/script.c: Moved to ...
2143         * script/sh/script.c: ... Moved here.
2145         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2146         <grub/reader.h>.
2147         (grub_exit_env): Removed.
2148         (fs_module_list): Moved to normal/autofs.c.
2149         (grub_file_getline): Don't handle comment here.
2150         (free_menu): Skip removed field entry->commands.
2151         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2152         script parameter.
2153         (read_config_file): Removed nested parameter, change getline function.
2154         (grub_enter_normal_mode): Removed.
2155         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2156         (read_command_list): Likewise.
2157         (autoload_fs_module): Moved to normal/autofs.c.
2158         (read_fs_list): Likewise.
2159         (reader_nested): New variable.
2160         (grub_normal_execute): Run parser.sh to switch to sh parser.
2161         (grub_cmd_rescue): Removed.
2162         (cmd_normal): Removed.
2163         (grub_cmd_normal): Unregister itself at the beginning. Don't register
2164         rescue command.
2165         (grub_cmdline_run): New function.
2166         (grub_normal_reader_init): Likewise.
2167         (grub_normal_read_line): Likewise.
2168         (grub_env_write_pager): Likewise.
2169         (cmdline): New variable.
2170         (grub_normal_reader): Likewise.
2171         (GRUB_MOD_INIT): Register normal reader and set as current, register
2172         pager hook, register normal command with grub_register_command_prio,
2173         so that it won't show up in command.lst.
2174         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2175         grub_fs_autoload_hook.
2177         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2178         (grub_menu_execute_entry): Replace grub_script_execute with
2179         grub_parser_execute, change parameter to grub_command_execute.
2181         * normal/menu_text.c: Remove <grub/script.h>.
2183         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2184         and <grub/parser.h>.
2185         (run): Change editor_getline to use new parser interface. Change
2186         parameter to grub_command_execute.
2188         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2189         <grub/reader.h> and <grub/parser.h>.
2190         (grub_load_normal_mode): Execute normal command.
2191         (grub_main): Call grub_register_core_commands,
2192         grub_register_rescue_parser and grub_register_rescue_reader, use
2193         grub_reader_loop to enter input loop.
2195         * kern/parser.c (grub_parser_split_cmdline): Change type of
2196         getline parameter.
2197         (grub_parser_class): New variable.
2198         (grub_parser_execute): New function.
2200         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2201         * loader/multiboot2.c: Likewise.
2202         * loader/sparc64/ieee1275/linux.c: Likewise.
2204         * util/grub-emu.c (read_command_list): New dummy function.
2206 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2208         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2209         count to 16 for CCISS and IDA.
2211 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2213         * normal/menu_text.c  (grub_wait_after_message): Print a newline
2214         after waiting for user input.
2216         * loader/i386/linux.c: Include `<grub/normal.h>'.
2217         (grub_cmd_linux): Improve the error message about `ask' mode, by
2218         waiting for user input so it's not missed (we can do this, since
2219         user requested interaction).
2221 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2223         Added missing lst to grub-mkrescue
2225         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2226         and ${input_dir}/parttool.lst
2228 2009-04-30  David S. Miller  <davem@davemloft.net>
2230         * util/hostdisk.c (device_is_wholedisk): New function.
2231         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2232         zero only if device_is_wholedisk() returns true.
2234         * util/hostdisk.c (convert_system_partition_to_system_disk):
2235         Handle virtual disk devices named /dev/vdiskX as found on sparc
2236         and powerpc.
2238         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2239         lettered partition specifier is found, convert to numbered.
2241 2009-04-29  David S. Miller  <davem@davemloft.net>
2243         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2244         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2246         * normal/command.c: Add missing newline at end of file.
2248         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2249         warnings.
2250         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2251         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2252         grub_ofdisk_read): Likewise, and deal similarly with the fact that
2253         ihandles have a 32-bit type but need to be stored in a "void *".
2255 2009-04-28  Pavel Roskin  <proski@gnu.org>
2257         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2258         not disk.  Adjust all dependencies.
2259         (grub_fs_uuid_close): Use grub_device_close(), not
2260         grub_disk_close().
2262         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2263         parent's partition, don't copy it by reference, as it gets freed
2264         on close.
2266 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2268         Preboot hooks support
2270         * commands/boot.c (struct grub_preboot_t): new declaration
2271         (preboots_head): new variable
2272         (preboots_tail): likewise
2273         (grub_loader_register_preboot_hook): new function
2274         (grub_loader_unregister_preboot_hook): likewise
2275         (grub_loader_set): launch preboot hooks
2276         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2277         (grub_loader_register_preboot_hook): new declaration
2278         (grub_loader_unregister_preboot_hook): likewise
2280 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2282         Warning fix
2284         * disk/scsi.c (grub_scsi_open): added missing cast when
2285         calling grub_dprintf
2287 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
2289         Bug and warning fixes
2291         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2292         declaration
2293         * commands/test.c (test_parse): fixed bug with file tests and corrected
2294         declaration of find_file
2296 2009-04-26  Pavel Roskin  <proski@gnu.org>
2298         * Makefile.in: Don't install empty manual pages if help2man is
2299         missing.  Use help2man option for output, not shell redirection.
2301 2009-04-26  David S. Miller  <davem@davemloft.net>
2303         * util/grub-mkdevicemap.c (make_device_map): Add missing
2304         NESTED_FUNC_ATTR to process_device().
2306 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2308         Test command
2310         * commands/test.c: rewritten to use bash-like test
2312 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2314         Parttool autoloading and improvements
2316         * Makefile.in (pkglib_DATA): add parttool.lst
2317         (parttool.lst): new target
2318         * genmk.rb: generate parttool-*
2319         (CLEANFILES): add #{parttool}
2320         (PARTTOOLFILES): new variable
2321         * genparttoollist.sh: new file
2322         * parttool/pcpart.c (grub_pcpart_boot): more feedback
2323         (grub_pcpart_type): likewise
2324         * commands/parttool.c (helpmsg): new variable
2325         (grub_cmd_parttool): output help if not enough arguments are supplied
2326         autoload modules
2327         (GRUB_MOD_INIT(parttool)): use helpmsg
2329 2009-04-24  David S. Miller  <davem@davemloft.net>
2331         Avoiding opening same device multiple times in device iterator.
2333         * kern/device.c: (grub_device_iterate): Define struct part_ent,
2334         and use it to build a list of partitions in iterate_disk() and
2335         iterate_partition().
2337         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2338         on disk->data.
2340         * disk/ieee1275/nand.c (grub_nand_iterate): Return
2341         grub_devalias_iterate() result instead of unconditional 0.
2342         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2343         Also, capture hook return value, either directly or via
2344         grub_children_iterate(), and propagate to caller.
2345         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2346         grub_children_iterate): Return value is now 'int' instead of
2347         'grub_err_t'.
2348         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2349         like a proper iterator, stopping when hooks return non-zero.
2350         (grub_devalias_iterate): Likewise.
2352 2009-04-23  David S. Miller  <davem@davemloft.net>
2354         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2356 2009-04-22  David S. Miller  <davem@davemloft.net>
2358         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2359         is larger than address_cells, use that value for address_cells too.
2361         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2362         IEEE1275_MAX_PATH_LEN): Define.
2363         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2364         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2365         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2366         'devtype'.  Explicitly NULL terminate devalias expansion.
2368         * util/sparc64/ieee1275/misc.c: New file.
2369         * util/sparc64/ieee1275/grub-setup.c: New file.
2370         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2371         * util/sparc64/ieee1275/grub-mkimage.c: New file.
2372         * util/sparc64/ieee1275/grub-install.in: New file.
2373         * util/ieee1275/ofpath.c: New file.
2374         * util/ieee1275/devicemap.c: New file.
2375         * util/devicemap.c: New file.
2376         * util/deviceiter.c: New file.
2377         * kern/sparc64/ieee1275/init.c: New file.
2378         * include/grub/util/ofpath.h: New file.
2379         * include/grub/util/deviceiter.h: New file.
2380         * util/grub-mkdevicemap.c: Include deviceiter.h.
2381         Implement using grub_util_emit_devicemap_entry and
2382         grub_util_iterate_devices.
2383         * conf/i386-corebook.rmk: Build util/deviceiter.c and
2384         util/devicemap.c into grub-mkdevicemap
2385         * conf/i386-efi.rmk: Likewise.
2386         * conf/i386-ieee1275.rmk: Likewise.
2387         * conf/i386-pc.rmk: Likewise.
2388         * conf/powerpc-ieee1275.rmk: Likewise.
2389         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2390         images and installation utilities.  Build kernel as image
2391         instead of as elf binary.  Use common rules as much as possible.
2393 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
2395         Correct GPT definition
2397         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2398         of "attrib" member
2400 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
2402         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2404 2009-04-19  David S. Miller  <davem@davemloft.net>
2406         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2407         (grub_rescue_cmd_linux): Rename to...
2408         (grub_cmd_linux): and fix prototype.
2409         (grub_rescue_cmd_initrd): Rename to...
2410         (grub_cmd_initrd): and fix prototype.
2411         (cmd_linux, cmd_initrd): New.
2412         (GRUB_MOD_INIT(linux)): Use grub_register_command().
2413         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2415 2009-04-17  Pavel Roskin  <proski@gnu.org>
2417         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2418         format.
2419         (grub_ohci_transfer): Likewise.
2421         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2423         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2424         return without a value.  Fix inconsistent indentation.
2426         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2427         match struct grub_fs.
2429         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2430         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2431         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2432         * commands/lspci.c (grub_lspci_iter): Likewise.
2434 2009-04-16  Bean  <bean123ch@gmail.com>
2436         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2437         value.
2439 2009-04-15  Pavel Roskin  <proski@gnu.org>
2441         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2442         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
2443         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2444         definitions.
2446 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2448         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2449         that no multiple data or metadata areas are supported and `Unknown
2450         metadata header'.
2452 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2454         Move loader out of the kernel
2456         * kern/loader.c: moved to ...
2457         * commands/boot.c: ... moved here
2458         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2459         * commands/boot.c (grub_cmd_boot): moved here. All users updated
2460         * include/grub/kernel.h (grub_machine_fini): export
2461         * include/grub/loader.h (grub_loader_is_loaded): update declaration
2462         (grub_loader_set): likewise
2463         (grub_loader_unset): likewise
2464         (grub_loader_boot): likewise
2465         * conf/common.rmk: new module boot.mod
2466         (pkglib_MODULES): add boot.mod
2467         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2468         (grub_emu_SOURCES): likewise
2469         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2470         (grub_emu_SOURCES): likewise
2471         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2472         (grub_emu_SOURCES): likewise
2473         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2474         (grub_emu_SOURCES): likewise
2475         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2476         (grub_emu_SOURCES): likewise
2477         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2478         (grub_emu_SOURCES): likewise
2479         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2480         (grub_emu_SOURCES): likewise
2482 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2484         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2486         * kern/misc.c (grub_itoa): Removed function
2487         (grub_ltoa): likewise
2488         (grub_vsprintf): use grub_lltoa
2490 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2492         Restore grub-emu
2494         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2495         * conf/i386-coreboot.rmk: likewise
2496         * conf/i386-ieee1275.rmk: likewise
2497         * conf/powerpc-ieee1275.rmk: likewise
2499 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2501         * INSTALL: Add that `./autogen.sh' needs to be run before
2502         `./configure.'.
2504 2009-04-14  Bean  <bean123ch@gmail.com>
2506         * Makefile.in (pkglib_DATA): Add handler.lst.
2507         (handler.lst): New rule.
2509         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2510         * conf/i386-coreboot.rmk: Likewise.
2511         * conf/i386-ieee1275.rmk: Likewise.
2512         * conf/i386-efi.rmk: Likewise.
2513         * conf/x86_64-efi.rmk: Likewise.
2514         * conf/powerpc-ieee1275.rmk: Likewise.
2515         * conf/sparc64-ieee1275.rmk: Likewise.
2517         * genhandlerlist.sh: New file.
2519         * genmk.rb: Add rules to generate handler.lst.
2521         * include/grub/normal.h (grub_file_getline): New function definition.
2522         (read_handler_list): Likewise.
2523         (free_handler_list): Likewise.
2525         * include/grub/term.h (grub_term_register_input): Add name parameter
2526         for auto generation of handler.lst.
2527         (grub_term_register_output): Likewise.
2529         * normal/handler.c: New file.
2531         * normal/main.c (get_line): Renamed to grub_file_getline.
2532         (read_config_file): Use the newly renamed grub_file_getline.
2533         (read_command_list): Likewise.
2534         (read_fs_list): Likewise.
2535         (grub_normal_execute): Call read_handler_list to parse handler.lst.
2536         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2538         * term/efi/console.c (grub_console_init): Add name parameter for auto
2539         generation of handler.lst.
2540         * term/gfxterm.c: Likewise.
2541         * term/i386/pc/at_keyboard.c: Likewise.
2542         * term/i386/pc/console.c: Likewise.
2543         * term/i386/pc/serial.c: Likewise.
2544         * term/i386/pc/vesafb.c: Likewise.
2545         * term/i386/pc/vga.c: Likewise.
2546         * term/i386/pc/vga_text.c: Likewise.
2547         * term/ieee1275/ofconsole.c: Likewise.
2548         * term/usb_keyboard.c: Likewise.
2550 2009-04-14  Bean  <bean123ch@gmail.com>
2552         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2553         properly with null character.
2555 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2557         * configure: Remove.
2558         * config.h.in: Likewise.
2559         * stamp-h.in: Likewise.
2560         * DISTLIST: Likewise.
2561         * conf/common.mk: Likewise.
2562         * conf/i386-coreboot.mk: Likewise.
2563         * conf/i386-efi.mk: Likewise.
2564         * conf/i386-ieee1275.mk: Likewise.
2565         * conf/i386.mk: Likewise.
2566         * conf/i386-pc.mk: Likewise.
2567         * conf/powerpc-ieee1275.mk: Likewise.
2568         * conf/sparc64-ieee1275.mk: Likewise.
2569         * conf/x86_64-efi.mk: Likewise.
2571         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2572         develop on GRUB.
2574 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
2575             David S. Miller  <davem@davemloft.net>
2577         * util/hostdisk.c (make_device_name): Fix buffer length
2578         calculations.
2580 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2582         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2583         <sys/param.h> and <sys/sysctl.h>.
2584         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2585         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2586         opening the device and reset them afterwards.
2588 2009-04-13  Pavel Roskin  <proski@gnu.org>
2590         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2591         Reported by John Stanley <jpsinthemix@verizon.net>
2593 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2595         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2596         that name for menuentries when appropriate.
2598 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2600         * util/grub.d/10_freebsd.in: Add a missing `fi'.
2602 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2604         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2605         to Linux, simply abort telling the user it's no longer supported.
2607 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2609         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2610         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
2611         `freebsd_loadenv' only when devices.hints exist.
2613 2009-04-13  Pavel Roskin  <proski@gnu.org>
2615         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2617 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2619         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2620         partition number.
2621         (grub_drive): Likewise.
2623 2009-04-13  David S. Miller  <davem@davemloft.net>
2625         * kern/sparc64/ieee1275/ieee1275.c: New file.
2626         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2627         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2628         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2629         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2630         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2631         grub_ieee1275_alloc_physmem): Declare new exported functions.
2633         * include/grub/sparc64/ieee1275/loader.h: New file.
2634         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2635         * include/grub/sparc64/kernel.h: Likewise.
2636         * loader/sparc64/ieee1275/linux.c: Likewise.
2638         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2639         (grub_fstest_SOURCES): Likewise.
2641         * util/hostdisk.c (make_device_name): Do not make any assumptions
2642         about the length of drive names.
2644         * kern/dl.c (grub_dl_load_file): Close file immediately when
2645         we are done using it.
2647 2009-04-12  David S. Miller  <davem@davemloft.net>
2649         * kern/misc.c (grub_ltoa): Fix cast when handling negative
2650         values.  Noticed by Pavel Roskin.
2652         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2653         target compiler.
2655         * genmk.rb: Add more flexible image type specification, also
2656         pass --strip-unneeded to objcopy.
2657         * conf/i386-pc.rmk: Use *_FORMAT.
2658         * conf/i386-pc.mk: Rebuilt.
2660         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2661         (OFDISK_HASH_SZ): Define.
2662         (ofdisk_hash): New hash table.
2663         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2664         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2665         instead of device phandle which is not unique.
2667         * kern/sparc64/ieee1275/init.c: Delete, replace with...
2668         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2669         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2670         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2671         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2672         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2673         GRUB_KERNEL_MACHINE_DATA_END): Define.
2674         (grub_kernel_image_size, grub_total_module_size): Declare.
2676 2009-04-12  Pavel Roskin  <proski@gnu.org>
2678          * configure.ac: Change the logic when we check for target tools.
2679          Do it when the target is specified and it's different from the
2680          specified value of the host.
2682 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
2684         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2685         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2686         GNU/kFreeBSD. Check if a device is a character device. Use
2687         DIOCGMEDIASIZE to get the size.
2688         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2689         support for GNU/kFreeBSD.
2690         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2691         is a character device instead of a block device. Add support for
2692         FreeBSD device names.
2694         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2695         is a character device instead of a block device.
2697         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2698         is a character device instead of a block device.
2700 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
2702         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2703         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2704         FreeBSD. Check if a device is a character device. Use
2705         DIOCGMEDIASIZE to get the size.
2706         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2707         support for FreeBSD.
2708         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2709         is a character device instead of a block device. Add support for
2710         FreeBSD device names.
2712         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2713         a character device instead of a block device.
2714         (grub_util_check_char_device): New function.
2716         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2717         a character device instead of a block device.
2719         * include/grub/util/getroot.h (grub_util_check_char_device): New
2720         prototype.
2722 2009-04-11  David S. Miller  <davem@davemloft.net>
2724         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2725         static libgcc.
2726         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2727         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2728         function, if present.
2729         (__bswapdi2): Likewise.
2731         * include/grub/sparc64/ieee1275/boot.h: New file.
2732         * boot/sparc64/ieee1275/boot.S: Likewise.
2733         * boot/sparc64/ieee1275/diskboot.S: Likewise.
2735         * kern/misc.c (grub_ltoa): New function.
2736         (grub_vsprintf): Use it to format 'long' integers.
2738 2009-04-10  David S. Miller  <davem@davemloft.net>
2740         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2741         slots are of type grub_ieee1275_cell_t.
2742         (grub_nand_read): Likewise.
2743         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2744         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2745         macros are used to compare values in arg/ret block of the call.
2746         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2747         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2748         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2749         grub_ieee1275_instance_to_path, grub_ieee1275_write,
2750         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2751         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2752         grub_ieee1275_close, grub_ieee1275_set_property,
2753         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2754         grub_ieee1275_cell_t.
2755         * kern/ieee1275/openfw.c (grub_map): Likewise.
2756         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2757         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2759         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2760         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2761         (grub_devalias_iterate): Likewise.
2763 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
2765         UFS improvements
2767         * fs/ufs.c (INODE_NBLOCKS): new definition
2768         (struct grub_ufs_dirent): added fields for non-BSD dirents
2769         (grub_ufs_get_file_block): fixed double indirect handling
2770         (grub_ufs_lookup_symlink): use more robust way to determine whether
2771         symlink is inline
2772         (grub_ufs_find_file): support for non-BSD dirents
2773         (grub_ufs_dir): support for non-BSD dirents
2775 2009-04-10  Bean  <bean123ch@gnail.com>
2777         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2778         attribute, otherwise the size would be wrong for i386 platform.
2780         * include/grub/pci.h (grub_pci_read_word): New inline function.
2781         (grub_pci_read_byte): Likewise.
2782         (grub_pci_write): Likewise.
2783         (grub_pci_write_word): Likewise.
2784         (grub_pci_write_byte): Likewise.
2786         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2788         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2789         (find_framebuf): Scan pci to locate the frame buffer address.
2791         * commands/efi/fixvideo.c: New file.
2793         * commands/efi/loadbios.c: Likewise.
2795         * commands/memrw.c: Likewise.
2797         * util/grub-dumpbios.in: Likewise.
2799         * conf/common.rmk (grub-dumpbios): New utility.
2800         (pkglib_MODULES): New module memrw.mod.
2801         (memrw_mod_SOURCE): New macro.
2802         (memrw_mod_CFLAGS): Likewise.
2803         (memrw_mod_LDFLAGS): Likewise.
2805         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2806         fixvideo.mod.
2807         (loadbios_mod_SOURCE): New macro.
2808         (loadbios_mod_CFLAGS): Likewise.
2809         (loadbios_mod_LDFLAGS): Likewise.
2810         (fixvideo_mod_SOURCE): Likewise.
2811         (fixvideo_mod_CFLAGS): Likewise.
2812         (fixvideo_mod_LDFLAGS): Likewise.
2814         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2815         fixvideo.mod.
2816         (loadbios_mod_SOURCE): New macro.
2817         (loadbios_mod_CFLAGS): Likewise.
2818         (loadbios_mod_LDFLAGS): Likewise.
2819         (fixvideo_mod_SOURCE): Likewise.
2820         (fixvideo_mod_CFLAGS): Likewise.
2821         (fixvideo_mod_LDFLAGS): Likewise.
2823 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
2825         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2827 2009-04-07  David S. Miller  <davem@davemloft.net>
2829         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2830         support for R_SPARC_OLO10 relocations.  Fix compile warning for
2831         R_SPARC_WDISP30 case.
2832         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2834 2009-04-06  Pavel Roskin  <proski@gnu.org>
2836         * include/grub/misc.h (ARRAY_SIZE): New macro.
2837         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2838         New macro.
2839         * loader/i386/linux.c (allocate_pages): Use free_pages().
2840         (grub_linux_unload): Don't use free_pages().
2841         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2842         wrong index.  Treat all other modes as text modes.
2843         (grub_cmd_linux): Initialize vid_mode unconditionally to
2844         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
2846         * commands/help.c (print_command_help): Use cmd->prio, not
2847         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2849 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
2851         Parttool
2853         * parttool/pcpart.c: new file
2854         * commands/parttool.c: likewise
2855         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2856         (parttool_mod_SOURCES): new variable
2857         (parttool_mod_CFLAGS): likewise
2858         (parttool_mod_LDFLAGS): likewise
2859         (pcpart_mod_SOURCES): likewise
2860         (pcpart_mod_CFLAGS): likewise
2861         (pcpart_mod_LDFLAGS): likewise
2862         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2863         and parttool/pcpart.c
2864         * conf/i386-efi.rmk: likewise
2865         * conf/i386-ieee1275.rmk: likewise
2866         * conf/i386-pc.rmk: likewise
2867         * conf/powerpc-ieee1275.rmk: likewise
2868         * conf/sparc64-ieee1275.rmk: likewise
2869         * conf/x86_64-ieee1275.rmk: likewise
2871 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2873         Support for mtime and further expandability of dir command
2875         * include/grub/lib/datetime.h: moved to ...
2876         * include/grub/datetime.h: ... moved here and added
2877         declaration of grub_unixtime2datetime. All users updated
2878         * include/grub/fs.h: new syntax for dir and mtime functions in
2879         struct grub_fs
2880         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2881         and GRUB_FSHELP_FLAGS_MASK
2882         * commands/ls.c (grub_ls_list_files): Write mtime in long format
2883         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2884         (grub_ext2_mtime): new function
2885         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2886         (grub_hfsplus_mtime): new function
2887         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2888         (GRUB_UFS_ATTR_FILE): likewise
2889         (GRUB_UFS_ATTR_LNK): likewise
2890         (struct grub_ufs_sblock): new fields mtime
2891         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2892         all users updated
2893         (grub_ufs_dir): mtime support
2894         (grub_ufs_mtime): new function
2895         * fs/affs.c (grub_affs_dir): use new dir syntax
2896         * fs/afs.c (grub_afs_dir): likewise
2897         * fs/cpio.c (grub_cpio_dir): likewise
2898         * fs/fat.c (grub_fat_find_dir): likewise
2899         * fs/hfs.c (grub_hfs_dir): likewise
2900         * fs/iso9660.c (grub_iso9660_dir): likewise
2901         * fs/jfs.c (grub_jfs_dir): likewise
2902         * fs/minix.c (grub_minix_dir): likewise
2903         * fs/ntfs.c (grub_ntfs_dir): likewise
2904         * fs/reiserfs.c (grub_reiserfs_dir): likewise
2905         * fs/sfs.c (grub_sfs_dir): likewise
2906         * fs/xfs.c (grub_xfs_dir): likewise
2907         * util/hostfs.c (grub_hostfs_dir): likewise
2908         * lib/datetime.c: moved to ...
2909         * normal/datetime.c: ... moved here
2910         (grub_unixtime2datetime): new function
2911         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2912         * normal/completion.c (iterate_dir): use new dir syntax
2913         * normal/misc.c (grub_normal_print_device_info): tell the
2914         last modification time of a volume
2915         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2916         * conf/common.rmk: added lib/datetime.c to ls.mod
2917         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2918         (normal_mod_SOURCES): likewise
2919         (datetime_mod_SOURCES): Removed lib/datetime.c
2920         * conf/i386-efi.rmk: likewise
2921         * conf/i386-ieee1275.rmk: likewise
2922         * conf/i386-pc.rmk: likewise
2923         * conf/powerpc-ieee1275.rmk: likewise
2924         * conf/sparc64-ieee1275.rmk: likewise
2925         * conf/x86_64-efi.rmk: likewise
2927 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2929         Trim trailing spaces in FAT label and support mtools-like labels
2931         * fs/fat.c (grub_fat_iterate_dir): New function based
2932         on grub_fat_find_dir
2933         (grub_fat_find_dir): use grub_fat_iterate_dir
2934         (grub_fat_label): likewise
2936 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
2938         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2939         and command.h
2940         remove extraneous kernel_elf_HEADERS
2942 2009-04-04  Bean  <bean123ch@gnail.com>
2944         * include/grub/util/misc.h: Add dummy function fsync for mingw.
2946         * util/misc.c: Likewise.
2948 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
2950         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2951         instead of grub_printf.
2953 2009-04-03  Robert Millan  <rmh@aybabtu.com>
2955         * loader/i386/linux.c (grub_linux_setup_video): Fill
2956         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2957         values from `mode info' structure instead of hardcoded
2958         values.
2960 2009-04-01  Pavel Roskin  <proski@gnu.org>
2962         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2963         unused now.
2964         * genmk.rb: Likewise.
2965         * configure.ac: Likewise.
2967 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
2969         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2970         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
2972 2009-04-01  David S. Miller  <davem@davemloft.net>
2974         * normal/sparc64/setjmp.S: Fix setjmp implementation.
2975         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2976         (grub_setjmp): Mark with 'returns_twice' attribute.
2977         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2978         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2979         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2981 2009-04-01  Robert Millan  <rmh@aybabtu.com>
2983         Reapply fix from 2008-07-28 which was accidentally reverted; also
2984         perform the same fix to a similar check in same function.
2986         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2987         with the same number are found, just use issue a warning with
2988         grub_dprintf(), as this error has been reported to be non-fatal.
2990 2009-03-31  Pavel Roskin  <proski@gnu.org>
2992         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2993         for cross-compilation.
2995 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2997         Fix i386-ieee1275 build.
2999         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3000         Remove declaration.
3002 2009-03-30  Pavel Roskin  <proski@gnu.org>
3004         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3005         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
3006         zero-terminated, rely only on the strlen value.  Fix comparison
3007         of strings differing in length.
3009 2009-03-30  Robert Millan  <rmh@aybabtu.com>
3011         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3012         checking for abi version.  Improve error messages on BIOS to notify
3013         user about `linux16' command.
3015 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
3017         Leak fixes
3019         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3020         in case of collision
3021         * disk/scsi.c (grub_scsi_open): free scsi in case of error
3023 2009-03-29  Robert Millan  <rmh@aybabtu.com>
3025         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3026         set `vid_mode' accordingly.
3027         (grub_linux_boot): Process `vid_mode' and set video mode.
3029 2009-03-29  Robert Millan  <rmh@aybabtu.com>
3031         * util/grub.d/10_linux.in (linux_entry): New function.
3032         Factorize generation of Linux boot entries.
3034 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
3036         Make the format of Environment Block plain text. The boot loader
3037         part is not tested well yet.
3039         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3040         (buffer): Removed.
3041         (envblk): Likewise.
3042         (usage): Remove "info" and "clear". Add "unset". Update the
3043         description of "set", as this does not delete variables any
3044         longer.
3045         (create_envblk_file): Complete rewrite.
3046         (open_envblk_file): Likewise.
3047         (cmd_info): Removed.
3048         (cmd_list): Likewise.
3049         (cmd_set): Likewise.
3050         (cmd_clear): Likewise.
3051         (list_variables): New function.
3052         (write_envblk): Likewise.
3053         (set_variables): Likewise.
3054         (unset_variables): Likewise.
3055         (main): Complete rewrite.
3057         * commands/loadenv.c (buffer): Removed.
3058         (envblk): Likewise.
3059         (open_envblk_file): New function.
3060         (read_envblk_file): Complete rewrite.
3061         (grub_cmd_load_env): Likewise.
3062         (grub_cmd_list_env): Likewise.
3063         (struct blocklist): New struct.
3064         (free_blocklists): New function.
3065         (check_blocklists): Likewise.
3066         (write_blocklists): Likewise.
3067         (grub_cmd_save_env): Complete rewrite.
3069         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3070         a plain text signature.
3071         (GRUB_ENVBLK_MAXLEN): Removed.
3072         (struct grub_envblk): Complete rewrite.
3073         (grub_envblk_find): Removed.
3074         (grub_envblk_insert): Likewise.
3075         (grub_envblk_open): New prototype.
3076         (grub_envblk_set): Likewise.
3077         (grub_envblk_delete): Put const to VALUE.
3078         (grub_envblk_iterate): Put const to NAME and VALUE.
3079         (grub_envblk_close): New prototype.
3080         (grub_envblk_buffer): New inline function.
3081         (grub_envblk_size): Likewise.
3083         * lib/envblk.c: Include grub/mm.h.
3084         (grub_env_find): Removed.
3085         (grub_envblk_open): New function.
3086         (grub_envblk_close): Likewise.
3087         (escaped_value_len): Likewise.
3088         (find_next_line): Likewise.
3089         (grub_envblk_insert): Removed.
3090         (grub_envblk_set): New function.
3091         (grub_envblk_delete): Complete rewrite.
3092         (grub_envblk_iterate): Likewise.
3094 2009-03-28  Robert Millan  <rmh@aybabtu.com>
3096         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3097         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3098         variables.  Use 16-bit loader.
3099         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3100         loader.
3101         * kern/i386/loader.S (grub_linux_boot): Rename to ...
3102         (grub_linux16_boot): ... this.  Update all users.
3103         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3104         (grub_linux_boot): ... this.  Update all users.
3106         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3107         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
3108         commands to `linux16' and `initrd16'.
3109         (GRUB_MOD_FINI(linux)): Rename to ...
3110         (GRUB_MOD_FINI(linux16)): ... this.
3112 2009-03-24  Pavel Roskin  <proski@gnu.org>
3114         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3115         not just for compilation.
3117 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
3119         Move multiboot helper out of kernel
3121         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3122         `loader/i386/multiboot_helper.S'.
3123         * conf/i386-coreboot.rmk: Likewise
3124         * conf/i386-ieee1275.rmk: Likewise
3126         * kern/i386/loader.S: Move multiboot helpers from here...
3127         * loader/i386/multiboot_helper.S: ...moved here
3128         * include/grub/i386/loader.h: Move declarations of multiboot
3129         helpers from here...
3130         * include/grub/i386/multiboot.h: ...moved here
3131         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3133 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3135         * kern/env.c (grub_env_context_open): Added an argument to specify
3136         whether a new context inherits exported variables from current
3137         one. This is useful when making a sandbox to interpret a config
3138         file.
3139         All callers updated.
3141         * include/grub/env.h (grub_env_context_open): Updated the prototype.
3143 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3145         * kern/env.c (grub_env_context_close): Fix memory leaks.
3147 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3149         * normal/main.c (grub_normal_execute): Added an argument
3150         BATCH to specify if an interactive interface should be provided
3151         after reading a config file.
3152         All callers updated.
3153         (read_command_list): Prevent being executed twice.
3154         (read_fs_list): Likewise.
3156         * include/grub/normal.h (grub_normal_execute): Updated the
3157         prototype.
3159 2009-03-22  Pavel Roskin  <proski@gno.org>
3161         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3162         _start.
3163         * kern/i386/pc/startup.S: Likewise.
3164         * kern/i386/efi/startup.S: Likewise.
3165         * kern/i386/ieee1275/startup.S: Likewise.
3166         * kern/i386/coreboot/startup.S: Likewise.
3167         * kern/x86_64/efi/startup.S: Likewise.
3169         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3170         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3171         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3173 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
3175         Bugfixes in multiboot for bugs uncovered by solaris kernel.
3177         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3178         limit detection.
3179         Use vaddr of correct segment for entry_point.
3181 2009-03-21  Bean  <bean123ch@gmail.com>
3183         * commands/blocklist.c: Add include file <grub/command.h>, remove
3184         <grub/normal.h> and <grub/arg.h>.
3185         (grub_cmd_blocklist): Use the new command interface.
3186         (GRUB_MOD_INIT): Likewise.
3187         (GRUB_MOD_FINI): Likewise.
3188         * commands/boot.c: Likewise.
3189         * commands/cat.c: Likewise.
3190         * commands/cmp.c: Likewise.
3191         * commands/configfile.c: Likewise.
3192         * commands/crc.c: Likewise.
3193         * commands/echo.c: Likewise.
3194         * commands/halt.c: Likewise.
3195         * commands/handler.c: Likewise.
3196         * commands/hdparm.c: Likewise.
3197         * commands/help.c: Likewise.
3198         * commands/hexdump.c: Likewise.
3199         * commands/loadenv.c: Likewise.
3200         * commands/ls.c: Likewise.
3201         * commands/lsmmap.c: Likewise.
3202         * commands/lspci.c: Likewise.
3203         * commands/loadenv.c: Likewise.
3204         * commands/read.c: Likewise.
3205         * commands/reboot.c: Likewise.
3206         * commands/search.c: Likewise.
3207         * commands/sleep.c: Likewise.
3208         * commands/test.c: Likewise.
3209         * commands/usbtest.c: Likewise.
3210         * commands/videotest.c: Likewise.
3211         * commands/i386/cpuid.c: Likewise.
3212         * commands/i386/pc/halt.c: Likewise.
3213         * commands/i386/pc/play.c: Likewise.
3214         * commands/i386/pc/pxecmd.c: Likewise.
3215         * commands/i386/pc/vbeinfo.c: Likewise.
3216         * commands/i386/pc/vbetest.c: Likewise.
3217         * commands/ieee1275/suspend.c: Likewise.
3218         * disk/loopback.c: Likewise.
3219         * font/font_cmd.c: Likewise.
3220         * hello/hello.c: Likewise.
3221         * loader/efi/appleloader.c: Likewise.
3222         * loader/efi/chainloader.c: Likewise.
3223         * loader/i386/bsd.c: Likewise.
3224         * loader/i386/efi/linux.c: Likewise.
3225         * loader/i386/ieee1275/linux.c: Likewise.
3226         * loader/i386/linux.c: Likewise.
3227         * loader/i386/pc/chainloader.c: Likewise.
3228         * loader/i386/pc/linux.c: Likewise.
3229         * loader/powerpc/ieee1275/linux.c: Likewise.
3230         * loader/multiboot_loader.c: Likewise.
3231         * term/gfxterm.c: Likewise.
3232         * term/i386/pc/serial.c: Likewise.
3233         * term/terminfo.c: Likewise.
3235         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3236         * term/i386/pc/vga.c: Likewise.
3237         * video/readers/jpeg.c: Likewise.
3238         * video/readers/png.c: Likewise.
3239         * video/readers/tga.c: Likewise.
3241         * util/grub-fstest (cmd_loopback): Removed.
3242         (cmd_blocklist): Likewise.
3243         (cmd_ls): Likewise.
3244         (grub_register_command): Likewise.
3245         (grub_unregister_command): Likewise.
3246         (execute_command): Use grub_command_find to locate command and execute
3247         it.
3249         * include/grub/efi/chainloader.h: Removed.
3250         * loader/efi/chainloader_normal.c: Likewise.
3251         * loader/i386/bsd_normal.c: Likewise.
3252         * loader/i386/pc/chainloader_normal.c: Likewise.
3253         * loader/i386/pc/multiboot_normal.c: Likewise.
3254         * loader/linux_normal.c: Likewise.
3255         * loader/multiboot_loader_normal.c: Likewise.
3256         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3258         * gencmdlist.sh: Scan new registration command grub_register_extcmd
3259         and grub_register_command_p1.
3261         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3262         kern/command.c, lib/arg.c and commands/extcmd.c.
3263         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3264         (minicmd_mod_SOURCES): New variable.
3265         (minicmd_mod_CFLAGS): Likewise.
3266         (minicmd_mod_LDFLAGS): Likewise.
3267         (extcmd_mod_SOURCES): Likewise.
3268         (extcmd_mod_CFLAGS): Likewise.
3269         (extcmd_mod_LDFLAGS): Likewise.
3270         (boot_mod_SOURCES): Removed.
3271         (boot_mod_CFLAGS): Likewise.
3272         (boot_mod_LDFLAGS): Likewise.
3274         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3275         kern/corecmd.c.
3276         (kernel_img_HEADERS): Add command.h.
3277         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3278         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3279         and lib/arg.c.
3280         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3281         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3282         remove the corresponding normal mode command.
3283         (normal_mod_SOURCES): Remove normal/arg.c.
3284         * conf/i386-coreboot.rmk: Likewise.
3285         * conf/i386-efi.rmk: Likewise.
3286         * conf/i386-ieee1275.rmk: Likewise.
3287         * conf/powerpc-ieee1275.rmk: Likewise.
3288         * conf/x86_64-efi.rmk: Likewise.
3290         * include/grub/arg.h: Move from here ...
3291         * include/grub/lib/arg.h: ... to here.
3293         * normal/arg.c: Move from here ...
3294         * lib/arg.c: ... to here.
3296         * commands/extcmd.c: New file.
3297         * commands/minicmd.c: Likewise.
3298         * include/grub/command.h: Likewise.
3299         * include/grub/extcmd.h: Likewise.
3300         * kern/command.c: Likewise.
3301         * kern/corecmd.c: Likewise.
3303         * kern/list.c (grub_list_iterate): Return int instead of void.
3304         (grub_list_insert): New function.
3305         (grub_prio_list_insert): Likewise.
3307         * kern/rescue.c (grub_rescue_command): Removed.
3308         (grub_rescue_command_list): Likewise.
3309         (grub_rescue_register_command): Likewise.
3310         (grub_rescue_unregister_command): Likewise.
3311         (grub_rescue_cmd_boot): Move to minicmd.c
3312         (grub_rescue_cmd_help): Likewise.
3313         (grub_rescue_cmd_info): Likewise.
3314         (grub_rescue_cmd_boot): Likewise.
3315         (grub_rescue_cmd_testload): Likewise.
3316         (grub_rescue_cmd_dump): Likewise.
3317         (grub_rescue_cmd_rmmod): Likewise.
3318         (grub_rescue_cmd_lsmod): Likewise.
3319         (grub_rescue_cmd_exit): Likewise.
3320         (grub_rescue_print_devices): Moved to corecmd.c.
3321         (grub_rescue_print_files): Likewise.
3322         (grub_rescue_cmd_ls): Likewise.
3323         (grub_rescue_cmd_insmod): Likewise.
3324         (grub_rescue_cmd_set): Likewise.
3325         (grub_rescue_cmd_unset): Likewise.
3326         (attempt_normal_mode): Use grub_command_find to get normal module.
3327         (grub_enter_rescue_mode): Use grub_register_core_commands to register
3328         commands, remove grub_rescue_register_command calls.
3330         * normal/command.c (grub_register_command): Removed.
3331         (grub_unregister_command): Likewise.
3332         (grub_command_find): Likewise.
3333         (grub_iterate_commands): Likewise.
3334         (rescue_command): Likewise.
3335         (export_command): Moved to corecmd.c.
3336         (set_command): Removed.
3337         (unset_command): Likewise.
3338         (insmod_command): Likewise.
3339         (rmmod_command): Likewise.
3340         (lsmod_command): Likewise.
3341         (grub_command_init): Likewise.
3343         * normal/completion.c (iterate_command): Use cmd->prio to check for
3344         active command.
3345         (complete_arguments): Use grub_extcmd_t structure to find options.
3346         (grub_normal_do_completion): Change function grub_iterate_commands to
3347         grub_command_iterate.
3349         * normal/execute.c (grub_script_execute_cmd): No need to parse
3350         argument here.
3352         * normal/main.c (grub_dyncmd_dispatcher): New function.
3353         (read_command_list): Register unload commands as dyncmd.
3354         (grub_cmd_normal): Use new command interface, register rescue,
3355         unregister normal at entry, register normal, unregister rescue at exit.
3357         * include/grub/list.h (grub_list_test_t): New type.
3358         (grub_list_iterate): Return int instead of void.
3359         (grub_list_insert): New function.
3360         (GRUB_AS_NAMED_LIST_P): New macro.
3361         (GRUB_AS_PRIO_LIST): Likewise.
3362         (GRUB_AS_PRIO_LIST_P): Likewise.
3363         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3364         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3365         (grub_prio_list): New structure.
3366         (grub_prio_list_insert): New function.
3367         (grub_prio_list_remove): New inline function.
3369         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3370         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3371         (GRUB_COMMAND_FLAG_MENU): Likewise.
3372         (GRUB_COMMAND_FLAG_BOTH): Likewise.
3373         (GRUB_COMMAND_FLAG_TITLE): Likewise.
3374         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3375         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3376         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3377         (grub_command): Likewise.
3378         (grub_register_command): Likewise.
3379         (grub_command_find): Likewise.
3380         (grub_iterate_commands): Likewise.
3381         (grub_command_init): Likewise.
3382         (grub_arg_parse): Likewise.
3383         (grub_arg_show_help): Likewise.
3385         * include/grub/rescue.h (grub_rescue_register_command): Removed.
3386         (grub_rescue_unregister_command): Likewise.
3388         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3389         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3390         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3392         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3393         grub_rescue_cmd_initrd.
3394         * include/grub/i386/loader.h: Likewise.
3395         * include/grub/x86_64/loader.h: Likewise.
3397         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3399 2009-03-21  Bean  <bean123ch@gmail.com>
3401         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3402         instead of stat in mingw environment.
3404         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3406         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3408         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3409         AC_CONFIG_LINKS.
3411 2009-03-21  Bean  <bean123ch@gmail.com>
3413         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3414         out of range error.
3416 2009-03-18  Michel Dänzer  <michel@daenzer.net>
3418         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3419         checking inode flags for EXT4_EXTENTS_FLAG.
3421 2009-03-18  Robert Millan  <rmh@aybabtu.com>
3423         * loader/i386/linux.c: Include `<grub/video.h>' and
3424         `<grub/i386/pc/vbe.h>'..
3425         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
3426         (grub_linux32_boot): Attempt to configure video settings with
3427         grub_linux_setup_video().
3428         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3429         to avoid grub_console_fini() which would step out of graphical mode
3430         unconditionally.
3432 2009-03-14  Robert Millan  <rmh@aybabtu.com>
3434         Fix build on powerpc.
3435         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3437 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
3439         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3440         background image command.
3442 2009-03-12  Colin D Bennett  <colin@gibibit.com>
3444         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3445         (grub_gfxterm_putchar): Extract pairs of identical calls to
3446         draw_cursor out of conditional blocks.
3448 2009-03-11  Pavel Roskin  <proski@gnu.org>
3450         * fs/hfs.c (grub_hfs_strncasecmp): New function.
3451         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3453 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3455         * loader/i386/multiboot_elfxx.c
3456         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3458 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
3460         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3461         `kern/handler.c'.
3463 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3465         * loader/i386/multiboot.c (code_size): New variable.
3466         (grub_multiboot): Define offsets by adding to `code_size' rather
3467         than subtracting from `grub_multiboot_payload_size'.  Provide
3468         4-byte alignment to MBI and others by increasing
3469         `boot_loader_name_length' appropriately.
3471         * loader/i386/multiboot_elfxx.c
3472         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3474 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
3476         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3477         `fs/ext2.c'.
3479 2009-03-08  Robert Millan  <rmh@aybabtu.com>
3481         Make loader/i386/linux.c usable on i386-pc again.
3483         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3484         memory to heap.
3485         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3486         `#error' stanza.
3488 2009-03-07  Bean  <bean123ch@gmail.com>
3490         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3491         allocation.
3493 2009-03-06  Robert Millan  <rmh@aybabtu.com>
3495         Fix display issue on terminals with screen size other than 80x25
3496         (e.g. gfxterm with resolution higher than 640x480).
3498         * normal/main.c (grub_normal_init_page): Display title text in a
3499         position relative to the center of the terminal instead of relying
3500         on a hardcoded offset.
3502 2009-03-04  Robert Millan  <rmh@aybabtu.com>
3504         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3505         installed.
3507         * Makefile.in (host_kernel): New variable.
3508         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3509         scripts instead of just the windows one.
3510         * configure.ac: Initialize and AC_SUBST `host_kernel'.
3512 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3514         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3515         `kern/handler.c'.
3516         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3517         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3518         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3519         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3520         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3521         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3523 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3525         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3526         or if there's no space for the disk label and print the partition number on a
3527         invalid magic.
3529 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3531         * util/misc.c: Include <time.h>.
3532         (grub_millisleep): New function.
3534 2009-03-04  Bean  <bean123ch@gmail.com>
3536         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3537         another option -mno-red-zone.
3539         * commands/handler.c: Change module description.
3541         * kern/handler.c: Add missing space at the end of description line.
3543         * kern/list.c: Likewise.
3545 2009-03-03  Robert Millan  <rmh@aybabtu.com>
3547         Move more components to the relocation area, and fix mbi pointer
3548         handling to use the destination rather than the origin (thanks to
3549         Vladimir Serbinenko for spotting).
3551         * loader/i386/multiboot.c (mbi_dest): New variable.
3552         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3553         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3554         relocation area.
3556 2009-03-01  Bean  <bean123ch@gmail.com>
3558         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3559         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3560         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3561         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3563         * loader/i386/efi/linux.c (acpi_guid): New variable.
3564         (acpi_guid): Likewise.
3565         (EBDA_SEG_ADDR): New constant.
3566         (LOW_MEM_ADDR): Likewise.
3567         (FAKE_EBDA_SEG): Likewise.
3568         (fake_bios_data): New function.
3569         (grub_linux_boot): Call fake_bios_data.
3571 2009-03-01  Bean  <bean123ch@gmail.com>
3573         * commands/terminal.c: Removed.
3575         * commands/handler.c: New file.
3577         * include/grub/list.h: Likewise.
3579         * include/grub/handler.h: Likewise.
3581         * kern/list.c: Likewise.
3583         * kern/handler.c: Likewise.
3585         * kern/term.h: Include header file <grub/handler.h>.
3586         (grub_term_input): Move next field to the beginning.
3587         (grub_term_output): Likewise.
3588         (grub_term_input_class): New variable.
3589         (grub_term_output_class): Likewise.
3590         (grub_term_register_input): Changed to inline function.
3591         (grub_term_register_output): Likewise.
3592         (grub_term_unregister_input): Likewise.
3593         (grub_term_unregister_output): Likewise.
3594         (grub_term_set_current_input): Likewise.
3595         (grub_term_set_current_output): Likewise.
3596         (grub_term_get_current_input): Likewise.
3597         (grub_term_get_current_output): Likewise.
3598         (grub_term_iterate_input): Removed.
3599         (grub_term_iterate_output): Likewise.
3601         * kern/term.c (grub_term_list_input): Removed.
3602         (grub_term_list_output): Likewise.
3603         (grub_term_input_class): New variable.
3604         (grub_term_output_class): Likewise.
3605         (grub_cur_term_input): Change variable as macro.
3606         (grub_cur_term_output): Likewise.
3607         (grub_term_register_input): Removed.
3608         (grub_term_register_output): Likewise.
3609         (grub_term_unregister_input): Likewise.
3610         (grub_term_unregister_output): Likewise.
3611         (grub_term_set_current_input): Likewise.
3612         (grub_term_set_current_output): Likewise.
3613         (grub_term_iterate_input): Likewise.
3614         (grub_term_iterate_output): Likewise.
3615         (grub_term_get_current_input): Likewise.
3616         (grub_term_get_current_output): Likewise.
3618         * util/grub-editenv.c: Include header file <grub/handler.h>.
3619         (grub_term_get_current_input): Removed.
3620         (grub_term_get_current_output): Likewise.
3621         (grub_term_input_class): New variable.
3622         (grub_term_output_class): Likewise.
3624         * util/grub-fstest.c (grub_term_get_current_input): Removed.
3625         (grub_term_get_current_output): Likewise.
3626         (grub_term_input_class): New variable.
3627         (grub_term_output_class): Likewise.
3629         * util/grub-probe.c (grub_term_get_current_input): Removed.
3630         (grub_term_get_current_output): Likewise.
3631         (grub_term_input_class): New variable.
3632         (grub_term_output_class): Likewise.
3634         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3635         (grub_term_get_current_output): Likewise.
3636         (grub_term_input_class): New variable.
3637         (grub_term_output_class): Likewise.
3639         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3640         (terminal_mod_SOURCES): Likewise.
3641         (terminal_mod_CFLAGS): Likewise.
3642         (terminal_mod_LDFLAGS): Likewise.
3644         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3645         handler.c.
3646         (kernel_img_SOURCES): Add list.c and handler.c.
3647         (kernel_img_HEADERS): Add list.h and handler.h.
3649         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3650         handler.c.
3651         (kernel_mod_SOURCES): Add list.c and handler.c.
3652         (kernel_mod_HEADERS): Add list.h and handler.h.
3654         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3655         handler.c.
3656         (kernel_elf_SOURCES): Add list.c and handler.c.
3657         (kernel_elf_HEADERS): Add list.h and handler.h.
3659         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3660         handler.c.
3661         (kernel_elf_SOURCES): Add list.c and handler.c.
3662         (kernel_elf_HEADERS): Add list.h and handler.h.
3664         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3665         handler.c.
3666         (kernel_mod_SOURCES): Add list.c and handler.c.
3667         (kernel_mod_HEADERS): Add list.h and handler.h.
3669         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3670         handler.c.
3671         (kernel_elf_SOURCES): Add list.c and handler.c.
3672         (kernel_elf_HEADERS): Add list.h and handler.h.
3674 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3676         Factorize elf32 / elf64 code in Multiboot loader.  This will
3677         prevent it from getting out of sync again.
3679         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3680         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3681         grub_multiboot_load_elf64): Move from here ...
3682         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3683         grub_multiboot_load_elf): ... to here (new file).
3685 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3687         * util/grub.d/10_linux.in: Rename "single-user mode" to
3688         "recovery mode".
3690 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
3692         Don't leak in SCSI code.
3693         * disk/scsi.c (grub_scsi_close): free `scsi'.
3695 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3697         * loader/i386/pc/multiboot.c: Move from here ...
3698         * loader/i386/multiboot.c: ... to here.  Update all users.
3700 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3702         Patch from Alexandre Bique <bique.alexandre@gmail.com>
3703         * util/i386/pc/grub-setup.c (setup): Fix directory path.
3705 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
3707         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3708         b-tree.
3710 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3712         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3713         `0x' qualifier as 0 when base is specified as parameter).
3715 2009-02-24  Bean  <bean123ch@gmail.com>
3717         * configure.ac: Check for -mcmodel=large in x86_64 target.
3719         * include/grub/efi/api.h (efi_call_10): New macro.
3720         (efi_wrap_10): New function.
3722         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3723         (GRUB_PE32_REL_BASED_HIGH): Likewise.
3724         (GRUB_PE32_REL_BASED_LOW): Likewise.
3725         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3726         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3727         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3728         (GRUB_PE32_REL_BASED_SECTION): Likewise.
3729         (GRUB_PE32_REL_BASED_REL): Likewise.
3730         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3731         (GRUB_PE32_REL_BASED_DIR64): Likewise.
3732         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3734         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3735         issue.
3737         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3738         (efi_wrap_10): New function.
3740         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3742         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3743         MB/MBP model (NV chipset).
3744         (devdata_devs): Add devpath_5 to the list.
3746         * load/i386/efi/linux.c (video_base): Remove variable.
3747         (RGB_MASK): New macro.
3748         (RGB_MAGIC): Likewise.
3749         (LINE_MIN): Likewise.
3750         (LINE_MAX): Likewise.
3751         (FBTEST_STEP): Likewise.
3752         (FBTEST_COUNT): Likewise.
3753         (fb_list): New variable.
3754         (grub_find_video_card): Remove function.
3755         (find_framebuf): New function.
3756         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3757         line length.
3759         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3760         problem for x86_64.
3762 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
3764         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3766         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3767         coding tool name.
3769 2009-02-22  Robert Millan  <rmh@aybabtu.com>
3771         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3772         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3773         in our relocation, instead of using it directly from heap.  Also
3774         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3776 2009-02-21  Robert Millan  <rmh@aybabtu.com>
3778         Implement USB keyboard support (based on patch by Marco Gerards)
3780         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3781         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3782         (usb_keyboard_mod_LDFLAGS): New variables.
3784         * term/usb_keyboard.c: New file.
3786 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
3788         Corrected wrong declaration
3790         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3792 2009-02-14  Christian Franke  <franke@computer.org>
3794         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3795         (grub_lspci_iter): Print class code and programming interface byte.
3797 2009-02-14  Christian Franke  <franke@computer.org>
3799         * gendistlist.sh: Ignore `.svn' directories.
3801 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
3803         * fs/fat.c: Add 2009 to Copyright line.
3805 2009-02-14  Christian Franke  <franke@computer.org>
3807         * commands/hdparm.c: New file.  Provides `hdparm' command
3808         which sends ATA commands via grub_disk_ata_pass_through ().
3810         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3812         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
3813         and <grub/cpu/io.h> to include/grub/ata.h.
3814         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3815         (GRUB_CDROM_SECTOR_SIZE): Remove.
3816         (GRUB_ATA_*): Move to include/grub/ata.h.
3817         (GRUB_ATAPI_*): Likewise.
3818         (enum grub_ata_commands): Likewise.
3819         (enum grub_ata_timeout_milliseconds): Likewise.
3820         (struct grub_ata_device): Likewise.
3821         (grub_ata_regset): Likewise.
3822         (grub_ata_regget): Likewise.
3823         (grub_ata_regset2): Likewise.
3824         (grub_ata_regget2): Likewise.
3825         (grub_ata_check_ready): Likewise.
3826         (grub_ata_wait_not_busy): Remove static, exported in
3827         include/grub/ata.h.
3828         (grub_ata_wait_drq): Likewise.
3829         (grub_ata_pio_read): Likewise.
3831         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
3832         function for hdparm.mod.
3834         * include/grub/ata.h: New file, contains declarations from
3835         disk/ata.c.
3836         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3838         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3839         (grub_disk_ata_pass_through): New exported variable.
3841         * kern/disk.c (grub_disk_ata_pass_through): New variable.
3843 2009-02-13  Colin D Bennett  <colin@gibibit.com>
3845         Support multiple fallback entries, and provide an API to support
3846         executing default+fallback menu entries.  Renamed the `terminal' menu
3847         viewer to `text'.
3849         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3850         variable declaration.
3851         (grub_menu_execute_callback): New structure declaration.
3852         (grub_menu_execute_callback_t): New typedef.
3853         (grub_menu_execute_with_fallback): New function declaration.
3854         (grub_menu_get_entry): Likewise.
3855         (grub_menu_get_timeout): Likewise.
3856         (grub_menu_set_timeout): Likewise.
3858         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3860         * normal/menu.c (grub_wait_after_message): Moved to
3861         `normal/menu_text.c'.
3862         (draw_border): Likewise.
3863         (print_message): Likewise.
3864         (print_entry): Likewise.
3865         (print_entries): Likewise.
3866         (grub_menu_init_page): Likewise.
3867         (get_entry_number): Likewise.
3868         (print_timeout): Likewise.
3869         (run_menu): Likewise.
3870         (grub_menu_execute_entry): Likewise.
3871         (show_text_menu): Likewise.
3872         (get_and_remove_first_entry_number): New function.
3873         (grub_menu_execute_with_fallback): Likewise.
3874         (get_entry): Renamed to ...
3875         (grub_menu_get_entry): .. this and made it global.
3876         (get_timeout): Renamed to ...
3877         (grub_menu_get_timeout): ... this and made it global.
3878         (set_timeout): Renamed to ...
3879         (grub_menu_set_timeout): ... this and made it global.
3880         (grub_normal_terminal_menu_viewer): Renamed to ...
3881         (grub_normal_text_menu_viewer): ... this.
3883         * normal/menu_text.c: New file.  Extracted text-menu-specific code
3884         from normal/menu.c.
3886         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3887         (normal_mod_SOURCES): Likewise.
3889         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3890         (normal_mod_SOURCES): Likewise.
3892         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3893         (normal_mod_SOURCES): Likewise.
3895         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3896         (normal_mod_SOURCES): Likewise.
3898         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3899         (normal_mod_SOURCES): Likewise.
3901         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3902         (normal_mod_SOURCES): Likewise.
3904         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3905         (normal_mod_SOURCES): Likewise.
3907 2009-02-11  Robert Millan  <rmh@aybabtu.com>
3909         * util/grub.d/00_header.in: Update old reference to `font' command.
3911 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
3913         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3915         Based on patch from Javier Martín.
3917 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3919         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3920         to avoid false positives with FAT.
3921         (grub_fstest_SOURCES): Likewise.
3922         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3923         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3924         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3925         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3926         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3927         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3929 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3931         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3932         bpb.version_specific.fat12_or_fat16.fstype and
3933         bpb.version_specific.fat32.fstype.
3935 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3937         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3939 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3941         * Makefile.in (host_os, host_cpu): New variables.
3942         (target_os): Remove.  Update all users.
3944 2009-02-08  Marco Gerards  <marco@gnu.org>
3946         * Makefile.in (enable_grub_emu_usb): New variable.
3947         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3948         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3949         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3950         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3951         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3952         `usbtest.mod' and `usbms.mod'.
3953         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3954         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3955         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3956         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3957         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3958         variables.
3960         * disk/usbms.c: New file.
3962         * include/grub/usb.h: Likewise.
3964         * include/grub/usbtrans.h: Likewise.
3966         * include/grub/usbdesc.h: Likewise.
3968         * bus/usb/usbtrans.c: Likewise.
3970         * bus/usb/ohci.c: Likewise.
3972         * bus/usb/uhci.c: Likewise.
3974         * bus/usb/usbhub.c: Likewise.
3976         * bus/usb/usb.c: Likewise.
3978         * commands/usbtest.c: Likewise.
3980         * util/usb.c: Likewise.
3982         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3984         * configure.ac: Test for libusb presence.
3986         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3988 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
3990         * kern/mm.c: Add more comments.
3992 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3994         Patch from Javier Martín.
3995         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3996         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3998 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4000         * fs/cpio.c: Split tar functionality to ...
4001         * fs/tar.c: ... here (new file).  Update all users.
4003 2009-02-07  Robert Millan  <rmh@aybabtu.com>
4005         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4006         backward-incompatible features.
4008         Based on patch from Javier Martín, with some adjustments.
4010 2009-02-07  Michael Scherer  <misc@mandriva.org>
4012         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4014 2009-02-07  Robert Millan  <rmh@aybabtu.com>
4016         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4017         position of `disk/lvm.c' to ensure grub_init_all() always picks it
4018         after the RAID stuff.
4020 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
4022         Fixes problem when running vbetest command as reported by
4023         Vladimir Serbinenko <phcoder@gmail.com>.
4025         * (grub_vbe_set_video_mode): Fixed problem with text modes.
4027 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
4029         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4030         /dev/md/NpN style mdraid devices.
4032 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4034         * util/unifont2pff.rb: Remove.
4036 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4038         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4039         `#'.
4041 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4043         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4044         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4045         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4046         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4047         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4048         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4049         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4051 2009-02-02  Christian Franke  <franke@computer.org>
4053         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4055 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
4057         * INSTALL: Note that we now require at least autoconf 2.59 and
4058         that LZO is optional.
4060 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4062         Base on patch on bug #24154 created by Tomas Tintera
4063         <trosos@seznam.cz>.
4065         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4067 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4069         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4070         <bero@arklinux.org>.
4072         * normal/parser.y (script_init): Add missing semicolon.
4074 2009-01-31  Colin D Bennett  <colin@gibibit.com>
4076         * normal/main.c: Add include to grub/menu_viewer.h.
4077         (free_menu_entry_classes): Added.
4078         (grub_normal_menu_addentry): Added class property handling.
4079         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4080         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4082         * normal/menu_viewer.c: New file.
4084         * normal/menu.c (run_menu_entry): Renamed to ...
4085         (grub_menu_execute_entry): ... this and made it as global.
4086         (grub_menu_run): Renamed to ...
4087         (show_text_menu): ... this and made it local.
4088         (show_text_menu): Adapt to new function names.
4089         (grub_normal_terminal_menu_viewer): New global variable.
4091         * include/grub/menu.h: New file.
4093         * include/grub/menu_viewer.h: New file.
4095         * include/grub/normal.h: Added include to grub/menu.h.
4096         (grub_menu_entry): Moved to include/grub/menu.h.
4097         (grub_menu_entry_t): Likewise.
4098         (grub_menu): Likewise.
4099         (grub_menu_t): Likewise.
4100         (grub_normal_terminal_menu_viewer): Added.
4101         (grub_menu_execute_entry): Likewise.
4102         (grub_menu_run): Removed.
4104         * DISTLIST: Added include/grub/menu.h.
4105         Added include/grub/menu_viewer.h.
4106         Added normal/menu_viewer.c.
4108 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
4110         * normal/execute.c (grub_script_execute_menuentry): Changed to use
4111         arglist for menutitle arguments.
4113         * normal/main.c (grub_normal_menu_addentry): Likewise.
4115         * normal/parser.y (menuentry): Likewise.
4117         * normal/script.c (grub_script_create_cmdmenu): Likewise.
4119         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4120         (grub_script_create_cmdmenu): Likewise.
4122         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4124         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4125         changes.
4127         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4129         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4131         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4133         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4135         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4137         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4139 2009-01-30  Christian Franke  <franke@computer.org>
4141         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4142         in option help text.
4144 2009-01-27  Pavel Roskin  <proski@gnu.org>
4146         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4148 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4150         * commands/lsmmap.c: Add include to grub/machine/memory.h.
4152         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4154         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4155         unregister function.
4157 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4159         * disk/scsi.c (grub_scsi_read): Fix sign problem.
4161         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4163         * util/grub-mkfont.c (usage): Fix typo.
4165         * util/elf/grub-mkimage.c (load_modules): Fix warning.
4167 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
4169         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4171         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4173         * kern/misc.c (grub_strcasecmp): New function.
4174         (grub_strcasecmp): Use grub_size_t instead of int for length.
4175         Fix return value.
4176         * include/grub/misc.h: Update function prototypes.
4178 2009-01-26  Robert Millan  <rmh@aybabtu.com>
4180         * configure.ac: Fix cross-compilation check.
4182 2009-01-22  Christian Franke  <franke@computer.org>
4184         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4185         (precision) digit string.  Allow `.format2' without `format1' (width).
4186         Limit input chars for `%s' output to `format2' if specified.  This is
4187         compatible with standard printf ().
4189 2009-01-22  Christian Franke  <franke@computer.org>
4191         * disk/ata.c (grub_ata_wait_status): Replace by ...
4192         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
4193         other status bits may be invalid while BSY is asserted.
4194         (grub_ata_check_ready): New function.
4195         (grub_ata_cmd): Removed.
4196         (grub_ata_wait_drq): New function.
4197         (grub_ata_strncpy): Remove inline.
4198         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
4199         and error check now done by grub_ata_wait_drq ().
4200         (grub_ata_pio_write): Likewise.
4201         (grub_atapi_identify): Set DEV before check for !BSY.  Use
4202         grub_ata_wait_drq () to wait for data.
4203         (grub_ata_device_initialize): Add status register check to
4204         detect missing SATA slave devices.  Add debug messages.
4205         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4206         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
4207         transfer loop by grub_ata_pio_write ().
4208         (grub_ata_identify): Set DEV before check for !BSY. Use
4209         grub_ata_wait_drq () to wait for data.
4210         (grub_ata_setaddress): Set DEV before check for !BSY.
4211         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4212         read/write in one loop.  Fix invalid command on write.  Fix incomplete
4213         command on (size % batch) == 0.  Add missing error check after write of
4214         last block.  Add debug messages.
4215         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
4217 2009-01-19  Christian Franke  <franke@computer.org>
4219         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4220         (GRUB_ATAPI_IREASON_*): Likewise.
4221         (grub_ata_pio_write): Fix timeout error return.
4222         (grub_atapi_identify): Add grub_ata_wait () after cmd.
4223         (grub_atapi_wait_drq): New function.
4224         (grub_atapi_packet): New parameter `size'.
4225         Use grub_atapi_wait_drq () and direct write instead of
4226         grub_ata_pio_write ().
4227         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4228         reads the number of bytes requested by the device for each DRQ
4229         assertion.
4230         (grub_atapi_write): Remove old implementation, return not
4231         implemented instead.
4233 2009-01-19  Christian Franke  <franke@computer.org>
4235         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4236         of 512 to calculate data size.
4237         (grub_scsi_read12): Likewise.
4238         (grub_scsi_write10): Likewise.
4239         (grub_scsi_write12): Likewise.
4240         (grub_scsi_read): Adjust size according to blocksize.
4241         Add checks for invalid blocksize and unaligned transfer.
4243 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
4245         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4247         * term/gfxterm.c (write_char): Fix background rendering for wide
4248         width glyphs.
4250 2009-01-19  Robert Millan  <rmh@aybabtu.com>
4252         * config.guess: Update to latest version from config git.
4253         * config.sub: Likewise.
4255 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
4257         * Makefile.in: Change font compilation to use new grub-mkfont instead
4258         of java version.
4260         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4261         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4262         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4263         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4264         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4265         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4266         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4267         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4268         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4270 2009-01-16  Christian Franke  <franke@computer.org>
4272         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4273         (enum grub_ata_timeout_milliseconds): New enum.
4274         (grub_ata_wait_status): Add parameter milliseconds.
4275         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
4276         recovery from timed-out commands.
4277         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
4278         return grub_errno instead of REG_ERROR.
4279         (grub_ata_pio_write): Add parameter milliseconds.
4280         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4281         Pass milliseconds to grub_ata_wait_status () and
4282         grub_ata_pio_read ().
4283         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4284         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
4285         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
4286         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4287         It is not suitable for device detection, because DEV bit is ignored,
4288         the command may run too long, and not all devices set the signature
4289         properly.
4290         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4291         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4292         Fix device selection, DEV bit must be set first to address the registers
4293         of the correct device.
4294         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4295         grub_ata_pio_read/write ().
4296         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4297         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4299 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
4301         * util/grub-editenv.c (main): Use fseeko(), not fseek().
4303 2009-01-13  Bean  <bean123ch@gmail.com>
4305         * util/grub-mkfont.c (write_font): forget to remove some debug code.
4307 2009-01-13  Bean  <bean123ch@gmail.com>
4309         * Makefile.in: (enable_grub_mkfont): New variable.
4310         (freetype_cflags): Likewise.
4311         (freetype_libs): Likewise.
4313         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4314         (grub_mkfont_SOURCES): New variable.
4315         (grub_mkfont_CFLAGS): Likewise.
4316         (grub_mkfont_LDFLAGS): Likewise.
4318         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4319         library if `--enable-grub-mkfont' is requested.
4320         (enable_grub_mkfont): New variable.
4321         (freetype_cflags): Likewise.
4322         (freetype_libs): Likewise.
4324         * util/grub-mkfont.c: New file.
4326 2009-01-12  Christian Franke  <franke@computer.org>
4328         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4329         mode check.  Fix setting of compat_use[].
4331 2009-01-10  Robert Millan  <rmh@aybabtu.com>
4333         Update a few copyright years which we forgot to do in 2008 (only for
4334         files whose changes made in 2008 were copyright-significant)
4336         * Makefile.in: Add 2008 to Copyright line.
4337         * disk/ieee1275/ofdisk.c: Likewise.
4338         * disk/efi/efidisk.c: Likewise.
4339         * kern/dl.c: Likewise.
4340         * kern/sparc64/ieee1275/init.c: Likewise.
4341         * kern/mm.c: Likewise.
4342         * kern/efi/mm.c: Likewise.
4343         * boot/i386/pc/boot.S: Likewise.
4344         * genfslist.sh: Likewise.
4345         * fs/iso9660.c: Likewise.
4346         * fs/hfs.c: Likewise.
4347         * fs/jfs.c: Likewise.
4348         * fs/minix.c: Likewise.
4349         * fs/ufs.c: Likewise.
4350         * gensymlist.sh.in: Likewise.
4351         * genkernsyms.sh.in: Likewise.
4352         * include/grub/misc.h: Likewise.
4353         * include/grub/types.h: Likewise.
4354         * include/grub/symbol.h: Likewise.
4355         * include/grub/elf.h: Likewise.
4356         * include/grub/kernel.h: Likewise.
4357         * include/grub/disk.h: Likewise.
4358         * include/grub/dl.h: Likewise.
4359         * include/grub/i386/linux.h: Likewise.
4360         * include/grub/i386/pc/biosdisk.h: Likewise.
4361         * include/grub/efi/api.h: Likewise.
4362         * include/grub/efi/pe32.h: Likewise.
4363         * include/grub/util/misc.h: Likewise.
4364         * normal/execute.c: Likewise.
4365         * normal/arg.c: Likewise.
4366         * normal/completion.c: Likewise.
4367         * normal/lexer.c: Likewise.
4368         * normal/parser.y: Likewise.
4369         * normal/misc.c: Likewise.
4370         * commands/i386/pc/vbeinfo.c: Likewise.
4371         * commands/hexdump.c: Likewise.
4372         * commands/terminal.c: Likewise.
4373         * commands/ls.c: Likewise.
4374         * commands/help.c: Likewise.
4375         * partmap/pc.c: Likewise.
4376         * loader/efi/chainloader.c: Likewise.
4377         * loader/multiboot_loader.c: Likewise.
4378         * loader/i386/pc/multiboot2.c: Likewise.
4379         * term/efi/console.c: Likewise.
4380         * term/i386/pc/serial.c: Likewise.
4381         * util/lvm.c: Likewise.
4382         * util/console.c: Likewise.
4383         * util/i386/efi/grub-mkimage.c: Likewise.
4384         * util/raid.c: Likewise.
4386 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
4388         * commands/videotest.c: Removed include to grub/machine/memory.h.
4390         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4391         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4392         (video_mod_SOURCES): Removed.
4393         (video_mod_CFLAGS): Likewise.
4394         (video_mod_LDFLAGS): Likewise.
4395         (gfxterm_mod_SOURCES): Likewise.
4396         (gfxterm_mod_CFLAGS): Likewise.
4397         (gfxterm_mod_LDFLAGS): Likewise.
4398         (videotest_mod_SOURCES): Likewise.
4399         (videotest_mod_CFLAGS): Likewise.
4400         (videotest_mod_LDFLAGS): Likewise.
4401         (bitmap_mod_SOURCES): Likewise.
4402         (bitmap_mod_CFLAGS): Likewise.
4403         (bitmap_mod_LDFLAGS): Likewise.
4404         (tga_mod_SOURCES): Likewise.
4405         (tga_mod_CFLAGS): Likewise.
4406         (tga_mod_LDFLAGS): Likewise.
4407         (jpeg_mod_SOURCES): Likewise.
4408         (jpeg_mod_CFLAGS): Likewise.
4409         (jpeg_mod_LDFLAGS): Likewise.
4410         (png_mod_SOURCES): Likewise.
4411         (png_mod_CFLAGS): Likewise.
4412         (png_mod_LDFLAGS): Likewise.
4414         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4415         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4416         (video_mod_SOURCES): Added.
4417         (video_mod_CFLAGS): Likewise.
4418         (video_mod_LDFLAGS): Likewise.
4419         (videotest_mod_SOURCES): Likewise.
4420         (videotest_mod_CFLAGS): Likewise.
4421         (videotest_mod_LDFLAGS): Likewise.
4422         (bitmap_mod_SOURCES): Likewise.
4423         (bitmap_mod_CFLAGS): Likewise.
4424         (bitmap_mod_LDFLAGS): Likewise.
4425         (tga_mod_SOURCES): Likewise.
4426         (tga_mod_CFLAGS): Likewise.
4427         (tga_mod_LDFLAGS): Likewise.
4428         (jpeg_mod_SOURCES): Likewise.
4429         (jpeg_mod_CFLAGS): Likewise.
4430         (jpeg_mod_LDFLAGS): Likewise.
4431         (png_mod_SOURCES): Likewise.
4432         (png_mod_CFLAGS): Likewise.
4433         (png_mod_LDFLAGS): Likewise.
4434         (gfxterm_mod_SOURCES): Likewise.
4435         (gfxterm_mod_CFLAGS): Likewise.
4436         (gfxterm_mod_LDFLAGS): Likewise.
4438         * term/gfxterm.c: Removed include to grub/machine/memory.h,
4439         grub/machine/console.h.
4441 2009-01-04  Jerone Young  <jerone@gmail.com>
4443         Make on screen instructions clearer
4445         Based on patch created by Jidanni <jidanni@jidanni.org>
4447         * normal/menu.c: print clearer instructions on the screen
4449 2009-01-02  Colin D Bennett  <colin@gibibit.com>
4451         New font engine.
4453         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4454         build system and fixed gfxterm.c to work with different sized fonts.
4456         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4458         * configure: Re-generated.
4460         * DISTLIST: Removed font/manager.c.
4461         Added font/font.c.
4462         Added font/font_cmd.c.
4464         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
4465         compilation.
4467         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
4469         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4471         * kern/term.c: Changed users of grub_utf8_to_ucs4.
4473         * normal/menu.c: Likewise.
4475         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4476         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4478         * include/grub/font.h: Replaced with new file.
4480         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4481         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4482         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4483         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4484         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4485         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4486         fg_red, fg_green, fg_blue, fg_alpha.
4487         (grub_video_adapter): Removed blit_glyph.
4488         (grub_video_blit_glyph): Removed.
4490         * font/manager.c: Removed file.
4492         * font/font.c: New file.
4494         * font/font_cmd.c: Likewise.
4496         * video/video.c (grub_video_blit_glyph): Removed.
4498         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4499         (grub_video_vbe_map_rgba): Likewise.
4500         (grub_video_vbe_unmap_color_int): Likewise.
4501         (grub_video_vbe_blit_glyph): Removed.
4502         (grub_video_vbe_adapter): Removed blit_glyph.
4504         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4505         (get_pixel): Likewise.
4506         (set_pixel): Likewise.
4508         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4510         * term/gfxterm.c: Adapted to new font engine.
4512         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
4514         * term/i386/pc/vga.c: Likewise.
4516         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4518         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4520         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4522         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4524         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4526         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4528         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4530         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4532         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4534         * util/grub.d/00_header.in: Changed to use new loadfont command.
4536         * util/grub-mkconfig_lib.in: Changed font extension.
4538 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
4540         * util/getroot.c (grub_util_get_grub_dev): Add support for
4541         /dev/md/dNNpNN style partitionable mdraid devices.
4543 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
4545         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4546         at a time limit of the PXE TFTP API correctly.
4547         (grub_pxefs_close): Likewise.
4549 2008-11-29  Robert Millan  <rmh@aybabtu.com>
4551         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4552         grub_ata_device_initialize() calls.
4554 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
4556         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4557         iteration failed.
4558         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4560 2008-11-28  Robert Millan  <rmh@aybabtu.com>
4562         Fix build on powerpc-ieee1275.  Based on patch created by
4563         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4564         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4565         `kern/ieee1275/mmap.c'.
4566         * include/grub/powerpc/ieee1275/memory.h: New file.
4568         Provide grub-install on coreboot.
4569         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4570         (grub_install_SOURCES): New variable.
4571         * util/i386/pc/grub-install.in: Add a few condition checks to make it
4572         usable on coreboot.
4574 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
4576         * util/grub-fstest.c (grub_term_get_current_input): Change return type
4577         to `grub_term_input_t'.
4578         (grub_term_get_current_output): Change return type to
4579         `grub_term_output_t'.
4581 2008-11-22  Robert Millan  <rmh@aybabtu.com>
4583         Fix breakage on coreboot due to declaration mismatch.
4584         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4585         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4586         grub_vga_text_cls().
4588         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4589         comments.  Avoid copying one more byte than necessary (just in case).
4591         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4592         to 0x200000 (avoids trouble with some OFW implementations, and matches
4593         with the one in Yaboot).
4594         Reported by Manoel Abranches
4596 2008-11-20  Robert Millan  <rmh@aybabtu.com>
4598         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4599         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4601         * util/grub-mkconfig_lib.in (grub_warn): New function.
4602         (convert_system_path_to_grub_path): Use grub_warn() when issuing
4603         warnings, to obtain consistent formatting.
4604         * util/grub.d/00_header.in: Likewise.
4605         * util/update-grub_lib.in: Likewise.
4607         * loader/i386/linux.c (allocate_pages): Fix a warning.
4608         Move comment text to `#error' stanza.
4610         Harmonize ieee1275's grub_available_iterate() with the generic
4611         grub_machine_mmap_iterate() interface (fixes a recently-introduced
4612         build problem on i386-ieee1275):
4613         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4614         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
4615         parameter `type'.  Update all users of this function.
4616         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4617         `kern/ieee1275/mmap.c'.
4618         * kern/ieee1275/init.c
4619         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4620         with ...
4621         (grub_machine_mmap_iterate): ... this.
4622         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4623         return type to `grub_err_t'.  Update all implementations of this
4624         function prototype.
4625         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4626         Likewise.
4628         Add `lsmmap' command (lists firmware-provided memory map):
4629         * commands/lsmmap.c: New file.
4630         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4631         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4632         variables.
4633         * conf/powerpc-ieee1275.rmk: Likewise.
4634         * conf/i386-coreboot.rmk: Likewise.
4635         * conf/i386-ieee1275.rmk: Likewise.
4637 2008-11-19  Robert Millan  <rmh@aybabtu.com>
4639         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4640         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4641         constraints to initrd allocation (based on code from
4642         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
4643         for Linux to find it.
4645 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4647         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4648         order to cope with duplicate slashes.
4650 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4652         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4653         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
4654         don't want to mess with lower memory, because it is used in the Linux
4655         loader.
4657         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4658         an appropriate place in lower memory, between 0x10000 and 0x90000,
4659         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
4660         is in our heap (probably as a result of it being corrupted during
4661         decompression).  Add #error instance with comment to explain why this
4662         loader isn't currently usable on PC/BIOS.
4664 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4666         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4667         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4669 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4671         Make loader/i386/linux.c buildable on i386-pc (although disabled).
4673         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4674         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4675         from here ...
4676         * include/grub/i386/pc/memory.h: ... to here.
4678 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4680         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4681         split).
4683         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4684         (grub_console_cur_color, grub_console_real_putchar)
4685         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4686         (grub_console_setcolorstate, grub_console_setcolor)
4687         (grub_console_getcolor): Move from here ...
4688         * include/grub/i386/vga_common.h: ... to here (new file).
4690         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4691         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4692         `<grub/i386/io.h>'.
4693         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4694         `<grub/i386/vga_common.h>'.
4696 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4698         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4699         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4700         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4701         variables.
4702         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4703         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4705         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4706         grub_console_init() with call to grub_vga_text_init().
4707         (grub_machine_fini): Replace call to
4708         grub_console_fini() with call to grub_vga_text_fini() and
4709         grub_at_keyboard_fini().
4711         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4712         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4713         (grub_console_setcolorstate, grub_console_setcolor)
4714         (grub_console_getcolor): New function prototypes.
4716         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4717         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4718         (grub_vga_text_setcursor): Static-ize.
4719         (grub_vga_text_term): New structure.
4720         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4722         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4723         (grub_console_cur_color, grub_console_standard_color)
4724         (grub_console_normal_color, grub_console_highlight_color)
4725         (map_char, grub_console_putchar, grub_console_getcharwidth)
4726         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4727         (grub_console_getcolor): Move from here ...
4728         * term/i386/vga_common.c: ... to here (same function names).
4730 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4732         Use newly-added Multiboot support in coreboot.
4734         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4735         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4737         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4738         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4739         (codestart): Store the MBI in `startup_multiboot_info' when we're
4740         being loaded using Multiboot.
4742         * kern/i386/coreboot/init.c (grub_machine_init): Move
4743         grub_at_keyboard_init() call to beginning of function (useful for
4744         debugging).  Call grub_machine_mmap_init() before attempting to use
4745         grub_machine_mmap_iterate().
4746         (grub_lower_mem, grub_upper_mem): Move from here ...
4747         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4748         here (new file).
4750         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4751         function prototype.
4753 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4755         Fix a regression introduced by the at_keyboard.mod split.  Because
4756         some terminals are default on some platforms and non-default on
4757         others, the first terminal being registered determines which is
4758         going to be default.
4760         * kern/term.c (grub_term_register_input): If this is the first
4761         terminal being registered, set it as the current one.
4762         (grub_term_register_output): Likewise.
4764         * term/efi/console.c (grub_console_init): Do not call
4765         grub_term_set_current_output() or grub_term_set_current_input().
4766         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4767         * term/i386/pc/console.c (grub_console_init): Likewise.
4768         (grub_console_fini): Do not call grub_term_set_current_input()
4769         (but leave grub_term_set_current_output() to restore text mode).
4771 2008-11-10  Robert Millan  <rmh@aybabtu.com>
4773         * util/grub.d/00_header.in: Add backward compatibility check for
4774         versions of terminal.mod that don't understand `terminal_input' or
4775         `terminal_output'.
4777 2008-11-09  Robert Millan  <rmh@aybabtu.com>
4779         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4780         `terminal_input' / `terminal_output', not `terminal'.
4782 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4784         * Makefile.in (include_DATA): Fix srcdir=. assumption.
4785         (DISTCLEANFILES): Add `build_env.mk'.
4787 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4789         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4790         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
4791         members.  Update all users.
4792         * util/console.c (grub_ncurses_term): Split in ...
4793         (grub_ncurses_term_input): ... this, and ...
4794         (grub_ncurses_term_output): ... this.  Update all users.
4795         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4797 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4799         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4800         (PKGDATA): Add $(pkgdata_SRCDIR).
4801         (pkglib_BUILDDIR): New variable.
4802         (pkgdata_SRCDIR): New variable.
4803         (build_env.mk): New target.
4804         (include_DATA): New variable.
4805         (install-local): Install $(include_DATA) files in $(includedir).
4807 2008-11-07  Pavel Roskin  <proski@gnu.org>
4809         * gendistlist.sh: Use C locale for sorting to ensure consistent
4810         output on all systems.
4812         * util/grub.d/00_header.in: Remove incorrect space before
4813         "serial".
4815 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4817         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4818         per specification.
4819         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4820         * loader/multiboot_loader.c (find_multi_boot2_header): New function
4821         (based on find_multi_boot1_header).
4822         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4823         using find_multi_boot2_header(), and abort if neither Multiboot or
4824         Multiboot headers were found.
4826 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4828         Modularize at_keyboard.mod:
4830         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4831         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4832         (at_keyboard_mod_LDFLAGS): New variables.
4834         Actual terminal split:
4836         * include/grub/term.h (struct grub_term): Split in ...
4837         (struct grub_term_input): ... this, and ...
4838         (struct grub_term_output): ... this.  Update all users.
4839         (grub_term_set_current): Split in ...
4840         (grub_term_set_current_input): ... this, and ...
4841         (grub_term_set_current_output): ... this.
4842         (grub_term_get_current): Split in ...
4843         (grub_term_get_current_input): ... this, and ...
4844         (grub_term_get_current_output): ... this.
4845         (grub_term_register): Split in ...
4846         (grub_term_register_input): ... this, and ...
4847         (grub_term_register_output): ... this.
4848         (grub_term_unregister): Split in ...
4849         (grub_term_unregister_input): ... this, and ...
4850         (grub_term_unregister_output): ... this.
4851         (grub_term_iterate): Split in ...
4852         (grub_term_iterate_input): ... this, and ...
4853         (grub_term_iterate_output): ... this.
4855         * kern/term.c (grub_term_list): Split in ...
4856         (grub_term_list_input): ... this, and ...
4857         (grub_term_list_output): ... this.  Update all users.
4858         (grub_cur_term): Split in ...
4859         (grub_cur_term_input): ... this, and ...
4860         (grub_cur_term_output): ... this.  Update all users.
4861         (grub_term_set_current): Split in ...
4862         (grub_term_set_current_input): ... this, and ...
4863         (grub_term_set_current_output): ... this.
4864         (grub_term_get_current): Split in ...
4865         (grub_term_get_current_input): ... this, and ...
4866         (grub_term_get_current_output): ... this.
4867         (grub_term_register): Split in ...
4868         (grub_term_register_input): ... this, and ...
4869         (grub_term_register_output): ... this.
4870         (grub_term_unregister): Split in ...
4871         (grub_term_unregister_input): ... this, and ...
4872         (grub_term_unregister_output): ... this.
4873         (grub_term_iterate): Split in ...
4874         (grub_term_iterate_input): ... this, and ...
4875         (grub_term_iterate_output): ... this.
4877         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4878         a check for input and one for output (and only attempt to get keys
4879         from user when input works).
4881         * util/grub-probe.c (grub_term_get_current): Split in ...
4882         (grub_term_get_current_input): ... this, and ...
4883         (grub_term_get_current_output): ... this.
4884         * util/grub-fstest.c: Likewise.
4885         * util/i386/pc/grub-setup.c: Likewise.
4886         * util/grub-editenv.c: Likewise.
4888         Portability adjustments:
4890         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4891         `term/i386/pc/at_keyboard.c'.
4892         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4893         grub_keyboard_controller_init() (now handled by terminal .init).
4894         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4895         grub_at_keyboard_init().
4896         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4897         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4898         at_keyboard.mod via input terminal interface).
4899         * include/grub/i386/coreboot/console.h: Convert into a stub for
4900         `<grub/i386/pc/console.h>'.
4902         Migrate full terminals to new API:
4904         * term/efi/console.c (grub_console_term): Split into ...
4905         (grub_console_term_input): ... this, and ...
4906         (grub_console_term_output): ... this.  Update all users.
4907         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4908         (grub_ofconsole_init): Split into ...
4909         (grub_ofconsole_init_input): ... this, and ...
4910         (grub_ofconsole_init_output): ... this.
4911         (grub_ofconsole_term): Split into ...
4912         (grub_ofconsole_term_input): ... this, and ...
4913         (grub_ofconsole_term_output): ... this.  Update all users.
4914         * term/i386/pc/serial.c (grub_serial_term): Split into ...
4915         (grub_serial_term_input): ... this, and ...
4916         (grub_serial_term_output): ... this.  Update all users.
4917         * term/i386/pc/console.c (grub_console_term): Split into ...
4918         (grub_console_term_input): ... this, and ...
4919         (grub_console_term_output): ... this.  Update all users.
4920         (grub_console_term_input): Only enable it on PC/BIOS platform.
4921         (grub_console_init): Remove grub_keyboard_controller_init() call.
4923         Migrate input terminals to new API:
4925         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4926         `i386' and `i386/pc' to enable build on x86_64 (this driver is
4927         i386-specific anyway).
4928         (grub_console_checkkey): Rename to ...
4929         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
4930         users.
4931         (grub_keyboard_controller_orig): New variable.
4932         (grub_console_getkey): Rename to ...
4933         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
4934         users.
4935         (grub_keyboard_controller_init): Static-ize.  Save original
4936         controller value so that it can be restored ...
4937         (grub_keyboard_controller_fini): ... here (new function).
4938         (grub_at_keyboard_term): New structure.
4939         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4940         functions.
4942         Migrate output terminals to new API:
4944         * term/i386/pc/vga.c (grub_vga_term): Change type to
4945         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4946         members.  Update all users.
4947         * term/gfxterm.c (grub_video_term): Change type to
4948         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4949         members.  Update all users.
4950         * include/grub/i386/pc/console.h (grub_console_checkkey)
4951         (grub_console_getkey): Do not export (no longer needed by gfxterm,
4952         etc).
4954         Migrate `terminal' command and userland tools to new API:
4956         * commands/terminal.c (grub_cmd_terminal): Split into ...
4957         (grub_cmd_terminal_input): ... this, and ...
4958         (grub_cmd_terminal_output): ... this.
4959         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4960         `terminal_input' and `terminal_output'.
4961         * util/grub.d/00_header.in: Adjust `terminal' calls to new
4962         `terminal_input' / `terminal_output' API.
4963         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4964         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4965         provided ${GRUB_TERMINAL}, convert it).
4967 2008-11-04  Robert Millan  <rmh@aybabtu.com>
4969         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
4970         for FreeBSD.
4971         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4973 2008-11-03  Bean  <bean123ch@gmail.com>
4975         * kern/elf.c (grub_elf32_load): Revert to previous code.
4976         (grub_elf64_load): Likewise.
4978         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4980 2008-11-01  Robert Millan  <rmh@aybabtu.com>
4982         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4983         (TARGET_CPPFLAGS): Likewise.
4984         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4986 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
4988         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4990 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4992         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4993         addition of objects until the code is not going to be able to fail.
4995 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4997         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4998         (add a missing NULL check, and correct them by moving the pointer
4999         operations after the actual check).
5001 2008-10-29  Robert Millan  <rmh@aybabtu.com>
5003         * util/i386/pc/grub-install.in: Handle empty string as output from
5004         make_system_path_relative_to_its_root().
5006 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
5008         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5009         circular metadata worst case scenario. If the metadata is circular
5010         then copy the wrap in place.
5011         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5012         project lib/format_text/layout.h
5013         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5015 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
5017         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
5019 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
5021         * util/update-grub_lib.in: Mention filename in warning message.
5023 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
5025         * NEWS: Update for rename of update-grub to grub-mkconfig.
5027 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
5029         * util/update-grub_lib.in: Copy to ...
5030         * util/grub-mkconfig_lib.in: ... this.  Update all users.
5031         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
5032         * util/update-grub.in: Rename to ...
5033         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
5034         option. Add `--output' option to allow users to specify the generated
5035         configuration file.  Default to stdout.
5036         (update_grub_dir): Rename to ...
5037         (grub_mkconfig_dir): ... this.
5038         (grub_cfg): Default to an empty string.
5039         * conf/common.rmk (update-grub): Rename to ...
5040         (grub-mkconfig): ... this.
5041         (update-grub_lib): Copy to ...
5042         (grub-mkconfig_lib): ... this.
5043         (update-grub_SCRIPTS): Copy to ...
5044         (grub-mkconfig_SCRIPTS): ... this. Update all users.
5045         (update-grub_DATA): Rename to ...
5046         (grub-mkconfig_DATA): ... this.
5048 2008-09-28  Robert Millan  <rmh@aybabtu.com>
5050         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5051         to `modified'.  Add the real `created' field.
5052         (grub_iso9660_uuid): Use `modified' rather than `created' for
5053         constructing the UUID.
5055 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
5057         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5058         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5060 2008-09-28  Bean  <bean123ch@gmail.com>
5062         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5063         Thanks to Christian Franke for finding this bug.
5065 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5067         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5068         instances of grub_util_get_disk_name() (see previous commit).
5070 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5072         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5073         `util/i386/get_disk_name.c'.
5074         * conf/i386-efi.rmk: Likewise.
5075         * conf/x86_64-efi.rmk: Likewise.
5076         * conf/i386-coreboot.rmk: Likewise.
5077         * conf/i386-ieee1275.rmk: Likewise.
5078         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5079         `util/ieee1275/get_disk_name.c'.
5080         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5081         * util/ieee1275/get_disk_name.c: Remove file.
5082         * util/i386/get_disk_name.c: Remove file.
5083         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5084         "hd%d" for device.map entries, rather than using
5085         grub_util_get_disk_name().
5087 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5089         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5090         warning.
5091         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5093 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5095         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5096         Changed to 0x5100.
5097         (GRUB_TERM_PPAGE): Changed to 0x4900.
5099 2008-09-24  Robert Millan  <rmh@aybabtu.com>
5101         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5102         macros (they were i386-pc specific).
5103         * include/grub/sparc64/ieee1275/console.h: Likewise.
5104         * include/grub/efi/console.h: Likewise.
5106 2008-09-22  Bean  <bean123ch@gmail.com>
5108         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5109         resident and in attribute list.
5111         * include/grub/ntfs.h (BMP_LEN): Removed.
5113 2008-09-22  Bean  <bean123ch@gmail.com>
5115         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5116         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5118         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5119         error occurs, as grub_disk_open will call grub_disk_close, which will
5120         call p->close (scsi).
5122 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5124         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5125         (AC_PREREQ): Bumped to 2.59.
5126         (AC_TRY_COMPILE): Replace obsolete macro with ...
5127         (AC_COMPILE_IFELSE): ... this.
5128         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5129         (AC_LINK_IFELSE): ... this.
5131 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5133         * autogen.sh: Add a call to `gendistlist.sh'.
5135 2008-09-19  Christian Franke  <franke@computer.org>
5137         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5138         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5139         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5140         Export __enable_execute_stack() to modules.
5141         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5142         New function.
5144 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5146         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5147         Sort the list.
5149 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5151         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5152         #include <grub/util/hostdisk.h>.
5154 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5156         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5157         segments when their filesz is zero (grub_file_read() interprets
5158         zero-size as "read until EOF", which results in memory corruption).
5159         Use `lowest_segment' rather than 0 for calculating the current
5160         segment load address.
5162 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5164         * util/hostdisk.c (open_device): Replace a grub_util_info() call
5165         with grub_dprintf("hostdisk", ...), as it was so verbose that it
5166         clobbered useful information.
5168 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5170         * include/grub/util/biosdisk.h: Move to ...
5171         * include/grub/util/hostdisk.h: ... here.  Update all users.
5172         * util/biosdisk.c: Move to ...
5173         * util/hostdisk.c: ... here.  Update all users.
5175 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5177         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5178         variables.
5179         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5180         and length can be stored directly in the `mbi->mmap_addr' and
5181         `mbi->mmap_length' struct fields.
5183 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5185         * conf/i386.rmk: New file.  Provides declaration for building
5186         `cpuid.mod'.
5187         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5188         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5189         variables.
5190         Include `conf/i386.mk'.
5191         * conf/i386-efi.rmk: Likewise.
5192         * conf/x86_64-efi.rmk: Likewise.
5193         * conf/i386-coreboot.rmk: Likewise.
5194         * conf/i386-ieee1275.rmk: Likewise.
5196 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
5198         Based on patch created by Colin D Bennett <colin@gibibit.com>.
5199         Adds optimization support for BGR based modes.
5201         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5202         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5203         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5204         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5205         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5206         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5207         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5208         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5209         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5210         (grub_video_i386_vbeblit_index_index): Likewise.
5211         (grub_video_i386_vbeblit_replace_directN): Added.
5212         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5213         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5214         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5215         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5216         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5217         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5218         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5219         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5220         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5221         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5222         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5223         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5224         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5226         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5227         (grub_video_i386_vbefill_R8G8B8): Likewise.
5228         (grub_video_i386_vbefill_index): Likewise.
5229         (grub_video_i386_vbefill_direct32): Added.
5230         (grub_video_i386_vbefill_direct24): Likewise.
5231         (grub_video_i386_vbefill_direct16): Likewise.
5232         (grub_video_i386_vbefill_direct8): Likewise.
5234         * include/grub/video.h (grub_video_blit_format): Removed
5235         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5236         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5237         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5238         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5239         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5241         * video/video.c (grub_video_get_blit_format): Updated to use new
5242         blit formats.  Added handling for 16 bit color modes.
5244         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5245         fillers.
5246         (common_blitter): Updated to use new blitters.
5248         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5249         Removed.
5250         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5251         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5252         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5253         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5254         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5255         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5256         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5257         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5258         (grub_video_i386_vbeblit_index_index): Likewise.
5259         (grub_video_i386_vbeblit_replace_directN): Added.
5260         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5261         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5262         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5263         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5264         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5265         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5266         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5267         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5268         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5269         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5270         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5271         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5272         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5274         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5275         (grub_video_i386_vbefill_R8G8B8): Likewise.
5276         (grub_video_i386_vbefill_index): Likewise.
5277         (grub_video_i386_vbefill_direct32): Added.
5278         (grub_video_i386_vbefill_direct24): Likewise.
5279         (grub_video_i386_vbefill_direct16): Likewise.
5280         (grub_video_i386_vbefill_direct8): Likewise.
5282         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5283         types.
5285         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5286         types.
5288         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5289         blitter types.
5291         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5292         types.
5294 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5296         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5297         RAID level 1.
5299 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5301         * fs/iso9660.c (grub_iso9660_date): New structure.
5302         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5303         (grub_iso9660_uuid): New function.
5305 2008-09-05  Bean  <bean123ch@gmail.com>
5307         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5309         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5310         insensitive bit for names in Win32 and Win32 & DOS namespace.
5312         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5314         * include/grub/types.h (LONG_MAX): Likewise.
5316 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5318         * util/getroot.c: Include <config.h>.
5319         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5320         add support for /dev/md/N devices and handle LVM double dash escaping.
5322 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5324         * config.guess: Update to latest version from config git.
5325         * config.sub: Likewise.
5327 2008-09-03  Robert Millan  <rmh@aybabtu.com>
5329         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5330         `disk->total_sectors'.
5332 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5334         * include/grub/normal.h: Fixed incorrect comment for
5335         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5337 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5339         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5340         values with defines.
5342         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5343         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5344         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5345         (GRUB_VBE_MODEATTR_COLOR): Likewise.
5346         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5347         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5348         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5349         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5350         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5351         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5352         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5353         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5354         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5355         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5356         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5357         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5358         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5359         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5360         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5362 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5364         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5365         declaration.
5366         (grub_multiboot): Fix a few warnings.
5368 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5370         * loader/i386/pc/multiboot.c: Update comment not to say that
5371         boot_device support is unimplemented.
5373 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5375         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5376         or memory map support are unimplemented.
5378 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5380         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5382 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5384         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5385         total video memory in 'vbeinfo' output; show color format details for
5386         each video mode.
5388 2008-08-30  Pavel Roskin  <proski@gnu.org>
5390         * util/genmoddep.c: Remove for real this time.
5391         * DISTLIST: Remove util/genmoddep.c.
5393 2008-08-30  Robert Millan  <rmh@aybabtu.com>
5395         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5396         as required by Multiboot spec (it was already 4-byte aligned, but
5397         only by chance).
5399 2008-08-29  Pavel Roskin  <proski@gnu.org>
5401         * kern/powerpc/ieee1275/crt0.S: Rename to ...
5402         * kern/powerpc/ieee1275/startup.S: ... this.
5403         * conf/powerpc-ieee1275.rmk: Adjust for the above.
5404         * DISTLIST: Likewise.
5406         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5407         grub/cpu/kernel.h.  Add start label for consistency with other
5408         platforms.  Add grub_prefix immediately after start.  Add jump
5409         to the code after grub_prefix.
5410         * include/grub/powerpc/kernel.h: Provide valid values for
5411         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5413 2008-08-29  Bean  <bean123ch@gmail.com>
5415         * configure.ac: Change host_os to cygwin for mingw.
5416         (asprintf): New check for function.
5418         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5419         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5421         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5422         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5423         sync, sleep and grub_util_get_disk_size for mingw.
5425         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5426         to get size in mingw.
5427         (open_device): Use flag O_BINARY if it's defined.
5428         (find_root_device): Add dummy code for mingw.
5430         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5431         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5432         (get_scsi_disk_name): Return 0 for mingw.
5434         * util/hostfs.c: #include <grub/util/misc.h>.
5435         (grub_hostfs_open): Use "rb" flag to open file, use
5436         grub_util_get_disk_size to get disk size for mingw.
5438         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5439         (asprintf): New function if HAVE_ASPRINTF is not set.
5440         (sync): New function for mingw.
5441         (sleep): Likewise.
5442         (grub_util_get_disk_size): Likewise.
5444 2008-08-28  Pavel Roskin  <proski@gnu.org>
5446         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5447         kern/time.c.
5449 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5451         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5453 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5455         Change find_grub_drive() syntax so it doesn't prevent it from
5456         detecting NULL names as errors.
5458         * util/biosdisk.c (find_grub_drive): Move free slot search code
5459         from here ...
5460         (find_free_slot): ... to here.
5461         (read_device_map): Use find_free_slot() to search for free slots.
5463 2008-08-27  Marco Gerards  <marco@gnu.org>
5465         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5466         (scsi_mod_SOURCES): New variable.
5467         (scsi_mod_CFLAGS): Likewise
5468         (scsi_mod_LDFLAGS): Likewise.
5470         * disk/scsi.c: New file.
5472         * include/grub/scsi.h: Likewise.
5474         * include/grub/scsicmd.h: Likewise.
5476         * disk/ata.c: Include <grub/scsi.h>.
5477         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5478         instead.
5479         (grub_ata_iterate): Skip ATAPI devices.
5480         (grub_ata_open): Only handle ATAPI devices.
5481         (struct grub_atapi_read): Removed.
5482         (grub_atapi_readsector): Likewise.
5483         (grub_ata_read): No longer handle ATAPI devices.
5484         (grub_ata_write): Likewise.
5485         (grub_atapi_iterate): New function.
5486         (grub_atapi_read): Likewise.
5487         (grub_atapi_write): Likewise.
5488         (grub_atapi_open): Likewise.
5489         (grub_atapi_close): Likewise.
5490         (grub_atapi_dev): New variable.
5491         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5492         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5494         * include/grub/disk.h (enum grub_disk_dev_id): Add
5495         `GRUB_DISK_DEVICE_SCSI_ID'.
5497 2008-08-26  Robert Millan  <rmh@aybabtu.com>
5499         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5500         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5501         descriptive.
5503 2008-08-23  Bean  <bean123ch@gmail.com>
5505         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5506         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5507         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5508         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5509         dm_nv.mod.
5510         (raid5rec_mod_SOURCES): New macro.
5511         (raid5rec_mod_CFLAGS): Likewise.
5512         (raid5rec_mod_LDFLAGS): Likewise.
5513         (raid6rec_mod_SOURCES): Likewise.
5514         (raid6rec_mod_CFLAGS): Likewise.
5515         (raid6rec_mod_LDFLAGS): Likewise.
5516         (mdraid_mod_SOURCES): Likewise.
5517         (mdraid_mod_CFLAGS): Likewise.
5518         (mdraid_mod_LDFLAGS): Likewise.
5519         (dm_nv_mod_SOURCES): Likewise.
5520         (dm_nv_mod_CFLAGS): Likewise.
5521         (dm_nv_mod_LDFLAGS): Likewise.
5523         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5524         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
5525         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5527         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5528         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5530         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5532         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5534         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5536         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5538         * disk/raid5_recover.c: New file.
5540         * disk/raid6_recover.c: Likewise.
5542         * disk/mdraid_linux.c: Likewise.
5544         * disk/dmraid_nvidia.c: Likewise.
5546         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5547         ULONG_MAX.
5549         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5550         calculate the size of raid device.
5551         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5552         different layout of raid5.
5553         (grub_raid_scan_device): Remove code specific to mdraid.
5554         (grub_raid_list): New variable.
5555         (free_array): New function.
5556         (grub_raid_register): Likewise.
5557         (grub_raid_unregister): Likewise.
5558         (grub_raid_rescan): Likewise.
5559         (GRUB_MOD_INIT): Don't iterate device here.
5560         (GRUB_MOD_FINI): Use free_array to release resource.
5562         * include/grub/raid.h: Remove macro and structure specific to mdraid.
5563         (grub_raid5_recover_func_t): New function variable type.
5564         (grub_raid6_recover_func_t): Likewise.
5565         (grub_raid5_recover_func): New variable.
5566         (grub_raid6_recover_func): Likewise.
5567         (grub_raid_register): New function.
5568         (grub_raid_unregister): Likewise.
5569         (grub_raid_rescan): Likewise.
5570         (grub_raid_block_xor): Likewise.
5572         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5573         (CMD_CRC): New macro.
5574         (part): Removed.
5575         (read_file): Handle device as well as file.
5576         (cmd_crc): New function.
5577         (fstest): Handle multiple disks.
5578         (options): Remove part, raw and long, add root and diskcount.
5579         (usage): Add crc, remove -p, -r, -l, add -r and -c.
5580         (main): Find the first non option entry and ignore subsequent options,
5581         add handling for the new options, support multiple disks.
5583         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5585 2008-08-23  Bean  <bean123ch@gmail.com>
5587         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5589         * genfslist.sh: Ignore kernel.mod.
5591         * genpartmaplist.sh: Likewise.
5593 2008-08-23  Robert Millan  <rmh@aybabtu.com>
5595         * util/getroot.c (find_root_device): Skip anything that starts with
5596         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
5598 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
5600         * util/update-grub.in (GRUB_GFXMODE): Export variable.
5601         * util/grub.d/00_header.in: Allow the administrator to change default
5602         gfxmode via ${GRUB_GFXMODE}.
5604 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
5606         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5608 2008-08-21  Robert Millan  <rmh@aybabtu.com>
5610         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
5611         loader.
5612         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5613         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5615 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
5617         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5618         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5620 2008-08-19  Robert Millan  <rmh@aybabtu.com>
5622         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5623         (struct grub_virtual_screen): Remove `cursor_color'.
5624         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5625         initialization.
5626         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5628 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5630         Unify (identical) linux_normal.c files.
5631         * loader/i386/efi/linux_normal.c: Move from here ...
5632         * loader/linux_normal.c: ... to here.  Update all users.
5633         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
5634         * loader/i386/ieee1275/linux_normal.c: Likewise.
5636 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5638         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5639         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5640         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5641         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5642         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5643         New macros.
5644         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5645         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5646         (GRUB_LINUX_CL_END_OFFSET): ... to here.
5647         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5648         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
5649         (GRUB_EFI_CL_END_OFFSET): Rename to ...
5650         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
5651         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5652         Initialize `params->video_cursor_x' and `params->video_cursor_y'
5653         portably using grub_getxy().
5654         Replace `-EFI' with `-bzImage' in boot message.
5656 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5658         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5660 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5662         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5664         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5665         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5666         (grub_machine_mmap_iterate): New function declaration.
5667         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5668         structure.
5669         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5670         macros.
5672         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5673         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5674         Move e820 parsing from here ...
5675         * kern/i386/pc/mmap.c: New file.
5676         (grub_machine_mmap_iterate): ... to here.
5678         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5679         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5680         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
5681         (grub_available_iterate): Redeclare to return `void', and redeclare
5682         its hook to use grub_uint64_t as addr and size parameters, and rename
5683         to ...
5684         (grub_machine_mmap_iterate): ... this.  Update all users.
5686         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5687         to make it more readable.  Rename to ...
5688         (grub_machine_mmap_iterate): ... this.
5690         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5691         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5692         (grub_multiboot): Allocate an extra region after the payload, and fill
5693         it with a Multiboot memory map.  Adjust a.out loader to calculate size
5694         with the extra space.
5695         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5696         with the extra space.
5698 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
5700         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5702 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
5704         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5705         mdate-sh to the list `find' searches for.
5706         * DISTLIST: Regenerated.
5708 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
5710         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5711         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5712         genmoddep.awk, gensymlist.sh.in.
5713         (DISTDIRS): Add bus, docs, hook, lib.
5714         * DISTLIST: Regenerated.
5715         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5717 2008-08-16  Robert Millan  <rmh@aybabtu.com>
5719         * disk/raid.c (grub_raid_init): Handle/report errors set by
5720         grub_device_iterate().
5721         * disk/lvm.c (grub_lvm_init): Likewise.
5723 2008-08-15  Bean  <bean123ch@gmail.com>
5725         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5726         and datehook.mod.
5727         (datetime_mod_SOURCES): New macro.
5728         (datetime_mod_CFLAGS): Likewise.
5729         (datetime_mod_LDFLAGS): Likewise.
5730         (date_mod_SOURCES): Likewise.
5731         (date_mod_CFLAGS): Likewise.
5732         (date_mod_LDFLAGS): Likewise.
5733         (datehook_mod_SOURCES): Likewise.
5734         (datehook_mod_CFLAGS): Likewise.
5735         (datehook_mod_LDFLAGS): Likewise.
5737         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5738         and datehook.mod.
5739         (datetime_mod_SOURCES): New macro.
5740         (datetime_mod_CFLAGS): Likewise.
5741         (datetime_mod_LDFLAGS): Likewise.
5742         (date_mod_SOURCES): Likewise.
5743         (date_mod_CFLAGS): Likewise.
5744         (date_mod_LDFLAGS): Likewise.
5745         (datehook_mod_SOURCES): Likewise.
5746         (datehook_mod_CFLAGS): Likewise.
5747         (datehook_mod_LDFLAGS): Likewise.
5749         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5750         and datehook.mod.
5751         (datetime_mod_SOURCES): New macro.
5752         (datetime_mod_CFLAGS): Likewise.
5753         (datetime_mod_LDFLAGS): Likewise.
5754         (date_mod_SOURCES): Likewise.
5755         (date_mod_CFLAGS): Likewise.
5756         (date_mod_LDFLAGS): Likewise.
5757         (datehook_mod_SOURCES): Likewise.
5758         (datehook_mod_CFLAGS): Likewise.
5759         (datehook_mod_LDFLAGS): Likewise.
5761         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5762         and datehook.mod.
5763         (datetime_mod_SOURCES): New macro.
5764         (datetime_mod_CFLAGS): Likewise.
5765         (datetime_mod_LDFLAGS): Likewise.
5766         (date_mod_SOURCES): Likewise.
5767         (date_mod_CFLAGS): Likewise.
5768         (date_mod_LDFLAGS): Likewise.
5769         (datehook_mod_SOURCES): Likewise.
5770         (datehook_mod_CFLAGS): Likewise.
5771         (datehook_mod_LDFLAGS): Likewise.
5773         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5774         and datehook.mod.
5775         (datetime_mod_SOURCES): New macro.
5776         (datetime_mod_CFLAGS): Likewise.
5777         (datetime_mod_LDFLAGS): Likewise.
5778         (date_mod_SOURCES): Likewise.
5779         (date_mod_CFLAGS): Likewise.
5780         (date_mod_LDFLAGS): Likewise.
5781         (datehook_mod_SOURCES): Likewise.
5782         (datehook_mod_CFLAGS): Likewise.
5783         (datehook_mod_LDFLAGS): Likewise.
5785         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5787         * commands/date.c: New file.
5789         * hook/datehook.c: Likewise.
5791         * include/grub/lib/datetime.h: Likewise.
5793         * include/grub/i386/cmos.h: Likewise.
5795         * lib/datetime.c: Likewise.
5797         * lib/i386/datetime.c: Likewise.
5799         * lib/efi/datetime.c: Likewise.
5801 2008-08-14  Robert Millan  <rmh@aybabtu.com>
5803         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5804         (grub_mkelfimage_SOURCES): New variable.
5805         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5807         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5808         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5809         * conf/powerpc-ieee1275.rmk: Likewise.
5810         * conf/i386-ieee1275.rmk: Likewise.
5812         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5813         * kern/i386/coreboot/init.c: Likewise.
5815         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5816         with `<grub/cpu/kernel.h>'.
5817         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5818         to ...
5819         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5820         * kern/i386/coreboot/startup.S: Likewise.
5822         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5823         (GRUB_MOD_GAP): Remove.
5824         * include/grub/powerpc/kernel.h: New file.
5825         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5826         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5827         * include/grub/i386/kernel.h: New file.
5828         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5829         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5830         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5832         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5833         `grub-mkelfimage'.
5834         Use --directory when invoking grub_mkimage.
5836         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5837         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5838         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5839         and GRUB_KERNEL_CPU_PREFIX.
5841 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
5843         * include/grub/err.h (grub_err_printf): New function prototype.
5844         * util/misc.c (grub_err_printf): New function.
5845         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5846         grub_printf.
5847         * kern/err.c (grub_print_error): Use grub_err_printf.
5849 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5851         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5853 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5855         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5856         boot entry.
5858 2008-08-12  Robert Millan  <rmh@aybabtu.com>
5860         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5861         of the relocation code from here ...
5862         (grub_multiboot): ... to here.
5863         (forward_relocator, backward_relocator): Move from here ...
5864         * kern/i386/loader.S (grub_multiboot_forward_relocator)
5865         (grub_multiboot_backward_relocator): ... to here.
5866         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
5867         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
5868         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5869         (grub_multiboot_forward_relocator_end)
5870         (grub_multiboot_backward_relocator)
5871         (grub_multiboot_backward_relocator_end): New variables.
5873 2008-08-12  Bean  <bean123ch@gmail.com>
5875         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5877 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5879         * kern/i386/linuxbios/startup.S: Move from here ...
5880         * kern/i386/coreboot/startup.S: ... to here.
5882         * kern/i386/linuxbios/init.c: Move from here ...
5883         * kern/i386/coreboot/init.c: ... to here.
5885         * kern/i386/linuxbios/table.c: Move from here ...
5886         * kern/i386/coreboot/mmap.c: ... to here.
5888         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5890 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5892         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5893         errors.  Leave it to the upper layer to handle them.
5895 2008-08-09  Christian Franke  <franke@computer.org>
5897         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5898         * conf/common.rmk: Install `grub-pe2elf' only if requested.
5899         Install `grub.d/10_windows' only on Cygwin.
5900         * configure.ac: Add subst of `target_os'.
5901         Check `target_os' also before setting TARGET_OBJ2ELF.
5902         Add `--enable-grub-pe2elf'.
5904 2008-08-08  Robert Millan  <rmh@aybabtu.com>
5906         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5907         (grub_last_time): Change type to grub_uint64_t.
5908         (grub_disk_open): Migrate code from to using grub_get_time_ms().
5909         (grub_disk_close): Likewise.
5911         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5912         (run_menu): Migrate code from to using grub_get_time_ms().
5914         * util/misc.c (grub_get_time_ms): New function.
5916 2008-08-08  Marco Gerards  <marco@gnu.org>
5918         * disk/ata.c (grub_ata_regget): Change return type to
5919         `grub_uint8_t'.
5920         (grub_ata_regget2): Likewise.
5921         (grub_ata_wait_status): New function.
5922         (grub_ata_wait_busy): Removed function, updated all users to use
5923         `grub_ata_wait_status'.
5924         (grub_ata_wait_drq): Likewise.
5925         (grub_ata_cmd): New function.
5926         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
5927         error handling.
5928         (grub_ata_pio_write): Add error handling.
5929         (grub_atapi_identify): Likewise.
5930         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5931         handling.
5932         (grub_ata_identify): Use `grub_ata_cmd' and improve error
5933         handling.  Actually use the detected registers.  Reorder the
5934         detection logic such that it is easier to read.
5935         (grub_ata_pciinit): Do not assign the same ID to each controller.
5936         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5937         handling.
5938         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5940         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5942 2008-08-08  Marco Gerards  <marco@gnu.org>
5944         * NEWS: Update.
5946 2008-08-07  Bean  <bean123ch@gmail.com>
5948         * include/grub/x86_64/pci.h: New file.
5950 2008-08-07  Christian Franke  <franke@computer.org>
5952         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5953         (TIMER2_GATE): Likewise.
5954         (grub_pit_wait): Add enable/disable of the timer2 gate
5955         bit of port 0x61.  This fixes a possible infinite loop.
5957 2008-08-07  Bean  <bean123ch@gmail.com>
5959         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5960         kern/i386/tsc.c and kern/i386/pit.c.
5962         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5963         x86_64 platform.
5965         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5966         <grub/i386/tsc.h>.
5968         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5970 2008-08-07  Bean  <bean123ch@gmail.com>
5972         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5974         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5976         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5977         multiple inclusion. Add #include <grub/types.h>.
5979 2008-08-06  Christian Franke  <franke@computer.org>
5981         * conf/common.rmk: Build and install `10_windows'.
5982         * util/grub.d/10_windows.in: New script.
5984 2008-08-06  Pavel Roskin  <proski@gnu.org>
5986         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5988 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5990         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5991         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5993 2008-08-06  Bean  <bean123ch@gmail.com>
5995         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5996         (grub_pxefs_fs_int): Remove dummy definition.
5997         (grub_pxefs_open): Use data->block_size to store the current block
5998         size setting.
5999         (grub_pxefs_read): Use block size stored in data->block_size. As the
6000         value of grub_pxe_blksize can be changed after the file is opened.
6002 2008-08-06  Bean  <bean123ch@gmail.com>
6004         * fs/i386/pc/pxe.c (curr_file): new variable.
6005         (grub_pxefs_open): Simply the handling of pxe file system. Don't
6006         require the dummy internal file system anymore.
6007         (grub_pxefs_read): Removed.
6008         (grub_pxefs_close): Likewise.
6009         (grub_pxefs_fs_int): Likewise.
6010         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6011         connection when we switch file.
6012         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6014 2008-08-06  Robert Millan  <rmh@aybabtu.com>
6016         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6017         `halt.mod'.
6018         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6019         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6021         * kern/i386/halt.c: New file.
6022         * kern/i386/reboot.c: Likewise.
6023         * include/grub/i386/reboot.h: Likewise.
6024         * include/grub/i386/halt.h: Likewise.
6026         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6027         Include `<grub/cpu/halt.h>'.
6028         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6029         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6031         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6032         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6033         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6034         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6035         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6036         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6037         from here ...
6038         * include/grub/i386/at_keyboard.h: ... to here.
6040 2008-08-05  Robert Millan  <rmh@aybabtu.com>
6042         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6043         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6044         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6045         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6046         `kern/generic/millisleep.c'.
6048         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6049         instead of grub_get_rtc().
6050         (grub_tsc_init): Initialize `tsc_boot_time'.
6052         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6053         (grub_machine_init): Use grub_tsc_init() rather than
6054         installing an RTC-based handler via grub_install_get_time_ms().
6056         * kern/i386/pit.c: New file.
6057         * include/grub/i386/pit.h: Likewise.
6059 2008-08-05  Bean  <bean123ch@gmail.com>
6061         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6063         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6064         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6065         (pxe_mod_SOURCES): New macro.
6066         (pxe_mod_CFLAGS): Likewise.
6067         (pxe_mod_LDFLAGS): Likewise.
6068         (pxecmd_mod_SOURCES): Likewise.
6069         (pxecmd_mod_CFLAGS): Likewise.
6070         (pxecmd_mod_LDFLAGS): Likewise.
6072         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6073         (grub_pxe_call): Likewise.
6075         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6077         * commands/i386/pc/pxecmd.c: New file.
6079         * fs/i386/pc/pxe.c: Likewise.
6081         * include/grub/i386/pc/pxe.h: Likewise.
6083 2008-08-05  Bean  <bean123ch@gmail.com>
6085         * util/console.c (grub_console_cur_color): New variable.
6086         (grub_console_standard_color): Likewise.
6087         (grub_console_normal_color): Likewise.
6088         (grub_console_highlight_color): Likewise.
6089         (color_map): Likewise.
6090         (use_color): Likewise.
6091         (NUM_COLORS): New macro.
6092         (grub_ncurses_setcolorstate): Handle color properly.
6093         (grub_ncurses_setcolor): Don't change color here, just remember the
6094         settings, color will be set in grub_ncurses_setcolorstate.
6095         (grub_ncurses_getcolor): New function.
6096         (grub_ncurses_init): Initialize color pairs.
6097         (grub_ncurses_term): New member grub_ncurses_getcolor.
6099 2008-08-05  Colin D Bennett  <colin@gibibit.com>
6101         High resolution timer support.  Implemented for x86 CPUs using TSC.
6102         Extracted generic grub_millisleep() so it's linked in only as needed.
6103         This requires a Pentium compatible CPU; if the RDTSC instruction is
6104         not supported, then it falls back on the generic grub_get_time_ms()
6105         implementation that uses the machine's RTC.
6107         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6108         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6109         `kern/generic/millisleep.c'.
6111         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6112         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6114         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6115         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6117         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6119         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6120         `kern/generic/millisleep.c'.
6122         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6124         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6126         * kern/generic/rtc_get_time_ms.c: New file.
6128         * kern/generic/millisleep.c: New file.
6130         * kern/misc.c: Don't include
6131         <kern/time.h> anymore.
6132         (grub_millisleep_generic): Removed.
6134         * commands/sleep.c (grub_interruptible_millisleep): Uses
6135         grub_get_time_ms() instead of grub_get_rtc().
6137         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
6138         function.
6139         (grub_cpu_is_cpuid_supported): New inline function.
6140         (grub_cpu_is_tsc_supported): New inline function.
6141         (grub_tsc_init): New function prototype.
6142         (grub_tsc_get_time_ms): New function prototype.
6144         * kern/i386/tsc.c (grub_get_time_ms): New file.
6146         * include/grub/time.h: Include <grub/types.h.
6147         (grub_millisleep_generic): Removed.
6148         (grub_get_time_ms): New prototype.
6149         (grub_install_get_time_ms): New prototype.
6150         (grub_rtc_get_time_ms): New prototype.
6152         * kern/time.c (grub_get_time_ms): New function.
6153         (grub_install_get_time_ms): New function.
6155         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
6156         <grub/time.h> anymore.
6157         (grub_millisleep): Removed.
6158         (grub_machine_init): Call grub_tsc_init.
6160         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6161         get_time_ms() implementation.
6163         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6164         (ieee1275_get_time_ms): New function.
6165         (grub_machine_init): Install get_time_ms() implementation.
6167         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6168         (grub_machine_init): Call grub_tsc_init().
6169         (grub_millisleep): Removed.
6171         * kern/ieee1275/init.c (grub_millisleep): Removed.
6172         (grub_machine_init): Install ieee1275_get_time_ms()
6173         implementation.
6174         (ieee1275_get_time_ms): New function.
6175         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6176         real work.
6178 2008-08-05  Marco Gerards  <marco@gnu.org>
6180         * disk/ata.c: Include <grub/pci.h>.
6181         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6182         (grub_ata_initialize): Rewritten.
6183         (grub_ata_device_initialize): New function.
6185 2008-08-04  Pavel Roskin  <proski@gnu.org>
6187         * kern/main.c: Include grub/mm.h.
6189 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6191         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6192         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6193         corruption problem).
6195 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6197         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6198         warnings introduced in my last commit.
6200 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6202         Make PCI available on all i386 architectures.
6204         * include/grub/i386/pc/pci.h: Move from here ...
6205         * include/grub/i386/pci.h: ... to here.
6207         * include/grub/i386/pc/pci.h: Remove.
6208         * include/grub/i386/efi/pci.h: Remove.
6209         * include/grub/x86_64/efi/pci.h: Remove.
6211         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6212         `<grub/cpu/pci.h>'.
6214         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6215         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6216         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6218         * conf/i386-ieee1275.rmk: Likewise.
6220 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6222         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6223         (grub_console_setcursor): Make it possible to set cursor off.
6225 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6227         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
6228         of modules instead of assuming which platform provides what.
6229         * util/update-grub.in: Likewise.
6231 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6233         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6234         instead of `grub_install_dos_part' to determine whether a drive needs
6235         to be prepended to prefix (`grub_install_dos_part' is not reliable,
6236         because it can be overridden when loading GRUB via Multiboot).
6238 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6240         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6242 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6244         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6245         of informational grub_dprintf() calls.
6247 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6249         * disk/memdisk.c (memdisk_size): Don't initialize.
6250         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6252         * include/grub/i386/pc/kernel.h
6253         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6254         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6255         (grub_memdisk_image_size, grub_arch_memdisk_addr)
6256         (grub_arch_memdisk_size): Remove.
6258         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6259         field (was only used to transfer a constant).  Add `type' field to
6260         support multiple module types.
6261         (grub_module_iterate): New function.
6263         * kern/device.c (grub_device_open): Do not hide error messages
6264         when grub_disk_open() fails.  Use grub_print_error() instead.
6266         * kern/i386/pc/init.c (grub_arch_modules_addr)
6267         (grub_arch_memdisk_size): Remove functions.
6268         (grub_arch_modules_addr): Return the module address in high memory
6269         (now that it isn't copied anymore).
6271         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6272         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6273         decompression routine (grub_total_module_size already includes that
6274         now).  Don't copy modules back to low memory.
6276         * kern/main.c: Include `<grub/mm.h>'.
6277         (grub_load_modules): Split out (and use) ...
6278         (grub_module_iterate): ... this function, which iterates through
6279         module objects and runs a hook.
6280         Comment out grub_mm_init_region() call, as it would cause non-ELF
6281         modules to be overwritten.
6283         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6284         the memdisk image in its own region, make it part of the module list.
6285         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6286         (main): Parse --memdisk|-m option, and pass user-provided path as
6287         parameter to generate_image().
6288         (add_segments): Pass `memdisk_path' down to load_modules().
6289         (load_modules): Embed memdisk image in module section when requested.
6290         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6291         `header.type' instead of `header.offset'.
6293         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6294         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6295         (memdisk_mod_LDFLAGS): New variables.
6296         * conf/i386-coreboot.rmk: Likewise.
6297         * conf/i386-ieee1275.rmk: Likewise.
6299 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6301         * loader/i386/pc/multiboot.c (playground, forward_relocator)
6302         (backward_relocator): New variables.  Used to allocate and relocate
6303         the payload, respectively.
6304         (grub_multiboot_load_elf32): Load into heap instead of requested
6305         address, install the appropriate relocator code in each bound of
6306         the payload, and set the entry point such that
6307         grub_multiboot_real_boot() will jump to one of them.
6309         * kern/i386/loader.S (grub_multiboot_payload_size)
6310         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6311         (grub_multiboot_payload_entry_offset): New variables.
6312         (grub_multiboot_real_boot): Set cpu context to what the relocator
6313         expects, and jump to the relocator instead of the payload.
6315         * include/grub/i386/loader.h (grub_multiboot_payload_size)
6316         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6317         (grub_multiboot_payload_entry_offset): Export.
6319 2008-08-01  Bean  <bean123ch@gmail.com>
6321         * normal/menu_entry.c (editor_getline): Don't return the original
6322         string as result, as it will be released by lexer once it has done
6323         using it.
6325 2008-08-01  Robert Millan  <rmh@aybabtu.com>
6327         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6328         within menuentries, not before them.
6329         util/grub.d/10_hurd.in: Likewise.
6331 2008-08-01  Bean  <bean123ch@gmail.com>
6333         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6334         (bufio_mod_SOURCES): New macro.
6335         (bufio_mod_CFLAGS): Likewise.
6336         (bufio_mod_LDFLAGS): Likewise.
6338         * include/grub/bufio.h: New file.
6340         * io/bufio.c: Likewise.
6342         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6343         (grub_video_reader_png): Use grub_buffile_open to open file.
6345         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6346         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6348         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6349         (grub_video_reader_tga): Use grub_buffile_open to open file.
6351         * font/manager.c: Include <grub/bufio.h>.
6352         (add_font): Use grub_buffile_open to open file.
6354 2008-07-31  Robert Millan  <rmh@aybabtu.com>
6356         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6357         ELF segments, use a macro for arbitrarily accessing any of them instead
6358         of preparing a pointer that allows access to one at a time.
6359         (grub_multiboot_load_elf64): Likewise.
6361 2008-07-31  Bean  <bean123ch@gmail.com>
6363         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6364         GRUB_KERNEL_MACHINE_DATA_END.
6366 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6368         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6369         Increase from 0x50 to 0x60.
6370         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6371         use UUIDs to identify the root drive for them.  If that's not
6372         possible, abort.
6373         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6374         check, for cross-disk installs.
6376 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6378         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6379         is non-empty, use it to set the `prefix' environment variable instead
6380         of the usual approach.
6381         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6382         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6383         environment variable instead of dummy make_install_device().
6385         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6386         (start): Insert a data section, with `grub_prefix' variable.
6387         * kern/i386/linuxbios/startup.S: Likewise.
6389         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6390         New variable reference.
6391         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6392         New macro.  Defines offset of `grub_prefix' within startup.S (relative
6393         to `start').
6394         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
6395         section within startup.S (relative to `start').
6396         * include/grub/i386/coreboot/kernel.h: Likewise.
6398         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6399         Overwrite grub_prefix with its contents, at the beginning of the
6400         first segment.
6401         (main): Understand -p|--prefix.
6403 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6405         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6407 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6409         * term/i386/pc/vga_text.c (grub_console_cls): Use
6410         grub_console_gotoxy() to go back to beginning of the screen.
6411         Found by Patrick Georgi <patrick.georgi@coresystems.de>
6413 2008-07-29  Christian Franke  <franke@computer.org>
6415         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6416         Add conversion of emulated mount points on Cygwin.
6418 2008-07-29  Christian Franke  <franke@computer.org>
6420         * util/update-grub.in: Add a check for admin
6421         group on Cygwin.
6422         Remove old `grub.cfg.new' before creation.
6423         Add `-f' to `mv' to handle the different filesystem
6424         semantics of Windows.
6426 2008-07-29  Bean  <bean123ch@gmail.com>
6428         * normal/main.c (get_line): Fix buffer overflow bug.
6430 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6432         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6433         (struct grub_apple_header): New struct.  Describes the layout of
6434         the partmap header.
6435         (apple_partition_map_iterate): Check the header magic as well as the
6436         partition magic (which was already being checked).
6438 2008-07-28  Pavel Roskin  <proski@gnu.org>
6440         * genmk.rb: Add a warning to the beginning of the output that
6441         it's a generated file and should not be edited.
6443 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6445         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6446         with the same number are found, just use issue a warning with
6447         grub_dprintf(), as this error has been reported to be non-fatal.
6449 2008-07-27  Robert Millan  <rmh@aybabtu.com>
6451         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6452         information.
6454 2008-07-27  Bean  <bean123ch@gmail.com>
6456         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6457         (grub_fat_find_dir): Ignore case when comparing filename.
6459 2008-07-27  Bean  <bean123ch@gmail.com>
6461         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6462         smallino, as it's more descriptive, and i8count can be confused with
6463         the other field count.
6464         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6465         inode type.
6467 2008-07-27  Bean  <bean123ch@gmail.com>
6469         * commands/crc.c: New file.
6471         * lib/crc.c: Likewise.
6473         * include/grub/lib/crc.h: Likewise.
6475         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6477         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6478         (hexdump): Move this function to ...
6480         * lib/hexdump.c: ... here.
6482         * include/grub/hexdump.h: Renamed to ...
6484         * include/grub/lib/hexdump.h: ... this.
6486         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6488         * util/grub-editenv.c: Likewise.
6490         * include/envblk.h: Renamed to ...
6492         * include/lib/envblk.h: ... this.
6494         * util/envblk.c: Renamed to ...
6496         * lib/envblk.c: ... this.
6498         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6499         lib/hexdump.c.
6500         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6501         (pkglib_MODULES): Add crc.mod.
6502         (hexdump_mod_SOURCES): Add lib/hexdump.c.
6503         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6504         (crc_mod_SOURCES): New macro.
6505         (crc_mod_CFLAGS): Likewise.
6506         (crc_mod_LDFLAGS): Likewise.
6508         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6510         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6512         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6514         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6516         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6518 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
6520         * commands/help.c: Include <grub/term.h>.
6521         (TERM_WIDTH): Removed.  Updated all users.
6523 2008-07-27  Pavel Roskin  <proski@gnu.org>
6525         * util/getroot.c (find_root_device): Rephrase a comment to avoid
6526         spurious warnings about a comment within a comment.
6528 2008-07-25  Robert Millan  <rmh@aybabtu.com>
6530         * util/getroot.c (find_root_device): Skip devices that match
6531         /dev/dm-[0-9].  This lets the real device be found for any type of
6532         abstraction (LVM, EVMS, RAID..).
6533         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6534         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
6535         device is found first, find_root_device() will now skip it.
6537 2008-07-24  Pavel Roskin  <proski@gnu.org>
6539         * include/grub/types.h: Use __builtin_bswap32() and
6540         __builtin_bswap64() with gcc 4.3 and newer.
6542 2008-07-24  Christian Franke  <franke@computer.org>
6544         * util/i386/pc/grub-install.in: If `--debug' is specified,
6545         pass `--verbose' to grub-setup.
6546         Abort script if make_system_path_relative_to_its_root() fails.
6548 2008-07-24  Bean  <bean123ch@gmail.com>
6550         * configure.ac: Fixed a bug caused by the previous cygwin patch,
6551         variable `target_platform' should be `platform'.
6553 2008-07-24  Bean  <bean123ch@gmail.com>
6555         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6556         (grub_png_init_fixed_block): New function.
6557         (grub_png_decode_image_data): Handle fixed huffman code compression.
6559 2008-07-24  Bean  <bean123ch@gmail.com>
6561         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6562         (grub_pe2elf_SOURCES): New macro.
6563         (CLEANFILES): Add grub-pe2elf.
6565         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6566         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6567         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6568         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6569         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6570         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6571         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6572         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6573         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6574         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6575         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6576         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6577         (GRUB_PE32_DT_FUNCTION): Likewise.
6578         (GRUB_PE32_REL_I386_DIR32): Likewise.
6579         (GRUB_PE32_REL_I386_REL32): Likewise.
6580         (grub_pe32_symbol): New structure.
6581         (grub_pe32_reloc): Likewise.
6583         * util/grub-pe2elf.c: New file.
6585         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6586         start symbol in non pc platform.
6588         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6590         The following patches are from Christian Franke.
6592         * include/grub/dl.h: Remove .previous, gas supports this only
6593         for ELF format.
6595         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6596         Remove .type, gas supports this only for ELF format.
6598         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6599         nullbytes in symbol table. This fixes an infinite loop if table is
6600         zero filled.
6602         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6603         TARGET_IMG_LDFLAGS and EXEEXT.
6605         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6606         TARGET_IMG_LDFLAGS_AC.
6607         (grub_CHECK_STACK_ARG_PROBE): New function.
6609         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6611         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6613         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6614         to set TARGET_IMG_LD* accordingly.
6615         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6616         Add call to grub_CHECK_STACK_ARG_PROBE.
6617         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6619         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6621         * genmk.rb: Add EXEEXT to CLEANFILES.
6623 2008-07-23  Robert Millan  <rmh@aybabtu.com>
6625         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6626         define the codes for arrows and lines used for the menu).
6627         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6628         as well.
6630         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6631         fonts, because the latter are too slow.
6633 2008-07-21  Bean  <bean123ch@gmail.com>
6635         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6636         a20. Run keyboard test last, as it will cause macbook to halt.
6638 2008-07-18  Pavel Roskin  <proski@gnu.org>
6640         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
6641         load foreign architecture modules correctly anyway.  Keep
6642         support for loading host architecture modules, whether we
6643         compile them or not.
6645 2008-07-17  Pavel Roskin  <proski@gnu.org>
6647         * configure.ac: Use -m32 or -m64 regardless of whether we had to
6648         change target_cpu.  The compiler default can mismatch target_cpu
6649         in any case.
6651         * disk/efi/efidisk.c: Fix format warnings on x86_64.
6652         * kern/efi/efi.c: Likewise.
6654         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
6655         target compiler is functional.
6656         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6657         are set up.
6659         * configure.ac: Default to efi platform for x86_64-apple.  Allow
6660         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
6661         adjustments from the rest, only do them if target is not
6662         explicitly given.  Merge other adjustments with the final sanity
6663         check.  Remove an extraneous check for supported CPU.  Be
6664         specific which CPU and which platform is not supported.
6666         * configure.ac: Default to pc platform for x86_64.
6668 2008-07-17  Robert Millan  <rmh@aybabtu.com>
6670         Partial LinuxBIOS -> Coreboot rename.
6672         * conf/i386-linuxbios.rmk: Renamed to ...
6673         * conf/i386-coreboot.rmk: ... this.
6674         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6675         * configure.ac: Accept "coreboot" as input platform (but maintain
6676         compatibility with "linuxbios").
6677         * include/grub/i386/linuxbios: Renamed to ...
6678         * include/grub/i386/coreboot: ... this.
6680 2008-07-17  Bean  <bean123ch@gmail.com>
6682         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6683         (appleldr_mod_SOURCE): New variable.
6684         (appleldr_mod_CFLAGS): Likewise.
6685         (appleldr_mod_LDFLAGS): Likewise.
6686         (pci_mod_SOURCES): Likewise.
6687         (pci_mod_CFLAGS): Likewise.
6688         (pci_mod_LDFLAGS): Likewise.
6689         (lspci_mod_SOURCES): Likewise.
6690         (lspci_mod_CFLAGS): Likewise.
6691         (lspci_mod_LDFLAGS): Likewise.
6693         * conf/x86_64-efi.rmk: New file.
6695         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6696         macro.
6697         (grub_efidisk_write): Likewise.
6699         * include/efi/api.h (efi_call_0): New macro.
6700         (efi_call_1): Likewise.
6701         (efi_call_2): Likewise.
6702         (efi_call_3): Likewise.
6703         (efi_call_4): Likewise.
6704         (efi_call_5): Likewise.
6705         (efi_call_6): Likewise.
6707         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6708         grub_rescue_cmd_chainloader.
6710         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6711         (grub_pe32_optional_header): Change some fields based on i386 or
6712         x86_64 platform.
6713         (GRUB_PE32_PE32_MAGIC): Likewise.
6715         * include/grub/efi/uga_draw.h: New file.
6717         * include/grub/elf.h (STN_ABS): New constant.
6718         (R_X86_64_NONE): Relocation constant for x86_64.
6719         (R_X86_64_64): Likewise.
6720         (R_X86_64_PC32): Likewise.
6721         (R_X86_64_GOT32): Likewise.
6722         (R_X86_64_PLT32): Likewise.
6723         (R_X86_64_COPY): Likewise.
6724         (R_X86_64_GLOB_DAT): Likewise.
6725         (R_X86_64_JUMP_SLOT): Likewise.
6726         (R_X86_64_RELATIVE): Likewise.
6727         (R_X86_64_GOTPCREL): Likewise.
6728         (R_X86_64_32): Likewise.
6729         (R_X86_64_32S): Likewise.
6730         (R_X86_64_16): Likewise.
6731         (R_X86_64_PC16): Likewise.
6732         (R_X86_64_8): Likewise.
6733         (R_X86_64_PC8): Likewise.
6735         * include/grub/i386/efi/pci.h: New file.
6737         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6738         Change it value based on platform.
6739         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6740         (GRUB_E820_RAM): Likewise.
6741         (GRUB_E820_RESERVED): Likewise.
6742         (GRUB_E820_ACPI): Likewise.
6743         (GRUB_E820_NVS): Likewise.
6744         (GRUB_E820_EXEC_CODE): Likewise.
6745         (GRUB_E820_MAX_ENTRY): Likewise.
6746         (grub_e820_mmap): New structure.
6747         (linux_kernel_header): Change the efi field according to different
6748         kernel version, also field from linux_kernel_header.
6750         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6752         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6753         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6754         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6755         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6756         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6757         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6758         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6759         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6760         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6761         (GRUB_PCI_ADDR_IO_MASK): Likewise.
6763         * include/grub/x86_64/efi/kernel.h: New file.
6765         * include/grub/x86_64/efi/loader.h: Likewise.
6767         * include/grub/x86_64/efi/machine.h: Likewise.
6769         * include/grub/x86_64/efi/pci.h: Likewise.
6771         * include/grub/x86_64/efi/time.h: Likewise.
6773         * include/grub/x86_64/linux.h: Likewise.
6775         * include/grub/x86_64/setjmp.h: Likewise.
6777         * include/grub/x86_64/time.h: Likewise.
6779         * include/grub/x86_64/types.h: Likewise.
6781         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6782          GRUB_TARGET_SIZEOF_VOID_P.
6784         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6785         (grub_efi_locate_handle): Likewise.
6786         (grub_efi_open_protocol): Likewise.
6787         (grub_efi_set_text_mode): Likewise.
6788         (grub_efi_stall): Likewise.
6789         (grub_exit): Likewise.
6790         (grub_reboot): Likewise.
6791         (grub_halt): Likewise.
6792         (grub_efi_exit_boot_services): Likewise.
6793         (grub_get_rtc): Likewise.
6795         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6796         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6797         (grub_efi_allocate_pages): Wrap efi calls.
6798         (grub_efi_free_pages): Wrap efi calls.
6799         (grub_efi_get_memory_map): Wrap efi calls.
6801         * kern/x86_64/dl.c: New file.
6803         * kern/x86_64/efi/callwrap.S: Likewise.
6805         * kern/x86_64/efi/startup.S: Likewise.
6807         * loader/efi/appleloader.c: Likewise.
6809         * loader/efi/chainloader.c (cmdline): New variable.
6810         (grub_chainloader_unload): Wrap efi calls.
6811         (grub_chainloader_boot): Likewise.
6812         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6813         command line.
6815         * loader/efi/chainloader_normal.c (chainloader_command):
6816         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6817         command line.
6819         * loader/i386/efi/linux.c (allocate_pages): Change allocation
6820         method.
6821         (grub_e820_add_region): New function.
6822         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6823         booting.
6824         (grub_find_video_card): New function.
6825         (grub_linux_setup_video): New function.
6826         (grub_rescue_cmd_linux): Probe for video information.
6828         * normal/x86_64/setjmp.S: New file.
6830         * term/efi/console.c (map_char): New function.
6831         (grub_console_putchar): Map unicode char.
6832         (grub_console_checkkey): Wrap efi calls.
6833         (grub_console_getkey): Likewise.
6834         (grub_console_getwh): Likewise.
6835         (grub_console_gotoxy): Likewise.
6836         (grub_console_cls): Likewise.
6837         (grub_console_setcolorstate): Likewise.
6838         (grub_console_setcursor): Likewise.
6840         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6842 2008-07-16  Pavel Roskin  <proski@gnu.org>
6844         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6845         format strings.
6847         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6848         pointer, not an integer.  This fixes a warning and prevents
6849         precision loss on 64-bit systems.
6850         (relocate_addresses): Remove unneeded cast.
6852 2008-07-15  Pavel Roskin  <proski@gnu.org>
6854         * kern/i386/ieee1275/init.c: Include grub/cache.h.
6856         * term/ieee1275/ofconsole.c: Disable code unused on i386.
6858         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6859         Fix comparison between signed and unsigned.
6861         * include/grub/i386/ieee1275/console.h: Declare
6862         grub_console_init() and grub_console_fini().
6864         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6865         It's empty and unused.
6867         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6868         beginning to avoid warnings with some compilers.
6870         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6871         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6873 2008-07-14  Pavel Roskin  <proski@gnu.org>
6875         * kern/env.c (grub_register_variable_hook): Don't copy empty
6876         string, it leaks memory.  Pass "" to grub_env_set(), it should
6877         handle constant strings.
6879         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6880         * commands/cmp.c (grub_cmd_cmp): Likewise.
6881         * kern/dl.c (grub_dl_flush_cache): Likewise.
6882         (grub_dl_load_core): Likewise.
6883         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6884         (grub_elf64_load_phdrs): Likewise.
6886 2008-07-13  Pavel Roskin  <proski@gnu.org>
6888         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6889         between signed and unsigned.
6890         (LzmaEnc_Finish): Fix warning about an unused parameter.
6892 2008-07-13  Bean  <bean123ch@gmail.com>
6894         * Makefile.in (enable_lzo): New rule.
6896         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6898         * configure.ac (ENABLE_LZO): New option --enable-lzo.
6900         * boot/i386/pc/lnxboot.S: #include <config.h>.
6902         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6903         its value according to the compression algorithm used, lzo or lzma.
6905         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6906         compression algorithm according to configure macro.
6908         * kern/i386/pc/startup.S (codestart): Likewise.
6910         * kern/i386/pc/lzma_decode.S: New file.
6912         * include/grub/lib/LzFind.h: Likewise.
6914         * include/grub/lib/LzHash.h: Likewise.
6916         * include/grub/lib/LzmaDec.h: Likewise.
6918         * include/grub/lib/LzmaEnc.h: Likewise.
6920         * include/grub/lib/LzmaTypes.h: Likewise.
6922         * lib/LzFind.c: Likewise.
6924         * lib/LzmaDec.c: Likewise.
6926         * lib/LzmaEnc.c: Likewise.
6928 2008-07-13  Bean  <bean123ch@gmail.com>
6930         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6931         (grub_ext4_extent_header): New structure.
6932         (grub_ext4_extent): Likewise.
6933         (grub_ext4_extent_idx): Likewise.
6934         (grub_ext4_find_leaf): New function.
6935         (grub_ext2_read_block): Handle extents.
6937 2008-07-12  Robert Millan  <rmh@aybabtu.com>
6939         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6941 2008-07-11  Robert Millan  <rmh@aybabtu.com>
6943         * util/grub.d/40_custom.in: New file. Example on how to add custom
6944         entries to /etc/grub.d.
6945         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6946         40_custom (implicitly, by merging all the grub.d rules).
6948 2008-07-11  Pavel Roskin  <proski@gnu.org>
6950         * commands/read.c (grub_getline): Fix invalid memory access.
6951         Don't add newline to the variable value.
6953         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6954         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6955         (serial_hw_get_port): Check validity of the port number.
6956         (grub_cmd_serial): Check return value of serial_hw_get_port().
6958 2008-07-07  Pavel Roskin  <proski@gnu.org>
6960         * boot/i386/pc/diskboot.S (notification_string): Replace
6961         "Loading kernel" with just "loading".  This is shorter, less
6962         confusing and saves a few bytes for possible future changes.
6964 2008-07-05  Pavel Roskin  <proski@gnu.org>
6966         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6967         size for ATAPI devices, they are undefined.  Output sector
6968         number in decimal form.
6970         * disk/ata.c: Use named constants for status bits.
6972 2008-07-04  Pavel Roskin  <proski@gnu.org>
6974         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6975         grub_addr_t before casting it to the void pointer to fix a
6976         warning.  Non-addressable regions are discarded earlier.
6977         (grub_arch_modules_addr): Cast _end to grub_addr_t.
6978         * kern/i386/linuxbios/table.c: Include grub/misc.h.
6979         (check_signature): Don't shadow table_header.
6980         (grub_linuxbios_table_iterate): Cast numeric constants to
6981         grub_linuxbios_table_header_t.
6982         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6983         grub_stop().
6985         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6986         prevent warnings.
6988         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6989         pointer, which can cause warnings.  Support 64-bit addresses.
6991         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6992         of sizeof(long).  This fixes PowerPC image generation on x86_64.
6994 2008-07-04  Robert Millan  <rmh@aybabtu.com>
6996         This fixes a performance issue when pc & gpt partmap iterators
6997         didn't abort iteration even after our hook found what it was
6998         looking for (often causing expensive probes of non-existent drives).
7000         Some callers relied on previous buggy behaviour, since they would
7001         raise an error when their own hooks caused early abortion of its
7002         iteration.
7004         * kern/device.c (grub_device_open): Improve error message.
7005         * disk/lvm.c (grub_lvm_open): Likewise.
7006         * disk/raid.c (grub_raid_open): Likewise.
7008         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7009         when hook requests it, independently of grub_errno.
7010         (pc_partition_map_probe): Do not fail when find_func() caused
7011         early abortion of pc_partition_map_iterate().
7013         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7014         when hook requests it, independently of grub_errno.
7015         (gpt_partition_map_probe): Do not fail when find_func() caused
7016         early abortion of gpt_partition_map_iterate().
7018         * kern/partition.c (grub_partition_iterate): Abort parent iteration
7019         when hook requests it, independently of grub_errno.  Do not fail when
7020         part_map_iterate_hook() caused early abortion of p->iterate().
7022         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7023         when grub_partition_iterate() returned with non-zero.
7025 2008-07-03  Pavel Roskin  <proski@gnu.org>
7027         * disk/ata.c (grub_ata_pio_write): Check status before writing,
7028         like we do in grub_ata_pio_read().
7029         (grub_ata_readwrite): Always write individual sectors.  Fix the
7030         sector count for the remainder.
7031         (grub_ata_write): Enable writing to ATA devices.  Correctly
7032         report error for ATAPI devices.
7034 2008-07-02  Pavel Roskin  <proski@gnu.org>
7036         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7037         warning.
7039         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7040         for every read sector, we already increment it for the whole
7041         batch.  This fixes reading more than 256 sectors at once.
7043         * util/grub-editenv.c (cmd_info): Cast argument to long
7044         explicitly.  ptrdiff_t reduces to int on i386.
7046         * util/grub-editenv.c (main): Be specific which parameter is
7047         missing.
7049         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7050         (memdisk): Make memdisk_orig_addr a pointer.
7052         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7053         for file offsets, use grub_off_t instead.  Fix printf format
7054         warnings.
7056         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7057         there.  Real unexpected warnings should not drown in the noise
7058         about known problems.
7060         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7061         grub_disk_addr_t for memory addresses.
7063         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7064         explicitly to fix a warning.
7066         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7068         * Makefile.in (MODULE_LDFLAGS): New variable.
7069         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
7070         the linker accepts --build-id=none.
7071         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
7072         MODULE_LDFLAGS.
7073         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7075         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7076         those in Linux XFS code.  Provide a way to access 64-bit parent
7077         inode.
7078         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
7079         the end of struct grub_xfs_dir_header.
7081 2008-07-02  Bean  <bean123ch@gmail.com>
7083         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7084         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7085         and GRUB_IEEE1275_FLAG_NO_ANSI.
7087         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7088         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7089         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7091         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7092         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7094         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7095         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7097         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7098         esc sequence on non ANSI terminal.
7099         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7101         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7102         beginning of file.
7104 2008-07-02  Bean  <bean123ch@gmail.com>
7106         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7107         (grub_editenv_SOURCES): New variable.
7108         (pkglib_MODULES): Add loadenv.mod.
7109         (loadenv_mod_SOURCES): New variable.
7110         (loadenv_mod_CFLAGS): Likewise.
7111         (loadenv_mod_LDFLAGS): Likewise.
7113         * include/grub/envblk.h: New file.
7115         * util/envblk.c: New file.
7117         * util/grub-editenv.c: New file.
7119         * commands/loadenv.c: New file.
7121 2008-07-01  Pavel Roskin  <proski@gnu.org>
7123         * include/multiboot2.h (struct multiboot_tag_module): Use char,
7124         not unsigned char.  This fixes warnings and is consistent with
7125         other tags.
7127         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7129         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7131         * term/tparm.c (analyze): Always set *popcount.
7133         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7134         cast to fix a warning.
7136         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7137         cast to suppress a warning.
7139         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7140         grub_fshelp_read_file() expects.
7142         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
7143         write uuid as a 32-bit value in CPU byte order, so declare and
7144         use it as such.
7146         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7147         long if the format specifier expects it.
7148         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7149         * partmap/pc.c (pc_partition_map_iterate): Likewise.
7150         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7151         long to fix a warning.
7152         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7153         grub_dprintf() arguments to fix warnings.
7155 2008-06-30  Pavel Roskin  <proski@gnu.org>
7157         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7158         install_bsd_part immediately before core.img is embedded or
7159         modified on disk.  This fixes core.img verification if core.img
7160         cannot be embedded.
7162         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7163         core_path to calculate the blocklist.
7164         Patch from Javier Martín <lordhabbit@gmail.com>
7166 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7168         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
7169         block to disk block.
7170         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7171         Patch from Niels Böhm <bitbucket@arcor.de>
7173 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7175         * util/update-grub_lib.in (font_path): Search for fonts in
7176         /boot/grub first, which is more likely to be readable (we aren't
7177         deciding where fonts live, just looking for them).
7179 2008-06-26  Pavel Roskin  <proski@gnu.org>
7181         * util/biosdisk.c (read_device_map): Don't leave dead map
7182         entries for devices failing stat() check.
7184         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7185         core_path_dev for the core.img path on the target device.
7187 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7189         * disk/fs_uuid.c: New file.
7190         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7191         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7192         (fs_uuid_mod_LDFLAGS): New variables.
7193         * include/grub/disk.h (grub_disk_dev_id): Add
7194         `GRUB_DISK_DEVICE_UUID_ID'.
7195         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7196         implement iterate().
7198 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7200         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7201         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7202         Linux image includes no initrd.
7204 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
7206         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7207         call to resolve the core image location that effectively appended the
7208         name twice.
7210 2008-06-21  Robert Millan  <rmh@aybabtu.com>
7212         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7213         call from here ...
7215         * util/grub.d/10_hurd.in: ... to here ...
7216         * util/grub.d/10_linux.in: ... and here.
7218 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7220         * kern/main.c (grub_main): Export `prefix' variable immediately
7221         after it has been set by grub_machine_set_prefix().
7223 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7225         * commands/search.c (search_label, search_fs_uuid, search_file): Print
7226         search result when not saving to variable, not the other way around.
7227         When saving to variable, abort iteration as soon as a match is found.
7229 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7231         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7232         check for partition that provides /boot/grub.  Its logic is flawed,
7233         as it prevents prepare_grub_to_access_device() from being called
7234         multiple times.
7236 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7238         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7239         "insmod" command directly when abstraction modules are needed,
7240         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7241         since it had already been processed).
7243 2008-06-19  Pavel Roskin  <proski@gnu.org>
7245         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7246         changed.  This is needed in case GRUB_LIBDIR changes.
7247         * conf/i386-ieee1275.rmk: Likewise.
7248         * conf/i386-linuxbios.rmk: Likewise.
7249         * conf/i386-pc.rmk: Likewise.
7250         * conf/powerpc-ieee1275.rmk: Likewise.
7252 2008-06-18  Pavel Roskin  <proski@gnu.org>
7254         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7255         kernel_elf_symlist.c to symlist.c for consistency with other
7256         architectures.  Update all users.
7257         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7259 2008-06-18  Robert Millan  <rmh@aybabtu.com>
7261         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7262         it in prefix.
7264         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
7265         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
7266         a RAID device, run setup() for all members independently on whether
7267         LVM abstraction is being used.
7268         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7269         If grub-mkimage has set `*install_dos_part == -2', don't override this
7270         value.
7271         Perform *install_dos_part adjustments independently on whether
7272         we're embedding or not.
7273         Clarify error message when image is too big for embedding.
7274         Remove duplicate *install_dos_part stanza.
7276 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7278         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7279         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7280         variables.
7281         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7282         values in grub_ofconsole_normal_color and
7283         grub_ofconsole_highlight_color (they're not directly related to
7284         background and foreground).
7285         (grub_ofconsole_setcolorstate): Extract background and foreground
7286         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7288 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7290         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7291         /boot/grub for the check in last commit, not /boot (they could be
7292         different partitions).
7294 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7296         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7297         asked to setup access for the same partition that provides /boot,
7298         don't bother using UUIDs since our root already has the value we
7299         want.
7301 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7303         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7304         I2O devices.
7305         Patch from Sven Mueller <sven@debian.org>.
7307 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7309         * util/update-grub.in: Check for $EUID instead of $UID.
7310         Reported by Vincent Zweije.
7312 2008-06-16  Bean  <bean123ch@gmail.com>
7314         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7315         (grub_ext2_read_block): Likewise.
7316         (grub_ext2_read_inode): Likewise.
7317         (grub_ext2_mount): Likewise.
7318         (grub_ext2_close): Likewise.
7319         (grub_ext3_get_journal): Removed.
7321         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7322         (grub_reiserfs_read_symlink): Likewise.
7323         (grub_reiserfs_mount): Likewise.
7324         (grub_reiserfs_open): Likewise.
7325         (grub_reiserfs_read): Likewise.
7326         (grub_reiserfs_close): Likewise.
7327         (grub_reiserfs_get_journal): Removed.
7329         * fs/fshelp.c (grub_fshelp_read): Removed.
7330         (grub_fshelp_map_block): Likewise.
7332         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7333         (grub_fshelp_journal): Likewise.
7334         (grub_fshelp_read): Likewise.
7335         (grub_fshelp_map_block): Likewise.
7337 2008-06-16  Pavel Roskin  <proski@gnu.org>
7339         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7340         floating point anymore.
7341         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7343 2008-06-15  Pavel Roskin  <proski@gnu.org>
7345         * commands/ls.c (grub_ls_list_files): Use integer calculations
7346         for human readable format, avoid floating point use.
7347         * kern/misc.c (grub_ftoa): Remove.
7348         (grub_vsprintf): Remove floating point support.
7350 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7352         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7353         devices.
7354         Reported by Max Vozeler.
7356 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7358         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7359         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7360         skipped later.
7361         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7362         the beginning of the prefix.
7364         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7365         It is assumed that if we have a memdisk, grub-mkimage has set
7366         grub_prefix to include the "(memdisk)" drive in it.
7368 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7370         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7371         Initialize keyboard controller after registering the terminal, so that
7372         grub_printf() can be called from grub_keyboard_controller_init().
7374 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7376         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7377         extent-btree which is written as big endian on disk.
7378         Reported by Alain Greppin  <al@chilibi.org>.
7380 2008-06-14  Robert Millan  <rmh@aybabtu.com>
7382         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7383         * util/i386/pc/grub-install.in (modules): Likewise.
7385 2008-06-13  Pavel Roskin  <proski@gnu.org>
7387         * commands/ls.c (grub_ls_list_files): Fix format warnings.
7389 2008-06-13  Bean  <bean123ch@gmail.com>
7391         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7393         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7395         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7396         to indicate sparse block.
7398 2008-06-12  Pavel Roskin  <proski@gnu.org>
7400         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7401         number, grub_fshelp_read() does it for us.
7403         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
7404         linear disk read with journal translation.
7405         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7406         * include/grub/fshelp.h: Declare grub_fshelp_read().
7408 2008-06-09  Pavel Roskin  <proski@gnu.org>
7410         * fs/minix.c (grub_minix_mount): Handle error reading
7411         superblock.
7413 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7415         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7416         don't append the RAID prefix afterwards.
7417         Reported by Clint Adams.
7419 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7421         Based on description from Pavel:
7422         * kern/disk.c (grub_disk_check_range): Rename to ...
7423         (grub_disk_adjust_range): ... this.  Add a comment explaining the
7424         tasks performed by this function.
7426 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7428         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7429         `num_serial' (for consistency with other variables).
7430         (struct grub_ntfs_data): Add `uuid' member.
7431         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7432         (grub_ntfs_uuid): New function.
7433         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7435 2008-06-07  Pavel Roskin  <proski@gnu.org>
7437         * util/biosdisk.c (open_device): Revert last change to the
7438         function, it broke installation.  The sector needs to be
7439         different dependent on which device is opened.
7441 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7443         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7444         rest of GRUB, and breakage doesn't happen if its value were modified.
7446         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7447         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7448         a constant (same value).
7449         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7450         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7452 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7454         * util/biosdisk.c (open_device): Do not modify sector offset when
7455         accessing a partition.  kern/disk.c already handles this for us.
7457 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7459         * util/grub-emu.c (grub_machine_init): Move code in this function from
7460         here ...
7461         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7462         segfault in case grub_printf() is called).
7464         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7465         grub_probe.  Update all users not to explicitly add it again.
7466         (grub_device): New variable; contains corresponding device for grubdir.
7467         (fs_module, partmap_module, devabstraction_module): Pass
7468         `--device ${grub_device}' to grub_probe to avoid traversing /dev
7469         every time.
7471 2008-06-05  Robert Millan  <rmh@aybabtu.com>
7473         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7474         is found, print it (same layout as with labels).
7476 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7478         * util/biosdisk.c (get_drive): Rename to ...
7479         (find_grub_drive): ... this.  Update all users.
7481         (get_os_disk): Rename to ...
7482         (convert_system_partition_to_system_disk): ... this.  Update all users.
7484         (find_drive): Rename to ...
7485         (find_system_device): ... this.  Update all users.
7487 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7489         * util/biosdisk.c (get_os_disk): Handle IDA devices.
7490         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7491         (make_device_map): Likewise.
7493 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7495         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7496         before dereferencing it.
7498         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7499         union with fat12/fat16-specific ones.  Add some new fields, including
7500         `num_serial' for both versions.
7501         (struct grub_fat_data): Add `uuid' member.
7502         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7503         names.  Initialize `data->uuid' using `num_serial'.
7504         (grub_fat_uuid): New function.
7505         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7507         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7508         (grub_reiserfs_uuid): New function.
7509         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7510         member.
7512         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7513         (grub_xfs_uuid): New function.
7514         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7516 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7518         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7519         code that is backward compatible with pre-uuid search command.
7521 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7523         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7524         floppies after everything else, to ensure floppy drive isn't accessed
7525         unnecessarily (patch from Bean).
7527 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7529         * commands/search.c (search_label, search_fs_uuid, search_file): Do
7530         not print device names when we were asked to set a variable.
7532 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7534         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7535         using "cursor-on" and "cursor-off" commands (understood at least by
7536         the Open Firmware flavour on OLPC).
7538 2008-05-31  Michael Gorven  <michael@gorven.za.net>
7540         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7541         on and off sequences.
7543 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7545         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7546         * util/update-grub.in: Likewise.
7548 2008-05-30  Pavel Roskin  <proski@gnu.org>
7550         * util/biosdisk.c (linux_find_partition): Simplify logic and
7551         make the code more universal.  Keep special processing for
7552         devfs, but use a simple rule for all other devices.  If the
7553         device ends with a number, append 'p' and the partition number.
7554         Otherwise, append only the partition number.
7556 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7558         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7559         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7560         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7561         the `root' parameter to Linux.
7563 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7565         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7566         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7567         --fs_uuid with --fs-uuid.
7568         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7569         all filesystems support them).
7571 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7573         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7574         grub_printf() flags, since we're printing in units of 2 bytes.
7576 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7578         * util/grub.d/00_header.in: Remove obsolete comment referencing
7579         convert_system_path_to_grub_path().
7580         * util/update-grub.in: Likewise.
7581         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7582         (convert_system_path_to_grub_path): Add a warning message explaining
7583         that this function is deprecated.  Rely on is_path_readable_by_grub()
7584         for the readability checks.
7585         (font_path): Use is_path_readable_by_grub() for the readability
7586         check rather than convert_system_path_to_grub_path().
7588 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7590         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7591         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7592         converting it first.
7593         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7594         grub.cfg for access to font file, and afterwards call it again to set
7595         the root device.
7597 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7599         * commands/search.c (options): Add --fs_uuid option.
7600         (search_fs_uuid): New function.
7601         (grub_cmd_search): Fix --set argument passing.
7602         Use search_fs_uuid() when requested via --fs_uuid.
7603         (grub_search_init): Update help message.
7604         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7605         and redeclare it as an array of 16-bit words.
7606         (grub_ext2_uuid): New function.
7607         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7608         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7609         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7610         (GRUB_DEVICE_BOOT_UUID): New variables.
7611         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7612         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7613         whenever possible.
7614         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
7615         just assume `root' variable has the right value.
7616         * util/grub.d/10_linux.in: Likewise.
7617         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7618         via PRINT_FS_UUID.
7619         (main): Recognise `-t fs_uuid' argument.
7621 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7623         * util/biosdisk.c (map): Redefine structure to hold information
7624         about GRUB drive name.
7625         (get_drive): Reimplement without assuming (and verifying) BIOS-like
7626         drive names.
7627         (call_hook): Remove.
7628         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7629         member.  Assume drive has partitions.
7630         (grub_util_biosdisk_open): Access device names via `.device' struct
7631         member.
7632         (open_device): Likewise.
7633         (find_drive): Likewise.
7634         (read_device_map): Adjust map[] usage to match the new struct
7635         definition.  Don't check for duplicates (still possible, but not cheap
7636         anymore).
7637         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7638         (make_device_name): Remove assumption of BIOS-like drive names.
7640 2008-05-30  Pavel Roskin  <proski@gnu.org>
7642         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7643         compiling execute.c doesn't need grub_script.tab.h anymore.
7644         (normal/command.c_DEPENDENCIES): Likewise.
7645         (normal/function.c_DEPENDENCIES): Likewise.
7646         * conf/i386-ieee1275.rmk: Likewise.
7647         * conf/i386-linuxbios.rmk: Likewise.
7648         * conf/i386-pc.rmk: Likewise.
7649         * conf/powerpc-ieee1275.rmk: Likewise.
7650         * conf/sparc64-ieee1275.rmk: Likewise.
7652 2008-05-29  Pavel Roskin  <proski@gnu.org>
7654         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7655         when scanning metadata for volume group name.
7657         * include/grub/script.h: Don't include grub_script.tab.h.  It's
7658         a generated file, which may only be included from the files with
7659         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
7660         use union YYSTYPE, as the later allows forward declaration.
7661         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7663 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7665         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7666         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7667         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7668         (grub_console_checkkey): Add grub_dprintf() call to report unknown
7669         scan codes.
7671 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7673         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7674         control key combinations.
7676 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7678         * util/powerpc/ieee1275/grub-install.in: Move from here ...
7679         * util/ieee1275/grub-install.in: ... to here.
7680         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7681         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7682         (grub_install_SOURCES): Likewise.
7684 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7686         * fs/affs.c: Update copyright year.
7687         * fs/ext2.c: Likewise.
7688         * fs/fshelp.c: Likewise.
7689         * fs/hfsplus.c: Likewise.
7690         * fs/ntfs.c: Likewise.
7691         * fs/xfs.c: Likewise.
7692         * include/grub/fshelp.h: Likewise.
7693         * util/grub-mkdevicemap.c: Likewise.
7695 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7697         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7698         might need to be fatfs to support some firmware implementations
7699         (e.g. OFW or EFI).
7701 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7703         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7704         devices.
7705         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7706         (make_device_map): Likewise.
7708 2008-05-20  Bean  <bean123ch@gmail.com>
7710         * fs/fshelp.c (grub_fshelp_map_block): New function.
7711         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7712         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7714         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7715         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7716         (grub_fshelp_journal): New structure.
7717         (grub_fshelp_map_block): New function prototype.
7718         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7719         (grub_fshelp_map_block): Likewise.
7721         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7722         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7723         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7724         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7725         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7726         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7727         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7728         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7729         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7730         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7731         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7732         (grub_ext2_sblock): New members for journal support.
7733         (grub_ext3_journal_header): New structure.
7734         (grub_ext3_journal_revoke_header): Likewise.
7735         (grub_ext3_journal_block_tag): Likewise.
7736         (grub_ext3_journal_sblock): Likewise.
7737         (grub_fshelp_node): New members logfile and journal.
7738         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7739         grub_fshelp_map_block to get real block number.
7740         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7741         number.
7742         (grub_ext2_read_inode): Likewise.
7743         (grub_ext3_get_journal): New function.
7744         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7745         (grub_ext2_close): Release memory used by journal.
7747         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7748         (REISERFS_MAGIC_DESC_BLOCK): New macro.
7749         (grub_reiserfs_transaction_header): Renamed to
7750         grub_reiserfs_description_block, replace field data with real_blocks.
7751         (grub_reiserfs_commit_block): New structure.
7752         (grub_reiserfs_data): New member journal.
7753         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7754         number.
7755         (grub_reiserfs_read_symlink): Likewise.
7756         (grub_reiserfs_iterate_dir): Likewise.
7757         (grub_reiserfs_open): Likewise.
7758         (grub_reiserfs_read): Likewise.
7759         (grub_reiserfs_get_journal): New function.
7760         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7761         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7762         using grub_reiserfs_get_journal.
7763         (grub_reiserfs_close): Release memory used by journal.
7765         * fs/affs.c (grub_affs_read_block): Change block type to
7766         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7768         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7770         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7772         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7774         * fs/udf.c (grub_udf_read_block): Change block type to
7775         grub_disk_addr_t. Use type cast to avoid warning.
7777         * fs/xfs.c (grub_xfs_read_block): Likewise.
7779 2008-05-16  Christian Franke  <franke@computer.org>
7781         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7782         to ensure that break with ESC will always work.
7783         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7784         Remove ESC from keyboard queue.
7786 2008-05-16  Christian Franke  <franke@computer.org>
7788         * util/biosdisk.c: [__CYGWIN__] Add includes.
7789         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7790         (get_os_disk): Move variable declarations to OS specific
7791         parts to avoid warning.
7792         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7793         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7794         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7795         Cygwin.
7796         * util/getroot.c: [__CYGWIN__] Add includes.
7797         (strip_extra_slashes): Fix "/" case.
7798         [__CYGWIN__] (get_win32_path): New function.
7799         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7800         [__CYGWIN__] (find_root_device): Disable.
7801         [__CYGWIN__] (get_bootsec_serial): New function.
7802         [__CYGWIN__] (find_cygwin_root_device): Likewise.
7803         [__linux__] (grub_guess_root_device): Add early returns to simplify
7804         structure.
7805         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7806         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7807         check for Linux only.
7809 2008-05-15  Bean  <bean123ch@gmail.com>
7811         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7812         keyboard hang problem in apple's intel mac.
7814 2008-05-09  Robert Millan  <rmh@aybabtu.com>
7816         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7817         devices.
7818         * util/grub-mkdevicemap.c (get_virtio_disk_name)
7819         (make_device_map): Likewise.
7820         Reported by Aurelien Jarno <aurel32@debian.org>
7822 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
7824         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7825         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7826         (make_device_map): Output entries for xvd type disks.
7828 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7830         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7831         devices.
7832         * util/grub-mkdevicemap.c (get_cciss_disk_name)
7833         (make_device_map): Likewise.
7834         Reported by Roland Dreier <rdreier@cisco.com>
7836 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7838         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7839         grub_strstr() call.  Correct a few mistakes in failure path handling.
7841 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7843         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7844         Do not print a trailing slash (therefore, the root directory is an
7845         empty string).
7846         (convert_system_path_to_grub_path): Do not remove trailing slash
7847         from make_system_path_relative_to_its_root() output.
7849         * util/i386/pc/grub-install.in: Add trailing slash to output from
7850         make_system_path_relative_to_its_root().
7852 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7854         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
7855         ensures that output lines aren't intermangled with those sent to
7856         stderr (via grub_util_info()).
7857         * util/grub-probe.c (grub_refresh): Likewise.
7858         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7860 2008-05-05  Christian Franke  <franke@computer.org>
7862         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7863         Add Cygwin device names.
7864         (get_ide_disk_name) [__CYGWIN__]: Likewise.
7865         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7866         (check_device): Return error instead of success on empty name.
7867         (make_device_map): Move label inside linux specific code to
7868         prevent compiler warning.
7870 2008-04-30  Robert Millan  <rmh@aybabtu.com>
7872         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7873         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7874         first boot option.
7875         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7877 2008-04-29  Robert Millan  <rmh@aybabtu.com>
7879         * docs/grub.cfg: New file (example GRUB configuration).
7881 2008-04-26  Robert Millan  <rmh@aybabtu.com>
7883         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
7884         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7885         and `disk/ieee1275/nand.c'.
7887 2008-04-25  Bean  <bean123ch@gmail.com>
7889         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7890         i386-linuxbios.
7892         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7893         change the buffer size to 4096 for cdrom device.
7895         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7896         and nand.mod.
7897         (_linux_mod_SOURCES): New variable.
7898         (_linux_mod_CFLAGS): Likewise.
7899         (_linux_mod_LDFLAGS): Likewise.
7900         (linux_mod_SOURCES): Likewise.
7901         (linux_mod_CFLAGS): Likewise.
7902         (linux_mod_LDFLAGS): Likewise.
7903         (nand_mod_SOURCES): Likewise.
7904         (nand_mod_CFLAGS): Likewise.
7905         (nand_mod_LDFLAGS): Likewise.
7907         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7908         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7909         type property. (nand device in olpc don't have this property)
7911         * include/grub/disk.h (grub_disk_dev_id): New macro
7912         GRUB_DISK_DEVICE_NAND_ID.
7914         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7915         function prototype.
7916         (grub_rescue_cmd_initrd): Likewise.
7918         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7919         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7920         ofw_cif_handler and ofw_idt, adjust padding number.
7922         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7923         GRUB_MACHINE_IEEE1275 is defined.
7925         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7926         Use NESTED_FUNC_ATTR attribute on the hook parameter.
7928         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7929         on nested function heap_init.
7930         (grub_upper_mem): New variable for i386-ieee1275.
7931         (grub_get_extended_memory): New function for i386-ieee1275.
7932         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7934         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7935         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7936         property.
7938         * loader/i386/ieee1275/linux.c: New file.
7940         * loader/i386/ieee1275/linux_normal.c: New file.
7942         * disk/ieee1275/nand.c: New file.
7944 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
7946         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7947         value.
7948         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7950 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7952         Restructures early code path on ieee1275 to unify grub_main() as
7953         the first C function that is executed in every platform.
7955         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7956         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7957         cmain().
7958         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7959         * kern/ieee1275/cmain.c (cmain): Rename to ...
7960         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7961         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7962         at the beginning.
7964 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7966         * util/update-grub.in: Fix syntax error when setting
7967         `GRUB_PRELOAD_MODULES'.
7968         Reported by Stephane Chazelas <stephane@artesyncp.com>
7970 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
7972         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7973         section into account, newer toolchains generate unique build ids
7974         * configure.ac: remove the test for --build-id=none acceptance,
7975         we want build ids to be preserved
7976         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7977         far from other sections don't cause the raw binary images grow
7978         size
7980 2008-04-15  Robert Millan  <rmh@aybabtu.com>
7982         * disk/lvm.c: Update copyright year.
7983         * kern/misc.c: Likewise.
7985 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7987         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7988         there is no memory left for physical volume name.
7990 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7992         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7993         volume name mapping to support bigger than 9 character names properly.
7995 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7997         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7998         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8000 2008-04-13  Christian Franke  <franke@computer.org>
8002         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8003         to create a floppy emulation boot CD when non emulation mode
8004         does not work.
8005         Enable Joliet CD filesystem extension.
8007 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8009         * kern/misc.c (grub_strncat): Fix off-by-one error.
8010         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8012         * kern/env.c (grub_env_context_close): Clear current context, not
8013         previous one.
8014         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8016         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8018 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8020         Improve robustness when handling LVM.
8022         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
8023         (and leave `*p' unmodified).
8024         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8025         through it.
8026         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8027         iterating through it.
8028         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8029         through it.
8030         (grub_lvm_scan_device): Check the return value (and fail gracefully
8031         when due) on each grub_lvm_getvalue() or grub_strstr() call.
8032         Don't assume `vg->pvs != NULL' when iterating through it.
8034 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8036         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8037         * genmk.rb (partmap): New variable.
8038         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8039         (#{partmap}): New target rule.
8040         * genpartmaplist.sh: New file.
8041         * Makefile.in (pkglib_DATA): Add partmap.lst.
8042         (partmap.lst): New target rule.
8043         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8044         modules (including all partition maps), instead of preloading them.
8046 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
8048         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8049         `linux-boot-prober' (if installed) to detect other operating
8050         systems which are installed on the computer and add them to
8051         the boot menu.
8052         * conf/common.rmk: Build and install 30_os-prober.
8054 2008-04-12  Robert Millan  <rmh@aybabtu.com>
8056         * kern/powerpc/ieee1275/init.c: Move from here ...
8057         * kern/ieee1275/init.c: ... to here.  Update all users.
8059         * kern/powerpc/ieee1275/cmain.c: Move from here ...
8060         * kern/ieee1275/cmain.c: ... to here.  Update all users.
8062         * kern/powerpc/ieee1275/openfw.c: Move from here ...
8063         * kern/ieee1275/openfw.c: ... to here.  Update all users.
8065         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8066         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
8068 2008-04-10  Pavel Roskin  <proski@gnu.org>
8070         * configure.ac: Always use "_cv_" in cache variables for
8071         compatibility with Autoconf 2.62.
8073 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8075         Revert grub/machine/init.h addition by Pavel (since it breaks on
8076         i386-ieee1275 and others):
8077         * util/i386/pc/misc.c: Remove grub/machine/init.h.
8078         * util/powerpc/ieee1275/misc.c: Likewise.
8080 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8082         * util/grub-probe.c (probe): Improve error message.
8084 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8086         * util/biosdisk.c (read_device_map): Skip devices that don't exist
8087         (this prevents the presence of a bogus entry from ruining the whole
8088         thing).
8090 2008-04-06  Pavel Roskin  <proski@gnu.org>
8092         * util/biosdisk.c: Include grub/util/biosdisk.h.
8093         * util/grub-fstest.c (execute_command): Make static.
8094         * util/grub-mkdevicemap.c (check_device): Likewise.
8095         * util/i386/pc/misc.c: Include grub/machine/init.h.
8096         * util/powerpc/ieee1275/misc.c: Likewise.
8097         * util/lvm.c: Include grub/util/lvm.h.
8098         * util/misc.c: Include grub/kernel.h, grub/misc.h and
8099         grub/cache.h.
8100         * util/raid.c: Include grub/util/raid.h.
8101         (grub_util_getdiskname): Make static.
8103         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8104         grub_hostfs_fini(), as they are called from grub_init_all() and
8105         grub_fini_all() respectively.  This fixes an infinite loop in
8106         grub-fstest due to double registration of hostfs.
8107         Reported by Christian Franke <Christian.Franke@t-online.de>
8109 2008-04-05  Pavel Roskin  <proski@gnu.org>
8111         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8112         all 8 functions.  Otherwise, probe function 0 only.
8114 2008-04-04  Pavel Roskin  <proski@gnu.org>
8116         * commands/lspci.c (grub_lspci_iter): Print the bus number
8117         correctly.
8119         * commands/lspci.c (grub_pci_classes): Fix typos.
8120         (grub_lspci_iter): Don't print func twice.  Print vendor ID
8121         before device ID, as it's normally done.
8123         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8124         Fix signedness warnings.
8125         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8126         Likewise.
8127         * util/ieee1275/get_disk_name.c: Include config.h so that
8128         _GNU_SOURCE is defined and getline() is declared.  Mark an
8129         unused argument as such.  Fix a signedness warning.
8131 2008-04-02  Pavel Roskin  <proski@gnu.org>
8133         * genkernsyms.sh.in: Use more robust assignments for CC and
8134         srcdir.  Quote srcdir.
8135         * gensymlist.sh.in: Likewise.  Assert at the compile time that
8136         the symbol table is not empty.
8138         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8139         * fs/cpio.c (grub_cpio_read): Likewise.
8141 2008-04-01  Pavel Roskin  <proski@gnu.org>
8143         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8144         * disk/host.c (grub_host_open): Likewise.
8145         * disk/loopback.c (grub_loopback_open): Likewise.
8146         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8147         disk->id as in disk/host.c, not a multi-character constant.
8149         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
8150         later is obsolete, potentially dangerous and sets a bad example.
8151         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8152         * util/misc.c (grub_util_get_image_size): Likewise.
8154         * disk/loopback.c (options): Improve help for "--partitions".
8156         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8157         options to align them with the short options, e.g. "echo -e".
8159 2008-03-31  Bean  <bean123ch@gmail.com>
8161         * video/reader/png.c (grub_png_data): New member is_16bit and
8162         image_data.
8163         (grub_png_decode_image_header): Detect 16 bit png image.
8164         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8165         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8166         (grub_video_reader_png): Release memory occupied by image_data.
8168         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8169         4096 bytes.
8170         (grub_nfs_mount): Skip the test for sector per cluster.
8172         * include/grub/ntfs.h (MAX_SPC): Removed.
8174 2008-03-31  Bean  <bean123ch@gmail.com>
8176         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8177         (grub_probe_SOURCES): Add fs/afs.c.
8178         (grub_fstest_SOURCES): Likewise.
8179         (afs_mod_SOURCES): New variable.
8180         (afs_mod_CFLAGS): Likewise.
8181         (afs_mod_LDFLAGS): Likewise.
8183         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8184         (grub_emu_SOURCES): Likewise.
8186         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8188         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8190         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8192         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8194         * fs/afs.c: New file.
8196 2008-03-30  Pavel Roskin  <proski@gnu.org>
8198         * disk/host.c: Include grub/misc.h to fix a warning.
8199         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8200         warnings about implicit declarations.
8202         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8203         variable.
8204         * include/grub/i386/loader.h: Change declaration of
8205         grub_linux_boot() to match what grub_loader_set() expects.
8206         * util/getroot.c (grub_guess_root_device): Return const char* to
8207         fix a warning.
8208         * util/grub-probe.c (probe): Fix a warning about uninitialized
8209         abstraction_name variable.
8210         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8211         second argument as unused to fix a warning.
8213         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8214         missing grub_error() call.
8216         * util/update-grub_lib.in: Define datarootdir, since Autoconf
8217         2.60 and newer uses it to define datadir.
8219         * commands/sleep.c: Fix warning about implicit declaration.
8220         * disk/memdisk.c: Likewise.
8221         * loader/aout.c: Likewise.
8222         * loader/i386/bsd_normal.c: Likewise.
8223         * util/grub-probe.c: Likewise.
8225         * commands/i386/cpuid.c (has_longmode): Make static.
8226         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8227         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8229         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8230         GDT.  This is more robust, as %ds can change.
8231         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8232         calling real_to_prot().
8233         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8235 2008-03-28  Pavel Roskin  <proski@gnu.org>
8237         * kern/i386/pc/startup.S: Assert that uncompressed functions
8238         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8239         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8240         code, as they push parts of the code (error handlers) beyond
8241         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
8242         code as correctness and size.
8244 2008-03-28  Pavel Roskin  <proski@gnu.org>
8246         * kern/i386/pc/startup.S
8247         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8248         data block address to the real mode, keep offset minimal.  This
8249         works around a bug in AWARD BIOS on old Athlon systems, which
8250         makes CD detection hang.
8252 2008-03-26  Pavel Roskin  <proski@gnu.org>
8254         * normal/color.c (grub_parse_color_name_pair): Make `name' a
8255         const.
8256         * include/grub/normal.h: Add grub_parse_color_name_pair()
8257         declaration.
8259 2008-03-24  Bean  <bean123ch@gmail.com>
8261         * disk/i386/pc/biosdisk.c (cd_start): Removed.
8262         (cd_count): Removed.
8263         (cd_drive): New variable.
8264         (grub_biosdisk_get_drive): Don't check for (cdN) device.
8265         (grub_biosdisk_call_hook): Likewise.
8266         (grub_biosdisk_iterate): Change cdrom detection method.
8267         (grub_biosdisk_open): Replace cd_start with cd_drive.
8268         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8269         detect cdrom device.
8271         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8272         Removed.
8273         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8274         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8275         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8276         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8277         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8278         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8279         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8280         (grub_biosdisk_cdrp): New structure.
8281         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8283         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8285         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8286         device.
8288         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8289         New function.
8291 2008-03-20  Robert Millan  <rmh@aybabtu.com>
8293         Remove 2 TiB limit in ata.mod.
8294         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8295         (grub_ata_dumpinfo): Print sector count with 0x%llx.
8296         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8297         grub_uint64_t instead of grub_uint32_t.
8299 2008-03-05  Bean  <bean123ch@gmail.com>
8301         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8302         (grub_multiboot): Set boot device.
8304         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8306 2008-03-02  Bean  <bean123ch@gmail.com>
8308         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8309         symlink_buffer.
8311 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
8313         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8314         texinfo.tex.
8316         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8317         modified.
8319         * docs/fdl.texi: New file.
8321         * docs/mdate-sh: New file. Copied from gnulib.
8322         * docs/texinfo.tex: Likewise.
8324         * config.guess: Updated from gnulib.
8325         * install-sh: Likewise.
8327 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8329         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8330         (aout_mod_SOURCES): New variable.
8331         (aout_mod_CFLAGS): Likewise.
8332         (aout_mod_LDFLAGS): Likewise.
8334         * conf/i386-ieee1275.rmk: Likewise.
8336 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8338         * util/update-grub.in: Reorganise terminal validity check.  Accept
8339         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8340         Based on suggestion by Franklin PIAT.
8342 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
8344         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8345         function.
8346         * util/getroot.c (grub_util_check_block_device): New function that
8347         returns the given argument if it is a block device and returns NULL else.
8348         * util/grub-probe.c (argument_is_device): New variable.
8349         (probe): Promote device_name from a variable to an argument. Receive
8350         device_name from grub_util_check_block_device() if path is NULL and from
8351         grub_guess_root_device() else. Do not free() device_name anymore.
8352         (options): Introduce new parameter '-d, --device'.
8353         (main): Add description of the new parameter to the help screen.
8354         Rename path variable to argument. Set argument_is_device if the '-d'
8355         option is given. Pass argument to probe() depending on
8356         argument_is_device.
8358 2008-02-24  Bean  <bean123ch@gmail.com>
8360         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8361         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8362         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8363         (GRUB_ISO9660_VOLDESC_PART): Likewise.
8364         (GRUB_ISO9660_VOLDESC_END): Likewise.
8365         (grub_iso9660_primary_voldesc): New member escape.
8366         (grub_iso9660_data): New member joliet.
8367         (grub_iso9660_convert_string): New function.
8368         (grub_iso9660_mount): Detect joliet extension.
8369         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8370         (grub_iso9660_iso9660_label): Likewise.
8372         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8373         (grub_setup_SOURCES): Add fs/udf.c.
8374         (grub_fstest_SOURCES): Likewise.
8375         (udf_mod_SOURCES): New variable.
8376         (udf_mod_CFLAGS): Likewise.
8377         (udf_mod_LDFLAGS): Likewise.
8379         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8380         (grub_emu_SOURCES): Likewise.
8382         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8384         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8386         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8388         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8390         * fs/udf.c: New file.
8392 2008-02-24  Robert Millan  <rmh@aybabtu.com>
8394         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8395         (normal/lexer.c_DEPENDENCIES): New variables.
8396         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8397         (normal/lexer.c_DEPENDENCIES): Likewise.
8398         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8399         (normal/lexer.c_DEPENDENCIES): Likewise.
8400         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8401         (normal/lexer.c_DEPENDENCIES): Likewise.
8402         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8403         (normal/lexer.c_DEPENDENCIES): Likewise.
8404         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8405         (normal/lexer.c_DEPENDENCIES): Likewise.
8407 2008-02-23  Robert Millan  <rmh@aybabtu.com>
8409         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8410         since they were intended to be in hex.  This didn't break previously
8411         because of a bug in gpt_partition_map_iterate() (see below).
8413         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8414         when checking the validity of GPT header.
8415         Remove `partno', since it always provides the same information as `i'.
8417 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
8419         * include/grub/efi/time.h: Fix a wrong comment.
8421 2008-02-19  Pavel Roskin  <proski@gnu.org>
8423         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8424         message.
8426 2008-02-19  Bean  <bean123ch@gmail.com>
8428         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8429         (aout_mod_SOURCES): New variable.
8430         (aout_mod_CFLAGS): Likewise.
8431         (aout_mod_LDFLAGS): Likewise.
8432         (_bsd_mod_SOURCES): New variable.
8433         (_bsd_mod_CFLAGS): Likewise.
8434         (_bsd_mod_LDFLAGS): Likewise.
8435         (bsd_mod_SOURCES): New variable.
8436         (bsd_mod_CFLAGS): Likewise.
8437         (bsd_mod_LDFLAGS): Likewise.
8439         * include/grub/aout.h: New file.
8441         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8443         * include/grub/i386/bsd.h: New file.
8445         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8446         to make it public.
8448         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8449         function is called, so that it's possible to change it inside the hook.
8450         (grub_elf64_load): Likewise.
8451         (grub_elf_file): Don't close the file if elf header is not found.
8452         (grub_elf_close): Close the file if grub_elf_file fails (The new
8453         grub_elf_file won't close it).
8454         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8455         (grub_elf64_size): Likewise.
8457         * kern/i386/loader.S (grub_unix_real_boot): New function.
8459         * loader/aout.c: New file.
8461         * loader/i386/bsd.c: New file.
8463         * loader/i386/bsd_normal.c: New file.
8465         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8467         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8468         can test other formats.
8470 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8472         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8473         (grub_gpt_partition_type_empty): Redefine with macro from
8474         `<grub/gpt_partition.h>'.
8475         (gpt_partition_map_iterate): Adjust partition type comparison.
8477         Export `entry' as partmap-specific `part.data' struct.
8478         (grub_gpt_header, grub_gpt_partentry): Move from here ...
8480         * include/grub/gpt_partition.h (grub_gpt_header)
8481         (grub_gpt_partentry): ... to here (new file).
8483         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8485         (grub_gpt_partition_type_bios_boot): New const variable, defined
8486         with macro from `<grub/gpt_partition.h>'.
8488         (setup): Replace `first_start' with `embed_region', which keeps
8489         track of the embed region (and is partmap-agnostic).
8491         Replace find_first_partition_start() with find_usable_region(),
8492         which finds a usable region for embedding using partmap-specific
8493         knowledge (supports PC/MSDOS and GPT).
8495         Fix all assumptions that the embed region start at sector 1, using
8496         `embed_region.start' from now on.  Similarly, use `embed_region.end'
8497         rather than `first_start' to calculate available size.
8499         In grub_util_info() message, replace "into after the MBR" with an
8500         indication of the specific sector our embed region starts at.
8502 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8504         * DISTLIST: Replace `commands/ieee1275/halt.c' and
8505         `commands/ieee1275/reboot.c' with `commands/halt.c' and
8506         `commands/reboot.c'.
8507         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8508         (halt_mod_SOURCES): Likewise.
8509         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8510         (halt_mod_SOURCES): Likewise.
8512 2008-02-17  Christian Franke  <franke@computer.org>
8514         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8516 2008-02-17  Robert Millan  <rmh@aybabtu.com>
8518         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8519         set `first_start' to 0 for non-PC/MSDOS partition maps.
8521 2008-02-16  Robert Millan  <rmh@aybabtu.com>
8523         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8524         do not assume partition map is PC/MSDOS before performing checks that
8525         are specific to that layout.
8527 2008-02-13  Robert Millan  <rmh@aybabtu.com>
8529         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8530         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8531         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8533 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
8535         * configure.ac: Only a cosmetic change on the handling of
8536         -fno-stack-protector.
8538 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
8540         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8541         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8542         reboot.c.
8543         (grub_install_SOURCES): Add halt.mod and reboot.mod.
8544         (halt_mod_SOURCES): New variable.
8545         (halt_mod_CFLAGS): Likewise.
8546         (halt_mod_LDFLAGS): Likewise.
8547         (reboot_mod_SOURCES): Likewise.
8548         (reboot_mod_CFLAGS): Likewise.
8549         (reboot_mod_LDFLAGS): Likewise.
8551         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8552         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8553         reboot.c.
8554         (halt_mod_SOURCES): Likewise.
8555         (reboot_mod_SOURCES): Likewise.
8557         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8558         commands/i386/pc/reboot.c by commands/reboot.c.
8559         (reboot_mod_SOURCES): Likewise.
8561         * commands/i386/pc/reboot.c: merge this file ...
8563         * commands/ieee1275/reboot.c: ... and this file ...
8565         * commands/reboot.c: ... to this file.
8566         Add some precompiler directive to include the correct header for
8567         each machine.
8569         * commands/ieee1275/halt.c: move this file ...
8571         * commands/halt.c: ... to here.
8572         Add some precompiler directive to include the correct header for
8573         each machine.
8575         * include/grub/efi/efi.h (grub_reboot): New function declaration.
8576         (grub_halt): Likewise.
8578         * kern/efi/efi.c (grub_reboot): New function.
8579         (grub_halt): Likewise.
8581 2008-02-12  Robert Millan  <rmh@aybabtu.com>
8583         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8584         /dev (like it is done for /dev/mapper).  This doesn't provide support
8585         for EVMS, but at least it is now easy to identify the problem when it
8586         arises.
8588 2008-02-11  Robert Millan  <rmh@aybabtu.com>
8590         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8591         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8592         comparing it with -1, not 0.
8594 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8596         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8597         `disk/lvm.c'.
8598         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8599         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8601         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8602         `disk/lvm.c' to the end of the list.
8603         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8604         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8606 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8608         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
8609         grub_print_error() instead.  This will let user know why we're entering
8610         rescue mode.
8611         Based on suggestions from Sam Morris.
8613 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
8615         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8616         on remaining N args, instead of "--" arg N times.
8618 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
8620         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8621         (fill_with_default_glyph): Changed to use unknown_glyph for fill
8622         pattern for unknown glyphs.
8624 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8626         * configure.ac: Probe for `help2man'.
8627         * Makefile.in (builddir): New variable.
8628         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
8629         or otherwise add a few flags/options to it.
8630         (install-local): For every executable utility or script that is
8631         installed, invoke $(HELP2MAN) to install a manpage based on --help
8632         output.
8634         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8635         that it doesn't prevent --help from working in build tree.
8637         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8638         with `bug-grub@gnu.org'.
8639         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8640         * util/update-grub.in (usage): New function.
8641         Implement proper argument check, with support for --help and --version
8642         (as well as existing -y).
8644 2008-02-09  Christian Franke  <franke@computer.org>
8646         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8647         avoid overwriting previous output.
8648         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8650 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8652         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8653         drawing the menu.
8655 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8657         * commands/sleep.c: New file.
8658         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8659         (sleep_mod_SOURCES): New variable.
8660         (sleep_mod_CFLAGS): Likewise.
8661         (sleep_mod_LDFLAGS): Likewise.
8663 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8665         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8666         situations in which we can deduce the RAID size and the superblock
8667         doesn't match it.
8669 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8671         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
8672         and return a grub_diskmemberlist_t composed of LVM physical volumes.
8673         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8675         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
8676         and return a grub_diskmemberlist_t composed of physical array members.
8677         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8679         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8680         prototype.
8681         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8682         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8683         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8685         * util/grub-probe.c (probe): Move partmap probing code from here ...
8686         (probe_partmap): ... to here.
8687         (probe): Use probe_partmap() once for the disk we're probing, and
8688         additionally, when such disk contains a memberlist() struct member,
8689         once for each disk that is contained in the structure returned by
8690         memberlist().
8692 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8694         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8695         environment variable to 'all' in order to obtain debug output from
8696         non-util/ code.
8697         * util/i386/pc/grub-setup.c (main): Likewise.
8699 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8701         * disk/raid.c (grub_raid_scan_device): Check for
8702         `array->device[sb.this_disk.number]' rather than for
8703         `array->device[sb.this_disk.number]->name', since the latter is not
8704         guaranteed to be accessible.
8706 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8708         * disk/raid.c: Update copyright.
8709         * fs/cpio.c: Likewise.
8710         * include/grub/raid.h: Likewise.
8711         * loader/i386/pc/multiboot.c: Likewise.
8712         * util/hostfs.c: Likewise.
8714 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8716         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8717         to a grub_disk_t array.
8718         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8719         `device[x]'.
8720         (grub_raid_scan_device): Replace `device[x].name' accesses with
8721         `device[x]->name'.  Simplify initialization of `array->device[x]'.
8723 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8725         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8726         grub_dprintf() calls.
8727         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8728         error message.
8730 2008-02-07  Christian Franke  <franke@computer.org>
8732         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8733         instead of fseek and ftell to support large files.
8734         (grub_hostfs_read): Likewise.
8736 2008-02-07  Robert Millan  <rmh@aybabtu.com>
8738         Patch from Jeroen Dekkers.
8739         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8740         failure, since successfully reading all array members might not be
8741         required.
8743 2008-02-06  Robert Millan  <rmh@aybabtu.com>
8745         * util/grub-probe.c (probe): Simplify partmap probing (with the
8746         assumption that the first word up to the underscore equals to
8747         the module name).
8749 2008-02-06  Christian Franke  <franke@computer.org>
8751         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8752         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8753         last block of a cpio or tar stream.
8754         Check for "TRAILER!!!" instead of any empty data
8755         block to detect last block of a cpio stream.
8756         (grub_cpio_dir): Fix constness of variable np.
8757         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8758         cpio or tar trailer is detected.  This fixes a crash
8759         on open of a non existing file.
8761 2008-02-05  Bean  <bean123ch@gmail.com>
8763         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8764         address of entry.
8765         (grub_multiboot_load_elf64): Likewise.
8766         (grub_multiboot): Initialize mbi structure.
8768         * util/grub-fstest.c: Don't include unused header file script.h.
8770         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8771         of file.
8772         (grub_fstest_SOURCES): Likewise.
8774 2008-02-05  Robert Millan  <rmh@aybabtu.com>
8776         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8777         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8778         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8779         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8781         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8782         (translation_table): Replace hardcoded values with macros
8783         provided by `<grub/term.h>'.
8785         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8786         (keyboard_map): Correct/add a few values, with macros provided
8787         by `<grub/term.h>'.
8788         (keyboard_map_shift): Zero values that don't differ from their
8789         `keyboard_map' equivalents.
8790         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8791         Discard the second scan code that is always sent by Caps lock.
8792         Only use `keyboard_map_shift' when it provides a non-zero value,
8793         otherwise fallback to `keyboard_map'.
8795 2008-02-04  Bean  <bean123ch@gmail.com>
8797         * Makefile.in (enable_grub_fstest): New variable.
8799         * conf/common.rmk (grub_fstest_init.lst): New rule.
8800         (grub_fstest_init.h): Likewise.
8801         (grub_fstest_init.c): Likewise.
8802         (util/grub-fstest.c_DEPENDENCIES): New variable.
8803         (grub_fstest_SOURCES): Likewise.
8805         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8807         * util/grub-fstest.c: New file.
8809 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8811         Make grub-setup handle a separate root device.
8813         * util/i386/pc/grub-setup.c (setup): Always open the root device,
8814         so that the root device can be compared with the destination
8815         device.
8816         When embedding the core image, if the root and destination devices
8817         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8818         0xFF.
8819         When not embedding, set ROOT_DRIVE to 0xFF.
8821 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8823         Add support for having a grub directory in a different drive. This
8824         is still only the data handling part.
8826         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8827         (codestart): Save %dh in GRUB_ROOT_DRIVE.
8828         (grub_root_drive): New variable.
8830         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8831         instead of GRUB_BOOT_DRIVE to construct a device name. Set
8832         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8833         as it was.
8835         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8837         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8838         macro.
8839         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8841         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8842         is bogus, because PXE booting does not specify any drive
8843         correctly.
8845         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8846         am not sure if this is really correct.
8848         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8849         is always identical to the boot drive when booting from a CD.
8851         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8852         longer.
8853         (root_drive): New variable.
8854         (real_start): Unconditionally set %dh to ROOT_DRIVE.
8855         (setup_sectors): Push %dx right after popping it, because %dh will
8856         be modified later.
8857         (copy_buffer): Restore %dx.
8859 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8861         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8862         use `cdboot.img' for cdrom images.
8864 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8866         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8867         only setup gfxterm when `font' command has succeeded.
8869 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8871         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8872         (grub_rescue_cmd_multiboot_loader)
8873         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8875 2008-02-03  Pavel Roskin  <proski@gnu.org>
8877         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8878         %edx and %esi from stack only after grub_gate_a20() is called.
8879         grub_gate_a20() clobbers %edx.
8881 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8883         * configure.ac (AC_INIT): Bumped to 1.96.
8885         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8886         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8887         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8888         video/readers/png.c.
8890 2008-02-03  Bean  <bean123ch@gmail.com>
8892         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8893         (cdboot_img_SOURCES): New variable.
8894         (cdboot_img_ASFLAGS): New variable.
8895         (cdboot_img_LDFLAGS): New variable.
8897         * boot/i386/pc/cdboot.S: New file.
8899         * disk/i386/pc/biosdisk.c (cd_start): New variable.
8900         (cd_count): Likewise.
8901         (grub_biosdisk_get_drive): Add support for cd device.
8902         (grub_biosdisk_call_hook): Likewise.
8903         (grub_biosdisk_iterate): Likewise.
8904         (grub_biosdisk_open): Likewise.
8905         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8906         (grub_biosdisk_rw): Support reading from cd device.
8907         (GRUB_MOD_INIT): Iterate cd devices.
8909         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8910         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8911         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8913         * kern/i386/pc/init.c (make_install_device): Check for cd device.
8915 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8917         * commands/read.c: New file.
8918         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8919         (read_mod_SOURCES): New variable.
8920         (read_mod_CFLAGS): Likewise.
8921         (read_mod_LDFLAGS): Likewise.
8923 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8925         * normal/main.c (grub_normal_execute): Check for `menu->size' when
8926         determining whether menu has to be displayed.
8928 2008-02-02  Marco Gerards  <marco@gnu.org>
8930         * bus/pci.c: New file.
8932         * include/grub/pci.h: Likewise.
8934         * include/grub/i386/pc/pci.h: Likewise.
8936         * commands/lspci.c: Likewise.
8938         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8939         `lspci.mod'.
8940         (pci_mod_SOURCES): New variable.
8941         (pci_mod_CFLAGS): Likewise.
8942         (pci_mod_LDFLAGS): Likewise.
8943         (lspci_mod_SOURCES): Likewise.
8944         (lspci_mod_CFLAGS): Likewise.
8945         (lspci_mod_LDFLAGS): Likewise.
8947 2008-02-02  Bean  <bean123ch@gmail.com>
8949         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8950         (grub_ufs_get_file_block): Fix indirect block calculation problem.
8952         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8953         (grub_xfs_btree_node): New structure.
8954         (grub_xfs_btree_root): New structure.
8955         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8956         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8957         (GRUB_XFS_EXTENT_BLOCK): Likewise.
8958         (GRUB_XFS_EXTENT_SIZE): Likewise.
8959         (grub_xfs_read_block): Support btree format type.
8960         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8961         Use directory block as basic unit.
8963         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8965         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8966         __attribute__ ((__regparm__ (1))).
8968 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8970         Correct a mistake in previous commit.
8972         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8973         top.
8974         (normal/command.c_DEPENDENCIES): New variable.
8976 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8978         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8979         top.
8980         (normal/command.c_DEPENDENCIES): New variable.
8981         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8982         * conf/i386-ieee1275.rmk: Likewise.
8983         * conf/i386-linuxbios.rmk: Likewise.
8984         * conf/i386-pc.rmk: Likewise.
8985         * conf/sparc64-ieee1275.rmk: Likewise.
8986         * conf/powerpc-ieee1275.rmk: Likewise.
8987         (grub_emu_SOURCES): Add `fs/fshelp.c'.
8989         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8991 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8993         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8994         call at beginning of function.
8996 2008-01-31  Pavel Roskin  <proski@gnu.org>
8998         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8999         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9000         (grub_mkrescue_SOURCES): Likewise.
9001         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9003 2008-01-30  Robert Millan  <rmh@aybabtu.com>
9005         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9006         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9007         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9008         (grub_probe_SOURCES): ... to here.
9010         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9011         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9012         * conf/i386-ieee1275.rmk: Likewise.
9013         * conf/i386-linuxbios.rmk: Likewise.
9014         * conf/powerpc-ieee1275.rmk: Likewise.
9016 2008-01-30  Tristan Gingold  <gingold@free.fr>
9018         * kern/rescue.c: Silently accept empty lines.
9020 2008-01-29  Bean  <bean123ch@gmail.com>
9022         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9023         (real_code_2): Code cleanup and change comment style.
9024         (move_memory): Avoid using 32-bit address mode.
9026 2008-01-29  Bean  <bean123ch@gmail.com>
9028         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9029         (png_mod_SOURCES): New variable.
9030         (png_mod_CFLAGS): Likewise.
9031         (png_mod_LDFLAGS): Likewise.
9033         * video/readers/png.c: New file.
9035 2008-01-28  Robert Millan  <rmh@aybabtu.com>
9037         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9038         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9039         `ifndef GRUB_MOD_GAP' hack.
9040         * util/elf/grub-mkimage.c (add_segments): Likewise.
9042 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9044         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9045         `GRUB_MOD_GAP' for platforms in which it's not defined.
9046         * util/elf/grub-mkimage.c (add_segments): Likewise.
9048 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9050         Get grub-emu to build again (including parallel builds).
9052         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9053         Split into ...
9054         (util/grub-emu.c_DEPENDENCIES): ... this, ...
9055         (normal/execute.c_DEPENDENCIES): ... this, ...
9056         (grub-emu_DEPENDENCIES): ... and this.
9058         * conf/i386-efi.rmk: Likewise.
9059         * conf/i386-linuxbios.rmk: Likewise.
9060         * conf/i386-ieee1275.rmk: Likewise.
9061         * conf/powerpc-ieee1275.rmk: Likewise.
9062         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9064 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9066         * NEWS: Add a few items.
9068 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9070         Fix parallel builds with grub-emu.  Based on earlier commit for
9071         grub-probe and grub-setup.
9073         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9074         (util/grub-emu.c_DEPENDENCIES): ... this.
9075         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9076         (util/grub-emu.c_DEPENDENCIES): ... this.
9077         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9078         (util/grub-emu.c_DEPENDENCIES): ... this.
9079         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9080         (util/grub-emu.c_DEPENDENCIES): ... this.
9081         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9082         (util/grub-emu.c_DEPENDENCIES): ... this.
9084 2008-01-27  Pavel Roskin  <proski@gnu.org>
9086         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9087         to create a gap between _end and the modules added to the image
9088         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
9089         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9090         * util/elf/grub-mkimage.c (add_segments): Likewise.
9092 2008-01-26  Pavel Roskin  <proski@gnu.org>
9094         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9095         just return an error.
9097 2008-01-26  Bean  <bean123ch@gmail.com>
9099         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9100         (grub_reiserfs_get_item): Save offset of the next item.
9101         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9103 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9105         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9106         make all filesystem sources appear together (possibly fixing omissions
9107         while at it).
9108         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9109         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9110         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9111         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9113         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
9114         add `kern/file.c'.
9115         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9116         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9117         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9118         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9120         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9121         (probe): Add a sanity check to make sure of our ability to read
9122         requested files when probing for filesystem type.
9124         * genmk.rb: Update copyright year (2007).
9126         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9127         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9128         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9129         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9130         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9131         : Remove function prototypes.
9133 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9135         Revert my previous commits (based on wrong assumption of how grub_errno
9136         works).
9138         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9139         * kern/file.c (grub_file_open): Likewise.
9141 2008-01-24  Pavel Roskin  <proski@gnu.org>
9143         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9144         that hang if GRUB tries to setup colors.
9145         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9146         colors for firmwares that don't support it.
9147         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9148         Recognize Open Hack'Ware, set flags to work around its
9149         limitations.
9151 2008-01-24  Robert Millan  <rmh@aybabtu.com>
9153         * kern/file.c (grub_file_open): Do not account previous failures of
9154         unrelated functions when grub_errno is checked for.
9155         Reported by Oleg Strikov.
9157 2008-01-24  Bean  <bean123ch@gmail.com>
9159         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9160         (grub_ufs_sblock): New member volume name.
9161         (grub_ufs_find_file): Fix string copy bug.
9162         (grub_ufs_label): Implement this function properly.
9164         * fs/hfs.c (grub_hfs_cnid_type): New enum.
9165         (grub_hfs_iterate_records): Use the correct file number for extents
9166         and catalog file. Fix problem in next index calculation.
9167         (grub_hfs_find_node): Replace recursive function call with loop.
9168         (grub_hfs_iterate_dir): Replace recursive function call with loop.
9170 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9172         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9173         `<grub/symbol.h>' and `<grub/multiboot.h>'.
9174         (grub_multiboot2_real_boot): New function prototype.
9176         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9177         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9179         * kern/i386/ieee1275/init.c (grub_os_area_addr)
9180         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9182 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9184         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9185         #ifdef'ed out grub_printf().
9187 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9189         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9190         grub_dprintf calls, since they make "debug=all" mode unusable.
9191         (grub_console_checkkey): Likewise.
9193 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9195         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9196         `term/i386/pc/at_keyboard.c'.
9197         (pkglib_MODULES): Add `serial.mod'.
9198         (serial_mod_SOURCES): New variable.
9199         (serial_mod_CFLAGS): Likewise.
9200         (serial_mod_LDFLAGS): Likewise.
9202         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
9203         `<grub/powerpc/ieee1275/console.h>'.
9204         (grub_keyboard_controller_init): New function prototype.
9205         (grub_console_checkkey): Likewise.
9206         (grub_console_getkey): Likewise.
9208         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9209         keyboard on i386.
9211         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9212         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9214 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9216         * kern/i386/pc/init.c (make_install_device): When memdisk image is
9217         present, "(memdisk)/boot/grub" becomes the default prefix.
9219         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9220         a memdisk tarball with all the modules.  Add --overlay=DIR option that
9221         allows users to overlay additional files into the image.
9223 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9225         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9226         and `machine/memory.h'.
9227         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9228         (_multiboot_mod_SOURCES): New variable.
9229         (_multiboot_mod_CFLAGS): Likewise.
9230         (_multiboot_mod_LDFLAGS): Likewise.
9231         (multiboot_mod_SOURCES): Likewise.
9232         (multiboot_mod_CFLAGS): Likewise.
9233         (multiboot_mod_LDFLAGS): Likewise.
9235         * include/grub/i386/ieee1275/loader.h: New file.
9237         * include/grub/i386/ieee1275/machine.h: Likewise.
9239         * include/grub/i386/ieee1275/memory.h: Likewise.
9241         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9242         variable declaration.
9243         (grub_os_area_size): Likewise.
9245         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9246         (grub_lower_mem, grub_upper_mem): New variables.
9247         (grub_stop_floppy): New function (just to make
9248         grub_multiboot2_real_boot() happy).
9250         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9251         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9252         (grub_stop): New function.
9253         Include `"../realmode.S"' and `"../loader.S"'.
9255         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9256         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9258         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9259         rely on grub_multiboot2_real_boot() for final boot.
9261 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9263         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9264         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9265         device that doesn't look like an SD card.
9266         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9267         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9268         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9269         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9270         found.
9272 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9274         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9275         avoid claiming over our own code.
9277 2008-01-22  Bean  <bean123ch@gmail.com>
9279         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9280         (jpeg_mod_SOURCES): New variable.
9281         (jpeg_mod_CFLAGS): Likewise.
9282         (jpeg_mod_LDFLAGS): Likewise.
9284         * video/readers/jpeg.c : New file.
9286 2008-01-22  Bean  <bean123ch@gmail.com>
9288         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9289         there are no more items.
9291 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9293         * kern/mm.c (grub_mm_init_region): Improve debug message.
9295 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9297         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9298         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9299         address.
9300         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9301         a C macro.
9302         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9303         Indicates start of upper memory.
9304         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9305         (generate_image): Abort when image size is big enough to corrupt
9306         upper memory.
9308         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9309         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9310         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9311         instead of hardcoding 0xA0000.
9312         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9313         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9314         instead of hardcoding 0xA0000.
9316 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9318         * disk/memdisk.c (memdisk_size): New variable.
9319         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9320         `memdisk_size'.
9321         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
9322         image to dynamic memory.
9323         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9324         `memdisk_size'.  Free memdisk block.
9326 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9328         Fix detection of very small filesystems (like tar).
9330         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9331         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9332         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9333         a problem with this disk).
9335 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9337         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9338         on grub_biosdisk_rw_standard() error.
9340 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9342         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9343         recent changes.
9344         * kern/elf.c: Likewise.
9345         * kern/ieee1275/ieee1275.c: Likewise.
9346         * kern/powerpc/ieee1275/openfw.c: Likewise.
9347         * term/ieee1275/ofconsole.c: Likewise.
9349 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9351         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9353         * include/grub/kernel.h (grub_arch_memdisk_addr)
9354         (grub_arch_memdisk_size): Moved from here ...
9356         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9357         (grub_arch_memdisk_size): ... to here.
9359 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9361         Mostly based on bugfix from Bean.
9363         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9364         attribute with hook() parameter.
9365         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9366         declaration.
9367         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9368         attribute with hook() parameter.
9369         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9370         declaration.
9372 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9374         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9375         (pkglib_MODULES): Add `memdisk.mod'.
9376         (memdisk_mod_SOURCES): New variable.
9377         (memdisk_mod_CFLAGS): Likewise.
9378         (memdisk_mod_LDFLAGS): Likewise.
9380         * disk/memdisk.c: New file.
9382         * include/grub/disk.h (grub_disk_dev_id): Add
9383         `GRUB_DISK_DEVICE_MEMDISK_ID'.
9385         * include/grub/i386/pc/kernel.h
9386         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9387         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9388         (grub_kernel_image_size): New variable declaration.
9389         (grub_total_module_size): Likewise.
9390         (grub_memdisk_image_size): Likewise.
9392         * include/grub/i386/pc/memory.h
9393         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9395         * include/grub/kernel.h: Include `<grub/symbol.h>'.
9396         (grub_arch_memdisk_addr): New variable declaration.
9397         (grub_arch_memdisk_size): Likewise.
9399         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9400         (grub_arch_memdisk_size): Likewise.
9402         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9403         (codestart): Replace hardcoded `0x100000' with
9404         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9406         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9407         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
9408         not NULL, append the contents of the file it refers to, at the end of
9409         the compressed kernel image.  Initialize `grub_memdisk_image_size'
9410         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9411         (options): Add "memdisk"|'m' option.
9412         (main): Parse --memdisk|-m option, and pass user-provided path as
9413         parameter to generate_image().
9415 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9417         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9418         grub_dprintf() calls from here ...
9419         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9421 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9423         Fix detection of "real mode" when /options/real-mode? doesn't exist.
9425         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9426         declaration.
9427         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9428         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9429         `GRUB_IEEE1275_FLAG_REAL_MODE'.
9430         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9431         property).
9432         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9433         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9435 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9437         Get rid of confusing function (superseded by
9438         `grub_ieee1275_get_integer_property')
9439         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9440         prototype.
9441         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9442         function.
9443         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9444         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9445         in native endianness from grub_ieee1275_get_integer_property().
9447 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9449         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9450         command after "shut-down", since implementations differ on which
9451         the command for halt is.
9453 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9455         * include/grub/i386/linuxbios/console.h: Add header protection.
9456         (grub_keyboard_controller_init): New function prototype.
9457         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9458         (KEYBOARD_COMMAND_READ): Likewise.
9459         (KEYBOARD_COMMAND_WRITE): Likewise.
9460         (KEYBOARD_SCANCODE_SET1): Likewise.
9461         (grub_keyboard_controller_write): New function.
9462         (grub_keyboard_controller_read): Likewise.
9463         (grub_keyboard_controller_init): Likewise.
9465         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9466         (grub_console_init): On coreboot/LinuxBIOS, call
9467         grub_keyboard_controller_init().
9469 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9471         PowerPC changes provided by Pavel Roskin.
9473         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9474         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9475         don't rely on cmain() doing it.
9476         * kern/i386/ieee1275/startup.S (_start): Store %eax in
9477         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9479 2008-01-16  Robert Millan  <rmh@aybabtu.com>
9481         * include/grub/i386/linuxbios/memory.h
9482         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9483         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9484         receive `table_header' as argument.  Instead, probe for it in the
9485         known memory ranges where it can be present.
9486         (grub_available_iterate): Do not pass a fixed `table_header' address
9487         to grub_linuxbios_table_iterate().
9489 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9491         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9492         * conf/i386-ieee1275.rmk: New file.
9493         * include/grub/i386/ieee1275/console.h: Likewise.
9494         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9495         * include/grub/i386/ieee1275/kernel.h: Likewise.
9496         * include/grub/i386/ieee1275/time.h: Likewise.
9497         * kern/i386/ieee1275/init.c: Likewise.
9498         * kern/i386/ieee1275/startup.S: Likewise.
9500 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9502         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9503         when pointers are 32-bit (but still do set it to one when they are
9504         64-bit).
9506 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9508         * include/grub/ieee1275/ieee1275.h
9509         (grub_ieee1275_get_integer_property): New function prototype.
9511         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9512         (grub_ieee1275_get_integer_property): New function.  Wraps around
9513         grub_ieee1275_get_property() to handle endianness.
9515         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9516         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9517         where appropriate.
9518         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9519         (grub_map): Likewise.
9520         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9522 2008-01-15  Bean  <bean123ch@gmail.com>
9524         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9525         (grub_script_execute_cmdline): Reset grub_errno.
9527         * normal/main.c (read_config_file): Reset grub_errno.
9529         * normal/parse.y (script_init): New.
9530         (script): Move function and menuentry here.
9531         (delimiter): New.
9532         (command): Add delimiter at the end of command.
9533         (commands): Adjust to match the new command.
9534         (commandblock): Remove grub_script_lexer_record_start.
9535         (menuentry): Add grub_script_lexer_record_start, use the new commands.
9536         (if): Use the new commands.
9538         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9540 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9542         * normal/menu.c (run_menu): Move timeout message from here ...
9543         (print_timeout): ... to here.
9544         (run_menu): Use print_timeout() once during initial draw to print
9545         the whole message, and again in every clock tick to update only
9546         the number of seconds.
9548 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9550         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9551         actual size of `available' from grub_ieee1275_get_property(), and
9552         restrict parsing to that bound.
9554 2008-01-15  Christian Franke  <franke@computer.org>
9556         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9557         (argp_program_version): Remove variable.
9558         (argp_program_bug_address): Likewise.
9559         (options): Convert from struct argp_option to struct option.
9560         (struct arguments): Remove.
9561         (parse_opt): Remove.
9562         (usage): New function.
9563         (main): Replace struct args members by simple variables.
9564         Replace argp_parse() by getopt_long().
9565         Add switch to evaluate options.
9566         Add missing "(...)" around root_dev in prefix string.
9568 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9570         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9571         for grub_ieee1275_exit(), in order to improve portability.
9573 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9575         * util/grub.d/10_linux.in (prefix): Define.
9576         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
9578 2008-01-13  Pavel Roskin  <proski@gnu.org>
9580         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9581         grub_errno if no errors have been detected.
9583 2008-01-12  Robert Millan  <rmh@aybabtu.com>
9585         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9586         (grub_util_get_dev_abstraction): New function prototype.
9588         * util/getroot.c: Include `<grub/util/getroot.h>'
9589         (grub_util_get_grub_dev): Move detection of abstraction type to ...
9590         (grub_util_get_dev_abstraction): ... here (new function).
9592         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
9593         `PRINT_ABSTRACTION'.
9594         (probe): Probe for abstraction type when requested.
9595         (main): Understand `--target=abstraction'.
9597         * util/i386/efi/grub-install.in: Add abstraction module to core
9598         image when it is found to be necessary.
9599         * util/i386/pc/grub-install.in: Likewise.
9600         * util/powerpc/ieee1275/grub-install.in: Likewise.
9602         * util/update-grub_lib.in (font_path): Return system path without
9603         converting to GRUB path.
9604         * util/update-grub.in: Convert system path returned by font_path()
9605         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
9606         abstraction module is needed for loading fonts (if any).  Export
9607         that as `GRUB_PRELOAD_MODULES'.
9608         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9609         insmod commands).
9611 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
9613         Remove some unused code from reiserfs.
9615         * fs/reiserfs.c (struct grub_reiserfs_key)
9616         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9617         (struct grub_reiserfs_node_body): Removed.
9618         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9619         Likewise.
9620         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9621         Likewise.
9622         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9623         Likewise.
9624         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9625         Likewise.
9626         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9627         Likewise.
9628         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9629         Likewise.
9630         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9631         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9632         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9634 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9636         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9637         Determines if a file is garbage left by packaging systems, etc.
9638         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9639         for processing /etc/grub.d scripts.
9640         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9641         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
9642         as a condition for processing Linux images.
9644 2008-01-10  Pavel Roskin  <proski@gnu.org>
9646         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
9647         to compile reiserfs.c on PowerPC.
9649 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9651         * kern/device.c (grub_device_iterate): Do not abort device iteration
9652         when one of the devices cannot be opened.
9653         * kern/disk.c (grub_disk_open): Do not account previous failures of
9654         unrelated functions when grub_errno is checked for.
9656 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9658         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9659         `! grub_linux_is_bzimage', change order of address comparison to make
9660         it more intuitive, and improve "too big zImage" error message.
9662 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9664         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9665         `$(update-grub_DATA)'.
9666         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9667         targets.
9669 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9671         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9672         which instruction is modified by grub-setup during installation
9673         (since it wasn't obvious by only looking at this file).
9675 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9677         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
9678         listing actual TODO items.
9680 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9682         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9683         correctly.
9684         (grub_reiserfs_get_key_offset): Likewise.
9685         (grub_reiserfs_set_key_offset): Likewise.
9686         (grub_reiserfs_set_key_type): Likewise.
9687         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9689         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9690         better to remove the bitfield version completely.
9692 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9694         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9695         allocated from the heap, due to the fshelp implementation.
9696         (grub_reiserfs_dir): Free NODE, due to the same reason.
9698 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9700         Mostly from Vincent Pelletier:
9702         * fs/reiserfs.c: New file.
9704         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9705         (reiserfs_mod_SOURCES): New variable.
9706         (reiserfs_mod_CFLAGS): Likewise.
9707         (reiserfs_mod_LDFLAGS): Likewise.
9709         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9710         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9711         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9712         normal/color.c.
9714 2008-01-06  Robert Millan  <rmh@aybabtu.com>
9716         * normal/color.c: Remove `<grub/env.h>'.
9718 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
9720         * include/grub/normal.h: Include <grub/env.h>.
9722 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9724         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9725         usage example with `(hd0,1)'.
9726         Reported by Samuel Thibault.
9728 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9730         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9731         (grub_linux_boot_zimage): Rename to ...
9732         (grub_linux_boot): ... this.
9733         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9734         (grub_linux_boot_zimage): Conditionalize zImage copy.
9736         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9737         (grub_linux_boot_bzimage): Remove prototype.
9738         (grub_linux_boot_zimage): Rename to ...
9739         (grub_linux_boot): ... this.
9741         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9742         (grub_linux_boot): Remove function.
9744 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9746         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9747         (grub_env_write_color_highlight): Likewise.
9748         (grub_wait_after_message): Likewise.
9750         * normal/color.c: New file.
9752         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9753         (normal_mod_DEPENDENCIES): Likewise.
9755         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9756         (normal_mod_DEPENDENCIES): Likewise.
9758         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9759         (normal_mod_DEPENDENCIES): Likewise.
9761         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9762         (normal_mod_DEPENDENCIES): Likewise.
9764         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9765         for waiting after a message is printed.
9766         * normal/main.c (read_config_file): Likewise.
9767         (grub_normal_init): Register grub_env_write_color_normal() and
9768         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
9769         `color_highlight' variables as global.
9771         * normal/menu.c (grub_wait_after_message): New function.
9772         (grub_color_menu_normal): New variable.  Replaces ...
9773         (GRUB_COLOR_MENU_NORMAL): ... this macro.
9774         (grub_color_menu_highlight): New variable.  Replaces ...
9775         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9776         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9777         `GRUB_TERM_COLOR_STANDARD'.
9778         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
9779         `normal_code' and `highlight_code' to `old_color_normal' and
9780         `old_color_highlight', respectively.
9781         (grub_menu_init_page): Update colors when drawing the menu, based on
9782         `menu_color_normal' and `menu_color_highlight' variables.
9783         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9784         a message is printed.
9786 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9788         * kern/env.c (grub_env_context_open): Propagate hooks for global
9789         variables to new context.
9791         * kern/main.c (grub_set_root_dev): Export `root' variable.
9793 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9795         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9796         discs unconditionally, since udev and others have options to provide
9797         them.
9799 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9801         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9803 2008-01-04  Christian Franke  <franke@computer.org>
9805         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9806         of eisa_mmap.
9808 2008-01-03  Pavel Roskin  <proski@gnu.org>
9810         * kern/i386/linuxbios/init.c: Put "void" to all function
9811         declarations with no arguments.
9812         * kern/powerpc/ieee1275/init.c: Likewise.
9813         * term/i386/pc/at_keyboard.c: Likewise.
9814         * term/i386/pc/vga_text.c: Likewise.
9815         * util/grub-mkdevicemap.c: Likewise.
9817 2008-01-02  Robert Millan  <rmh@aybabtu.com>
9819         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9820         message when loaded image is out of bounds.
9821         (grub_multiboot_load_elf64): Likewise.
9823 2008-01-02  Pavel Roskin  <proski@gnu.org>
9825         * util/grub.d/10_linux.in: Try version without ".old" when
9826         looking for initrd.  It's better to use initrd from the newer
9827         kernel of the same version than no initrd at all.
9829 2008-01-01  Robert Millan  <rmh@aybabtu.com>
9831         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9833 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
9835         * include/grub/video.h: Added grub_video_unmap_color and
9836         grub_video_get_active_render_target.
9837         (grub_video_adapter): Added unmap_color and get_active_render_target.
9839         * video/video.c: Added grub_video_unmap_color and
9840         grub_video_get_active_render_target.
9841         (grub_video_get_info): Changed method to accept NULL pointer as an
9842         argument to allow detection of active video adapter.
9844         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9845         grub_video_vbe_unmap_color_int.
9846         Added grub_video_vbe_unmap_color and
9847         grub_video_vbe_get_active_render_target.
9848         (grub_video_vbe_adapter): Added unmap_color and
9849         get_active_render_target.
9851         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9852         with grub_video_vbe_unmap_color_int.
9854         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9855         (DEFAULT_NORMAL_COLOR): Likewise.
9856         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9857         (DEFAULT_FG_COLOR): Removed.
9858         (DEFAULT_BG_COLOR): Likewise.
9859         (DEFAULT_CURSOR_COLOR): Changed value.
9860         (grub_virtual_screen): Added standard_color_setting,
9861         normal_color_setting, highlight_color_setting and term_color.
9862         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9863         (bitmap_width): Added.
9864         (bitmap_height): Likewise.
9865         (bitmap): Likewise.
9866         (set_term_color): Likewise.
9867         (grub_virtual_screen_setup): Changed to use new terminal coloring
9868         settings.
9869         (grub_gfxterm_init): Added init for bitmap.
9870         (grub_gfxterm_fini): Added destroy for bitmap.
9871         (redraw_screen_rect): Updated to use background bitmap and new
9872         terminal coloring.
9873         (scroll_up): Added optimization for case when there is no bitmap.
9874         (grub_gfxterm_cls): Fixed to use correct background color.
9875         (grub_virtual_screen_setcolorstate): Changed to use new terminal
9876         coloring.
9877         (grub_virtual_screen_setcolor): Likewise.
9878         (grub_virtual_screen_getcolor): Added.
9879         (grub_gfxterm_background_image_cmd): Likewise.
9880         (grub_video_term): Added setcolor and getcolor.
9881         (MOD_INIT): Added registration of background_image command.
9882         (MOD_TERM): Added unregistration for background_image command.
9884 2007-12-30  Pavel Roskin  <proski@gnu.org>
9886         * loader/multiboot_loader.c: Fix multiboot command
9887         unregistration.  Fix all typos in the word "multiboot".
9889 2007-12-29  Pavel Roskin  <proski@gnu.org>
9891         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
9892         support for initrd names used in Fedora.
9894 2007-12-26  Bean  <bean123ch@gmail.com>
9896         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9897         (cpio_mod_SOURCES): New variable.
9898         (cpio_mod_CFLAGS): Likewise.
9899         (cpio_mod_LDFLAGS): Likewise.
9901         * fs/cpio.c: New file.
9903         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9905         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9907         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9909         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9911 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9913         * include/grub/term.h (struct grub_term): Add `getcolor' function.
9914         (grub_getcolor): New function.
9916         * kern/term.c (grub_getcolor): New function.
9917         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9918         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9919         (print_entry): Set normal and highlight colors to
9920         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9921         respectively, before printing and restore them to old
9922         values afterwards.
9923         (grub_menu_init_page): Likewise.  Fill an additional colored space
9924         that would otherwise be left blank.
9926         * term/efi/console.c (grub_console_getcolor): New function.
9927         (struct grub_console_term.getcolor): New variable.
9928         * term/i386/pc/console.c (grub_console_getcolor): New function.
9929         (struct grub_console_term.getcolor): New variable.
9930         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9931         (struct grub_console_term.getcolor): New variable.
9933         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9934         (struct grub_console_term.setcolor): Remove variable.
9935         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9936         (struct grub_console_term.setcolor): Remove variable.
9937         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9938         (struct grub_console_term.setcolor): Remove variable.
9939         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9940         (struct grub_console_term.setcolor): Remove variable.
9942 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9944         * configure.ac: Search for possible unifont.hex locations, and
9945         define UNIFONT_HEX if found.
9947         * Makefile.in (UNIFONT_HEX): Define variable.
9948         (DATA): Rename to ...
9949         (PKGLIB): ... this.  Update all users.
9950         (PKGDATA): New variable.
9951         (pkgdata_IMAGES): Rename to ...
9952         (pkglib_IMAGES): ... this. Update all users.
9953         (pkgdata_MODULES): Rename to ...
9954         (pkglib_MODULES): ... this. Update all users.
9955         (pkgdata_PROGRAMS): Rename to ...
9956         (pkglib_PROGRAMS): ... this. Update all users.
9957         (pkgdata_DATA): Rename to ...
9958         (pkglib_DATA): ... this. Update all users.
9959         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9960         (unicode.pff, ascii.pff): New rules.
9961         (all-local): Add `$(PKGDATA)' dependency.
9962         (install-local): Process `$(PKGDATA)'.
9964         * util/update-grub_lib.in (font_path): Search for *.pff files in
9965         a few more locations, including `${pkgdata}'.
9967 2007-12-23  Robert Millan  <rmh@aybabtu.com>
9969         Patch from Bean  <bean123ch@gmail.com>:
9970         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9971         `size'.
9973 2007-12-21  Bean  <bean123ch@gmail.com>
9975         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9976         (ntfscomp_mod_SOURCES): New variable.
9977         (ntfscomp_mod_CFLAGS): Likewise.
9978         (ntfscomp_mod_LDFLAGS): Likewise.
9980         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9981         (grub_probe_SOURCES): Likewise.
9982         (grub_emu_SOURCES): Likewise.
9984         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9985         (grub_emu_SOURCES): Likewise.
9987         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9988         (grub_emu_SOURCES): Likewise.
9990         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9991         (grub_emu_SOURCES): Likewise.
9993         * fs/ntfs.c (grub_ntfscomp_func): New variable.
9994         (read_run_list): Renamed to grub_ntfs_read_run_list.
9995         (decomp_nextvcn): Moved to ntfscomp.c.
9996         (decomp_getch): Likewise.
9997         (decomp_get16): Likewise.
9998         (decomp_block): Likewise.
9999         (read_block): Likewise.
10000         (read_data): Partially moved to ntfscomp.c.
10001         (fixup): Change unsigned to grub_uint16_t.
10002         (read_mft): Change unsigned long to grub_uint32_t.
10003         (read_attr): Likewise.
10004         (read_data): Likewise.
10005         (read_run_data): Likewise.
10006         (read_run_list): Likewise.
10007         (read_mft): Likewise.
10009         * fs/ntfscomp.c: New file.
10011         * include/grub/ntfs.h: New file.
10013 2007-12-16  Robert Millan  <rmh@aybabtu.com>
10015         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10016         IDE disk check, since Linux is known to support 20 IDE disks.
10017         Reported by Colin Watson.
10019 2007-12-15  Bean  <bean123ch@gmail.com>
10021         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10022         (lnxboot_img_SOURCES): New variable.
10023         (lnxboot_img_ASFLAGS): Likewise.
10024         (lnxboot_img_LDFLAGS): Likewise.
10026         * boot/i386/pc/lnxboot.S: New file.
10028 2007-11-24  Pavel Roskin  <proski@gnu.org>
10030         * configure.ac: Test if '--build-id=none' is supported by the
10031         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
10032         objcopy to generate incorrect binary files (binutils
10033         2.17.50.0.18-1 as shipped by Fedora 8).
10034         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10035         linking, so that build ID doesn't break the test.
10037 2007-11-24  Pavel Roskin  <proski@gnu.org>
10039         * include/grub/i386/time.h: use "void" in the argument list
10040         of grub_cpu_idle().
10041         * include/grub/powerpc/time.h: Likewise.
10042         * include/grub/sparc64/time.h: Likewise.
10044 2007-11-18  Christian Franke  <franke@computer.org>
10046         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10047         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10048         This fixes the problem that function keys did not work in grub-emu.
10050 2007-11-18  Christian Franke  <franke@computer.org>
10052         * disk/host.c (grub_host_open): Remove attribute unused from
10053         name parameter. Add check for "host". This fixes the problem
10054         that grub-emu does not find partitions.
10056 2007-11-18  Christian Franke  <franke@computer.org>
10058         * util/hostfs.c (is_dir): New function.
10059         (grub_hostfs_dir):  Handle missing dirent.d_type case.
10060         (grub_hostfs_read): Add missing fseek().
10061         (grub_hostfs_label): Clear label pointer.  This fixes a crash
10062         of grub-emu on "ls (host)".
10064 2007-11-18  Christian Franke  <franke@computer.org>
10066         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10067         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10068         to 64 bit boundary by default.
10070 2007-11-18  Bean  <bean123ch@gmail.com>
10072         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10073         (hexdump_mod_SOURCES): New variable.
10074         (hexdump_mod_CFLAGS): Likewise.
10075         (hexdump_mod_LDFLAGS): Likewise.
10077         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10079         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10081         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10083         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10085         * include/grub/hexdump.h: New file.
10087         * commands/hexdump.c: New file.
10089 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10091         * commands/i386/pc/play.c (beep_off): Switch order of arguments
10092         in grub_outb() calls.
10093         (beep_on): Likewise.
10095 2007-11-10  Christian Franke  <franke@computer.org>
10097         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10098         (grub_menu_run): Likewise.
10100 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10102         * include/grub/i386/efi/machine.h: New file.
10103         * include/grub/i386/linuxbios/machine.h: Likewise.
10104         * include/grub/i386/pc/machine.h: Likewise.
10105         * include/grub/powerpc/ieee1275/machine.h: Likewise.
10106         * include/grub/sparc64/ieee1275/machine.h: Likewise.
10108         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10109         (serial_hw_io_addr): New variable.
10110         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10111         instead of `(unsigned short *) 0x400'.
10113 2007-11-10  Bean  <bean123ch@gmail.com>
10115         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10117 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10119         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10120         (vga_mod_SOURCES): Added.
10121         (vga_mod_CFLAGS): Likewise.
10122         (vga_mod_LDFLAGS): Likewise.
10124         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10125         grub_outb() calls.
10126         (set_map_mask): Likewise.
10127         (set_read_map): Likewise.
10128         (set_read_address): Likewise.
10129         (vga_font): Removed variable.
10130         (get_vga_glyph): Removed function.
10131         (invalidate_char): Likewise.
10132         (write_char): Changed to use grub_font_get_glyph() for font
10133         information.
10134         (grub_vga_putchar): Likewise.
10135         (grub_vga_getcharwidth): Likewise.
10137 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10139         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10140         flags.
10141         (pxeboot_img_LDFLAGS): Likewise.
10142         (diskboot_img_LDFLAGS): Likewise.
10143         (kernel_img_LDFLAGS): Likewise.
10145 2007-11-06  Robert Millan  <rmh@aybabtu.com>
10147         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10148         in grub_outb() calls.
10149         (serial_hw_init): Likewise.
10151 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10153         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10154         spaces.  Skip non-regular files.
10156 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10158         * kern/disk.c (grub_disk_firmware_fini)
10159         (grub_disk_firmware_is_tainted): New variables.
10161         * include/grub/disk.h (grub_disk_firmware_fini)
10162         (grub_disk_firmware_is_tainted): Likewise.
10164         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10165         (grub_disk_biosdisk_fini): ... to here.
10166         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10167         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10168         is set.  Register grub_disk_biosdisk_fini() in
10169         `grub_disk_firmware_fini'.
10171         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10172         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10173         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10174         to finish existing firmware disk interface.
10176         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10177         (ata_mod_SOURCES): New variable.
10178         (ata_mod_CFLAGS): Likewise.
10179         (ata_mod_LDFLAGS): Likewise.
10181 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10183         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
10184         (grub_ata_wait): Reimplement using grub_millisleep().
10186         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10187         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10189 2007-11-03  Marco Gerards  <marco@gnu.org>
10191         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10192         (CRTC_ADDR_PORT): New macro.
10193         (CRTC_DATA_PORT): Likewise.
10194         (CRTC_CURSOR): Likewise.
10195         (CRTC_CURSOR_ADDR_HIGH): Likewise.
10196         (CRTC_CURSOR_ADDR_LOW): Likewise.
10197         (update_cursor): New function.
10198         (grub_console_real_putchar): Call `update_cursor'.
10199         (grub_console_gotoxy): Likewise.
10200         (grub_console_cls): Set the default color when clearing the
10201         screen.
10202         (grub_console_setcursor): Implemented.
10204 2007-11-03  Marco Gerards  <marco@gnu.org>
10206         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10207         become activate.
10208         (grub_ata_pio_write): Likewise.
10210         (grub_atapi_identify): Wait after issuing an ATA command.
10211         (grub_atapi_packet): Likewise.
10212         (grub_ata_identify): Likewise.
10213         (grub_ata_readwrite): Likewise.
10215 2007-11-03  Marco Gerards  <marco@gnu.org>
10217         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10218         (grub_ata_pio_write): Likewise.
10219         (grub_ata_readwrite): Use `grub_error', instead of
10220         returning `grub_errno'.
10222 2007-11-03  Marco Gerards  <marco@gnu.org>
10224         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10225         grub_ata_pio_write once for every single sector, instead of for
10226         multiple sectors.
10228 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10230         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10232         * conf/i386-linuxbios.rmk: New file.
10234         * kern/i386/pc/hardware.c: Likewise.
10235         * term/i386/pc/at_keyboard.c: Likewise.
10236         * term/i386/pc/vga_text.c: Likewise.
10238         * include/grub/i386/linuxbios/boot.h: Likewise.
10239         * include/grub/i386/linuxbios/console.h: Likewise.
10240         * include/grub/i386/linuxbios/init.h: Likewise.
10241         * include/grub/i386/linuxbios/kernel.h: Likewise.
10242         * include/grub/i386/linuxbios/loader.h: Likewise.
10243         * include/grub/i386/linuxbios/memory.h: Likewise.
10244         * include/grub/i386/linuxbios/serial.h: Likewise.
10245         * include/grub/i386/linuxbios/time.h: Likewise.
10247         * kern/i386/linuxbios/init.c: Likewise.
10248         * kern/i386/linuxbios/startup.S: Likewise.
10249         * kern/i386/linuxbios/table.c: Likewise.
10251 2007-10-31  Marco Gerards  <marco@gnu.org>
10253         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10254         (ata_mod_SOURCES): New variable.
10255         (ata_mod_CFLAGS): Likewise.
10256         (ata_mod_LDFLAGS): Likewise.
10258         * disk/ata.c: New file.
10260         * include/grub/disk.h (grub_disk_dev_id): Add
10261         `GRUB_DISK_DEV_ATA_ID'.
10263 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10265         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10266         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10268         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10269         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10271         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10272         `<grub/types.h>'.
10274         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10276 2007-10-27  Robert Millan  <rmh@aybabtu.com>
10278         * include/grub/types.h (ULONG_MAX): Define macro.
10280 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10282         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
10283         `"../realmode.S"'.
10284         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
10286 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10288         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10289         (pkgdata_MODULES): Add `biosdisk.mod'.
10290         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10291         variables.
10293         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10294         (grub_biosdisk_init): Replace with ...
10295         (GRUB_MOD_INIT(biosdisk)): ... this.
10296         (grub_biosdisk_fini): Replace with ...
10297         (GRUB_MOD_FINI(biosdisk)): ... this.
10299         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10300         (grub_machine_init): Remove call to grub_biosdisk_init().
10301         (grub_machine_fini): Remove call to grub_machine_fini().
10303         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10305 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10307         * include/grub/time.h: New file.
10308         * include/grub/i386/time.h: Likewise.
10309         * include/grub/powerpc/time.h: Likewise.
10310         * include/grub/sparc64/time.h: Likewise.
10312         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10313         instances to ...
10314         (KERNEL_MACHINE_TIME_HEADER): ... this.
10315         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10316         instances to ...
10317         (KERNEL_MACHINE_TIME_HEADER): ... this.
10318         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10319         instances to ...
10320         (KERNEL_MACHINE_TIME_HEADER): ... this.
10322         * kern/i386/efi/init.c: Include `<grub/time.h>'.
10323         (grub_millisleep): New function.
10324         * kern/i386/pc/init.c: Include `<grub/time.h>'.
10325         (grub_millisleep): New function.
10326         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10327         Remove `grub/machine/time.h' include.
10328         (grub_millisleep): New function.
10329         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10330         Remove `grub/machine/time.h' include.
10331         (grub_millisleep): New function.
10333         * include/grub/misc.h (grub_div_roundup): New function.
10335         * kern/misc.c: Include `<grub/time.h>'.
10336         (grub_millisleep_generic): New function.
10338         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10339         Add `time.h'.
10340         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10341         Add `time.h'.
10342         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10343         `machine/time.h'.  Add `time.h'.
10344         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10346 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10348         * include/grub/misc.h (grub_max): New function.
10350 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10352         * util/misc.c (grub_util_info): Call fflush() before returning.
10354 2007-10-20  Robert Millan  <rmh@aybabtu.com>
10356         * genmk.rb (Image): Copy `extra_flags' from here ...
10357         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
10359         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10360         to `argc' and `args' arguments.
10362 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10364         * kern/i386/loader.S: New file.
10366         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10367         * kern/i386/loader.S (grub_linux_prot_size)... to here.
10368         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10369         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10370         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10371         * kern/i386/loader.S (grub_linux_real_addr)... to here.
10372         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10373         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10374         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10375         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10376         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10377         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10378         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10379         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10381         * kern/i386/realmode.S: New file.
10383         * kern/i386/pc/startup.S (protstack): Moved from here ...
10384         * kern/i386/realmode.S (protstack)... to here.
10385         * kern/i386/pc/startup.S (gdt): Moved from here ...
10386         * kern/i386/realmode.S (gdt)... to here.
10387         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10388         * kern/i386/realmode.S (prot_to_real)... to here.
10390         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10391         `kern/i386/realmode.S'.
10393 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10395         * include/grub/i386/loader.h: New file.
10397         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10398         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10399         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10400         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10401         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10402         * include/grub/i386/loader.h (grub_linux_prot_size)
10403         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10404         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10405         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10406         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10408         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10410 2007-10-15  Robert Millan  <rmh@aybabtu.com>
10412         * normal/misc.c (grub_normal_print_device_info): Do not probe for
10413         filesystem when dev->disk is unset.
10414         Do probe for filesystem even when dev->disk->has_partitions is set.
10415         In case a filesystem is found, always report it.
10416         In case it isn't, if dev->disk->has_partitions is set, report that
10417         a partition table was found instead of reporting that no filesystem
10418         could be identified.
10420 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10422         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10423         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10425         * include/grub/types.h (grub_host_to_target16): New macro.
10426         (grub_host_to_target32): Likewise.
10427         (grub_host_to_target64): Likewise.
10428         (grub_target_to_host16): Likewise.
10429         (grub_target_to_host32): Likewise.
10430         (grub_target_to_host64): Likewise.
10432         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10433         Renamed from to ...
10434         (GRUB_MOD_ALIGN): ...this.  Update all users.
10436         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10437         grub_host_to_target32.
10438         Replace grub_be_to_cpu32 with grub_target_to_host32.
10439         (load_modules): Likewise.
10440         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10441         Replace grub_be_to_cpu32 with grub_target_to_host32.
10442         Replace grub_cpu_to_be16 with grub_host_to_target16.
10443         Replace grub_cpu_to_be32 grub_host_to_target32.
10445 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10447         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10448         * util/elf/grub-mkimage.c: ... here.
10450         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
10451         `util/powerpc/ieee1275/grub-mkimage.c'.
10453 2007-10-07  Robert Millan  <rmh@aybabtu.com>
10455         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10456         and make it easier to figure out.
10457         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10458         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10459         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10460         leave us with less than HEAP_MIN_SIZE total heap.
10461         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10463 2007-10-03  Robert Millan  <rmh@aybabtu.com>
10465         * include/grub/i386/io.h: New file.
10466         * commands/i386/pc/play.c (inb): Removed.
10467         (outb): Removed.
10468         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10469         with grub_outb().
10470         * term/i386/pc/serial.c  (inb): Removed.
10471         (outb): Removed.
10472         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10473         with grub_outb().
10474         * term/i386/pc/vga.c  (inb): Removed.
10475         (outb): Removed.
10476         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10477         with grub_outb().
10479 2007-10-02  Robert Millan  <rmh@aybabtu.com>
10481         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10482         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10483         Reported by Marcin Kurek.
10485 2007-09-07  Robert Millan  <rmh@aybabtu.com>
10487         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10488         SmartFirmware version updates (as released by Sven Luther), and avoid
10489         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10490         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10491         known broken.
10493 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10495         From Hitoshi Ozeki:
10496         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10497         when merging two regions.
10499 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10501         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10502         * normal/completion.c (grub_normal_do_completion): Likewise.
10503         Reported by Hitoshi Ozeki.
10505 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10507         Do not use devices at boot in chainloading.
10509         * loader/i386/pc/chainloader.c (boot_drive): New variable.
10510         (boot_part_addr): Likewise.
10511         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10512         with BOOT_DRIVE and BOOT_PART_ADDR.
10513         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10514         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10516 2007-08-29  Robert Millan  <rmh@aybabtu.com>
10518         Patch from Simon Peter <dn.tlp@gmx.net>:
10519         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10520         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10521         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
10522         util/i386/pc/grub-setup.c_DEPENDENCIES.
10523         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10524         util/grub-probe.c_DEPENDENCIES.
10525         * conf/powerpc-ieee1275.rmk: Likewise.
10527 2007-08-28  Robert Millan  <rmh@aybabtu.com>
10529         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
10530         to tell grub-mkdevicemap how to name devices.
10531         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10532         feature).
10534         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10535         util/i386/get_disk_name.c.
10536         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10537         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10538         util/ieee1275/get_disk_name.c.
10540         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10542         * DISTLIST: Add util/i386/get_disk_name.c and
10543         util/ieee1275/get_disk_name.c.
10545         * util/grub-mkdevicemap.c: Replace device naming logic with
10546         grub_util_get_disk_name() calls.
10548 2007-08-20  Robert Millan  <rmh@aybabtu.com>
10550         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10551         (so that it works for both plural and singular quantities).
10553 2007-08-05  Robert Millan  <rmh@aybabtu.com>
10555         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10556         so that [xz] isn't taken into account when determining order.
10558 2007-08-02  Marco Gerards  <marco@gnu.org>
10560         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10561         `include/multiboot2.h', `include/grub/elfload.h',
10562         `include/multiboot.h', `include/grub/multiboot.h',
10563         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10564         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10565         `kern/elf.c', `loader/multiboot_loader.c',
10566         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10567         `loader/i386/pc/multiboot2.c',
10568         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10569         `util/i386/pc/grub-mkrescue.in'.  Remove
10570         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10571         `include/grub/i386/pc/util/biosdisk.h' and
10572         `include/grub/powerpc/ieee1275/multiboot.h'.
10574 2007-08-02  Bean  <bean123ch@gmail.com>
10576         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10577         (ntfs_mod_SOURCES): New variable.
10578         (ntfs_mod_CFLAGS): Likewise.
10579         (ntfs_mod_LDFLAGS): Likewise.
10581         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10582         (grub_probe_SOURCES): Likewise.
10583         (grub_emu_SOURCES): Likewise.
10585         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10586         (grub_emu_SOURCES): Likewise.
10588         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10589         (grub_emu_SOURCES): Likewise.
10591         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10593         * fs/ntfs.c: New file.
10595 2007-08-02  Bean  <bean123ch@gmail.com>
10597         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10599         * file.h (grub_file): Likewise.
10601         * fshelp.h (grub_fshelp_read_file): Likewise.
10603         * util/i386/pc/grub-setup.c (setup): Likewise.
10604         (save_first_sector): Likewise.
10605         (save_blocklists): Likewise.
10607         * fs/affs.c (grub_affs_read_file): Likewise.
10609         * fs/ext2.c (grub_ext2_read_file): Likewise.
10611         * fs/fat.c (grub_fat_read_data): Likewise.
10613         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10615         * fs/hfs.c (grub_hfs_read_file): Likewise.
10617         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10619         * fs/jfs.c (grub_jfs_read_file): Likewise.
10621         * fs/minix.c (grub_minix_read_file): Likewise.
10623         * fs/sfs.c (grub_sfs_read_file): Likewise.
10625         * fs/ufs.c (grub_ufs_read_file): Likewise.
10627         * fs/xfs.c (grub_xfs_read_file): Likewise.
10629         * command/blocklist.c (read_blocklist): Likewise.
10630         (print_blocklist): Likewise.
10632 2007-08-02  Marco Gerards  <marco@gnu.org>
10634         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10635         `util/hostfs.c'.
10637         * disk/host.c: New file.
10639         * util/hostfs.c: Likewise.
10641         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10642         return `GRUB_ERR_BAD_FS'.
10643         * fs/sfs.c (grub_sfs_mount): Likewise.
10644         * fs/xfs.c (grub_xfs_mount): Likewise.
10646         * include/grub/disk.h (enum grub_disk_dev_id): Add
10647         `GRUB_DISK_DEVICE_HOST_ID'.
10649         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10651 2007-07-24  Jerone Young  <jerone@gmail.com>
10653         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10654         modules for compilation.
10655         * conf/powerpc-ieee1275.rmk: Likewise.
10657         * include/multiboot.h: Move multiboot definitions to one file. Rename
10658         many definitions to not get grub specific.
10659         * include/multiboot2.h: Create header with multiboot 2 definitions.
10660         * include/grub/multiboot.h: Header for grub specific function
10661         prototypes and definitions.
10662         * include/grub/multiboot2.h: Likewise.
10663         * include/grub/multiboot_loader.h: Likewise.
10664         * include/grub/i386/pc/multiboot.h: Removed.
10665         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10667         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10668         and 2 to allow for one multiboot and module commands.
10669         * loader/multiboot2.c: Add multiboot2 functionality.
10670         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10671         and definition names.
10672         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10673         2 functions.
10674         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10675         ieee1275 specific multiboot2 code.
10677         * kern/i386/pc/startup.S: Change headers and definition names for
10678         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10680 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10682         * geninitheader.sh: Process file specified in first parameter rather
10683         than hardcoding grub_modules_init.lst.
10684         * geninit.sh: Likewise.  Also, construct header name dynamically rather
10685         than hardcoding grub_modules_init.h.
10687         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10688         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
10689         grub_probe_init.[ch] and grub_setup_init.[ch].
10691         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10692         grub_modules_init.h with grub_emu_init.h.
10693         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10694         grub_probe_init.[ch] files.
10695         * conf/i386-efi.rmk: Likewise.
10696         * conf/i386-pc.rmk: Likewise.
10697         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10698         grub_setup_init.[ch] files.
10700         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10701         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
10702         to initialize modules rather than a list of hardcoded functions.
10703         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
10704         grub_init_all() to initialize modules rather than a list of hardcoded
10705         functions.
10707 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10709         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10710         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10712 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10714         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10715         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10716         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10717         flag when running on SmartFirmware.
10718         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10719         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10720         was set.
10722         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10723         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10724         rather than decreasing it.
10726         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10727         there's not enough space to do it, fail in the same way as when it
10728         can't be done because there are no partitions.
10730         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10731         when nvsetenv failed.
10733 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10735         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10736         because this rule is automatically generated.
10737         (grub-mkrescue): Removed for the same reason as above.
10739 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10741         Migrate to GNU General Public License Version 3.
10743         * COPYING: Replaced with the plain text version of GPLv3.
10745         * config.guess: Updated from gnulib.
10746         * config.sub: Likewise.
10748         * geninit.sh: Output a GPLv3 copyright notice.
10749         * geninitheader.sh: Likewise.
10750         * genmodsrc.sh: Likewise.
10751         * gensymlist.sh.in: Likewise.
10753         * boot/i386/pc/boot.S: Upgraded to GPLv3.
10754         * boot/i386/pc/diskboot.S: Likewise.
10755         * boot/i386/pc/pxeboot.S: Likewise.
10756         * commands/blocklist.c: Likewise.
10757         * commands/boot.c: Likewise.
10758         * commands/cat.c: Likewise.
10759         * commands/cmp.c: Likewise.
10760         * commands/configfile.c: Likewise.
10761         * commands/echo.c: Likewise.
10762         * commands/help.c: Likewise.
10763         * commands/ls.c: Likewise.
10764         * commands/search.c: Likewise.
10765         * commands/terminal.c: Likewise.
10766         * commands/test.c: Likewise.
10767         * commands/videotest.c: Likewise.
10768         * commands/i386/cpuid.c: Likewise.
10769         * commands/i386/pc/halt.c: Likewise.
10770         * commands/i386/pc/play.c: Likewise.
10771         * commands/i386/pc/reboot.c: Likewise.
10772         * commands/i386/pc/vbeinfo.c: Likewise.
10773         * commands/i386/pc/vbetest.c: Likewise.
10774         * commands/ieee1275/halt.c: Likewise.
10775         * commands/ieee1275/reboot.c: Likewise.
10776         * commands/ieee1275/suspend.c: Likewise.
10777         * disk/loopback.c: Likewise.
10778         * disk/lvm.c: Likewise.
10779         * disk/raid.c: Likewise.
10780         * disk/efi/efidisk.c: Likewise.
10781         * disk/i386/pc/biosdisk.c: Likewise.
10782         * disk/ieee1275/ofdisk.c: Likewise.
10783         * font/manager.c: Likewise.
10784         * fs/affs.c: Likewise.
10785         * fs/ext2.c: Likewise.
10786         * fs/fat.c: Likewise.
10787         * fs/fshelp.c: Likewise.
10788         * fs/hfs.c: Likewise.
10789         * fs/hfsplus.c: Likewise.
10790         * fs/iso9660.c: Likewise.
10791         * fs/jfs.c: Likewise.
10792         * fs/minix.c: Likewise.
10793         * fs/sfs.c: Likewise.
10794         * fs/ufs.c: Likewise.
10795         * fs/xfs.c: Likewise.
10796         * hello/hello.c: Likewise.
10797         * include/grub/acorn_filecore.h: Likewise.
10798         * include/grub/arg.h: Likewise.
10799         * include/grub/bitmap.h: Likewise.
10800         * include/grub/boot.h: Likewise.
10801         * include/grub/cache.h: Likewise.
10802         * include/grub/device.h: Likewise.
10803         * include/grub/disk.h: Likewise.
10804         * include/grub/dl.h: Likewise.
10805         * include/grub/elfload.h: Likewise.
10806         * include/grub/env.h: Likewise.
10807         * include/grub/err.h: Likewise.
10808         * include/grub/file.h: Likewise.
10809         * include/grub/font.h: Likewise.
10810         * include/grub/fs.h: Likewise.
10811         * include/grub/fshelp.h: Likewise.
10812         * include/grub/gzio.h: Likewise.
10813         * include/grub/hfs.h: Likewise.
10814         * include/grub/kernel.h: Likewise.
10815         * include/grub/loader.h: Likewise.
10816         * include/grub/lvm.h: Likewise.
10817         * include/grub/misc.h: Likewise.
10818         * include/grub/mm.h: Likewise.
10819         * include/grub/net.h: Likewise.
10820         * include/grub/normal.h: Likewise.
10821         * include/grub/parser.h: Likewise.
10822         * include/grub/partition.h: Likewise.
10823         * include/grub/pc_partition.h: Likewise.
10824         * include/grub/raid.h: Likewise.
10825         * include/grub/rescue.h: Likewise.
10826         * include/grub/script.h: Likewise.
10827         * include/grub/setjmp.h: Likewise.
10828         * include/grub/symbol.h: Likewise.
10829         * include/grub/term.h: Likewise.
10830         * include/grub/terminfo.h: Likewise.
10831         * include/grub/tparm.h: Likewise.
10832         * include/grub/types.h: Likewise.
10833         * include/grub/video.h: Likewise.
10834         * include/grub/efi/api.h: Likewise.
10835         * include/grub/efi/chainloader.h: Likewise.
10836         * include/grub/efi/console.h: Likewise.
10837         * include/grub/efi/console_control.h: Likewise.
10838         * include/grub/efi/disk.h: Likewise.
10839         * include/grub/efi/efi.h: Likewise.
10840         * include/grub/efi/pe32.h: Likewise.
10841         * include/grub/efi/time.h: Likewise.
10842         * include/grub/i386/linux.h: Likewise.
10843         * include/grub/i386/setjmp.h: Likewise.
10844         * include/grub/i386/types.h: Likewise.
10845         * include/grub/i386/efi/kernel.h: Likewise.
10846         * include/grub/i386/efi/loader.h: Likewise.
10847         * include/grub/i386/efi/time.h: Likewise.
10848         * include/grub/i386/pc/biosdisk.h: Likewise.
10849         * include/grub/i386/pc/boot.h: Likewise.
10850         * include/grub/i386/pc/chainloader.h: Likewise.
10851         * include/grub/i386/pc/console.h: Likewise.
10852         * include/grub/i386/pc/init.h: Likewise.
10853         * include/grub/i386/pc/kernel.h: Likewise.
10854         * include/grub/i386/pc/loader.h: Likewise.
10855         * include/grub/i386/pc/memory.h: Likewise.
10856         * include/grub/i386/pc/multiboot.h: Likewise.
10857         * include/grub/i386/pc/serial.h: Likewise.
10858         * include/grub/i386/pc/time.h: Likewise.
10859         * include/grub/i386/pc/vbe.h: Likewise.
10860         * include/grub/i386/pc/vbeblit.h: Likewise.
10861         * include/grub/i386/pc/vbefill.h: Likewise.
10862         * include/grub/i386/pc/vbeutil.h: Likewise.
10863         * include/grub/i386/pc/vga.h: Likewise.
10864         * include/grub/ieee1275/ieee1275.h: Likewise.
10865         * include/grub/ieee1275/ofdisk.h: Likewise.
10866         * include/grub/powerpc/libgcc.h: Likewise.
10867         * include/grub/powerpc/setjmp.h: Likewise.
10868         * include/grub/powerpc/types.h: Likewise.
10869         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10870         * include/grub/powerpc/ieee1275/console.h: Likewise.
10871         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10872         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10873         * include/grub/powerpc/ieee1275/loader.h: Likewise.
10874         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10875         * include/grub/powerpc/ieee1275/time.h: Likewise.
10876         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10877         * include/grub/sparc64/libgcc.h: Likewise.
10878         * include/grub/sparc64/setjmp.h: Likewise.
10879         * include/grub/sparc64/types.h: Likewise.
10880         * include/grub/sparc64/ieee1275/console.h: Likewise.
10881         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10882         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10883         * include/grub/sparc64/ieee1275/time.h: Likewise.
10884         * include/grub/util/biosdisk.h: Likewise.
10885         * include/grub/util/getroot.h: Likewise.
10886         * include/grub/util/lvm.h: Likewise.
10887         * include/grub/util/misc.h: Likewise.
10888         * include/grub/util/raid.h: Likewise.
10889         * include/grub/util/resolve.h: Likewise.
10890         * io/gzio.c: Likewise.
10891         * kern/device.c: Likewise.
10892         * kern/disk.c: Likewise.
10893         * kern/dl.c: Likewise.
10894         * kern/elf.c: Likewise.
10895         * kern/env.c: Likewise.
10896         * kern/err.c: Likewise.
10897         * kern/file.c: Likewise.
10898         * kern/fs.c: Likewise.
10899         * kern/loader.c: Likewise.
10900         * kern/main.c: Likewise.
10901         * kern/misc.c: Likewise.
10902         * kern/mm.c: Likewise.
10903         * kern/parser.c: Likewise.
10904         * kern/partition.c: Likewise.
10905         * kern/rescue.c: Likewise.
10906         * kern/term.c: Likewise.
10907         * kern/efi/efi.c: Likewise.
10908         * kern/efi/init.c: Likewise.
10909         * kern/efi/mm.c: Likewise.
10910         * kern/i386/dl.c: Likewise.
10911         * kern/i386/efi/init.c: Likewise.
10912         * kern/i386/efi/startup.S: Likewise.
10913         * kern/i386/pc/init.c: Likewise.
10914         * kern/i386/pc/lzo1x.S: Likewise.
10915         * kern/i386/pc/startup.S: Likewise.
10916         * kern/ieee1275/ieee1275.c: Likewise.
10917         * kern/powerpc/cache.S: Likewise.
10918         * kern/powerpc/dl.c: Likewise.
10919         * kern/powerpc/ieee1275/cmain.c: Likewise.
10920         * kern/powerpc/ieee1275/crt0.S: Likewise.
10921         * kern/powerpc/ieee1275/init.c: Likewise.
10922         * kern/powerpc/ieee1275/openfw.c: Likewise.
10923         * kern/sparc64/cache.S: Likewise.
10924         * kern/sparc64/dl.c: Likewise.
10925         * kern/sparc64/ieee1275/init.c: Likewise.
10926         * kern/sparc64/ieee1275/openfw.c: Likewise.
10927         * loader/efi/chainloader.c: Likewise.
10928         * loader/efi/chainloader_normal.c: Likewise.
10929         * loader/i386/efi/linux.c: Likewise.
10930         * loader/i386/efi/linux_normal.c: Likewise.
10931         * loader/i386/pc/chainloader.c: Likewise.
10932         * loader/i386/pc/chainloader_normal.c: Likewise.
10933         * loader/i386/pc/linux.c: Likewise.
10934         * loader/i386/pc/linux_normal.c: Likewise.
10935         * loader/i386/pc/multiboot.c: Likewise.
10936         * loader/i386/pc/multiboot_normal.c: Likewise.
10937         * loader/powerpc/ieee1275/linux.c: Likewise.
10938         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10939         * normal/arg.c: Likewise.
10940         * normal/cmdline.c: Likewise.
10941         * normal/command.c: Likewise.
10942         * normal/completion.c: Likewise.
10943         * normal/execute.c: Likewise.
10944         * normal/function.c: Likewise.
10945         * normal/lexer.c: Likewise.
10946         * normal/main.c: Likewise.
10947         * normal/menu.c: Likewise.
10948         * normal/menu_entry.c: Likewise.
10949         * normal/misc.c: Likewise.
10950         * normal/parser.y: Likewise.
10951         * normal/script.c: Likewise.
10952         * normal/i386/setjmp.S: Likewise.
10953         * normal/powerpc/setjmp.S: Likewise.
10954         * normal/sparc64/setjmp.S: Likewise.
10955         * partmap/acorn.c: Likewise.
10956         * partmap/amiga.c: Likewise.
10957         * partmap/apple.c: Likewise.
10958         * partmap/gpt.c: Likewise.
10959         * partmap/pc.c: Likewise.
10960         * partmap/sun.c: Likewise.
10961         * term/gfxterm.c: Likewise.
10962         * term/terminfo.c: Likewise.
10963         * term/efi/console.c: Likewise.
10964         * term/i386/pc/console.c: Likewise.
10965         * term/i386/pc/serial.c: Likewise.
10966         * term/i386/pc/vesafb.c: Likewise.
10967         * term/i386/pc/vga.c: Likewise.
10968         * term/ieee1275/ofconsole.c: Likewise.
10969         * util/biosdisk.c: Likewise.
10970         * util/console.c: Likewise.
10971         * util/genmoddep.c: Likewise.
10972         * util/getroot.c: Likewise.
10973         * util/grub-emu.c: Likewise.
10974         * util/grub-mkdevicemap.c: Likewise.
10975         * util/grub-probe.c: Likewise.
10976         * util/lvm.c: Likewise.
10977         * util/misc.c: Likewise.
10978         * util/raid.c: Likewise.
10979         * util/resolve.c: Likewise.
10980         * util/update-grub.in: Likewise.
10981         * util/update-grub_lib.in: Likewise.
10982         * util/grub.d/00_header.in: Likewise.
10983         * util/grub.d/10_hurd.in: Likewise.
10984         * util/grub.d/10_linux.in: Likewise.
10985         * util/i386/efi/grub-install.in: Likewise.
10986         * util/i386/efi/grub-mkimage.c: Likewise.
10987         * util/i386/pc/grub-install.in: Likewise.
10988         * util/i386/pc/grub-mkimage.c: Likewise.
10989         * util/i386/pc/grub-mkrescue.in: Likewise.
10990         * util/i386/pc/grub-setup.c: Likewise.
10991         * util/i386/pc/misc.c: Likewise.
10992         * util/powerpc/ieee1275/grub-install.in: Likewise.
10993         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10994         * util/powerpc/ieee1275/misc.c: Likewise.
10995         * video/bitmap.c: Likewise.
10996         * video/video.c: Likewise.
10997         * video/i386/pc/vbe.c: Likewise.
10998         * video/i386/pc/vbeblit.c: Likewise.
10999         * video/i386/pc/vbefill.c: Likewise.
11000         * video/i386/pc/vbeutil.c: Likewise.
11001         * video/readers/tga.c: Likewise.
11003 2007-07-02  Robert Millan  <rmh@aybabtu.com>
11005         * conf/i386-efi.rmk: Replace obsolete reference to
11006         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11007         with util/getroot.c.
11008         * conf/powerpc-ieee1275.rmk: Likewise.
11009         * conf/sparc64-ieee1275.rmk: Likewise.
11011         * util/grub-emu.c (main): Fix unchecked pointer handling.
11013 2007-07-02  Robert Millan  <rmh@aybabtu.com>
11015         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11016         invocation to fail, in order to support partition-less media.
11018         * util/i386/pc/grub-install.in: Likewise.
11020         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11021         which fs or partmap modules are needed (akin to its sister scripts).
11023         Also use grub-probe to get rid of unportable /proc/mounts check.
11025         Print the same informational message that the other scripts do, before
11026         exiting.
11028 2007-06-23  Robert Millan  <rmh@aybabtu.com>
11030         * util/update-grub_lib.in (font_path): New function.  Determine whether
11031         a font file can be found and, if so, echo the GRUB path to it.
11033         * util/update-grub.in: Handle multiple terminals depending on user
11034         input, platform availability and font file presence.  Propagate
11035         variables of our findings to /etc/grub.d/ children.
11037         * util/grub.d/00_header.in: Handle multiple terminals, based on
11038         environment setup by update-grub.
11040 2007-06-23  Robert Millan  <rmh@aybabtu.com>
11042         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
11044 2007-06-21  Robert Millan  <rmh@aybabtu.com>
11046         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11047         indicate end of data section in kernel image.
11048         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11049         GRUB_KERNEL_MACHINE_DATA_END.
11051         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11052         space for it.
11053         * kern/i386/efi/startup.S: Likewise.
11055         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11056         during image generation.  Implement --prefix option to override this
11057         patch.
11058         * util/i386/efi/grub-mkimage.c: Likewise.
11060         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11061         code to make path relative to its root into a separate function.
11063         * util/i386/pc/grub-install.in: Use newly provided
11064         make_system_path_relative_to_its_root() to convert ${grubdir}, then
11065         pass the result to grub-install --prefix.
11067 2007-06-13  Robert Millan  <rmh@aybabtu.com>
11069         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11070         DEFAULT_DEVICE_MAP.
11071         * util/grub-emu.c: Use above definitions from misc.h instead of
11072         defining them.
11073         * util/grub-mkdevicemap.c: Likewise.
11074         * util/i386/pc/grub-setup.c: Likewise.
11075         * util/grub-probe.c: Likewise.
11076         (probe): Abort with grub_util_error() when either
11077         grub_guess_root_device or grub_util_get_grub_dev fails.
11079 2007-06-12  Robert Millan  <rmh@aybabtu.com>
11081         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11082         "pager" assignment.
11083         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11084         "pcdata".
11085         * util/grub-probe.c (probe): Likewise for "drive_name".
11087 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11089         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11090         not just the cdrom one.
11092 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11094         * util/i386/pc/grub-mkrescue.in: Add "set -e".
11095         Add --pkglibdir=DIR option to override pkglibdir.
11096         Mention --image-type=TYPE in help output.
11097         Fix --grub-mkimage (it was a no-op).
11098         Abort gracefully when no parameter is given.
11100 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11102         * util/i386/pc/grub-mkrescue.in: New file.
11103         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
11104         * Makefile.in: Handle bin_SCRIPTS.
11106 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
11108         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11109         list of video modes.
11111 2007-06-06  Robert Millan  <rmh@aybabtu.com>
11113         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11114         file doesn't exist, or if it is in a filesystem grub can't read.
11116         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
11117         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
11118         header comment to fit in 80 columns when the variables are resolved.
11120         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11121         could be identified by update-grub.  Remove redundant check for
11122         unifont.pff existence (since convert_system_path_to_grub_path now
11123         handles that).
11125 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11127         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11129         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11131         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11133 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11135         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11137         * include/grub/partition.h: Declare grub_apple_partition_map_init and
11138         grub_apple_partition_map_fini.
11140         * util/biosdisk.c
11141         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11142         to access >2 TiB disks).
11144         Print disk->total_sectors with %llu instead of %lu, since this
11145         variable is always 64-bit (prevents wrong disk size from being displayed
11146         on either >2 TiB disk or big-endian CPU).
11148         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11149         into a generic case that supports all (sane) partition maps.
11151         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11152         breaks big-endian.
11154         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11155         and grub_apple_partition_map_fini() after that.
11157 2007-06-01  Robert Millan  <rmh@aybabtu.com>
11159         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11161         * util/grub.d/00_header.in: Only enable gfxterm when
11162         convert_system_path_to_grub_path() succeeds.
11164 2007-05-20  Robert Millan  <rmh@aybabtu.com>
11166         * util/update-grub_lib.in: New file.
11167         * DISTLIST: Add update-grub_lib.in.
11168         * conf/common.rmk: Generate update-grub_lib and install it in
11169         $(lib_DATA).
11170         * Makefile.in: Add install routine for $(lib_DATA).
11172         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11173         function provided by update-grub_lib to support arbitrary paths of
11174         unifont.pff.
11175         * util/update-grub.in: Use convert_system_path_to_grub_path() to
11176         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11178 2007-05-19  Robert Millan  <rmh@aybabtu.com>
11180         * commands/i386/cpuid.c: New module.
11181         * DISTLIST: Add it.
11182         * conf/i386-efi.rmk: Enable cpuid.mod.
11183         * conf/i386-pc.rmk: Likewise.
11185 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11187         * kern/disk.c (grub_disk_read): Check return value of
11188         grub_realloc().
11190 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11192         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11193         arrays.
11194         * disk/raid.c (grub_raid_open): Likewise.
11196 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11198         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11199         stack instead of on the heap.
11201         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11202         before doing a read on it.
11204         * configure.ac: Only use -fno-stack-protector for the target
11205         environment.
11207 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11209         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11210         __attribute_ ((unused)) to mode_type argument.
11212         * util/getroot.c (grub_guess_root_device): Fix #endif.
11214         * kern/misc.c (memcmp): Fix prototype.
11216         * include/grub/partition.h [GRUB_UTIL]
11217         (grub_gpt_partition_map_init): Add prototype.
11218         (grub_gpt_partition_map_fini): Likewise.
11220         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11221         at the right place.
11223         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11224         (grub_fat_read_data): Likewise.
11225         (grub_fat_find_dir): Likewise.
11227         * font/manager.c (find_glyph): Make table a const.
11228         (grub_font_get_glyph): Remove bitmap from if statement.
11230 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
11232         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11233         code, first search for device in /dev/mapper, then in /dev.
11234         (grub_util_get_grub_dev): New function.
11235         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11236         prototype.
11237         * util/grub-probe.c (probe): Remove check for RAID, call
11238         grub_util_get_grub_dev() instead of
11239         grub_util_biosdisk_get_grub_dev().
11240         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11241         grub_util_biosdisk_get_grub_dev().
11242         * util/i386/pc/grub-setup.c (main): Likewise.
11244 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11246         * DISTLIST: Update for the latest changes.
11247         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11248         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11249         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11250         grub/util/biosdisk.h.
11251         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11252         grub/util/biosdisk.h.
11254 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11256         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11258 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11260         * util/i386/efi/grub-install.in: New.
11261         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11262         newly added grub-install.
11263         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11264         include.
11265         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11266         grub/util/biosdisk.h.
11267         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11268         grub/util/biosdisk.h.
11270 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11272         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11273         * include/grub/util/biosdisk.h: ... here.
11274         * util/i386/pc/biosdisk.c: Moved to ...
11275         * util/biosdisk.c: ... here.
11276         * util/i386/pc/getroot.c: Moved to ...
11277         * util/getroot.c: ... here.
11278         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11279         * util/grub-mkdevicemap.c: ... here.
11280         * util/i386/pc/grub-probe.c: Moved to ...
11281         * util/grub-probe.c: ... here.
11283 2007-05-15  Robert Millan  <rmh@aybabtu.com>
11285         * util/update-grub.in: Remove duplicated line in grub.cfg header
11286         message.
11288 2007-05-13  Robert Millan  <rmh@aybabtu.com>
11290         * util/update-grub.in: Fix a few assumptions about the devices holding
11291         /, /boot and /boot/grub being the same.
11292         * util/grub.d/00_header.in: Likewise.
11293         * util/grub.d/10_hurd.in: Likewise.
11294         * util/grub.d/10_linux.in: Likewise.
11296         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11297         patterns.  Use that to define the `.old' suffix as older than `'.
11299         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11301         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11302         the grub.cfg header message.
11304 2007-05-11  Robert Millan  <rmh@aybabtu.com>
11306         * util/update-grub.in: Create device.map if it doesn't already exist,
11307         before attempting to run grub-probe.
11308         Check for grub-probe and grub-mkdevicemap with the same code
11309         grub-install is using.
11310         Remove test mode.
11312 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11314         * Makefile.in: Add the datarootdir autoconf variable.
11316 2007-05-09  Robert Millan  <rmh@aybabtu.com>
11318         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11319         fail gracefully if dev->disk->partition == NULL.
11321 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11323         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11324         determine partition map module.
11325         * util/i386/pc/grub-install.in: Use this feature to decide which
11326         partition module to load, instead of hardcoding pc and gpt.
11328 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11330         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11331         source directory differs from build directory.
11333 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11335         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11336         initialisation.
11338 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11340         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11342 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11344         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11345         command-line arguments via ${GRUB_CMDLINE_LINUX}.
11347 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11349         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11350         (grub_probe_SOURCES): Likewise.
11351         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11352         GPT and initialize dos_part and bsd_part accordingly.
11353         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11354         install_bsd_part.
11355         (main): Activate gpt module for use during partition identification,
11356         and deactivate it afterwards.
11357         * util/i386/pc/grub-install.in: Add gpt module to core.img.
11358         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11359         partition identification, and deactivate it afterwards.
11361 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11363         * term/i386/pc/console.c (grub_console_fini): Call
11364         grub_term_set_current() before grub_term_unregister().
11366 2007-05-04  Robert Millan  <rmh@aybabtu.com>
11368         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11369         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11370         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
11371         and update-grub_DATA.
11372         * conf/common.rmk: Build and install update-grub components.
11373         * conf/common.mk: Regenerate.
11374         * util/update-grub.in: New.  Core of update-grub.
11375         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
11376         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
11377         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
11378         * util/grub.d/README: New.  Document grub.d directory layout.
11380 2007-05-01  Robert Millan  <rmh@aybabtu.com>
11382         * util/grub-emu.c: Move initialization functions
11383         grub_util_biosdisk_init() and grub_init_all() before
11384         grub_util_biosdisk_get_grub_dev(), which relies on them.
11386 2007-04-19  Robert Millan  <rmh@aybabtu.com>
11388         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11389         it is used later.
11391 2007-04-18  Jerone Young  <jerone@gmail.com>
11393         * kernel/elf.c: Add missing parenthesis for conditional statement
11394         stanza.
11396 2007-04-10  Jerone Young  <jerone@gmail.com>
11398         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11399         continue on and look for device node with real device name.
11401 2007-04-10  Jerone Young  <jerone@gmail.com>
11403         * configure.ac: Add argument for autoconf to use transformation
11404         ability.
11405         * Makefile.in: Add autoconf package transformation code.
11406         * util/i386/pc/grub-install.in: Likewise.
11407         * util/powerpc/ieee1275/grub-install.in: Likewise.
11409 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
11411         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11412         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11413         (EXT2_REVISION): Likewise.
11414         (EXT2_INODE_SIZE): Likewise.
11415         (struct grub_ext2_block_group): Added a missing member
11416         "used_dirs".
11417         (grub_ext2_read_inode): Divide by the inode size in a superblock
11418         instead of 128 to obtain INODES_PER_BLOCK.
11419         Use the macro EXT2_INODE_SIZE instead of directly using
11420         SBLOCK->INODE_SIZE.
11422 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
11424         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11425         superblock instead of the structure size to compute an
11426         offset. This fixes the problem that GRUB could not read a
11427         filesystem when inode size is different from 128-byte.
11429 2007-03-05  Marco Gerards  <marco@gnu.org>
11431         * normal/main.c (read_config_file): When "menu" is not set, create
11432         an initial context.
11434 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11436         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11437         (HEAP_LIMIT): New macro.
11438         (grub_claim_heap): Claim memory up to `heaplimit'.
11440 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11442         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11443         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11444         (_start): Likewise.
11445         (grub_arch_modules_addr): Return address after `_end'.
11446         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11447         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11448         (add_segments): Calculate `_end' from phdr size and location.
11449         (ALIGN_UP): Moved to ...
11450         * include/grub/misc.h: here.
11451         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11452         New macro.
11453         (GRUB_IEEE1275_MODULE_BASE): Removed.
11455 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11457         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11458         loop boundary.
11460 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11462         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11463         All users updated.
11464         (grub_elf64_load_hook_t): Likewise.
11465         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11466         debug output.
11468 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11470         * kern/mm.c: Update copyright.
11471         (grub_mm_debug): Correct syntax error.
11472         (grub_mm_dump_free): New function.
11473         (grub_debug_free): Call `grub_free'.
11474         * include/grub/mm.h: Update copyright.
11475         (grub_mm_dump_free): Add declaration.
11477 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11479         * include/grub/ieee1275/ieee1275.h: Update copyright.
11480         * kern/powerpc/ieee1275/init.c: Likewise.
11481         * kern/powerpc/ieee1275/openfw.c: Likewise.
11483         * loader/powerpc/ieee1275/linux.c: Likewise.
11484         * include/grub/elfload.h: Likewise.
11485         * kern/elf.c: Likewise.
11486         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
11487         callers.
11488         (grub_elf64_load): Likewise.
11489         (grub_elf32_load_segment): Move to a nested function.
11490         (grub_elf64_load_segment): Likewise.
11492 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11494         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11495         prototype.
11496         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11497         (grub_heap_len): Likewise.
11498         (HEAP_SIZE): New macro.
11499         (grub_claim_heap): New function.
11500         (grub_machine_init): Don't claim heap directly.  Call
11501         `grub_claim_heap'.
11502         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11503         (grub_available_iterate): New function.
11505 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
11507         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11508         * configure.ac: Use it for testing the HOST and TARGET compilers.
11510 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
11512         * Makefile.in (enable_grub_emu): New variable.
11513         * configure.ac (--enable-grub-emu): New option.
11514         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11515         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11516         * conf/i386-pc.rmk: Likewise.
11517         * conf/powerpc-ieee1275.rmk: Likewise.
11518         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11520 2006-12-12  Marco Gerards  <marco@gnu.org>
11522         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11524         * kern/env.c (grub_env_unset): Don't free the member `value' when
11525         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11526         pointer.
11528         * normal/main.c (current_menu): Removed.
11529         (free_menu): Unset the `menu' environment variable.
11530         (grub_normal_menu_addentry): Make use of the environment variable
11531         `menu', instead of using the global `current_menu'.  Allocate
11532         memory for the sourcecode of this entry.
11533         (read_config_file): New argument `nested', changed all callers.
11534         Only in the case of a new context, initialize a new menu.  Set the
11535         `menu' environment variable.
11536         (grub_normal_execute): Don't set and unset the environment
11537         variable `menu' here anymore.  Only free the menu when leaving the
11538         context.
11540         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11541         leak.
11543 2006-12-11  Marco Gerards  <marco@gnu.org>
11545         * normal/menu_entry.c (run): Fix off by one bug so the last line
11546         is executed.  Move the loader check to outside the loop.
11548 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
11550         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11552 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
11554         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11555         the number of sectors.  Reported by Andrey Shuvikov
11556         <mr_hyro@yahoo.com>.
11558 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
11560         * kern/disk.c (grub_disk_read): When there is a read error, always
11561         try to read only the necessary data.
11563         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11564         disk/raid.c.
11565         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11566         prototype.
11567         [GRUB_UTIL] (grub_raid_fini): Likewise.
11568         [GRUB_UTIL] (grub_lvm_init): Likewise.
11569         [GRUB_UTIL] (grub_lvm_fini): Likewise.
11570         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11571         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11572         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11573         and grub_raid_fini().
11575 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11577         * include/grub/types.h (__unused): Rename to UNUSED.
11578         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11579         (grub_elf64_size): Likewise.
11581 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11583         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11584         grub_error_push and grub_error_pop in the error-handling path.
11585         (grub_elf32_load_segment): Only call grub_file_read with non-zero
11586         length.
11588 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11590         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11591         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11592         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11593         (kernel_elf_SOURCES): Likewise.
11594         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11595         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11596         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11597         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11598         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11599         (elf_mod_SOURCES): New variable.
11600         (elf_mod_CFLAGS): Likewise.
11601         (elf_mod_LDFLAGS): Likewise.
11602         * include/grub/types.h (__unused): New macro.
11603         * include/grub/elfload.h: New file.
11604         * kern/elf.c: Likewise.
11605         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11606         (ELF32_LOADMASK): New macro.
11607         (ELF64_LOADMASK): Likewise.
11608         (vmlinux): Removed.
11609         (grub_linux_load32): New function.
11610         (grub_linux_load64): Likewise.
11611         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11612         Use grub_elf_t instead of grub_file_t.
11614 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11616         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11617         `catch_result' to struct set_color_args.
11619 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
11621         * normal/menu.c: Include grub/script.h.
11622         * normal/menu_entry.c: Likewise.
11623         * include/grub/normal.h: Do not include grub/script.h.
11625 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11627         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11629 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11631         * kern/disk.c (grub_disk_open): Print debug messages when opening a
11632         disk.
11633         (grub_disk_close): Print debug messages when closing a disk.
11634         (grub_disk_read): Print debug messages when disk read fails.
11635         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11636         filesystem type.
11637         * kern/partition.c: Include misc.h.
11638         (grub_partition_iterate): Print debug messages when detecting
11639         partition type.
11641 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11643         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11644         is negative.
11645         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11647 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
11649         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11650         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11652 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
11654         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11655         instead of sizeof(lv). Patch by Michael Guntsche.
11657 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11659         * disk/lvm.c: Rename VGS to VG_LIST.
11660         (grub_lvm_iterate): Change VGS->LV to VG-LV.
11661         (grub_lvm_open): Likewise.
11662         Thanks to Michael Guntsche for finding this bug.
11664 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11666         * configure.ac (AC_INIT): Bumped to 1.95.
11668 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11670         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11671         with "/dev/.static/dev/md".
11673 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11675         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11676         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11677         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11678         DRIVE_NAME are always freed.
11680         * util/i386/pc/biosdisk.c (make_device_name): Add one into
11681         DOS_PART, as a DOS partition is counted from one instead of zero
11682         now. Reported by Robert Millan.
11684 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11686         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11687         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11688         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11689         string returned by grub_guess_root_device.
11690         * util/i386/pc/grub-setup.c: Likewise.
11691         * util/i386/pc/grub-probefs.c: Likewise.
11693         * util/i386/pc/grub-probefs.c: Rename to ...
11694         * util/i386/pc/grub-probe.c: ... this.
11695         * DISTLIST: Remove grub-probefs, add grub-probe.
11696         * conf/i386-efi.rmk: Likewise.
11697         * conf/i386-pc.rmk: Likewise.
11698         * util/i386/pc/grub-install.in: Likewise.
11700         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11701         choose which information we want to print.
11703 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11705         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11706         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11707         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11708         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11709         video/readers/tga.c and video/i386/pc/vbeutil.c.
11711 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11713         Added support for RAID and LVM.
11715         * disk/lvm.c: New file.
11716         * disk/raid.c: Likewise.
11717         * include/grub/lvm.h: Likewise.
11718         * include/grub/raid.h: Likewise.
11719         * include/grub/util/lvm.h: Likewise.
11720         * include/grub/util/raid.h: Likewise.
11721         * util/lvm.c: Likewise.
11722         * util/raid.c: Likewise.
11724         * include/grub/disk.h (grub_disk_dev_id): Add
11725         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11726         (grub_disk_get_size): New prototype.
11727         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11728         returns a partition.
11729         (grub_disk_get_size): New function.
11731         * kern/i386/pc/init.c (make_install_device): Copy the prefix
11732         verbatim if grub_install_dos_part is -2.
11734         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11735         and LVM devices.
11737         * util/i386/pc/grub-setup.c (setup): New argument
11738         MUST_EMBED. Force embedding of GRUB when the argument is
11739         true. Close FILE before returning.
11740         (main): Add support for RAID and LVM.
11742         * conf/common.rmk: Add RAID and LVM modules.
11743         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11744         util/lvm.c.
11745         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11747         * kern/misc.c (grub_strstr): New function.
11748         * include/grub/misc.h (grub_strstr): New prototype.
11750 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
11752         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11754 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
11756         * kern/misc.c (grub_strtoull): Guess the base only if not
11757         specified.
11759 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11761         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11762         PowerMac support.
11764 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11766         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11768         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11769         Remove `flags' argument.  All callers changed.
11770         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11771         (IEEE1275_IHANDLE_INVALID): New variable.
11772         (IEEE1275_CELL_INVALID): New variable.
11773         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11774         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11775         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11776         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11777         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11778         codes from Open Firmware.  All callers updated.
11779         (grub_ieee1275_next_property): Directly return Open Firmware return
11780         code.
11781         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11782         Standardize error checking from `grub_ieee1275_get_property'.
11783         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11784         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
11786 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11788         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11789         `instance_to_package_args' to `instance_to_path_args'.
11791         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11792         `grub_ieee1275_chosen'.
11794         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11795         `grub_ieee1275_interpret'.
11797 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11799         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11801 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11803         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11804         (__cmpdi): Likewise.
11806         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11807         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
11808         `grub_ssize_t'.
11810         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11812         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11813         to type `grub_ssize_t'.
11814         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11816 2006-09-22  Marco Gerards  <marco@gnu.org>
11818         * normal/script.c (grub_script_create_cmdmenu): Skip leading
11819         newlines.
11821 2006-09-22  Marco Gerards  <marco@gnu.org>
11823         * commands/echo.c: New file.
11825         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11827         * conf/common.rmk (echo_mod_SOURCES): New variable.
11828         (echo_mod_CFLAGS): Likewise.
11829         (echo_mod_LDFLAGS): Likewise.
11831 2006-09-22  Marco Gerards  <marco@gnu.org>
11833         * normal/main.c (get_line): Malloc memory instead of using
11834         preallocated memory.  Removed the arguments `cmdline' and
11835         `max_len'.  Updated all callers.
11837 2006-09-22  Marco Gerards  <marco@gnu.org>
11839         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11840         (normal_mod_DEPENDENCIES): Likewise.
11842         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11843         (normal_mod_DEPENDENCIES): Likewise.
11845         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11847 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
11849         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11850         programs.
11851         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11852         (normal_mod_DEPENDENCIES): Likewise.
11853         * conf/i386-pc.mk: Regenerate.
11854         * conf/i386-efi.mk: Likewise
11855         * conf/common.mk: Likewise.
11856         * conf/powerpc-ieee1275.mk: Likewise.
11857         * conf/sparc64-ieee1275.mk: Likewise.
11859 2006-09-22  Robert Millan  <rmh@aybabtu.com>
11861         Sync with i386 version.
11862         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11863         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11865 2006-09-21  Robert Millan  <rmh@aybabtu.com>
11867         Import from GRUB Legacy (lib/device.c):
11868         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11869         (init_device_map) [__linux__]: Add support for I2O devices.
11871 2006-09-14  Marco Gerards  <marco@gnu.org>
11873         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11874         `-melf_i386'.
11876 2006-09-14  Robert Millan  <rmh@aybabtu.com>
11878         * util/i386/pc/grub-install.in: Skip menu.lst when removing
11879         /boot/grub/*.lst.
11881         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11883         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11884         before adding it to device.map.
11886 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
11888         * genmk.rb: Let GCC generate dependencies the first time it
11889         compiles a file; using the -MD option.
11890         * conf/common.mk: Regenerate.
11891         * conf/i386-pc.mk: Likewise.
11892         * conf/i386-efi.mk: Likewise.
11893         * conf/powerpc-ieee1275.mk: Likewise.
11894         * conf/sparc64-ieee1275.mk: Likewise.
11896 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
11898         Move the prototypes of grub_setjmp and grub_longjmp to
11899         cpu/setjmp.h, so that each architecture may specify different
11900         attributes.
11902         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11903         (grub_longjmp): Likewise.
11904         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11905         (grub_longjmp): Likewise.
11906         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11907         (grub_longjmp): Likewise.
11909         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11910         [!GRUB_UTIL] (grub_longjmp): Removed.
11912 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
11914         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11915         "color!" method does not return any value.
11917 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11919         * include/grub/bitmap.h: New file.
11921         * include/grub/i386/pc/vbeutil.h: Likewise.
11923         * video/bitmap.c: Likewise.
11925         * video/readers/tga.c: Likewise.
11927         * video/i386/pc/vbeutil.c: Likewise.
11929         * commands/videotest.c: Code cleanup and updated to reflect to new
11930         video API.
11932         * term/gfxterm.c: Likewise.
11934         * video/video.c: Likewise.
11936         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11937         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11938         (bitmap_mod_SOURCES): New entry.
11939         (bitmap_mod_CFLAGS): Likewise.
11940         (bitmap_mod_LDFLAGS): Likewise.
11941         (tga_mod_SOURCES): Likewise.
11942         (tga_mod_CFLAGS): Likewise.
11943         (tga_mod_LDFLAGS): Likewise.
11945         * include/grub/video.h (grub_video_blit_operators): New enum type.
11946         (grub_video_render_target): Changed as forward declaration and moved
11947         actual definition to be video driver specific.
11948         (grub_video_adapter.blit_bitmap): Added blitting operator.
11949         (grub_video_adapter.blit_render_target): Likewise.
11950         (grub_video_blit_bitmap): Likewise.
11951         (grub_video_blit_render_target): Likewise.
11953         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11954         driver specific render target definition.
11955         (grub_video_vbe_map_rgba): Added driver internal helper.
11956         (grub_video_vbe_unmap_color): Updated to use
11957         grub_video_i386_vbeblit_info.
11958         (grub_video_vbe_get_video_ptr): Likewise.
11960         * include/grub/i386/pc/vbeblit.h
11961         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11962         grub_video_i386_vbeblit_info.
11963         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11964         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11965         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11966         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11967         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11968         (grub_video_i386_vbeblit_index_index): Likewise.
11969         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11970         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11971         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11972         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11973         operator.
11974         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11975         operator.
11977         * video/i386/pc/vbeblit.c: Updated to reflect changes on
11978         include/grub/i386/pc/vbeblit.h.
11980         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11981         Updated to use grub_video_i386_vbeblit_info.
11982         (grub_video_i386_vbefill_R8G8B8): Likewise.
11983         (grub_video_i386_vbefill_index): Likewise.
11984         (grub_video_i386_vbefill): Added generic filler.
11986         * video/i386/pc/vbefill.c: Updated to reflect changes on
11987         include/grub/i386/pc/vbefill.h.
11989         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11990         grub_video_i386_vbeblit_info.
11991         (grub_video_vbe_unmap_color): Likewise.
11992         (grub_video_vbe_blit_glyph): Likewise.
11993         (grub_video_vbe_scroll): Likewise.
11994         (grub_video_vbe_draw_pixel): Removed function.
11995         (grub_video_vbe_get_pixel): Likewise.
11996         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11997         updated code to use it.
11998         (common_blitter): Added common blitter for render target and bitmap.
11999         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12000         (grub_video_vbe_blit_render_target): Likewise.
12002 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
12004         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12005         is in text mode if there is no console control protocol instance
12006         available.
12008 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12010         * include/grub/video.h: Code cleanup.
12012         * include/grub/i386/pc/vbe.h: Likewise.
12014         * video/i386/pc/vbe.c: Likewise.
12016         * video/i386/pc/vbeblit.c: Likewise.
12018         * video/i386/pc/vbefill.c: Likewise.
12020         * video/video.c: Likewise.  Also added more comments.
12022 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12024         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12025         (struct grub_biosdisk_dap): Likewise.
12027         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
12028         linkage settings for all functions.
12030 2006-07-12  Marco Gerards  <marco@gnu.org>
12032         * configure.ac (--enable-mm-debug): Fix typo.
12034         * genkernsyms.sh.in: Use proper quoting for `CC'.
12036 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
12038         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12039         (normal_mod_ASFLAGS): Remove "-m32".
12041 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
12043         * util/misc.c: Include config.h.
12044         [!HAVE_MEMALIGN]: Do not include malloc.h.
12045         (grub_memalign): Use posix_memalign, if present. Then, use
12046         memalign, if present. Otherwise, emit an error.
12048         * util/grub-emu.c: Do not include malloc.h.
12050         * include/grub/util/misc.h: Include unistd.h. This is required for
12051         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12052         D. Eades III <hde@foobar-qux.org>.
12054         * configure.ac (AC_GNU_SOURCE): Added.
12055         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12056         type.
12058 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
12060         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12061         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12063 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
12065         * include/grub/types.h (grub_host_addr_t): Rename to
12066         grub_target_addr_t.
12067         (grub_host_off_t): Rename to grub_target_off_t.
12068         (grub_host_size_t): Rename to grub_target_size_t.
12069         (grub_host_ssize_t): Rename to grub_target_ssize_t.
12070         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12072         * include/grub/kernel.h (struct grub_module_header): Change type
12073         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12074         (grub_module_info): Likewise.
12076 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12078         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12079         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12080         Velazquez <jesus.velazquez@gmail.com>.
12082 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12084         Count partitions from 1 instead of 0 in the string representation
12085         of partitions. Still use 0-based internally.
12087         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12088         (sun_partition_map_iterate): Use grub_partition_t instead of
12089         struct grub_partition *. Cast DESC->START_CYLINDER to
12090         grub_uint64_t after converting the endian.
12091         (sun_partition_map_probe): Subtract 1 for PARTNUM.
12092         (sun_partition_map_get_name): Add 1 to P->INDEX.
12094         * partmap/pc.c (grub_partition_parse): Subtract 1 for
12095         PCDATA->DOS_PART.
12096         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12098         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12099         zero instead of one.
12100         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12101         (gpt_partition_map_get_name): Add 1 into P->INDEX.
12103         * partmap/apple.c (apple_partition_map_iterate): Change the type
12104         of POS to unsigned.
12105         (apple_partition_map_probe): Subtract 1 for PARTNUM.
12106         (apple_partition_map_get_name): Add 1 into P->INDEX.
12108         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12109         of POS to unsigned.
12110         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12111         calculate the offset of a partition.
12112         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12113         (amiga_partition_map_get_name): Add 1 into P->INDEX.
12115         * partmap/acorn.c (acorn_partition_map_find): Change the type of
12116         SECTOR to grub_disk_addr_t.
12117         (acorn_partition_map_iterate): Likewise.
12118         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12119         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12120         top.
12121         (acorn_partition_map_get_name): Add 1 into P->INDEX.
12123         * kern/i386/pc/init.c (make_install_device): Add 1 into
12124         GRUB_INSTALL_DOS_PART.
12126         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12127         conditional.
12129 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12131         Clean up the code to support 64-bit addressing in disks and
12132         files. This change is not enough for filesystems yet.
12134         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12135         type of "start" to grub_uint64_t.
12136         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12137         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12138         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12139         convert addresses.
12141         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12142         to grub_disk_addr_t.
12144         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12145         string.
12147         * partmap/pc.c (pc_partition_map_iterate): Likewise.
12149         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12150         to char *.
12152         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12154         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12156         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12158         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12159         to grub_off_t, to detect an error from grub_file_seek.
12160         (grub_multiboot_load_elf32): Likewise.
12162         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12163         maximum unsigned long value when an overflow is detected.
12164         (grub_strtoull): New function.
12165         (grub_divmod64): Likewise.
12166         (grub_lltoa): use grub_divmod64.
12168         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12169         grub_disk_addr_t.
12170         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12171         the pointer to next character. Use grub_strtoull instead of
12172         grub_strtoul.
12173         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12174         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12175         respectively.
12177         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12178         return value is signed.
12179         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12180         test if OFFSET is less than zero, as OFFSET is unsigned now.
12182         * kern/disk.c (struct grub_disk_cache): Change the type of
12183         "sector" to grub_disk_addr_t.
12184         (grub_disk_cache_get_index): Change the type of SECTOR to
12185         grub_disk_addr_t. Calculate the hash with SECTOR casted to
12186         unsigned after shifting.
12187         (grub_disk_cache_invalidate): Change the type of SECTOR to
12188         grub_disk_addr_t.
12189         (grub_disk_cache_unlock): Likewise.
12190         (grub_disk_cache_store): Likewise.
12191         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12192         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12193         grub_disk_addr_t and grub_uint64_t, respectively.
12194         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12195         body, as the value of OFFSET is tweaked by
12196         grub_disk_check_range. Change the types of START_SECTOR, LEN and
12197         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12198         respectively.
12199         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12200         body, as the value of OFFSET is tweaked by
12201         grub_disk_check_range. Change the types of LEN and N to
12202         grub_size_t.
12204         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12205         and "saved_offset" to grub_off_t.
12206         (test_header): Cast BUF to char *.
12207         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12208         to char *.
12209         (grub_gzio_read): Change the types of OFFSET and SIZE to
12210         grub_off_t and grub_size_t, respectively.
12212         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12213         Removed.
12214         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12215         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12216         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12217         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12218         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12220         * include/grub/types.h (grub_off_t): Unconditionally set to
12221         grub_uint64_t.
12222         (grub_disk_addr_t): Changed to grub_uint64_t.
12224         * include/grub/partition.h (struct grub_partition): Change the
12225         types of "start", "len" and "offset" to grub_disk_addr_t,
12226         grub_uint64_t and grub_disk_addr_t, respectively.
12227         (grub_partition_get_start): Return grub_disk_addr_t.
12228         (grub_partition_get_len): Return grub_uint64_t.
12230         * include/grub/misc.h (grub_strtoull): New prototype.
12231         (grub_divmod64): Likewise.
12233         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12234         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12235         grub_off_t, respectively.
12236         All callers and references changed.
12238         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12239         grub_size_t in "read".
12240         All callers and references changed.
12242         * include/grub/file.h (struct grub_file): Change the types of
12243         "offset" and "size" to grub_off_t and grub_off_t,
12244         respectively. Change the type of SECTOR to grub_disk_addr_t in
12245         "read_hook".
12246         (grub_file_read): Change the type of LEN to grub_size_t.
12247         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12248         grub_off_t.
12249         (grub_file_size): Return grub_off_t.
12250         (grub_file_tell): Likewise.
12251         All callers and references changed.
12253         * include/grub/disk.h (struct grub_disk_dev): Change the types of
12254         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12255         "write".
12256         (struct grub_disk): Change the type of "total_sectors" to
12257         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12258         "read_hook".
12259         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12260         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12261         (grub_disk_write): Likewise.
12262         All callers and references changed.
12264         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12265         char * for grub_strncmp to silence gcc.
12266         (grub_iso9660_mount): Likewise.
12267         (grub_iso9660_mount): Likewise.
12268         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12269         return statement.
12270         (grub_iso9660_iterate_dir): Likewise.
12271         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12273         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12274         LEN to grub_disk_addr_t and grub_size_t, respectively.
12276         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12278         * fs/jfs.c (grub_jfs_read_file): Likewise.
12280         * fs/minix.c (grub_jfs_read_file): Likewise.
12282         * fs/sfs.c (grub_jfs_read_file): Likewise.
12284         * fs/ufs.c (grub_jfs_read_file): Likewise.
12286         * fs/xfs.c (grub_jfs_read_file): Likewise.
12288         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12289         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12290         respectively.
12292         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12293         BLKNR to -1 instead of returning GRUB_ERRNO.
12294         (grub_ext2_read_file): Change the types of SECTOR and
12295         LEN to grub_disk_addr_t and grub_size_t, respectively.
12297         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12298         LEN to grub_disk_addr_t and grub_size_t, respectively.
12300         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12301         grub_file_read.
12303         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12304         string. Do not cast SECTOR explicitly.
12306         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12307         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12308         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12309         grub_disk_addr_t and grub_size_t, respectively. If the sector is
12310         over 2TB and LBA mode is not supported, raise an error.
12311         (get_safe_sectors): New function.
12312         (grub_biosdisk_read): Use get_safe_sectors.
12313         (grub_biosdisk_write): Likewise.
12315         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12316         (grub_efidisk_write): Likewise.
12318         * disk/loopback.c (delete_loopback): Cosmetic changes.
12319         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12320         correctly.
12321         (grub_loopback_open): Likewise.
12322         (grub_loopback_read): Likewise. Also, change the type of POS to
12323         grub_off_t, and fix the usage of grub_memset.
12325         * commands/i386/pc/play.c: Include grub/machine/time.h.
12327         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12328         print FILE->SIZE.
12330         * commands/configfile.c: Include grub/env.h.
12332         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12333         GRUB_ERRNO directly instead. Change the type of POS to
12334         grub_off_t. Follow the coding standard.
12336         * commands/blocklist.c: Include grub/partition.h.
12337         (grub_cmd_blocklist): Return an error if the underlying device is
12338         not a disk. Take the starting sector of a partition into account,
12339         if a partition is used.
12341         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12342         a length field.
12343         (lba_mode): Support 64-bit addresses.
12344         (chs_mode): Likewise.
12345         (copy_buffer): Adapted to the new offsets of a length field and a
12346         segment field.
12347         (blocklist_default_start): Allocate 64-bit space.
12349         * boot/i386/pc/boot.S (force_lba): Removed.
12350         (boot_drive): Moved to under KERNEL_SECTOR.
12351         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12352         space.
12353         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12354         is useless.
12355         (lba_mode): Refactored to support a 64-bit address. More size
12356         optimization.
12357         (setup_sectors): Likewise.
12359 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12361         * DISTLIST: Added include/grub/i386/linux.h. Removed
12362         include/grub/i386/pc/linux.h
12364         * configure.ac (AC_INIT): Bumped to 1.94.
12366         * config.guess: Updated from gnulib.
12367         * config.sub: Likewise.
12368         * install-sh: Likewise.
12369         * mkinstalldirs: Likewise.
12371 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12373         * conf/common.rmk (grub_modules_init.lst): Depended on
12374         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12375         MODSRCFILES.
12377         * genmk.rb (PModule::rule): Reverted the previous change.
12379 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12381         * conf/common.rmk (grub_modules_init.lst): Depends on
12382         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12383         that the target does not exist before producing.
12384         (grub_modules_init.h): Remove the target before generating.
12385         (grub_emu_init.c): Likewise.
12387         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12389 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
12391         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12392         for the target-specific tests. Make sure that we also have the
12393         up-to-date target variables for those tests.
12395 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12397         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12398         (PModule::rule): Likewise.
12400 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12402         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12403         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12404         target-specific flags should be prefixed.
12405         (PModule::rule): Likewise.
12407 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
12409         * configure.ac (CMP): Check if cmp is available explicitly.
12411 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
12413         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12414         (target_cpu): New variable.
12415         (pkglibdir): Use target_cpu instead of host_cpu.
12417         * util/i386/pc/grub-install.in (host_cpu): Removed.
12418         (target_cpu): New variable.
12419         (pkglibdir): Use target_cpu instead of host_cpu.
12421         * util/genmoddep.c: Removed.
12423         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12424         instead of GRUB_HOST_SIZEOF_VOID_P.
12425         * kern/dl.c: Likewise.
12427         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12428         ...
12429         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12430         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12431         (GRUB_TARGET_SIZEOF_LONG): ... this.
12432         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12433         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12434         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12435         to ...
12436         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12437         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12438         (GRUB_TARGET_SIZEOF_LONG): ... this.
12439         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12440         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12441         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12442         to ...
12443         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12444         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12445         (GRUB_TARGET_SIZEOF_LONG): ... this.
12446         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12447         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12449         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12450         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12451         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12452         instead of GRUB_HOST_SIZEOF_LONG.
12453         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12454         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12455         GRUB_CPU_WORDS_BIGENDIAN.
12456         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12457         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12458         grub_host_ssize_t.
12460         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12461         (genmoddep_SOURCES): Likewise.
12462         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12463         (genmoddep_SOURCES): Likewise.
12464         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12465         (genmoddep_SOURCES): Likewise.
12466         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12467         Likewise.
12468         (genmoddep_SOURCES): Likewise.
12470         * genmoddep.awk: New file.
12472         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12473         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12474         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12475         (PModule::rule): Likewise.
12476         (Program::rule): Likewise.
12477         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12478         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12479         respectively.
12481         * configure.ac: Rewritten intensively to use host and target
12482         instead of build and host, respectively.
12484         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12485         (host_cpu): Removed.
12486         (target_cpu): New variable.
12487         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12488         (BUILD_CC): Removed.
12489         (BUILD_CFLAGS): Likewise.
12490         (BUILD_CPPFLAGS): Likewise.
12491         (TARGET_CC): New variable.
12492         (TARGET_CFLAGS): Likewise.
12493         (TARGET_CPPFLAGS): Likewise.
12494         (TARGET_LDFLAGS): Likewise.
12495         (AWK): Likewise.
12496         (include): Use target_cpu instead of host_cpu.
12497         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12499         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12501 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
12503         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12504         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
12505         field 'false' to 'exec_on_false'.
12506         (grub_script_create_cmdif): Renamed argument names to reflect above
12507         changes.
12509         * normal/execute.c (grub_script_execute_cmdif): Likewise.
12511         * normal/script.c (grub_script_create_cmdif): Likewise.
12513 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
12515         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12516         top.
12517         (grub_hfsplus_btree_recptr): Likewise.
12518         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12519         FILEBLOCK both to pass a block number and store next block
12520         number.
12521         (grub_hfsplus_read_block): Rewritten heavily to support an extent
12522         overflow file correctly. Specify errors appropriately, because
12523         fshelp expects that GRUB_ERRNO is set when fails. Reuse
12524         grub_hfsplus_btree_recptr to get the pointer to a found key.
12525         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12526         is found.
12528         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12529         linux.mod.
12530         (_linux_mod_SOURCES): New variable.
12531         (_linux_mod_CFLAGS): Likewise.
12532         (_linux_mod_LDFLAGS): Likewise.
12533         (linux_mod_SOURCES): Likewise.
12534         (linux_mod_CFLAGS): Likewise.
12535         (linux_mod_LDFLAGS): Likewise.
12537         * DISTLIST: Added loader/i386/efi/linux.c,
12538         loader/i386/efi/linux_normal.c and
12539         include/grub/i386/efi/loader.h.
12541         * loader/i386/efi/linux.c: New file.
12542         * loader/i386/efi/linux_normal.c: Likewise.
12543         * include/grub/i386/efi/loader.h: Likewise.
12545 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
12547         * commands/blocklist.c: New file.
12549         * DISTLIST: Added commands/blocklist.c.
12551         * term/efi/console.c (grub_console_highlight_color): Use a lighter
12552         color for the background, and a darker color for the foreground.
12553         (grub_console_checkkey): Return READ_KEY.
12554         (grub_console_cls): Set the background to
12555         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12557         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12559         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12560         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12562         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12563         prototype.
12565         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12566         BG. The spec is wrong again.
12568         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12569         prototype.
12570         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12572         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12573         commands/blocklist.c.
12574         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12576         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12577         (blocklist_mod_SOURCES): New variable.
12578         (blocklist_mod_CFLAGS): Likewise.
12579         (blocklist_mod_LDFLAGS): Likewise.
12581 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
12583         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12584         duplication.
12585         (lba_mode): Use %eax more intensively to reduce the code size.
12587 2006-05-20  Marco Gerards  <marco@gnu.org>
12589         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12591         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
12592         for `menuentry'.
12593         (script): Accept leading newlines.
12594         (newlines): New rule to describe 0 or more newlines.
12595         (commands): Accept `command' with trailing newline.  Fixed the
12596         order in which arguments were passed to `grub_script_add_cmd'.
12597         Accept commands separated by newlines.
12598         (function): Changed to accept newlines.
12599         (menuentry) Rewritten.
12601         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12602         front of the list, instead of to the end.
12604 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
12606         * util/i386/pc/grub-install.in (bindir): New variable.
12607         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12608         Shaver <lbgwjl@gmail.com>.
12610 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
12612         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12613         grub/machine/linux.h
12614         * loader/i386/pc/linux.c: Likewise.
12616         * include/grub/i386/pc/linux.h: Moved to ...
12617         * include/grub/i386/linux.h: ... here.
12619         * include/grub/i386/linux.h (struct linux_kernel_params): New
12620         struct.
12622 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
12624         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12625         checking.
12626         (grub_video_vbe_blit_glyph): Likewise.
12627         (grub_video_vbe_blit_bitmap): Likewise.
12628         (grub_video_vbe_blit_render_target): Likewise.
12630 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
12632         * configure.ac (--with-platform): Properly quote the square
12633         brackets.
12635 2006-05-08  Marco Gerards  <marco@gnu.org>
12637         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12638         this...
12639         (kernel_elf_HEADERS): ...to this.  Updated all users.
12640         (grubof_symlist.c): Renamed from this...
12641         (kernel_elf_symlist.c): ...to this.  Updated all users.
12642         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12643         (grubof_SOURCES): Renamed from this...
12644         (kernel_elf_SOURCES): ...to this.
12645         (grubof_HEADERS): Renamed from this...
12646         (kernel_elf_HEADERS): ...to this.
12647         (grubof_CFLAGS): Renamed from this...
12648         (kernel_elf_CFLAGS): ...to this.
12649         (grubof_ASFLAGS): Renamed from this...
12650         (kernel_elf_ASFLAGS): ...to this.
12651         (grubof_LDFLAGS): Renamed from this...
12652         (kernel_elf_LDFLAGS): ...to this.
12654         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12655         this...
12656         (kernel_elf_HEADERS): ...to this.  Updated all users.
12657         (grubof_symlist.c): Renamed from this...
12658         (kernel_elf_symlist.c): ...to this.  Updated all users.
12659         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12660         (grubof_SOURCES): Renamed from this...
12661         (kernel_elf_SOURCES): ...to this.
12662         (grubof_HEADERS): Renamed from this...
12663         (kernel_elf_HEADERS): ...to this.
12664         (grubof_CFLAGS): Renamed from this...
12665         (kernel_elf_CFLAGS): ...to this.
12666         (grubof_ASFLAGS): Renamed from this...
12667         (kernel_elf_ASFLAGS): ...to this.
12668         (grubof_LDFLAGS): Renamed from this...
12669         (kernel_elf_LDFLAGS): ...to this.
12671         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12672         `kernel.elf' instead of `grubof'.
12674 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
12676         Add --with-platform to configure. Use pkglibdir instead of
12677         pkgdatadir. This is reported by Roger Leigh.
12679         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12680         (host_vendor): Likewise.
12681         (host_os): Likewise.
12682         (pkgdatadir): Likewise.
12683         (platform): New variable.
12684         (pkglibdir): Likewise.
12685         Use PKGLIBDIR instead of PKGDATADIR.
12687         * util/i386/pc/grub-install.in (datadir): Removed.
12688         (host_vendor): Likewise.
12689         (host_os): Likewise.
12690         (pkgdatadir): Likewise.
12691         (platform): New variable.
12692         (pkglibdir): Likewise.
12693         Use PKGLIBDIR instead of PKGDATADIR.
12695         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12696         instead of GRUB_DATADIR.
12697         (main): Likewise.
12698         * util/i386/pc/grub-mkimage.c (usage): Likewise.
12699         (main): Likewise.
12700         * util/i386/efi/grub-mkimage.c (usage): Likewise.
12701         (main): Likewise.
12703         * configure.ac (--with-platform): New option.
12704         Use PLATFORM instead of HOST_VENDOR to specify a platform.
12706         * Makefile.in: Include a makefile based on PLATFORM instead of
12707         HOST_VENDOR.
12708         (pkgdatadir): Not appended by the machine type.
12709         (pkglibdir): Appended by the machine type.
12710         (host_vendor): Removed.
12711         (platform): New variable.
12712         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12713         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12714         (uninstall): Likewise.
12716 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
12718         Use the environment context in the menu. Remove the commands
12719         "default" and "timeout", and use variables instead.
12721         * normal/menu.c: Include grub/env.h.
12722         (print_entry): Cast TITLE to silence gcc.
12723         (get_timeout): New function.
12724         (set_timeout): Likewise.
12725         (get_entry_number): Likewise.
12726         (run_menu): Use a default entry, a fallback entry and a timeout
12727         in the environment variables "default", "fallback" and
12728         "timeout". Also, tweak the default entry if it is not within the
12729         current menu entries.
12730         (grub_menu_run): Use a fallback entry in the environment variable
12731         "fallback".
12733         * normal/main.c (read_config_file): Do not initialize
12734         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12735         NEWMENU->TIMEOUT.
12736         (grub_normal_execute): Use a data slot to store the menu.
12738         * include/grub/normal.h (struct grub_menu): Removed default_entry,
12739         fallback_entry and timeout.
12740         (struct grub_menu_list): Removed.
12741         (grub_menu_list_t): Likewise.
12742         (struct grub_context): Likewise.
12743         (grub_context_t): Likewise.
12744         (grub_context_get): Likewise.
12745         (grub_context_get_current_menu): Likewise.
12746         (grub_context_push_menu): Likewise.
12747         (grub_context_pop_menu): Likewise.
12748         (grub_default_init): Likewise.
12749         (grub_default_fini): Likewise.
12750         (grub_timeout_init): Likewise.
12751         (grub_timeout_fini): Likewise.
12753         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12754         and timeout.mod.
12755         (normal_mod_SOURCES): Removed normal/context.c.
12757         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12758         commands/default.c, commands/timeout.c and normal/context.c.
12759         (normal_mod_SOURCES): Removed normal/context.c.
12761         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12762         commands/timeout.c and normal/context.c.
12763         (normal_mod_SOURCES): Removed normal/context.c.
12765         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12766         commands/default.c, commands/timeout.c and normal/context.c.
12767         (normal_mod_SOURCES): Removed normal/context.c.
12769         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12770         timeout.mod.
12771         (default_mod_SOURCES): Removed.
12772         (default_mod_CFLAGS): Likewise.
12773         (default_mod_LDFLAGS): Likewise.
12774         (timeout_mod_SOURCES): Removed.
12775         (timeout_mod_CFLAGS): Likewise.
12776         (timeout_mod_LDFLAGS): Likewise.
12778         * DISTLIST: Removed commands/default.c, commands/timeout.c and
12779         normal/context.c.
12781         * commands/default.c: Removed.
12782         * commands/timeout.c: Likewise.
12783         * normal/context.c: Likewise.
12785 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
12787         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12789 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
12791         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12792         "next" to "prev" for readability.
12793         (struct grub_env_sorted_var): New struct.
12794         (grub_env_context): Renamed to ...
12795         (initial_context): ... this.
12796         (grub_env_var_context): Renamed to ...
12797         (current_context): ... this.
12798         (grub_env_find): Look only at CURRENT_CONTEXT.
12799         (grub_env_context_open): Rewritten to copy exported variables from
12800         previous context.
12801         (grub_env_context_close): Rewritten according to the new
12802         scheme. Also, add an assertion to prevent the initial context from
12803         removed.
12804         (grub_env_insert): Removed the code for the sorted list.
12805         (grub_env_remove): Likewise.
12806         (grub_env_export): Simply mark the variable with
12807         GRUB_ENV_VAR_GLOBAL.
12808         (grub_env_set): A cosmetic change for naming consistency.
12809         (grub_env_get): Likewise.
12810         (grub_env_unset): Likewise.
12811         (grub_env_iterate): Rewritten to sort variables within this
12812         function.
12813         (grub_register_variable_hook): Fixed for naming consistency. Call
12814         grub_env_find again, only if NAME is not found at the first time.
12815         (mangle_data_slot_name): New function.
12816         (grub_env_set_data_slot): Likewise.
12817         (grub_env_get_data_slot): Likewise.
12818         (grub_env_unset_data_slot): Likewise.
12820         * include/grub/env.h (grub_env_var_type): New enum.
12821         (GRUB_ENV_VAR_LOCAL): New constant.
12822         (GRUB_ENV_VAR_GLOBAL): Likewise.
12823         (GRUB_ENV_VAR_DATA): Likewise.
12824         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12825         "type".
12826         (grub_env_set): Replace VAR with NAME for consistency.
12827         (grub_register_variable_hook): Likewise.
12828         (grub_env_export): Specify the name of the argument.
12829         (grub_env_set_data_slot): New prototype.
12830         (grub_env_get_data_slot): Likewise.
12831         (grub_env_unset_data_slot): Likewise.
12833 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12835         Extend the loader so that GRUB can accept a loader which comes
12836         back to GRUB when a loaded image exits. Also, this change adds
12837         support for a chainloader on EFI.
12839         * term/efi/console.c: Include grub/misc.h.
12840         (grub_console_checkkey): Display a scan code on the top for
12841         debugging. This will be removed once the EFI port gets stable.
12842         Correct the scan code mapping.
12844         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12845         allocate memory from larger regions, in order to reduce the number
12846         of allocated regions. Otherwise, the MacOSX loader panics.
12847         (filter_memory_map): Avoid less than 1MB for compatibility with
12848         other loaders.
12849         (add_memory_regions): Allocate from the tail of a region, if
12850         possible, to avoid allocating a region near to 1MB, for the MacOSX
12851         loader.
12853         * kern/efi/init.c (grub_efi_set_prefix): Specify
12854         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12856         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12857         argument IMAGE_HANDLE and specify it to get a loaded image.
12858         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12859         grub_efi_get_loaded_image.
12860         (grub_efi_get_filename): Divide the length by the size of
12861         grub_efi_char16_t.
12862         (grub_efi_get_device_path): New function.
12863         (grub_efi_print_device_path): Print End Device Path nodes. Divide
12864         the length by the size of grub_efi_char16_t for a file path device
12865         path node.
12867         * kern/loader.c (grub_loader_noreturn): New variable.
12868         (grub_loader_set): Accept a new argument NORETURN. Set
12869         GRUB_LOADER_NORETURN to NORETURN.
12870         All callers changed.
12871         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12872         grub_machine_fini.
12874         * include/grub/efi/efi.h (grub_efi_get_device_path): New
12875         prototype.
12876         (grub_efi_get_loaded_image): Take an argument to specify an image
12877         handle.
12879         * include/grub/loader.h (grub_loader_set): Added one more argument
12880         NORETURN.
12882         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12883         instead of grub_efi_open_protocol.
12884         (grub_efidisk_get_device_name): Likewise.
12885         (grub_efidisk_close): Print a newline.
12886         (grub_efidisk_get_device_handle): Fixed to use
12887         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12888         GRUB_EFI_DEVICE_PATH_TYPE.
12890         * disk/efi/efidisk.c (device_path_guid): Moved to ...
12891         * kern/efi/efi.c (device_path_guid): ... here.
12893         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12894         chain.mod.
12895         (kernel_mod_HEADERS): Added efi/disk.h.
12896         (_chain_mod_SOURCES): New variable.
12897         (_chain_mod_CFLAGS): Likewise.
12898         (_chain_mod_LDFLAGS): Likewise.
12899         (chain_mod_SOURCES): Likewise.
12900         (chain_mod_CFLAGS): Likewise.
12901         (chain_mod_LDFLAGS): Likewise.
12903         * DISTLIST: Added include/grub/efi/chainloader.h,
12904         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12906         * include/grub/efi/chainloader.h: New file.
12907         * loader/efi/chainloader.c: Likewise.
12908         * loader/efi/chainloader_normal.c: Likewise.
12910 2006-04-30  Marco Gerards  <marco@gnu.org>
12912         * commands/configfile.c (grub_cmd_source): New function.
12913         (GRUB_MOD_INIT): Register the commands `source' and `.'.
12914         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12916 2006-04-30  Marco Gerards  <marco@gnu.org>
12918         * normal/execute.c (grub_script_execute_cmd): Change the return
12919         type to `grub_err_t'.  Correctly return the error.
12920         (grub_script_execute_cmdline): In case a command line is not a
12921         command or a function, try to interpret it as an assignment.
12923 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12925         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12926         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12927         skip a node whose name is obviously invalid as UTF-16,
12928         i.e. contains a NUL character. Stop the iteration when the last
12929         directory entry is found. Instead of using the return value of
12930         grub_hfsplus_btree_iterate_node, store the value in RET and use
12931         it, because the iterator can be stopped by the last directory
12932         entry.
12934 2006-04-30  Marco Gerards  <marco@gnu.org>
12936         * include/grub/env.h (grub_env_export): New prototype.  Reported
12937         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12939 2006-04-30  Marco Gerards  <marco@gnu.org>
12941         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12942         size of the extents in a catalog file record.
12944 2006-04-29  Marco Gerards  <marco@gnu.org>
12946         * commands/configfile.c (grub_cmd_configfile): Execute the
12947         configfile within its own context.
12949         * include/grub/env.h (grub_env_context_open): New prototype.
12950         (grub_env_context_close): Likewise.
12952         * kern/env.c (grub_env): Removed.
12953         (grub_env_sorted): Likewise.
12954         (grub_env_context): New variable.
12955         (grub_env_var_context): Likewise.
12956         (grub_env_find): Search both the active context and the global
12957         context.
12958         (grub_env_context_open): New function.
12959         (grub_env_context_close): Likewise.
12960         (grub_env_insert): Likewise.
12961         (grub_env_remove): Likewise.
12962         (grub_env_export): Likewise.
12963         (grub_env_set): Changed to use helper functions to avoid code
12964         duplication.
12965         (grub_env_iterate): Rewritten so both the current context and the
12966         global context are being used.
12968         * normal/command.c (export_command): New function.
12969         (grub_command_init): Register the `export' function.
12971 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
12973         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12974         explicitly to suppress gcc's warnings.
12975         * fs/fat.c (grub_fat_find_dir): Likewise.
12976         (grub_fat_label): Likewise.
12977         * fs/xfs.c (grub_xfs_read_inode): Likewise.
12978         (grub_xfs_mount): Likewise.
12979         (grub_xfs_label): Likewise.
12980         * fs/affs.c (grub_affs_mount): Likewise.
12981         (grub_affs_label): Likewise.
12982         (grub_affs_iterate_dir): Likewise.
12983         * fs/sfs.c (grub_sfs_mount): Likewise.
12984         (grub_sfs_iterate_dir): Likewise.
12985         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12986         * fs/hfs.c (grub_hfs_mount): Likewise.
12987         (grub_hfs_cmp_catkeys): Likewise.
12988         (grub_hfs_find_dir): Likewise.
12989         (grub_hfs_dir): Likewise.
12990         (grub_hfs_label): Likewise.
12991         * fs/jfs.c (grub_jfs_mount): Likewise.
12992         (grub_jfs_opendir): Likewise.
12993         (grub_jfs_getent): Likewise.
12994         (grub_jfs_lookup_symlink): Likewise.
12995         (grub_jfs_label): Likewise.
12996         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12997         (grub_hfsplus_iterate_dir): Likewise.
12998         (grub_hfsplus_btree_iterate_node): Made static.
13000         * util/grub-emu.c (prefix): New variable.
13001         (grub_machine_set_prefix): New function.
13002         (main): Do not set the environment variable "prefix" here. Only
13003         set PREFIX, which is used later by grub_machine_set_prefix.
13005         * include/grub/video.h: Do not include grub/symbol.h.
13006         (grub_video_register): Not exported. This symbol is not defined in
13007         the kernel.
13008         (grub_video_unregister): Likewise.
13009         (grub_video_iterate): Likewise.
13010         (grub_video_setup): Likewise.
13011         (grub_video_restore): Likewise.
13012         (grub_video_get_info): Likewise.
13013         (grub_video_get_blit_format): Likewise.
13014         (grub_video_set_palette): Likewise.
13015         (grub_video_get_palette): Likewise.
13016         (grub_video_set_viewport): Likewise.
13017         (grub_video_get_viewport): Likewise.
13018         (grub_video_map_color): Likewise.
13019         (grub_video_map_rgb): Likewise.
13020         (grub_video_map_rgba): Likewise.
13021         (grub_video_fill_rect): Likewise.
13022         (grub_video_blit_glyph): Likewise.
13023         (grub_video_blit_bitmap): Likewise.
13024         (grub_video_blit_render_target): Likewise.
13025         (grub_video_scroll): Likewise.
13026         (grub_video_swap_buffers): Likewise.
13027         (grub_video_create_render_target): Likewise.
13028         (grub_video_delete_render_target): Likewise.
13029         (grub_video_set_active_render_target): Likewise.
13031         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13032         Undefined.
13033         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13035         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13036         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13037         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13038         instead of $(srcdir)/genkernsyms.sh.
13040         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13041         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13042         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13043         instead of $(srcdir)/genkernsyms.sh.
13045         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13046         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13047         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13048         instead of $(srcdir)/genkernsyms.sh.
13050         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13051         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13052         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13053         instead of $(srcdir)/genkernsyms.sh.
13055         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13056         genkernsyms.sh.
13058         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13059         genkernsyms.sh.
13060         (gensymlist.sh): New target.
13061         (genkernsyms.sh): Likewise.
13063         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13064         genkernsyms.sh.in and gensymlist.sh.in.
13066         * genkernsyms.sh: Removed.
13067         * gensymlist.sh: Likewise.
13069         * genkernsyms.sh.in: New file.
13070         * gensymlist.sh.in: Likewise.
13072 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13074         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13075         clobber "prefix", since we may have already set it manually.
13077 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13079         * kern/misc.c (abort): New alias for grub_abort.
13081 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
13083         A new machine-specific function "grub_machine_set_prefix" is
13084         defined. This is called after loading modules, so that a prefix
13085         initialization can use modules. Also, this change adds an
13086         intensive debugging feature for the memory manager via the
13087         configure option "--enable-mm-debug".
13089         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13090         PART.LEN.
13092         * kern/sparc64/ieee1275/init.c (abort): Removed.
13093         (grub_stop): Likewise.
13094         (grub_exit): New function.
13095         (grub_set_prefix): Renamed to ...
13096         (grub_machine_set_prefix): ... this.
13097         (grub_machine_init): Do not call grub_set_prefix.
13099         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13100         (grub_machine_set_prefix): ... this.
13101         (grub_machine_init): Do not call grub_set_prefix.
13103         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13104         (grub_machine_init): Do not set the prefix here.
13106         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13108         * kern/efi/init.c: Include grub/mm.h.
13109         (grub_efi_set_prefix): New function.
13111         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13112         (grub_efi_get_filename): New function.
13113         (grub_print_device_path): Renamed to ...
13114         (grub_efi_print_device_path): ... this.
13116         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13117         [MM_DEBUG] (grub_realloc): Likewise.
13118         [MM_DEBUG] (grub_free): Likewise.
13119         [MM_DEBUG] (grub_memalign): Likewise.
13120         [MM_DEBUG] (grub_mm_debug): New variable.
13121         [MM_DEBUG] (grub_debug_malloc): New function.
13122         [MM_DEBUG] (grub_debug_free): New function.
13123         [MM_DEBUG] (grub_debug_realloc): New function.
13124         [MM_DEBUG] (grub_debug_memalign): New function.
13126         * kern/misc.c (grub_abort): Print a newline to distinguish
13127         the message.
13129         * kern/main.c (grub_main): Call grub_machine_set_prefix and
13130         grub_set_root_dev after loading modules. This is necessary when
13131         setting a prefix depends on modules.
13133         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13134         (grub_efi_print_device_path): ... this.
13135         (grub_efi_get_filename): New prototype.
13136         (grub_efi_set_prefix): Likewise.
13138         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13139         and grub/disk.h.
13140         (grub_efidisk_get_device_handle): New prototype.
13141         (grub_efidisk_get_device_name): Likewise.
13143         * include/grub/mm.h: Include config.h.
13144         (MM_DEBUG): Removed.
13145         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13146         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13147         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13148         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13149         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13150         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13151         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13152         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13153         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13155         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13157         * disk/efi/efidisk.c: Include grub/partition.h.
13158         (iterate_child_devices): New function.
13159         (add_device): First, compare only last device path nodes, so that
13160         devices are sorted by the types.
13161         (grub_efidisk_get_device_handle): New function.
13162         (grub_efidisk_get_device_name): Likewise.
13164         * configure.ac (--enable-mm-debug): New option to enable the
13165         memory manager debugging feature. This makes the binary much
13166         bigger, so is disabled by default.
13168 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
13170         Use grub_abort instead of grub_stop, and grub_exit must be
13171         define in each architecture now. Also, this change adds support
13172         for EFI disks.
13174         * util/i386/pc/grub-probefs.c: Include grub/term.h.
13175         (grub_getkey): New function.
13176         (grub_term_get_current): Likewise.
13178         * util/i386/pc/grub-setup.c: Include grub/term.h.
13179         (grub_getkey): New function.
13180         (grub_term_get_current): Likewise.
13182         * util/misc.c (grub_stop): Renamed to ...
13183         (grub_exit): ... this.
13185         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13186         (grub_exit): ... this.
13187         (grub_machine_init): Use grub_abort instead of abort.
13188         (grub_stop): Removed.
13190         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13191         abort.
13193         * kern/i386/pc/startup.S (grub_exit): New function.
13194         (cold_reboot): New label.
13196         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13197         (grub_efi_init): Call grub_efidisk_init.
13198         (grub_efi_fini): Call grub_efidisk_fini.
13200         * kern/efi/efi.c: Include grub/mm.h.
13201         (grub_efi_console_control_guid): Renamed to ...
13202         (console_control_guid): ... this.
13203         (grub_efi_loaded_image_guid): Renamed to ...
13204         (loaded_image_guid): ... this.
13205         (grub_efi_locate_handle): New function.
13206         (grub_efi_open_protocol): Likewise.
13207         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13208         GRUB_EFI_CONSOLE_CONTROL_GUID.
13209         (grub_efi_exit): Removed.
13210         (grub_stop): Likewise.
13211         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13212         (grub_exit): New function.
13213         (grub_print_device_path): Likewise.
13215         * kern/rescue.c (grub_rescue_cmd_exit): New function.
13216         (grub_enter_rescue_mode): Register "exit".
13218         * kern/misc.c (grub_real_dprintf): A cosmetic change.
13219         (grub_abort): New function.
13221         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13223         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13225         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13227         * include/grub/efi/efi.h (grub_efi_exit): Removed.
13228         (grub_print_device_path): New prototype.
13229         (grub_efi_locate_handle): Likewise.
13230         (grub_efi_open_protocol): Likewise.
13232         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13233         * disk/efi/efidisk.c: Likewise.
13235         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13237         * include/grub/efi/console_control.h
13238         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13240         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13241         last 8 bytes as an array.
13242         (GRUB_EFI_DISK_IO_GUID): New macro.
13243         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13244         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13245         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13246         grub_uint8_t.
13247         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13248         (struct grub_efi_device_path): Rename the member "sub_type" to
13249         "subtype".
13250         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13251         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13252         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13253         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13254         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13255         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13256         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13257         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13258         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13259         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13260         (struct grub_efi_pci_device_path): New structure.
13261         (grub_efi_pci_device_path_t): New type.
13262         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13263         (struct grub_efi_pccard_device_path): New structure.
13264         (grub_efi_pccard_device_path_t): New type.
13265         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13266         (struct grub_efi_memory_mapped_device_path): New structure.
13267         (grub_efi_memory_mapped_device_path_t): New type.
13268         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13269         (struct grub_efi_vendor_device_path): New structure.
13270         (grub_efi_vendor_device_path_t): New type.
13271         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13272         (struct grub_efi_controller_device_path): New structure.
13273         (grub_efi_controller_device_path_t): New type.
13274         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13275         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13276         (struct grub_efi_acpi_device_path): New structure.
13277         (grub_efi_acpi_device_path_t): New type.
13278         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13279         (struct grub_efi_expanded_acpi_device_path): New structure.
13280         (grub_efi_expanded_acpi_device_path_t): New type.
13281         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13282         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13283         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13284         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13285         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13286         (struct grub_efi_atapi_device_path): New structure.
13287         (grub_efi_atapi_device_path_t): New type.
13288         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13289         (struct grub_efi_fibre_channel_device_path): New structure.
13290         (grub_efi_fibre_channel_device_path_t): New type.
13291         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13292         (struct grub_efi_1394_device_path): New structure.
13293         (grub_efi_1394_device_path_t): New type.
13294         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13295         (struct grub_efi_usb_device_path): New structure.
13296         (grub_efi_usb_device_path_t): New type.
13297         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13298         (struct grub_efi_usb_class_device_path): New structure.
13299         (grub_efi_usb_class_device_path_t): New type.
13300         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13301         (struct grub_efi_i2o_device_path): New structure.
13302         (grub_efi_i2o_device_path_t): New type.
13303         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13304         (struct grub_efi_mac_address_device_path): New structure.
13305         (grub_efi_mac_address_device_path_t): New type.
13306         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13307         (struct grub_efi_ipv4_device_path): New structure.
13308         (grub_efi_ipv4_device_path_t): New type.
13309         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13310         (struct grub_efi_ipv6_device_path): New structure.
13311         (grub_efi_ipv6_device_path_t): New type.
13312         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13313         (struct grub_efi_infiniband_device_path): New structure.
13314         (grub_efi_infiniband_device_path_t): New type.
13315         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13316         (struct grub_efi_uart_device_path): New structure.
13317         (grub_efi_uart_device_path_t): New type.
13318         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13319         (struct grub_efi_vendor_messaging_device_path): New structure.
13320         (grub_efi_vendor_messaging_device_path_t): New type.
13321         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13322         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13323         (struct grub_efi_hard_drive_device_path): New structure.
13324         (grub_efi_hard_drive_device_path_t): New type.
13325         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13326         (struct grub_efi_cdrom_device_path): New structure.
13327         (grub_efi_cdrom_device_path_t): New type.
13328         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13329         (struct grub_efi_vendor_media_device_path): New structure.
13330         (grub_efi_vendor_media_device_path_t): New type.
13331         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13332         (struct grub_efi_file_path_device_path): New structure.
13333         (grub_efi_file_path_device_path_t): New type.
13334         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13335         (struct grub_efi_protocol_device_path): New structure.
13336         (grub_efi_protocol_device_path_t): New type.
13337         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13338         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13339         (struct grub_efi_bios_device_path): New structure.
13340         (grub_efi_bios_device_path_t): New type.
13341         (struct grub_efi_disk_io): New structure.
13342         (grub_efi_disk_io_t): New type.
13343         (struct grub_efi_block_io_media): New structure.
13344         (grub_efi_block_io_media_t): New type.
13345         (struct grub_efi_block_io): New structure.
13346         (grub_efi_block_io_t): New type.
13348         * include/grub/misc.h (grub_stop): Removed.
13349         (grub_exit): New prototype.
13350         (grub_abort): Likewise.
13352         * include/grub/disk.h (enum grub_disk_dev_id): Added
13353         GRUB_DISK_DEVICE_EFIDISK_ID.
13355         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13356         disk/efi/efidisk.c.
13357         (kernel_syms.lst): Remove the target if an error occurs.
13359 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
13361         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13362         as it was simply too buggy.
13364 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
13366         * kern/misc.c (grub_lltoa): New function.
13367         (grub_vsprintf): Added support for the long long suffix,
13368         i.e. "ll".
13370 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
13372         * Makefile.in (LDFLAGS): Add variable.
13373         (LD): Remove variable.
13374         * configure.ac: Add -m32 to LDFLAGS.
13375         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13376         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13377         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13378         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13379         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13380         variables.
13381         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13382         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13383         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13385 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
13387         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13388         length for unknown glyph.
13390 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13392         Add support for pre-loaded modules into the EFI port.
13394         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13395         completely. Accept one more argument DIR. The caller has changed.
13397         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13399         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13400         (grub_efi_loaded_image_guid): New variable.
13401         (grub_efi_get_loaded_image): New function.
13402         (grub_arch_modules_addr): Likewise.
13404         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13405         prototype.
13407         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13408         (struct grub_efi_loaded_image): New structure.
13409         (grub_efi_loaded_image_t): New type.
13411 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13413         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13414         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13415         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13417 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
13419         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13421 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
13423         * DISTLIST: Added include/grub/efi/console.h,
13424         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13425         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13427         * include/grub/efi/console.h: New file.
13428         * include/grub/efi/time.h: Likewise.
13429         * include/grub/i386/efi/kernel.h: Likewise.
13430         * kern/efi/init.c: Likewise.
13431         * kern/efi/mm.c: Likewise.
13432         * term/efi/console.c: Likewise.
13434         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13435         (grub_stop): Removed.
13436         (grub_get_rtc): Likewise.
13437         (grub_machine_init): Simply call grub_efi_init.
13438         (grub_machine_fini): Call grub_efi_fini.
13440         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13441         (grub_efi_output_string): Removed.
13442         (grub_efi_stall): New function.
13443         (grub_stop): Likewise.
13444         (grub_get_rtc): Likewise.
13446         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13447         (grub_efi_stall): New prototype.
13448         (grub_efi_allocate_pages): Likewise.
13449         (grub_efi_free_pages): Likewise.
13450         (grub_efi_get_memory_map): Likewise.
13451         (grub_efi_mm_init): Likewise.
13452         (grub_efi_mm_fini): Likewise.
13453         (grub_efi_init): Likewise.
13454         (grub_efi_fini): Likewise.
13456         * include/grub/i386/efi/time.h: Do not include
13457         grub/symbol.h. Include grub/efi/time.h.
13458         (GRUB_TICKS_PER_SECOND): Removed.
13459         (grub_get_rtc): Likewise.
13461         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13462         Added padding. The EFI spec is buggy.
13463         (GRUB_EFI_BLACK): New macro.
13464         (GRUB_EFI_BLUE): Likewise.
13465         (GRUB_EFI_GREEN): Likewise.
13466         (GRUB_EFI_CYAN): Likewise.
13467         (GRUB_EFI_RED): Likewise.
13468         (GRUB_EFI_MAGENTA): Likewise.
13469         (GRUB_EFI_BROWN): Likewise.
13470         (GRUB_EFI_LIGHTGRAY): Likewise.
13471         (GRUB_EFI_BRIGHT): Likewise.
13472         (GRUB_EFI_DARKGRAY): Likewise.
13473         (GRUB_EFI_LIGHTBLUE): Likewise.
13474         (GRUB_EFI_LIGHTGREEN): Likewise.
13475         (GRUB_EFI_LIGHTCYAN): Likewise.
13476         (GRUB_EFI_LIGHTRED): Likewise.
13477         (GRUB_EFI_LIGHTMAGENTA): Likewise.
13478         (GRUB_EFI_YELLOW): Likewise.
13479         (GRUB_EFI_WHITE): Likewise.
13480         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13481         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13482         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13483         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13484         (GRUB_EFI_BACKGROUND_RED): Likewise.
13485         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13486         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13487         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13488         (GRUB_EFI_TEXT_ATTR): Likewise.
13490         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13491         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13492         (kernel_mod_HEADERS): Added efi/time.h.
13494 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
13496         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13497         include/grub/efi/api.h, include/grub/efi/console_control.h,
13498         include/grub/efi/efi.h, include/grub/efi/pe32.h,
13499         include/grub/i386/efi/time.h, kern/efi/efi.c,
13500         kern/i386/efi/init.c, kern/i386/efi/startup.S,
13501         and util/i386/efi/grub-mkimage.c.
13503         * Makefile.in (RMKFILES): Added i386-efi.rmk.
13505         * genmk.rb (PModule#rule): Do not export symbols if
13506         #{prefix}_EXPORTS is set to "no".
13508         * conf/i386-efi.mk: New file.
13509         * conf/i386-efi.rmk: Likewise.
13510         * include/grub/efi/api.h: Likewise.
13511         * include/grub/efi/console_control.h: Likewise.
13512         * include/grub/efi/efi.h: Likewise.
13513         * include/grub/efi/pe32.h: Likewise.
13514         * include/grub/i386/efi/time.h: Likewise.
13515         * kern/efi/efi.c: Likewise.
13516         * kern/i386/efi/init.c: Likewise.
13517         * kern/i386/efi/startup.S: Likewise.
13518         * util/i386/efi/grub-mkimage.c: Likewise.
13520 2006-04-17  Marco Gerards  <marco@gnu.org>
13522         * include/grub/script.h: Include <grub/parser.h> and
13523         "grub_script.tab.h".
13524         (struct grub_lexer_param): New struct.
13525         (struct grub_parser_param): Likewise.
13526         (grub_script_create_arglist): Pass the state in an argument.
13527         (grub_script_add_arglist): Likewise.
13528         (grub_script_create_cmdline): Likewise.
13529         (grub_script_create_cmdblock): Likewise.
13530         (grub_script_create_cmdif): Likewise.
13531         (grub_script_create_cmdmenu): Likewise.
13532         (grub_script_add_cmd): Likewise.
13533         (grub_script_arg_add): Likewise.
13534         (grub_script_lexer_ref): Likewise.
13535         (grub_script_lexer_deref): Likewise.
13536         (grub_script_lexer_record_start): Likewise.
13537         (grub_script_lexer_record_stop): Likewise.
13538         (grub_script_mem_record): Likewise.
13539         (grub_script_mem_record_stop): Likewise.
13540         (grub_script_malloc): Likewise.
13541         (grub_script_yylex): Likewise.
13542         (grub_script_yyparse): Likewise.
13543         (grub_script_yyerror): Likewise.
13544         (grub_script_yylex): Likewise.
13545         (grub_script_lexer_init): Return the state.
13547         * normal/lexer.c (grub_script_lexer_state): Removed variable.
13548         (grub_script_lexer_done): Likewise.
13549         (grub_script_lexer_getline): Likewise.
13550         (grub_script_lexer_refs): Likewise.
13551         (script): Likewise.
13552         (newscript): Likewise.
13553         (record): Likewise.
13554         (recording): Likewise.
13555         (recordpos): Likewise.
13556         (recordlen): Likewise.
13557         (grub_script_lexer_init): Return the state instead of setting
13558         global variables.
13559         (grub_script_lexer_ref): Use the newly added argument for state
13560         instead of globals.
13561         (grub_script_lexer_deref): Likewise.
13562         (grub_script_lexer_record_start): Likewise.
13563         (grub_script_lexer_record_stop): Likewise.
13564         (recordchar): Likewise.
13565         (nextchar): Likewise.
13566         (grub_script_yylex2): Likewise.
13567         (grub_script_yylex): Likewise.
13568         (grub_script_yyerror): Likewise.
13570         * normal/parser.y (func_mem): Removed variable.
13571         (menu_entry): Likewise.
13572         (err): Likewise.
13573         (%lex-param): New parser option.
13574         (%parse-param): Likewise.
13575         (script): Always return the AST.
13576         (argument): Pass the state around.
13577         (arguments): Likewise.
13578         (grubcmd): Likewise.
13579         (commands): Likewise.
13580         (function): Likewise.
13581         (menuentry): Likewise.
13582         (if_statement): Likewise.
13583         (if): Likewise.
13585         * normal/script.c (grub_script_memused): Removed variable.
13586         (grub_script_parsed): Likewise.
13587         (grub_script_malloc): Added a state argument.  Use that instead of
13588         global variables.
13589         (grub_script_mem_record): Likewise.
13590         (grub_script_mem_record_stop): Likewise.
13591         (grub_script_arg_add): Likewise.
13592         (grub_script_add_arglist): Likewise.
13593         (grub_script_create_cmdline): Likewise.
13594         (grub_script_create_cmdif): Likewise.
13595         (grub_script_create_cmdmenu): Likewise.
13596         (grub_script_add_cmd): Likewise.
13597         (grub_script_parse): Setup the state before calling the parser.
13599 2006-04-16  Marco Gerards  <marco@gnu.org>
13601         * normal/command.c (grub_command_init): Remove the title command.
13603         * normal/lexer.c (grub_script_yylex): Renamed from this...
13604         (grub_script_yylex2): ... to this.
13605         (grub_script_yylex): New function.  Temporary
13606         introduced to filter some tokens.
13607         (grub_script_yyerror): Print a newline.
13609         * normal/main.c (read_config_file): Output information about the
13610         lines that contain errors.  Wait for a key after all lines have
13611         been processed.  Don't return an empty menu.
13613         * normal/parser.y (func_mem): Don't initialize.
13614         (menu_entry): Likewise.
13615         (err): New variable.
13616         (script): Don't return anything when an error was encountered.
13617         (ws, returns): Removed rules.
13618         (argument): Disabled concatenated variable support.
13619         (arguments): Remove explicit separators.
13620         (grubcmd): Likewise.
13621         (function): Likewise.
13622         (menuentry): Likewise.
13623         (if): Likewise.
13624         (commands): Likewise.  Add error handling.
13626         * normal/script.c (grub_script_create_cmdline): If
13627         `grub_script_parsed' is 0, assume the parser encountered an error.
13629 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
13631         * configure.ac: Add support for EFI. Fix the typo
13632         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13634 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13636         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
13637         foreign multibyte characters should be shown correctly.
13639 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13641         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13642         calculation.
13643         (read_config_file): Made it to close file before returning.
13645 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
13647         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13648         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13649         video/i386/pc/vbefill.c.
13651         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13652         video/i386/pc/vbefill.c.
13654         * include/grub/video.h (grub_video_blit_format): New enum.
13655         (grub_video_mode_info): Added new member blit_format.
13656         (grub_video_get_blit_format): New function prototype.
13658         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13659         function prototype.
13660         (grub_video_vbe_map_rgb): Likewise.
13661         (grub_video_vbe_unmap_color): Likewise.
13663         * include/grub/i386/pc/vbeblit.h: New file.
13665         * include/grub/i386/pc/vbefill.h: New file.
13667         * video/video.c (grub_video_get_blit_format): New function.
13668         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13669         (grub_video_vbe_map_rgb): Likewise.
13670         (grub_video_vbe_unmap_color): Likewise.
13672         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13673         optimized fills.
13674         (grub_video_vbe_blit_render_target): Changed to use more optimized
13675         blits.
13676         (grub_video_vbe_setup): Added detection for optimized settings.
13677         (grub_video_vbe_create_render_target): Likewise.
13679         * video/i386/pc/vbeblit.c: New file.
13681         * video/i386/pc/vbefill.c: New file.
13683 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
13685         * font/manager.c (grub_font_get_glyph): Removed font fixup from
13686         here...
13688         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
13689         parsing to support both hex and dec ranges.  If filename was missing
13690         show usage information.
13692 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
13694         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13695         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
13697         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13698         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
13699         (video_mod_SOURCES): Added.
13700         (video_mod_CFLAGS): Likewise.
13701         (video_mod_LDFLAGS): Likewise.
13702         (gfxterm_mod_SOURCES): Likewise.
13703         (gfxterm_mod_CFLAGS): Likewise.
13704         (gfxterm_mod_LDFLAGS): Likewise.
13705         (videotest_mod_SOURCES): Likewise.
13706         (videotest_mod_CFLAGS): Likewise.
13707         (videotest_mod_LDFLAGS): Likewise.
13708         (vesafb_mod_SOURCES): Removed.
13709         (vesafb_mod_CFLAGS): Likewise.
13710         (vesafb_mod_LDFLAGS): Likewise.
13711         (vga_mod_SOURCES): Likewise.
13712         (vga_mod_CFLAGS): Likewise.
13713         (vga_mod_LDFLAGS): Likewise.
13715         * commands/videotest.c: New file.
13717         * font/manager.c (fill_with_default_glyph): Modified to use
13718         grub_font_glyph.
13719         (grub_font_get_glyph): Likewise.
13720         (fontmanager): Renamed from this...
13721         (font_manager): ... to this.
13723         * include/grub/font.h (grub_font_glyph): Added new structure.
13724         (grub_font_get_glyph): Modified to use grub_font_glyph.
13726         * include/grub/misc.h (grub_abs): Added as inline function.
13728         * include/grub/video.h: New file.
13730         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13731         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13732         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13733         (grub_vbe_get_controller_info): Renamed from this...
13734         (grub_vbe_bios_get_controller_info): ... to this.
13735         (grub_vbe_get_mode_info): Renamed from this...
13736         (grub_vbe_bios_get_mode_info): ... to this.
13737         (grub_vbe_set_mode): Renamed from this...
13738         (grub_vbe_bios_set_mode): ... to this.
13739         (grub_vbe_get_mode): Renamed from this...
13740         (grub_vbe_bios_get_mode): ... to this.
13741         (grub_vbe_set_memory_window): Renamed from this...
13742         (grub_vbe_bios_set_memory_window): ... to this.
13743         (grub_vbe_get_memory_window): Renamed from this...
13744         (grub_vbe_bios_get_memory_window): ... to this.
13745         (grub_vbe_set_scanline_length): Renamed from this...
13746         (grub_vbe_set_scanline_length): ... to this.
13747         (grub_vbe_get_scanline_length): Renamed from this...
13748         (grub_vbe_bios_get_scanline_length): ... to this.
13749         (grub_vbe_set_display_start): Renamed from this...
13750         (grub_vbe_bios_set_display_start): ... to this.
13751         (grub_vbe_get_display_start): Renamed from this...
13752         (grub_vbe_bios_get_display_start): ... to this.
13753         (grub_vbe_set_palette_data): Renamed from this...
13754         (grub_vbe_bios_set_palette_data): ... to this.
13755         (grub_vbe_set_pixel_rgb): Removed.
13756         (grub_vbe_set_pixel_index): Likewise.
13758         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13759         from this...
13760         (grub_vbe_bios_get_controller_info): ... to this.
13761         (grub_vbe_get_mode_info): Renamed from this...
13762         (grub_vbe_bios_get_mode_info): ... to this.
13763         (grub_vbe_set_mode): Renamed from this...
13764         (grub_vbe_bios_set_mode): ... to this.
13765         (grub_vbe_get_mode): Renamed from this...
13766         (grub_vbe_bios_get_mode): ... to this.
13767         (grub_vbe_set_memory_window): Renamed from this...
13768         (grub_vbe_bios_set_memory_window): ... to this.
13769         (grub_vbe_get_memory_window): Renamed from this...
13770         (grub_vbe_bios_get_memory_window): ... to this.
13771         (grub_vbe_set_scanline_length): Renamed from this...
13772         (grub_vbe_set_scanline_length): ... to this.
13773         (grub_vbe_get_scanline_length): Renamed from this...
13774         (grub_vbe_bios_get_scanline_length): ... to this.
13775         (grub_vbe_set_display_start): Renamed from this...
13776         (grub_vbe_bios_set_display_start): ... to this.
13777         (grub_vbe_get_display_start): Renamed from this...
13778         (grub_vbe_bios_get_display_start): ... to this.
13779         (grub_vbe_set_palette_data): Renamed from this...
13780         (grub_vbe_bios_set_palette_data): ... to this.
13781         (grub_vbe_bios_get_controller_info): Fixed problem with registers
13782         getting corrupted after calling it.  Added more pushes and pops.
13783         (grub_vbe_bios_set_mode): Likewise.
13784         (grub_vbe_bios_get_mode): Likewise.
13785         (grub_vbe_bios_get_memory_window): Likewise.
13786         (grub_vbe_bios_set_scanline_length): Likewise.
13787         (grub_vbe_bios_get_scanline_length): Likewise.
13788         (grub_vbe_bios_get_display_start): Likewise.
13789         (grub_vbe_bios_set_palette_data): Likewise.
13791         * normal/cmdline.c (cl_set_pos): Refresh the screen.
13792         (cl_insert): Likewise.
13793         (cl_delete): Likewise.
13795         * term/gfxterm.c: New file.
13797         * term/i386/pc/vesafb.c: Removed file.
13799         * video/video.c: New file.
13801         * video/i386/pc/vbe.c (real2pm): Added new function.
13802         (grub_video_vbe_draw_pixel): Likewise.
13803         (grub_video_vbe_get_video_ptr): Likewise.
13804         (grub_video_vbe_get_pixel): Likewise
13805         (grub_video_vbe_init): Likewise.
13806         (grub_video_vbe_fini): Likewise.
13807         (grub_video_vbe_setup): Likewise.
13808         (grub_video_vbe_get_info): Likewise.
13809         (grub_video_vbe_set_palette): Likewise.
13810         (grub_video_vbe_get_palette): Likewise.
13811         (grub_video_vbe_set_viewport): Likewise.
13812         (grub_video_vbe_get_viewport): Likewise.
13813         (grub_video_vbe_map_color): Likewise.
13814         (grub_video_vbe_map_rgb): Likewise.
13815         (grub_video_vbe_map_rgba): Likewise.
13816         (grub_video_vbe_unmap_color): Likewise.
13817         (grub_video_vbe_fill_rect): Likewise.
13818         (grub_video_vbe_blit_glyph): Likewise.
13819         (grub_video_vbe_blit_bitmap): Likewise.
13820         (grub_video_vbe_blit_render_target): Likewise.
13821         (grub_video_vbe_scroll): Likewise.
13822         (grub_video_vbe_swap_buffers): Likewise.
13823         (grub_video_vbe_create_render_target): Likewise.
13824         (grub_video_vbe_delete_render_target): Likewise.
13825         (grub_video_vbe_set_active_render_target): Likewise.
13826         (grub_vbe_set_pixel_rgb): Remove function.
13827         (grub_vbe_set_pixel_index): Likewise.
13828         (index_color_mode): Remove static variable.
13829         (active_mode): Likewise.
13830         (framebuffer): Likewise.
13831         (bytes_per_scan_line): Likewise.
13832         (grub_video_vbe_adapter): Added new static variable.
13833         (framebuffer): Likewise.
13834         (render_target): Likewise.
13835         (initial_mode): Likewise.
13836         (mode_in_use): Likewise.
13837         (mode_list): Likewise.
13839 2006-03-10  Marco Gerards  <marco@gnu.org>
13841         * configure.ac (AC_INIT): Bumped to 1.93.
13843         * DISTLIST: Added `include/grub/hfs.h'.
13845 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
13847         * boot/i386/pc/boot.S (general_error): Before looping, try INT
13848         18H, which might help the BIOS falling back to next boot media.
13850 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
13852         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13853         Poe Chen <poe.poechen@gmail.com>.
13855 2006-01-17  Marco Gerards  <marco@gnu.org>
13857         * include/grub/normal.h: Include <grub/script.h>.
13858         (grub_command_list): Removed struct.
13859         (grub_command_list_t): Removed type.
13860         (grub_menu_entry): Remove members `num' and `command_list'.  Add
13861         members `commands' and `sourcecode'.
13862         * include/grub/script.h: Add inclusion guards.
13863         (grub_script_cmd_menuentry): New struct.
13864         (grub_script_execute_menuentry): New prototype.
13865         (grub_script_lexer_record_start): Likewise.
13866         (grub_script_lexer_record_stop): Likewise.
13867         * normal/execute.c (grub_script_execute_menuentry): New function.
13868         * normal/lexer.c (record, recording, recordpos, recordlen): New
13869         variables.
13870         (grub_script_lexer_record_start): New function.
13871         (grub_script_lexer_record_stop): Likewise.
13872         (recordchar): Likewise.
13873         (nextchar): Likewise.
13874         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
13875         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
13876         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13877         (current_menu): New variable.
13878         (free_menu): Mainly rewritten.
13879         (grub_normal_menu_addentry): New function.
13880         (read_config_file): Rewritten.
13881         * normal/menu.c (run_menu_entry): Mainly rewritten.
13882         * normal/menu_entry.c (make_screen): Rewritten the code to insert
13883         the menu entry.
13884         (run): Mainly rewritten.
13885         * normal/parser.y (menu_entry): New variable.
13886         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13887         (menuentry): New rule.
13888         (command): Add `menuentry'.
13889         (if_statement): Allow additional returns before `fi'.
13890         * normal/script.c (grub_script_create_cmdmenu): New function.
13892 2006-01-03  Marco Gerards  <marco@gnu.org>
13894         * INSTALL: GNU Bison is required.
13895         * configure.ac: Rewritten the test to detect Bison.
13896         * Makefile.in (YACC): New variable.  Reported by Xun Sun
13897         <xun.sun.cn@gmail.com>.
13899 2006-01-03  Marco Gerards  <marco@gnu.org>
13901         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13902         the HFS+ filesystem to filesystem blocks.
13903         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13904         GCC warning is silenced.
13906 2006-01-03  Marco Gerards  <marco@gnu.org>
13908         * partmap/apple.c (apple_partition_map_iterate): Convert the data
13909         read from disk from big endian to host byte order.
13911 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13913         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
13914         documentation.
13915         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13916         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13917         embedded HFS+ filesystem.
13918         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13919         (grub_hfs_sblock): Move from here...
13920         * include/grub/hfs.h: To here...  New file.
13921         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
13922         documentation.
13923         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13924         New macros.
13925         (grub_hfsplus_volheader): Change type of member `magic' to
13926         `grub_uint16_t'.
13927         (grub_hfsplus_data): Add new member `embedded_offset'.
13928         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13929         returned block.
13930         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13931         Calculate the offset.
13933 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13935         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13936         Removed.
13937         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13939 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13941         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13942         ENV->NAME is NULL after allocating ENV->VALUE.
13944 2005-12-25  Marco Gerards  <marco@gnu.org>
13946         * kern/env.c (grub_env_set): Rewritten the error handling code.
13948 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13950         * geninit.sh: Made more robust, and more portable.
13952 2005-12-25  Marco Gerards  <marco@gnu.org>
13954         Add support for Apple HFS+ filesystems.
13956         * fs/hfsplus.c: New file.
13958         * DISTLIST: Added `fs/hfsplus.c'.
13960         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13961         (hfsplus_mod_SOURCES): New variable.
13962         (hfsplus_mod_CFLAGS): Likewise.
13963         (hfsplus_mod_LDFLAGS): Likewise.
13964         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13965         (grub_setup_SOURCES): Likewise.
13966         (grub_mkdevicemap_SOURCES): Likewise.
13967         (grub_emu_SOURCES): Likewise.
13968         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13970         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13972         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13974 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13976         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13977         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13978         include/grub/parser.h, include/grub/script.h, kern/parser.c,
13979         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13980         normal/lexer.c, normal/parser.y, normal/script.c, and
13981         partmap/gpt.c.
13982         Removed kern/sparc64/cache.c.
13984         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13985         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13986         grub_emu_init.c.
13988         * configure.ac (AC_INIT): Bumped to 1.92.
13990 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
13992         * kern/err.c (grub_error_push): Added new function to support error
13993         stacks.
13994         (grub_error_pop): Likewise.
13995         (grub_error_stack_items): New local variable to support error stacks.
13996         (grub_error_stack_pos): Likewise.
13997         (grub_error_stack_assert): Likewise.
13998         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13999         stack depth.
14000         (grub_print_error): Added support to print errors from error stack.
14002         * include/grub/err.h (grub_error_push): Added function prototype.
14003         (grub_error_pop): Likewise.
14005 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
14007         * configure.ac: Accept `powerpc64' as host_cpu.
14008         (amd64): Rename to `biarch32'.
14010         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14011         non-cacheline-aligned addresses.
14013         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14014         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
14015         if `size' is non-zero.
14017 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
14019         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14020         and `cd' to make sure the filename is not prefixed with a
14021         directory name.
14022         (pkgdata_MODULES): Add `gpt.mod'.
14023         (gpt_mod_SOURCES): New variable.
14024         (gpt_mod_CFLAGS): Likewise.
14025         (gpt_mod_LDFLAGS): Likewise.
14027         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14029         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14030         New macro.
14032         * partmap/gpt.c: New file.
14034         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14035         GPT partition map is detected.
14037 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
14039         * commands/i386/pc/play.c: New file.
14040         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14041         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14042         macros.
14044 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
14046         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14047         ((unused))' to silence gcc warning.
14049 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
14051         * configure.ac: Correct `AC_PROG_YACC' test.
14053 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14055         * util/powerpc/ieee1275/grub-install.in: Run the mount point
14056         check before installing files.
14058 2005-11-22  Mike Small  <smallm@panix.com>
14060         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14061         number regex so multidigit numbers are recognized correctly.
14063 2005-11-22  Mike Small  <smallm@panix.com>
14065         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14066         debugging message before attempting to claim memory.
14067         (grub_rescue_cmd_initrd): Add a claim debugging message and try
14068         multiple addresses in case of failure.
14070 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14072         * term/tparm.c (get_space): Remove empty `if' statement.
14074         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14076         * kern/parser.c (check_varstate): Rename `state' to 's'.
14078 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14080         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
14081         variable definitions to the beginning of each function.  Sort stack
14082         variables by size.
14083         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
14084         `buf' argument to `char *'.
14086 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14088         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14089         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14090         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14091         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14092         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14093         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14094         configfile.mod, search.mod, gzio.mod and test.mod.
14095         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14096         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14097         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14098         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14099         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14100         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14101         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14102         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14103         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14104         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14105         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14106         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14107         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14108         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14109         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14110         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14111         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14112         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14113         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14114         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14115         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14116         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14117         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14119         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14120         `grep --include'.
14121         (pkgdata_MODULES): Add test.mod.
14123 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14125         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
14126         appending to variables with "+=".
14127         (PModule): Use full pathname to generate *.lst filenames.
14129         * Makefile.in: Fixed list rules moved from genmk.rb.
14130         (.DELETE_ON_ERROR): New special target.
14131         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14133         * conf/i386-pc.rmk: Include conf/common.mk.
14134         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14135         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14136         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14137         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14138         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14139         configfile.mod, search.mod, gzio.mod and test.mod.
14140         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14141         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14142         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14143         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14144         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14145         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14146         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14147         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14148         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14149         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14150         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14151         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14152         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14153         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14154         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14155         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14156         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14157         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14158         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14159         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14160         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14161         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14162         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14163         here...
14164         * conf/common.rmk: ... to here.  New file.
14166         * conf/common.mk: New file.
14168 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
14170         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14171         (grub_script.tab.c): ... here.
14173         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14174         (grub_script.tab.c): ... here.
14176         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14177         (grub_script.tab.c): ... here.
14179         * normal/command.c (grub_command_find): Fixed a memory leak of
14180         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14182 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14184         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14185         "@" which marks the start of a comment on ARM.
14186         (VARIABLE): Likewise.
14188 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14190         Add support for Linux/ADFS partition tables.
14192         * partmap/acorn.c: New file.
14194         * include/grub/acorn_filecore.h: Likewise.
14196         * DISTLIST: Added `partmap/acorn.c' and
14197         `include/grub/acorn_filecore.h'.
14199         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14200         `partmap/acorn.c'.
14201         (pkgdata_MODULES): Add `acorn.mod'.
14202         (acorn_mod_SOURCES): New variable.
14203         (acorn_mod_CFLAGS): Likewise.
14205         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14206         `partmap/acorn.c'.
14207         (pkgdata_MODULES): Add `acorn.mod'.
14208         (acorn_mod_SOURCES): New variable.
14209         (acorn_mod_CFLAGS): Likewise.
14211         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14212         (pkgdata_MODULES): Add `acorn.mod'.
14213         (acorn_mod_SOURCES): New variable.
14214         (acorn_mod_CFLAGS): Likewise.
14215         (acorn_mod_LDFLAGS): Likewise.
14217         * include/types.h (grub_disk_addr_t): New typedef.
14219 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
14221         * geninit.sh: New file.
14223         * geninitheader.sh: Likewise.
14225         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14226         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14227         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14228         * commands/configfile.c (grub_configfile_init)
14229         (grub_configfile_fini): Likewise.
14230         * commands/default.c (grub_default_init, grub_default_fini):
14231         Likewise.
14232         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14233         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14234         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14235         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14236         Likewise.
14237         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14238         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14239         Likewise.
14240         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14241         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14242         Likewise.
14243         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14244         Likewise.
14245         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14246         Likewise.
14247         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14248         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14249         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14250         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14251         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14252         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14253         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14254         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14255         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14256         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14257         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14258         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14259         * partmap/amiga.c (grub_amiga_partition_map_init)
14260         (grub_amiga_partition_map_fini): Likewise.
14261         * partmap/apple.c (grub_apple_partition_map_init)
14262         (grub_apple_partition_map_fini): Likewise.
14263         * partmap/pc.c (grub_pc_partition_map_init)
14264         (grub_pc_partition_map_fini): Likewise.
14265         * partmap/sun.c (grub_sun_partition_map_init,
14266         grub_sun_partition_map_fini): Likewise.
14267         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14268         Likewise.
14270         * util/grub-emu.c: Include <grub_modules_init.h>.
14271         (main): Don't initialize and de-initialize any modules directly,
14272         use `grub_init_all' and `grub_fini_all' instead.
14274         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14275         `grub_vesafb_mod_init'.
14276         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
14277         all users.
14278         * term/i386/pc/vga.c (grub_vga_init): Renamed to
14279         `grub_vga_mod_init'.  Updated all users.
14280         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14282         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14283         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14284         rules.
14286         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14287         Generate a function to initialize the module in utilities.
14288         Updated all callers.
14289         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
14290         initialize the module in utilities.  Updated all callers.
14292 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14294         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14295         escape sequence and a literal ^L to clear the screen.
14297         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14298         when returning from Open Firmware.
14300 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14302         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14303         (grub_ofconsole_height): Likewise.
14304         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14305         manually insert a '\n'.
14306         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14307         `grub_ofconsole_height'.  Return early if these are already set.
14309 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
14311         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14312         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14313         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14314         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14315         and `normal/script.c'.
14316         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14317         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14318         (test_mod_SOURCES): New variable.
14319         (test_mod_CFLAGS): Likewise.
14320         (test_mod_LDFLAGS): Likewise.
14321         (pkgdata_MODULES): Add `test.mod'.
14322         (grub_script.tab.c): New rule.
14323         (grub_script.tab.h): Likewise.
14325 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
14327         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14328         `commands/test.c', `normal/execute.c', `normal/lexer.c',
14329         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14330         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14331         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14332         (test_mod_SOURCES): New variable.
14333         (test_mod_CFLAGS): Likewise.
14334         (pkgdata_MODULES): Add `test.mod'.
14335         (grub_script.tab.c): New rule.
14336         (grub_script.tab.h): Likewise.
14338 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
14340         Add initial scripting support.
14342         * commands/test.c: New file.
14343         * include/grub/script.h: Likewise.
14344         * normal/execute.c: Likewise.
14345         * normal/function.c: Likewise.
14346         * normal/lexer.c: Likewise.
14347         * normal/parser.y: Likewise.
14348         * normal/script.c: Likewise.
14350         * configure.ac: Add `AC_PROG_YACC' test.
14352         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14353         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14354         `normal/function.c' and `normal/script.c'.
14355         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14356         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14357         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14358         variables.
14359         (pkgdata_MODULES): Add `test.mod'.
14360         (grub_script.tab.c): New rule.
14361         (grub_script.tab.h): Likewise.
14363         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14365         * include/grub/normal.h (grub_test_init): New prototype.
14366         (grub_test_fini): Likewise.
14368         * normal/command.c: Include <grub/script.h>.
14369         (grub_command_execute): Rewritten.
14371         * util/grub-emu.c (main): Call `grub_test_init' and
14372         `grub_test_fini'.
14374 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14376         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14377         to 0.
14378         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14379         there are no pending characters.
14381 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14383         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14384         `grub_strndup' to drop device arguments. Replace unnecessary
14385         `grub_strndup' with `grub_strdup'.
14387 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14389         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14390         `debug' environment variable has been set.
14392 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
14394         * Makefile.in (install-local): Use $(DATA).
14395         (uninstall): Likewise.
14396         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14397         (sbin_UTILITIES): ... to here.
14398         (sbin_SCRIPTS): New variable.
14399         (grub_install_SOURCES): New variable.
14400         * util/powerpc/ieee1275/grub-install.in: New file.
14401         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14402         variable.
14403         (add_segments): Call `grub_util_get_path'.
14405 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
14407         From Timothy Baldwin:
14408         * commands/ls.c (grub_ls_list_files): Close FILE with
14409         grub_file_close.
14410         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14412 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
14414         * include/grub/parser.h: New file.
14416         * kern/parser.c: Likewise.
14418         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14419         (grub_setup_SOURCES): Likewise.
14420         (grub_probefs_SOURCES): Likewise.
14421         (grub_emu_SOURCES): Likewise.
14422         (kernel_img_HEADERS): Add `parser.h'.
14424         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14425         (grub_emu_SOURCES): Add `kern/parser.c'.
14426         (grubof_SOURCES): Likewise.
14428         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14429         (grubof_SOURCES): Add `kern/parser.c'.
14431         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14433         * kern/misc.c (grub_split_cmdline): Removed function.
14435         * kern/rescue.c: Include <grub/parser.h>.
14436         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14437         of `grub_split_cmdline'.
14439         * normal/command.c: Include <grub/parser.h>.
14440         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
14441         of `grub_split_cmdline'.
14443         * normal/completion.c: Include <grub/parser.h>.
14444         (cmdline_state): New variable.
14445         (iterate_dir): End the filename with a quote depending on the
14446         command line state.
14447         (get_state): new function.
14448         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14449         split the arguments and determine the current argument.  When the
14450         argument string is not quoted, escape all spaces.
14452 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14454         * normal/sparc64/setjmp.S: New file.
14456 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14458         * include/grub/sparc64/libgcc.h: New file.
14459         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14460         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14461         normal/sparc64/setjmp.c.
14463 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14465         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14466         * kern/sparc64/cache.S: New file.
14467         * kern/sparc64/cache.c: Removed.
14468         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14469         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
14470         -mtune=ultrasparc.
14471         (COMMON_LDFLAGS): Add -melf64_sparc.
14472         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14473         (grubof_SOURCES): Use cache.S instead of cache.c.
14474         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
14475         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14476         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14477         commented though.
14478         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14479         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14480         (linux_mod_CFLAGS): Commented out.
14481         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14482         out because module isn't built.
14483         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14484         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14485         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14486         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14487         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14488         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14489         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14490         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14491         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14492         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14493         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14494         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14495         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14496         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14498 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
14500         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14501         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14502         longer, because HFS should not be used on PC.
14504 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14506         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14507         consistently within the loop.
14509 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
14511         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14512         directory can not be read.
14514 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14516         * configure.ac (AC_INIT): Increase the version number to 1.91.
14518         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14519         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14520         term/i386/pc/serial.c.
14522 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14524         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14525         file size must be permitted.
14527         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14528         between %ah and %al.
14530 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14532         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14533         grub_uint64_t.
14534         Call the hook with a NUL-terminated filename.
14535         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14536         grub_cpu_to_be32.
14538         * kern/term.c (cursor_state): New variable.
14539         (grub_term_set_current): Reset the cursor state on a new
14540         terminal.
14541         (grub_setcursor): Rewritten to use CURSOR_STATE.
14542         (grub_getcursor): New function.
14544         * include/grub/term.h (grub_getcursor): New prototype.
14546         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14547         integers on ARM. Reported by Timothy Baldwin
14548         <T.E.Baldwin99@members.leeds.ac.uk>.
14550 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
14552         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14553         allocated.
14554         (grub_sfs_dir): Likewise.
14556 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
14558         Add support for the SFS filesystem.
14560         * fs/sfs.c: New file.
14562         * DISTLIST: Added `fs/sfs.c'.
14564         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14565         (grub_probefs_SOURCES): Likewise.
14566         (grub_emu_SOURCES): Likewise.
14567         (pkgdata_MODULES): Add `sfs.mod'.
14568         (sfs_mod_SOURCES): New variable.
14569         (sfs_mod_CFLAGS): Likewise.
14570         (sfs_mod_LDFLAGS): Likewise.
14572         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14573         (pkgdata_MODULES): Add `sfs.mod'.
14574         (sfs_mod_SOURCES): New variable.
14575         (sfs_mod_CFLAGS): Likewise.
14577         * util/grub-emu.c (main): Call `grub_sfs_init' and
14578         `grub_sfs_fini'.
14580         * include/grub/fs.h (grub_sfs_init): New prototype.
14581         (grub_sfs_fini): Likewise.
14583 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
14585         Add support for the AFFS filesystem.
14587         * fs/affs.c: New file.
14589         * DISTLIST: Added `fs/affs.c'.
14591         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14592         (grub_probefs_SOURCES): Likewise.
14593         (grub_emu_SOURCES): Likewise.
14594         (pkgdata_MODULES): Add `affs.mod'.
14595         (affs_mod_SOURCES): New variable.
14596         (affs_mod_CFLAGS): Likewise.
14597         (affs_mod_LDFLAGS): Likewise.
14599         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14600         (pkgdata_MODULES): Add `affs.mod'.
14601         (affs_mod_SOURCES): New variable.
14602         (affs_mod_CFLAGS): Likewise.
14604         * util/grub-emu.c (main): Call `grub_affs_init' and
14605         `grub_affs_fini'.
14607         * include/grub/fs.h (grub_affs_init): New prototype.
14608         (grub_affs_fini): Likewise.
14610 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14612         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14614 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14616         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
14617         `-m32' to CFLAGS.
14619         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14620         linking.
14622         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14623         (COMMON_LDFLAGS): New variable.
14624         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14625         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14626         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14627         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14628         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14629         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14630         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14631         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14632         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14633         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14634         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14635         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14636         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14637         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14638         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14639         variables.
14640         (normal_mod_ASFLAGS): Add `-m32'.
14642         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14643         (grub_host_size_t, grub_host_ssize_t): New types.
14644         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14645         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14646         `GRUB_HOST_SIZEOF_VOID_P'.
14648         * include/grub/kernel.h (struct grub_module_header): Type of
14649         member offset changed to `grub_host_off_t'.  Type of member size
14650         changed to `grub_host_size_t'.
14651         (struct grub_module_info): Type of member offset changed to
14652         `grub_host_off_t'.  Type of member size changed to
14653         `grub_host_size_t'.
14655 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
14657         Make GRUB's kernel compliant to Multiboot Specification.
14659         * kern/i386/pc/startup.S (multiboot_header): New label.
14660         (multiboot_entry): Likewise.
14661         (multiboot_trampoline): Likewise.
14663         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14664         Increased to 0x4A0.
14666         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14667         put parentheses after a question mark.
14668         [!GRUB_UTIL] (my_mod): New variable.
14670         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14672 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
14674         Adds support for the XFS filesystem.  Btrees are not supported
14675         yet.
14677         * fs/xfs.c: New file.
14679         * DISTLIST: Added `fs/xfs.c'.
14681         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14682         (grub_probefs_SOURCES): Likewise.
14683         (grub_emu_SOURCES): Likewise.
14684         (pkgdata_MODULES): Add `xfs.mod'.
14685         (xfs_mod_SOURCES): New variable.
14686         (xfs_mod_CFLAGS): Likewise.
14688         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14689         (pkgdata_MODULES): Add `xfs.mod'.
14690         (xfs_mod_SOURCES): New variable.
14691         (xfs_mod_CFLAGS): Likewise.
14693         * util/grub-emu.c (main): Call `grub_xfs_init' and
14694         `grub_xfs_fini'.
14696         * include/grub/fs.h (grub_xfs_init): New prototype.
14697         (grub_xfs_fini): Likewise.
14700 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
14702         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14703         color modes, allow greater than 16 colors to be configured as
14704         a default palette.
14706 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
14708         * normal/completion.c (complete_arguments): Add the qualifier
14709         const into OPTIONS.
14711         From Omniflux <omniflux+lists@omniflux.com>:
14712         * include/grub/terminfo.h: New file.
14713         * include/grub/tparm.h: Likewise.
14714         * include/grub/i386/pc/serial.h: Likewise.
14715         * term/terminfo.c: Likewise.
14716         * term/tparm.c: Likewise.
14717         * term/i386/pc/serial.c: Likewise.
14718         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14719         serial.mod.
14720         (terminfo_mod_SOURCES): New variable.
14721         (terminfo_mod_CFLAGS): Likewise.
14722         (serial_mod_SOURCES): Likewise.
14723         (serial_mod_CFLAGS): Likewise.
14725 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
14727         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14728         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14729         and kern/powerpc/ieee1275/cmain.c, respectively.
14731         * boot/powerpc/ieee1275/crt0.S: Moved to ...
14732         * kern/powerpc/ieee1275/crt0.S: ... here.
14734         * boot/powerpc/ieee1275/cmain.c: Moved to ...
14735         * kern/powerpc/ieee1275/cmain.c: ... here.
14737         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14738         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14739         instead of boot/powerpc/ieee1275/crt0.S and
14740         boot/powerpc/ieee1275/cmain.c, respectively.
14742         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14743         sectors. It was not used anyway.
14745 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14747         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14748         `unused parameter' warning.
14750 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14752         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14753         function.
14754         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14755         getcharwidth.
14757 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
14759         * include/grub/normal.h (enum grub_completion_type): Added
14760         `GRUB_COMPLETION_TYPE_ARGUMENT'.
14762         * normal/cmdline.c (print_completion): Handle
14763         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14764         * normal/menu_entry.c (store_completion): Likewise.
14766         * normal/completion.c (complete_arguments): New function.
14767         (grub_normal_do_completion): Call `complete_arguments' when the
14768         current words start with a dash.
14770 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
14772         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14773         `gzio.mod' instead of `io.mod').
14775 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
14777         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14778         (DISTDIRS): Added io and video.
14779         Rewrite the search routine to make an output consistently.
14781         * DISTLIST: Added conf/sparc64-ieee1275.mk,
14782         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14783         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14784         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14785         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14786         util/powerpc/ieee1275/misc.c.
14788         * include/grub/gzio.h: New file.
14789         * io/gzio.c: Likewise.
14791         * kern/file.c (grub_file_close): Call grub_device_close only if
14792         FILE->DEVICE is not NULL.
14794         * include/grub/mm.h [!NULL] (NULL): New macro.
14796         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14798         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14799         (pkgdata_MODULES): Added gzio.mod.
14800         (gzio_mod_SOURCES): New variable.
14801         (gzio_mod_CFLAGS): Likewise.
14803         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14804         (pkgdata_MODULES): Added gzio.mod.
14805         (gzio_mod_SOURCES): New variable.
14806         (gzio_mod_CFLAGS): Likewise.
14808         * commands/cat.c: Include grub/gzio.h.
14809         (grub_cmd_cat): Use grub_gzfile_open instead of
14810         grub_file_open.
14812         * commands/cmp.c: Include grub/gzio.h.
14813         (grub_cmd_cmp): Use grub_gzfile_open instead of
14814         grub_file_open.
14816         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14817         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14818         grub_file_open.
14819         (grub_rescue_cmd_module): Likewise.
14821 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14823         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14824         kern/sparc64/ieee1275/init.c because it contains _start.
14825         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14827 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14829         * configure.ac: Add support for sparc64 host with ieee1275
14830         firmware.
14831         * configure: Generated from configure.ac.
14832         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14833         instead of int.
14834         (grub_ofdisk_read): Likewise.
14835         (grub_ofdisk_open): Use %p to print pointer values, and cast the
14836         pointers as (void *) to remove a warning.
14837         (grub_ofdisk_close): Likewise.
14838         (grub_ofdisk_read): Likewise.
14839         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14840         returns, so make it return void to remove a warning.
14841         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14842         Corresponding prototype change.
14843         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14844         values, and cast the pointers as (void *) to remove a warning.
14845         (grub_mm_dump): Likewise.
14846         * conf/sparc64-ieee1275.mk: New file.
14847         * conf/sparc64-ieee1275.rmk: Likewise.
14848         * include/grub/sparc64/setjmp.h: Likewise.
14849         * include/grub/sparc64/types.h: Likewise.
14850         * include/grub/sparc64/ieee1275/console.h: Likewise.
14851         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14852         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14853         * include/grub/sparc64/ieee1275/time.h: Likewise.
14854         * kern/sparc64/cache.c: Likewise.
14855         * kern/sparc64/dl.c: Likewise.
14856         * kern/sparc64/ieee1275/init.c: Likewise.
14857         * kern/sparc64/ieee1275/openfw.c: Likewise.
14859 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
14861         * util/console.c (grub_ncurses_putchar): If C is greater than
14862         0x7f, set C to a question mark.
14863         (grub_ncurses_getcharwidth): New function.
14864         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14865         getcharwidth.
14867         * normal/menu.c (print_entry): Made aware of Unicode. First,
14868         convert TITLE to UCS-4, and predict the cursor position by
14869         grub_getcharwidth.
14871         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14872         const to SRC.
14873         * kern/misc.c (grub_utf16_to_utf8): Likewise.
14875 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14877         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14878         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14879         grub_strcat.
14881         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14882         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14883         grub_strcpy and grub_strlen. Take it into account that a space
14884         character is inserted as a delimiter.
14886 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14888         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14889         invalid magic in the error.
14891         * commands/search.c: New file.
14893         * util/grub-emu.c (main): Call grub_search_init and
14894         grub_search_fini.
14896         * kern/rescue.c (grub_rescue_print_disks): Removed.
14897         (grub_rescue_print_devices): New function.
14898         (grub_rescue_cmd_ls): Use grub_device_iterate with
14899         grub_rescue_print_devices instead of grub_disk_dev_iterate with
14900         grub_rescue_print_disks.
14902         * kern/partition.c (grub_partition_iterate): Return the result of
14903         PARTMAP->ITERATE instead of GRUB_ERRNO.
14905         * kern/device.c: Include grub/partition.h.
14906         (grub_device_iterate): New function.
14908         * include/grub/partition.h (grub_partition_iterate): Return int
14909         instead of grub_err_t.
14911         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14912         prototype.
14913         [GRUB_UTIL] (grub_search_fini): Likewise.
14915         * include/grub/device.h (grub_device_iterate): New prototype.
14917         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14918         commands/search.c.
14919         (pkgdata_MODULES): Added search.mod.
14920         (search_mod_SOURCES): New variable.
14921         (search_mod_CFLAGS): Likewise.
14923         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14924         (pkgdata_MODULES): Added search.mod.
14925         (search_mod_SOURCES): New variable.
14926         (search_mod_CFLAGS): Likewise.
14928         * commands/ls.c (grub_ls_list_disks): Renamed to ...
14929         (grub_ls_list_devices): ... this, and use grub_device_iterate.
14930         All callers changed.
14932         * DISTLIST: Added commands/search.c.
14934 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14936         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14937         conversion.
14938         (grub_getcharwidth): New function.
14940         * kern/misc.c (grub_utf8_to_ucs4): New function.
14942         * include/grub/term.h (struct grub_term): Added a new member
14943         "getcharwidth".
14944         (grub_getcharwidth): New prototype.
14946         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14948         * term/i386/pc/console.c (map_char): New function. Segregated from
14949         grub_console_putchar.
14950         (grub_console_putchar): Use map_char.
14951         (grub_console_getcharwidth): New function.
14952         (grub_console_term): Specified grub_console_getcharwidth as
14953         getcharwidth.
14955         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14956         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14958         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14959         GRUB_ERRNO.
14960         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14961         on grub_strtoul completely.
14962         (write_char): Declare local variables in the beginning of the
14963         function.
14964         (grub_vesafb_getcharwidth): New function.
14965         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14966         getcharwidth.
14968 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
14970         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14971         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14972         commands/i386/pc/vbetest.c.
14974         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14975         call grub_vbe_get_controller_info again, because the returned
14976         information is volatile.
14977         (grub_vbe_set_video_mode): Mostly rewritten.
14978         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14979         grub_vbe_status_t correctly.
14980         (grub_vbe_get_video_mode_info): Likewise.
14981         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14982         several if statements.
14984         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14985         * commands/i386/pc/vbeinfo.c: ... this.
14987         * commands/i386/pc/vbe_test.c: Renamed to ...
14988         * commands/i386/pc/vbetest.c: ... this.
14990         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14991         ...
14992         (grub_cmd_vbeinfo): ... this. Save video modes before
14993         iterating. Skip a video mode, if it is not available, not enough
14994         information is given or it is monochrome. Show the memory
14995         model. Leave the interpretation of MODEVAR to grub_strtoul
14996         completely.
14997         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14998         (GRUB_MOD_FINI): Likewise.
15000         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15001         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15002         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15003         duplicated grub_env_get. Leave the interpretation of MODEVAR to
15004         grub_strtoul completely.
15005         (real2pm): Removed.
15006         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15007         (GRUB_MOD_FINI): Likewise.
15009         * normal/misc.c: Include grub/mm.h.
15011         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15012         vbe_list_modes with vbetest.mod and vbeinfo.mod.
15013         (vbe_list_modes_mod_SOURCES): Removed.
15014         (vbe_list_modes_mod_CFLAGS): Likewise.
15015         (vbe_test_mod_SOURCES): Likewise.
15016         (vbe_test_mod_CFLAGS): Likewise.
15017         (vbeinfo_mod_SOURCES): New variable.
15018         (vbeinfo_mod_CFLAGS): Likewise.
15019         (vbetest_mod_SOURCES): Likewise.
15020         (vbetest_mod_CFLAGS): Likewise.
15022 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
15024         * normal/misc.c: New file.
15026         * DISTLIST: Added normal/misc.c.
15028         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15029         DISK to HOOK. Call HOOK with DISK.
15030         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15031         * partmap/pc.c (pc_partition_map_iterate): Likewise.
15032         * partmap/sun.c (sun_partition_map_iterate): Likewise.
15034         * normal/menu_entry.c (struct screen): Added a new member
15035         "completion_shown".
15036         (completion_buffer): New global variable.
15037         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15038         (store_completion): New function.
15039         (complete): Likewise.
15040         (clear_completions): Likewise.
15041         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15042         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15043         a tab, call complete.
15045         * normal/completion.c (disk_dev): Removed.
15046         (print_simple_completion): Likewise.
15047         (print_partition_completion): Likewise.
15048         (print_func): New global variable.
15049         (add_completion): Do not take the arguments WHAT or PRINT any
15050         longer. Added a new argument TYPE. Instead of printing directly,
15051         call PRINT_FUNC if not NULL.
15052         All callers changed.
15053         (complete_device): Use a local variable DEV instead of
15054         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15055         (grub_normal_do_completion): Take a new argument HOOK. Do not
15056         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15057         empty string, return NULL instead.
15058         All callers changed.
15060         * normal/cmdline.c (print_completion): New function.
15062         * kern/partition.c (grub_partition_iterate): Add an argument DISK
15063         to HOOK.
15064         All callers changed.
15066         * kern/disk.c (grub_print_partinfo): Removed.
15068         * include/grub/partition.h (struct grub_partition_map): Add a new
15069         argument DISK into HOOK of ITERATE.
15070         (grub_partition_iterate): Add a new argument DISK to HOOK.
15072         * include/grub/normal.h (enum grub_completion_type): New enum.
15073         (grub_completion_type_t): New type.
15074         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15075         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15076         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15077         (GRUB_COMPLETION_TYPE_FILE): Likewise.
15078         (grub_normal_do_completion): Added a new argument HOOK.
15079         (grub_normal_print_device_info): New prototype.
15081         * include/grub/disk.h (grub_print_partinfo): Removed.
15083         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15084         (normal_mod_SOURCES): Likewise.
15085         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15086         (normal_mod_SOURCES): Likewise.
15088         * commands/ls.c (grub_ls_list_disks): Use
15089         grub_normal_print_device_info instead of grub_print_partinfo. Free
15090         PNAME.
15091         (grub_ls_list_files): Use grub_normal_print_device_info instead of
15092         duplicating the code.
15094 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15096         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15097         follow GCS more precisely.
15098         * commands/i386/pc/vbe_test.c: Likewise.
15099         * include/grub/i386/pc/vbe.h: Likewise.
15100         * term/i386/pc/vesafb.c: Likewise.
15101         * video/i386/pc/vbe.c: Likewise.
15103 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15105         * DISTLIST: Added term/i386/pc/vesafb.c
15106         DISTLIST: Added video/i386/pc/vbe.c
15107         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15108         DISTLIST: Added commands/i386/pc/vbe_test.c.
15109         * commands/i386/pc/vbe_list_modes.c: New file.
15110         * commands/i386/pc/vbe_test.c: Likewise.
15111         * term/i386/pc/vesafb.c: Likewise.
15112         * video/i386/pc/vbe.c: Likewise.
15113         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15114         (grub_vbe_probe) Added prototype.
15115         (grub_vbe_set_video_mode) Likewise.
15116         (grub_vbe_get_video_mode) Likewise.
15117         (grub_vbe_get_video_mode_info) Likewise.
15118         (grub_vbe_set_pixel_rgb) Likewise.
15119         (grub_vbe_set_pixel_index) Likewise.
15120         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15121         (pkgdata_MODULES): Added vesafb.mod.
15122         (pkgdata_MODULES): Added vbe_list_modes.mod.
15123         (pkgdata_MODULES): Added vbe_test.mod.
15124         (vbe_mod_SOURCES): Added.
15125         (vbe_mod_CFLAGS): Likewise.
15126         (vesafb_mod_SOURCES): Likewise.
15127         (vesafb_mod_CFLAGS): Likewise.
15128         (vbe_list_modes_mod_SOURCES): Likewise.
15129         (vbe_list_modes_mod_CFLAGS): Likewise.
15130         (vbe_test_mod_SOURCES): Likewise.
15131         (vbe_test_mod_CFLAGS): Likewise.
15133 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
15135         * normal/command.c (grub_command_execute): If INTERACTIVE is
15136         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15137         CMDLINE. Disable the pager if INTERACTIVE is true.
15138         All callers are changed.
15140         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15141         before reading a config file.
15142         * normal/main.c (read_config_file): Even if a command is not
15143         found, register it if it is within an entry.
15145         * util/grub-emu.c: Include sys/types.h and unistd.h.
15146         (options): Added --hold.
15147         (struct arguments): Added a new member "hold".
15148         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15149         missing.
15150         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15151         cleared by a debugger, if it is not zero.
15153         * include/grub/normal.h (grub_command_execute): Add an argument
15154         INTERACTIVE.
15156 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
15158         * DISTLIST: Added include/grub/i386/pc/vbe.h.
15160 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
15162         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15163         program with another one, because the old one didn't detect a bug
15164         in gcc-3.4. Always use regparm 2, because the new test is still
15165         not enough for gcc-4.0. Someone must investigate a simple test
15166         case which detects a bug in gcc-4.0.
15168 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
15170         * DISTLIST: Added normal/completion.c.
15172         * normal/completion.c: New file.
15174         * term/i386/pc/console.c (grub_console_getwh): New function.
15175         (grub_console_term): Assign grub_console_getwh to getwh.
15177         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15178         function is defined in normal/completion.c as
15179         grub_normal_do_completion.
15180         (grub_cmdline_get): Use grub_normal_do_completion instead of
15181         grub_tab_complete.
15183         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15184         returns non-zero, otherwise return 0.
15185         (grub_partition_iterate): First, probe the partition map. Then,
15186         call ITERATE only for this partition map.
15188         * kern/misc.c (grub_strncmp): Rewritten.
15190         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15191         returns non-zero. Otherwise return 0.
15193         * include/grub/partition.h (grub_partition_map_iterate): Return
15194         int instead of void.
15196         * include/grub/normal.h (grub_normal_do_completion): New prototype.
15198         * include/grub/misc.h (grub_strncmp): Change the type of N to
15199         grub_size_t.
15201         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15202         of void.
15204         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15205         unsigned explicitly before comparing it with I.
15207         * kern/main.c (grub_env_write_root): Add the attribute unused into
15208         VAR.
15210         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15211         normal/completion.c.
15212         (normal_mod_SOURCES): Likewise.
15213         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15214         (normal_mod_SOURCES): Likewise.
15216         * normal/command.c (grub_iterate_commands): If ITERATE returns
15217         non-zero, return one immediately.
15219 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
15221         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15222         * kern/i386/pc/startup.S: Updated Global Descriptor table's
15223         descriptions.
15224         (grub_vbe_get_controller_info): New function.
15225         (grub_vbe_get_mode_info): Likewise.
15226         (grub_vbe_set_mode): Likewise.
15227         (grub_vbe_get_mode): Likewise.
15228         (grub_vbe_set_memory_window): Likewise.
15229         (grub_vbe_get_memory_window): Likewise.
15230         (grub_vbe_set_scanline_length): Likewise.
15231         (grub_vbe_get_scanline_length): Likewise.
15232         (grub_vbe_set_display_start): Likewise.
15233         (grub_vbe_get_display_start): Likewise.
15234         (grub_vbe_set_palette_data): Likewise.
15235         * include/grub/i386/pc/vbe.h: New file.
15237 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15239         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15240         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15241         * DISTLIST: Likewise.
15242         * kern/ieee1275/of.c: Moved to ...
15243         * kern/ieee1275/ieee1275.c: ... here.
15245 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15247         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15248         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15249         Pass 0 as `end' parameter to grub_strtoul().
15251 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15253         * include/grub/powerpc/ieee1275/console.h: Do not include
15254         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
15255         ifdef.
15256         (grub_console_cur_color): Remove i386-specific prototype.
15257         (grub_console_real_putchar): Likewise.
15258         (grub_console_checkkey): Likewise.
15259         (grub_console_getkey): Likewise.
15260         (grub_console_getxy): Likewise.
15261         (grub_console_gotoxy): Likewise.
15262         (grub_console_cls): Likewise.
15263         (grub_console_setcursor): Likewise.
15264         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15265         Include <grub/machine/console.h>.
15266         * term/ieee1275/ofconsole.c: Likewise.
15268 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
15270         * Makefile.in (LIBLZO): New variable.
15272         * configure.ac: Check for LZO version 2.
15274         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15275         lzo/lzo1x.h instead of lzo1x.h.
15277         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15278         of -llzo.
15280         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15281         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15283         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15284         copying the data from PARTITION to P.
15286 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15288         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15289         negative, unload the module.
15291         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15292         map is "pc_partition_map" but not "pc".
15293         (usage): Fix the description. The options are --boot-image and
15294         --core-image but not --boot-file or --core-file.
15295         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15296         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15297         DEFAULT_DIRECTORY.
15299         * util/i386/pc/grub-install.in: Do not specify --boot-file or
15300         --core-file. Specify INSTALL_DEVICE as an argument.
15302         * util/console.c: Include config.h.
15303         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15304         [HAVE_NCURSES_H]: Include ncurses.h.
15305         [HAVE_CURSES_H]: Include curses.h.
15306         [!A_NORMAL] (A_NORMAL): Defined as zero.
15307         [!A_STANDOUT] (A_STANDOUT): Likewise.
15309         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15310         -lncurses.
15311         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15313         * configure.ac: Check for curses libraries and headers.
15315         * Makefile.in (LIBCURSES): New variable.
15317         * genmk.rb (Script::rule): Set the executable bits.
15319         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15320         name of the PC partition map is "pc_partition_map" but not "pc".
15322 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15324         * util/i386/pc/grub-install.in (grub_probefs): New variable.
15325         (modules): Likewise.
15326         (usage): Added descriptions for --modules and --grub-probefs.
15327         Handle --modules and --grub-probefs. Save the arguments in MODULES
15328         and GRUB_PROBEFS, respectively.
15329         Auto-detect a filesystem module against GRUBDIR. If the result is
15330         empty and modules are not specified explicitly, abort the
15331         installation. Add the result to MODULES.
15333         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15334         disk/powerpc/ieee1275/ofdisk.c,
15335         include/grub/powerpc/ieee1275/init.h and
15336         term/powerpc/ieee1275/ofconsole.c.
15337         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15338         term/ieee1275/ofconsole.c.
15340         * include/grub/powerpc/ieee1275/console.h: Resurrected.
15342         * COPYING: Upgraded to the latest version. Only the address of the
15343         FSF office has changed.
15345 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15347         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15348         kern/ieee1275.c with kern/ieee1275/of.c.
15350         * kern/ieee1275.c: Moved to ...
15351         * kern/ieee1275/of.c: ... here.
15353 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
15355         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15356         readability.
15358         * config.guess: Updated to the latest version from gnulib.
15359         * config.sub: Likewise.
15360         * install.sh: Likewise.
15361         * mkinstalldirs: Likewise.
15363         * include/grub/console.h: Removed. This file is arch-specific. Do
15364         not put this in include/grub.
15366         * include/grub/i386/pc/console.h: Resurrected.
15368         * util/console.c: Include grub/machine/console.h instead of
15369         grub/console.h.
15370         * util/grub-emu.c: Likewise.
15372 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
15374         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15375         hardcoded value.
15377         From Vincent Pelletier  <subdino2004@yahoo.fr>
15378         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15379         Redefined to use grub_getwh.
15380         (grub_term): New member named getwh.
15381         (grub_getwh): New prototype.
15382         * kern/term.c (grub_getwh): New function.
15383         * term/i386/pc/console.c (grub_console_getwh): New function.
15384         (grub_console_term): New member `getwh'.
15385         * term/i386/pc/vga.c (grub_vga_getwh): New function.
15386         (grub_vga_term): New member `getwh'.
15387         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15388         grub_ssize_t.
15389         (grub_ofconsole_getw): New function.
15390         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15391         (grub_ofconsole_term): New field named getwh and new initial
15392         value.
15394 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
15396         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15397         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
15398         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15399         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15400         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15401         of <grub/machine/ieee1275.h>.
15402         * commands/ieee1275/reboot.c: Likewise.
15403         * boot/powerpc/ieee1275/ieee1275.c: Move ...
15404         * kern/ieee1275.c: ... to here.  All users updated.  Change all
15405         parameter structs to use new type `grub_ieee1275_cell_t'.
15406         * term/powerpc/ieee1275/ofconsole.c: Move ...
15407         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
15408         * disk/powerpc/ieee1275/ofdisk.c: Move ...
15409         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
15410         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15411         to return int.
15412         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15413         Remove unused prototypes.  All users updated.
15414         * include/grub/powerpc/ieee1275/console.h: Removed.
15415         * include/grub/powerpc/ieee1275/ieee1275.h: Define
15416         `grub_ieee1275_cell_t'.
15417         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15418         Cast comparisons with -1 to the correct type.
15419         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15420         type to match `grub_ieee1275_entry_fn'.
15422 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
15424         * DISTLIST: Added util/i386/pc/grub-probefs.c.
15426         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15427         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15428         partmap/sun.c.
15429         (grub_probefs_SOURCES): New variable.
15431         * util/i386/pc/grub-probefs.c: New file.
15433         * util/i386/pc/grub-setup.c (main): Call
15434         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15435         grub_hfs_init and grub_jfs_init to initialize the system. Call
15436         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15437         grub_pc_partition_map_fini to finish the system.
15439 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
15441         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15442         function.
15443         (grub_multiboot_load_elf32): Likewise.
15444         (grub_multiboot_is_elf64): Likewise.
15445         (grub_multiboot_load_elf64): Likewise.
15446         (grub_multiboot_load_elf): Likewise.
15447         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15448         an ELF32 or ELF64 file.
15449         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15451         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15452         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15453         NULL before calling FS->LABEL.
15454         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15455         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15456         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15457         before calling FS->LABEL.
15459 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
15461         * util/i386/pc/grub-install.in (datadir): New variable.
15462         (libdir): Removed.
15463         (pkgdatadir): New variable.
15464         (pkglibdir): Removed.
15466 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
15468         * DISTLIST: Added util/i386/pc/grub-install.in.
15470         * util/i386/pc/grub-install.in: New file.
15472         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15473         (grub_install_SOURCES): Likewise.
15475         * genmk.rb: Added support for scripts.
15476         (Script): New class.
15477         (scripts): New variable.
15479         * Makefile.in (install-local): Install sbin_SCRIPTS by
15480         INSTALL_SCRIPT.
15481         (uninstall): Remove sbin_SCRIPTS.
15483         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15484         device, try to get a GRUB device by
15485         grub_util_biosdisk_get_grub_dev.
15486         Free DEST_DEV.
15488         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15489         description for --device-map.
15491 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15493         Change the semantics of variable hooks. They now return strings
15494         instead of error values.
15496         * util/i386/pc/grub-setup.c: Include grub/env.h.
15497         (setup): Use grub_device_set_root instead of grub_env_set.
15499         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15500         grub_env_get instead of grub_device_set_root and
15501         grub_device_get_root, respectively.
15503         * kern/main.c (grub_env_write_root): New function.
15504         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15505         grub_env_set instead of grub_device_set_root.
15507         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15508         many variables.
15509         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15510         rather than calling ENV->WRITE_HOOK afterwards.
15511         (grub_env_get): Return the result of ENV->READ_HOOK rather than
15512         passing a pointer of a pointer.
15513         (grub_register_variable_hook): Change the types of "read_hook" and
15514         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15515         respectively.
15516         Allocate the default empty string on the heap, because this string
15517         may be freed later.
15519         * kern/device.c: Include grub/env.h.
15520         (grub_device_set_root): Removed.
15521         (grub_device_get_root): Likewise.
15522         (grub_device_open): Use grub_env_get instead of
15523         grub_device_get_root.
15525         * include/grub/env.h (grub_env_read_hook_t): New type.
15526         (grub_env_write_hook_t): Likewise.
15527         (grub_env_var): Change the types of "read_hook" and "write_hook"
15528         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15529         (grub_register_variable_hook): Likewise.
15531         * include/grub/device.h (grub_device_set_root): Removed.
15532         (grub_device_set_root): Likewise.
15534         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15535         make sure that DIRNAME terminates with '/', so that
15536         grub_fat_find_dir will fail if PATH is not a directory.
15538         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15539         from DIRNAME.
15540         Use the qualifier auto for print_files and print_files_long.
15541         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15542         as a regular file.
15543         Put a newline only if there is no error.
15544         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15545         used.
15547 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15549         * kern/partition.c (grub_partition_probe): Initialize PART to
15550         NULL. Otherwise, when no partition map is registered, this returns
15551         a garbage.
15553 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
15555         * partmap/apple.c (apple_partition_map_iterate): Check if POS
15556         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15557         valid.
15559 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
15561         * commands/ls.c (grub_ls_list_disks): Print the filesystem
15562         information on each device, if it does not have partitions. Print
15563         "Device" instead of "Disk", because this function is not specific
15564         to disk devices.
15566         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15567         static to ensure that it is put on the memory rather than a
15568         register.
15570 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15572         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15573         (grub_cat_init): Likewise.
15574         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15575         (options): Likewise.
15576         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15577         (grub_configfile_init): Likewise.
15578         * font/manager.c (GRUB_MOD_INIT): Likewise.
15579         * commands/help.c (GRUB_MOD_INIT): Likewise.
15580         (grub_help_init): Likewise.
15581         * normal/command.c (grub_command_init): Likewise.
15582         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15583         * disk/loopback.c (grub_loop_init): Likewise.
15584         (GRUB_MOD_INIT): Likewise.
15585         * commands/ls.c (grub_ls_init): Likewise.
15586         (GRUB_MOD_INIT): Likewise.
15587         (options): Likewise.
15588         * commands/boot.c (grub_boot_init): Likewise.
15589         (GRUB_MOD_INIT): Likewise.
15590         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15591         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15592         (GRUB_MOD_INIT): Likewise.
15593         * commands/cmp.c (grub_cmp_init): Likewise.
15594         (GRUB_MOD_INIT): Likewise.
15596         * normal/arg.c: Use <> instead of "" to include header files.
15597         (SHORT_ARG_HELP): New macro.
15598         (SHORT_ARG_USAGE): Likewise.
15599         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15600         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15601         descriptions.
15602         (find_short): Check if C is 'h' or 'u' explicitly.
15603         (grub_arg_show_help): Use space characters instead of tabs. Treat
15604         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15605         are shown with --help and --usage only if they are not used for
15606         the command itself.
15607         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15608         'h' and 'u'.
15610         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15611         const into "longarg". Change the type of "shortarg" to int.
15613 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15615         * boot/i386/pc/boot.S (boot_drive_check): New label.
15617         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15618         macro.
15620         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15621         which do not pass a boot drive correctly. Copied from GRUB Legacy.
15623 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15625         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15626         When turning off Gate A20, skip the check and return immediately,
15627         because this is not fatal usually.
15629 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15631         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15632         be 0x7C00 instead of 0x8000.
15634         * boot/i386/pc/pxeboot.S: Rewritten.
15636         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15637         EXT_C.
15638         (gate_a20_check_state): Read a byte from 0x108000. Invert the
15639         result.
15641 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
15643         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15644         robustness. This routine now supports a BIOS call and System
15645         Control Port A to modify the gate A20.
15647         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15648         Increased to 0x440.
15650 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
15652         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15653         device path and resulting ihandle.
15654         (grub_ofdisk_close): dprintf the ihandle being closed.
15655         (grub_ofdisk_read): dprintf function parameters.
15656         * kern/mm.c (grub_mm_init_region): Likewise.
15657         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15658         (grub_linux_boot): dprintf the Linux entry point, initrd address and
15659         size, and boot arguments.
15660         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15661         before loading into memory.
15662         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15663         before loading into memory.
15665 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
15667         * kern/mm.c: Added much documentation.
15668         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15669         8, set to 5 instead of 8.
15671 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15673         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15675         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15676         (grub_mkdevicemap_SOURCES): New variable.
15678         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15679         lib/device.c of GRUB Legacy.
15681 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15683         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15684         instead of PATH is NULL.
15686 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
15688         * commands/cmp.c (BUFFER_SIZE): New macro.
15689         (grub_cmd_cmp): Close the right file at the right time.  Compare
15690         only data just read.  Don't report files of different  size as
15691         identical.  Dynamically allocate buffers.  Move variable
15692         declarations at the beginning of function.
15694 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
15696         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15697         reverse.
15699 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
15701         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15702         when backspace is pressed at beginning of line.
15704 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
15706         * DISTLIST: Added genfslist.sh.
15708         * normal/main.c (fs_module_list): New variable.
15709         (autoload_fs_module): New function.
15710         (read_fs_list): Likewise.
15711         (grub_normal_execute): Call read_fs_list.
15713         * kern/fs.c (grub_fs_autoload_hook): New variable.
15714         (grub_fs_probe): Added support for auto-loading.
15716         * include/grub/normal.h (struct grub_fs_module_list): New struct.
15717         (grub_fs_module_list_t): New type.
15719         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15720         (grub_fs_autoload_hook): New prototype.
15722         * genfslist.sh: New file.
15724         * genmk.rb: Added a rule to generate a filesystem list.
15726 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
15728         * configure.ac: Fix the test for cross-compiling.
15730         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
15731         define GRUB_UTIL anymore.
15733         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15734         so this function works on other systems than just big endian.
15735         (load_modules): Likewise.
15736         (add_segments): Likewise.
15738 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
15740         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
15741         contains `l' modifier, get a long from va_arg().
15743 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
15745         * kern/mm.c (grub_free): If the next free block which is being
15746         merged is the first free block, set the first block to the block
15747         being freed.
15748         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15750 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15752         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15753         `grub_ieee1275_chosen'.
15755 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15757         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15758         (grub_ieee1275_chosen): New variable.
15759         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15760         `chosen'.
15761         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15762         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15763         Rename first argument to `phandle' for consistency.
15764         (grub_ieee1275_get_property_length): Likewise.
15765         (grub_ieee1275_next_property): Likewise.  Change type of first argument
15766         to grub_ieee1275_phandle_t.
15767         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15768         Move export next to declaration.
15769         (grub_ieee1275_chosen): New variable.
15770         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15771         Correct cosmetic typo.
15772         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15773         `grub_ieee1275_chosen'.
15774         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15775         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15776         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15777         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15778         `grub_ieee1275_chosen'.
15780 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
15782         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15783         /chosen/bootargs.
15784         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15785         /chosen/bootargs as "variable=value" pairs.
15787 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
15789         * include/grub/misc.h (grub_dprintf): New macro.
15790         (grub_real_dprintf): New prototype.
15791         (grub_strword): Likewise.
15792         (grub_iswordseparator): Likewise.
15793         * kern/misc.c (grub_real_dprintf): New function.
15794         (grub_strword): Likewise.
15795         (grub_iswordseparator): Likewise.
15797 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
15799         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15800         (roundup): Remove macro.
15801         (grub_ieee1275_flags): Make static.
15802         (grub_ieee1275_realmode): Remove.
15803         (grub_ieee1275_test_flag): New function.
15804         (grub_ieee1275_set_flag): Likewise.
15805         (find_options): Rename to `grub_ieee1275_find_options'; update
15806         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15807         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15808         (cmain): New prototype.
15809         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15810         `grub_ieee1275_flags' directly.
15811         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15812         machine/biosdisk.h.
15813         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15814         Don't include grub/machine/init.h.
15815         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15816         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15817         Remove prototype.
15818         (grub_ieee1275_realmode): Likewise.
15819         (grub_ieee1275_flag): New enum.
15820         (grub_ieee1275_test_flag): New prototype.
15821         (grub_ieee1275_set_flag): New prototype.
15822         * include/grub/powerpc/ieee1275/init.h: Remove file.
15823         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15824         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15825         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
15826         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
15827         comment.
15828         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15829         `grub_ieee1275_test_flag'.
15830         (grub_ieee1275_encode_devname): Likewise.
15832 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
15834         * include/grub/powerpc/ieee1275/ieee1275.h
15835         (grub_ieee1275_encode_devname): New prototype.
15836         (grub_ieee1275_get_filename): Likewise.
15837         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15838         function.
15839         (grub_set_prefix): Likewise.
15840         (grub_machine_init): Call grub_set_prefix.
15841         * kern/powerpc/ieee1275/openfw.c: Fix typos.
15842         (grub_parse_type): New enum.
15843         (grub_ieee1275_get_devargs): New function.
15844         (grub_ieee1275_get_devname): Likewise.
15845         (grub_ieee1275_parse_args): Likewise.
15846         (grub_ieee1275_get_filename): Likewise.
15847         (grub_ieee1275_encode_devname): Likewise.
15849 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
15851         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15852         `grub_loader_unset'.
15854 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
15856         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15857         instead of grub_ieee1275_interpret.
15858         (grub_halt_init): New function.
15859         (grub_halt_fini): Likewise.
15860         (GRUB_MOD_INIT): Correct message grammar.
15861         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15862         instead of grub_ieee1275_interpret.
15863         (grub_reboot_init): New function.
15864         (grub_reboot_fini): Likewise.
15865         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15866         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15867         util/i386/pc/misc.c with commands/ieee1275/halt.c,
15868         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15869         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15870         function.
15871         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15872         Add prototype.
15873         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15874         prototype.
15875         (grub_halt): Likewise.
15876         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15877         (cmain): Remove __attribute__((unused)).
15878         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15879         (grub_heap_len): Likewise.
15880         (grub_machine_fini): New function.
15881         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15882         (grub_halt): Likewise.
15883         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15884         function.
15885         * util/powerpc/ieee1275/misc.c: New file.
15887 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
15889         * DISTLIST: New file.
15890         * gendistlist.sh: Likewise.
15892         * Makefile.in (COMMON_DISTFILES): Removed.
15893         (BOOT_DISTFILES): Likewise.
15894         (CONF_DISTFILES): Likewise.
15895         (DISK_DISTFILES): Likewise.
15896         (FS_DISTFILES): Likewise.
15897         (INCLUDE_DISTFILES): Likewise.
15898         (KERN_DISTFILES): Likewise.
15899         (LOADER_DISTFILES): Likewise.
15900         (TERM_DISTFILES): Likewise.
15901         (UTIL_DISTFILES): Likewise.
15902         (DISTFILES): Likewise.
15903         (uninstall): Uninstall files in $(pkgdata_DATA).
15904         (DISTLIST): New target.
15905         (distdir): Use the contents of the file DISTLIST to get a list of
15906         distributed files.
15908 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
15910         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15911         descriptor. This is ported from GRUB Legacy.
15913         * gencmdlist.sh: Added an extra semicolon to make it work with
15914         old sed versions. Reported by Robert Bihlmeyer
15915         <robbe@orcus.priv.at>.
15917 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
15919         Automatic loading of commands is supported.
15921         * normal/main.c (read_command_list): New function.
15922         (grub_normal_execute): Call read_command_list.
15924         * normal/command.c (grub_register_command): Return zero or CMD.
15925         Allocate CMD->NAME from the heap.
15926         Initialize CMD->MODULE_NAME to zero.
15927         Find the same name as well. If the same command is found and it is
15928         a dummy command, overwrite members. If it is not a dummy command,
15929         return zero.
15930         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15931         (grub_command_find): If a dummy command is found, load a module
15932         and retry to find a command only once.
15934         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15935         make sure that each command is loaded.
15937         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15938         macro.
15939         (struct grub_command): Remove const from the member `name'.
15940         Add a new member `module_name'.
15941         (grub_register_command): Return grub_command_t.
15943         * commands/help.c (grub_cmd_help): Call grub_command_find to make
15944         sure that each command is loaded.
15946         * genmk.rb (PModule::rule): Specify a module name without the
15947         suffix ".mod" to gencmdlist.sh.
15949 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15951         * gencmdlist.sh: New file.
15953         * genmk.rb (PModule::rule): Generate a rule for a command list.
15954         Clean command.lst.
15955         Generate command.lst from $(COMMANDFILES).
15957         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15958         (DATA): Added $(pkgdata_DATA).
15959         (install-local): Install files in $(pkgdata_DATA).
15961 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15963         * term/i386/pc/vga.c (debug_command): Removed.
15964         (GRUB_MOD_INIT): Do not register the command "debug".
15966         From Hollis Blanchard:
15967         * commands/configfile.c: New file.
15968         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15969         commands/configfile.c.
15970         (pkgdata_MODULES): Added configfile.mod.
15971         (configfile_mod_SOURCES): New variable.
15972         (configfile_mod_CFLAGS): Likewise.
15973         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15974         commands/configfile.c.
15975         (pkgdata_MODULES): Added configfile.mod.
15976         (configfile_mod_SOURCES): New variable.
15977         (configfile_mod_CFLAGS): Likewise.
15978         * util/grub-emu.c (main): Call grub_configfile_init and
15979         grub_configfile_fini.
15980         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15981         prototype.
15982         [GRUB_UTIL] (grub_configfile_fini): Likewise.
15984 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15986         * normal/arg.c (grub_arg_show_help): Do not show the bug report
15987         address.
15989         * commands/help.c (grub_cmd_help): Do not print newlines after
15990         the last command in print_command_help.
15992 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15994         * commands/default.h: New file.
15995         * commands/timeout.h: Likewise.
15996         * normal/context.c: Likewise.
15998         * util/misc.c: Do not include sys/times.h.
15999         Include sys/time.h and grub/machine/time.h.
16000         (grub_get_rtc): Rewritten with gettimeofday.
16002         * util/grub-emu.c (main): Call grub_default_init and
16003         grub_timeout_init before grub_normal_init, and call
16004         grub_timeout_fini and grub_default_fini after grub_main.
16006         * util/console.c (grub_ncurses_checkkey): Return the read
16007         character or -1.
16009         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16010         timeouts.
16012         * normal/main.c (read_config_file): Push MENU. If this fails,
16013         print an error and wait for a user input.
16014         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16015         If a menu is empty or an error occurs, pop MENU.
16016         (grub_normal_execute): Pop and free MENU after grub_menu_run
16017         returns.
16019         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16021         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16022         include time.h.
16023         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16024         without GRUB_UTIL.
16025         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16026         time.h.
16027         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16028         without GRUB_UTIL.
16030         * include/grub/normal.h (struct grub_menu_list): New struct.
16031         (grub_menu_list_t): New type.
16032         (struct grub_context): New struct.
16033         (grub_context_t): New type.
16034         (grub_register_command): Got rid of EXPORT_FUNC.
16035         (grub_unregister_command): Likewise.
16036         (grub_context_get): New prototype.
16037         (grub_context_get_current_menu): Likewise.
16038         (grub_context_push_menu): Likewise.
16039         (grub_context_pop_menu): Likewise.
16040         [GRUB_UTIL] (grub_default_init): Likewise.
16041         [GRUB_UTIL] (grub_default_fini): Likewise.
16042         [GRUB_UTIL] (grub_timeout_init): Likewise.
16043         [GRUB_UTIL] (grub_timeout_fini): Likewise.
16045         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16046         commands/timeout.c and normal/context.c.
16047         (pkgdata_MODULES): Added default.mod and timeout.mod.
16048         (normal_mod_SOURCES): Added normal/context.c.
16049         (default_mod_SOURCES): New variable.
16050         (default_mod_CFLAGS): Likewise.
16051         (timeout_mod_SOURCES): Likewise.
16052         (timeout_mod_CFLAGS): Likewise.
16053         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16054         conf/i386-pc.rmk.
16055         (pkgdata_MODULES): Added default.mod and timeout.mod.
16056         (normal_mod_SOURCES): Added normal/context.c.
16057         (default_mod_SOURCES): New variable.
16058         (default_mod_CFLAGS): Likewise.
16059         (timeout_mod_SOURCES): Likewise.
16060         (timeout_mod_CFLAGS): Likewise.
16062         * Makefile.in (all-local): Added $(MKFILES).
16064 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16066         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16067         (grub_emu_SOURCES): Likewise.
16068         (pkgdata_MODULES): Add `sun.mod'.
16069         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16070         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16071         `partmap/sun.c'.
16072         (pkgdata_MODULES): Add `sun.mod'.
16073         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16074         * include/grub/partition.h (grub_sun_partition_map_init): New
16075         prototype.
16076         (grub_sun_partition_map_fini): Likewise.
16077         * partmap/sun.c: New file.
16078         * util/grub-emu.c (main): Initialize and de-initialize the sun
16079         partitionmap support.
16081 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
16083         This implements an Emacs-like menu entry editor.
16085         * normal/menu_entry.c: New file.
16087         * util/console.c (grub_ncurses_putchar): Translate some Unicode
16088         characters to ASCII.
16089         (saved_char): New variable.
16090         (grub_ncurses_checkkey): Rewritten completely.
16091         (grub_ncurses_getkey): Likewise.
16092         (grub_ncurses_init): Call raw instead of cbreak.
16094         * normal/menu.c (print_entry): Do not put a space.
16095         (init_page): Renamed to ...
16096         (grub_menu_init_page): ... this. All callers changed.
16097         (edit_menu_entry): Removed.
16098         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16100         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16102         * kern/misc.c (grub_vprintf): Call grub_refresh.
16104         * normal/menu.c (DISP_LEFT): Renamed to ...
16105         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16106         * normal/menu.c (DISP_UP): Renamed to ...
16107         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16108         * normal/menu.c (DISP_RIGHT): Renamed to ...
16109         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16110         * normal/menu.c (DISP_DOWN): Renamed to ...
16111         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16112         * normal/menu.c (DISP_HLINE): Renamed to ...
16113         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16114         * normal/menu.c (DISP_VLINE): Renamed to ...
16115         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16116         * normal/menu.c (DISP_UL): Renamed to ...
16117         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16118         * normal/menu.c (DISP_UR): Renamed to ...
16119         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16120         * normal/menu.c (DISP_LL): Renamed to ...
16121         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16122         * normal/menu.c (DISP_LR): Renamed to ...
16123         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16124         * normal/menu.c (TERM_WIDTH): Renamed to ...
16125         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16126         * normal/menu.c (TERM_HEIGHT): Renamed to ...
16127         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16128         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16129         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16130         * normal/menu.c (TERM_MARGIN): Renamed to ...
16131         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16132         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16133         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16134         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16135         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16136         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16137         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16138         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16139         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16140         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16141         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16142         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16143         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16144         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16145         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16146         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16147         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16148         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16149         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16150         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16151         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16152         All callers changed.
16154         * include/grub/normal.h: New prototype.
16156         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16157         normal/menu_entry.c.
16158         (normal_mod_SOURCES): Likewise.
16159         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16160         (normal_mod_SOURCES): Likewise.
16162 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
16164         * include/grub/normal.h (grub_halt_init): New prototype.
16165         (grub_halt_fini): Likewise.
16166         (grub_reboot_init): Likewise.
16167         (grub_reboot_fini): Likewise.
16169         * util/grub-emu.c: Include signal.h.
16170         (main_env): New global variable.
16171         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16172         catch C-c.
16173         (grub_machine_fini): New function.
16174         (main): Call grub_halt_init and grub_reboot_init before
16175         grub_main, and grub_reboot_fini and grub_halt_fini after it.
16176         Call setjmp with MAIN_ENV to go back afterwards.
16177         Call grub_machine_fini right before return.
16179         * include/grub/util/misc.h: Include setjmp.h.
16180         (main_env): New prototype.
16182         * include/grub/kernel.h (grub_machine_fini): New prototype.
16183         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16184         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16186         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16187         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16188         * term/i386/pc/console.c (grub_console_fini): Likewise.
16190         * util/i386/pc/misc.c: New file.
16192         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16193         util/i386/pc/misc.c, commands/i386/pc/halt.c and
16194         commands/i386/pc/reboot.c.
16196 2005-02-14  Guillem Jover  <guillem@hadrons.org>
16198         * include/grub/dl.h (grub_dl_check_header): New prototype.
16199         (grub_arch_dl_check_header): Change return type to grub_err_t,
16200         remove size parameter and export function.  Update all callers.
16201         * kern/dl.c (grub_dl_check_header): New function.
16202         (grub_dl_load_core): Use `grub_dl_check_header' instead of
16203         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
16204         are inside the core.
16205         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16206         independent ELF header checks.
16207         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16208         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16209         `grub_dl_check_header' instead of explicit checks.  Check for the
16210         ELF type.
16211         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16212         `grub_dl_check_header' instead of explicit checks.  Remove arch
16213         specific ELF header checks.
16215         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16216         argument SIZE.
16218 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
16220         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16221         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16223 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
16225         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16226         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16227         (part_map_iterate): Clear `grub_errno' and return 0 if
16228         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16229         * partmap/amiga.c (amiga_partition_map_iterate): Return
16230         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16231         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16233 2005-02-01  Guillem Jover  <guillem@hadrons.org>
16235         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16236         help info.
16238 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16240         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16241         Removed prototype.
16242         (grub_rescue_cmd_linux): New prototype.
16243         (grub_rescue_cmd_initrd): Likewise.
16244         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16245         `bi_rec'.
16246         (grub_linux_release_mem): Release the memory for the initrd.
16247         (grub_load_linux): Renamed from this...
16248         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
16249         Changed `entry' not to be static.  Loop over memory regions to
16250         find another one when the default fails.
16251         (grub_rescue_cmd_initrd): New function.
16252         (grub_linux_init): Remove function.
16253         (grub_linux_fini): Likewise.
16254         (GRUB_MOD_INIT): Register `initrd'.
16255         (GRUB_MOD_FINI): Unregister `initrd'.
16256         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16257         Function removed.
16258         (grub_linux_normal_fini): Likewise.
16259         (GRUB_MOD_INIT): Register `initrd'.
16260         (GRUB_MOD_FINI): Unregister `initrd'.
16262 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16264         * commands/help.c: New file.
16265         * normal/arg.c (show_help): Renamed to...
16266         (grub_arg_show_help): ... this.
16267         * commands/i386/pc/halt.c: New file.
16268         * commands/i386/pc/reboot.c: Likewise.
16269         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16270         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16271         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16272         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16273         variables.
16274         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16275         `commands/help.c'.
16276         (pkgdata_MODULES): Add `help.mod'.
16277         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16278         * grub/i386/pc/init.h (grub_reboot): New prototype.
16279         (grub_halt): Likewise.
16280         * include/grub/normal.h (grub_arg_show_help): New prototype.
16281         (grub_help_init): Likewise.
16282         (grub_help_fini): Likewise.
16283         * util/grub-emu.c (main): Initialize and deinitialize the help
16284         command.
16286         * normal/cmdline.c (grub_cmdline_get): Doc fix.
16288         * normal/command.c (grub_command_init): Fixed the description of
16289         the `set' and `unset' commands.
16291 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16293         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16294         function.
16295         * commands/ieee1275/halt.c: New file.
16296         * commands/ieee1275/reboot.c: Likewise.
16297         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16298         `__attribute__ ((unused))'.  Some GCS related fixed.
16299         (grub_suspend_init) [GRUB_UTIL]: Function removed.
16300         (grub_suspend_fini): Likewise.
16301         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16302         and `halt.mod'.
16303         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16304         (halt_mod_CFLAGS): New variables.
16305         * include/grub/powerpc/ieee1275/ieee1275.h
16306         (grub_ieee1275_interpret): New prototype.
16308 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
16310         * include/grub/misc.h (memmove): New prototype.
16311         (memcpy): Likewise.
16313 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
16315         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16316         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
16318 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
16320         * kern/misc.c (grub_strndup): Function rewritten.
16322 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
16324         * normal/menu.c (TERM_WIDTH): Macro redefined.
16325         (TERM_TOP_BORDER_Y): Likewise.
16326         (draw_border): Replaced while-loop by a for-loop.  Make the number
16327         of lines consistent with the number of lines displayed in
16328         print_entries.  Added a margin below the rectangle.
16329         (print_entry): Make the entry fit in the rectangle.
16330         (print_entries): Display the scroll arrows next to the right
16331         border.
16333 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16335         * fs/minix.c (grub_minix_find_file): Reserve more space for
16336         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
16337         `grub_strncpy' to copy `path' into it.
16339 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16341         Add the loopback device, a device via which files can be accessed
16342         as devices.
16344         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16345         (pkgdata_MODULES): Add loopback.mod.
16346         (loopback_mod_SOURCES): New variable.
16347         (loopback_mod_CFLAGS): Likewise.
16348         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16349         `disk/loopback.c'.
16350         (pkgdata_MODULES): Add loopback.mod.
16351         (loopback_mod_SOURCES): New variable.
16352         (loopback_mod_CFLAGS): Likewise.
16353         * disk/loopback.c: new file.
16354         * include/grub/normal.h (grub_loop_init): New prototype.
16355         (grub_loop_fini): New prototype.
16356         * util/grub-emu.c (main): Initialize and de-initialize loopback
16357         support.
16358         * include/grub/disk.h (grub_disk_dev_id): Add
16359         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16361 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
16363         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16364         function.
16365         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16366         (suspend_mod_SOURCES): New variable.
16367         (suspend_mod_CFLAGS): Likewise.
16368         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16369         New prototype.
16370         * commands/ieee1275/suspend.c: New file.
16372 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16374         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16375         ((unused))' to `__attribute__ ((used))'.
16376         (GRUB_MOD_FINI): Likewise.
16377         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16378         * genmk.rb (PModule): Assign space to common symbols when linking
16379         modules.
16381 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
16383         * include/grub/mm.h (grub_mm_init_region): Change the type of the
16384         `unsigned' arguments to `grub_size_t'.
16385         (grub_malloc): Likewise.
16386         (grub_realloc): Likewise.
16387         (grub_memalign): Likewise.
16388         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16389         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16390         * util/misc.c (grub_malloc): Likewise.
16391         (grub_realloc): Likewise.
16392         * kern/mm.c (get_header_from_pointer): Change the casts to
16393         `unsigned' into a cast to `grub_size_t'.
16395         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16396         point to `currnode' when `currnode' is changed.
16398         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
16399         Schottelius <nico-linux@schottelius.org>.
16401 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
16403         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16404         (note_path): Remove variable.
16405         (GRUB_IEEE1275_NOTE_NAME): New macro.
16406         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16407         (grub_ieee1275_note_hdr): New structure.
16408         (grub_ieee1275_note_desc): Likewise.
16409         (grub_ieee1275_note): Likewise.
16410         (load_note): Remove `dir' argument.  All callers updated.  Remove
16411         `note_img' and `path'.  Do not load a file from `note_path'.
16412         Initialize a struct grub_ieee1275_note and write that to `out'.
16413         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16415 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
16417         * util/misc.c (grub_util_read_image): Revert last change.  It
16418         called `grub_util_read_at', which seeks from the beginning of the
16419         file.
16421 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
16423         * TODO: Add note about endianness in grub-mkimage.
16424         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16425         section.
16426         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16427         (grub_mkimage_SOURCES): New target.
16428         * include/grub/kernel.h (grub_start_addr): Remove variable.
16429         (grub_end_addr): Likewise.
16430         (grub_total_module_size): Likewise.
16431         (grub_kernel_image_size): Likewise.
16432         (GRUB_MODULE_MAGIC): New constant.
16433         (grub_module_info): New structure.
16434         (grub_arch_modules_addr): New prototype.
16435         (grub_get_end_addr): Remove prototype.
16436         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16437         * include/grub/powerpc/ieee1275/kernel.h: New file.
16438         * include/grub/util/misc.h (grub_util_get_fp_size): New
16439         prototype.
16440         (grub_util_read_at): Likewise.
16441         (grub_util_write_image_at): Likewise.
16442         * kern/main.c (grub_get_end_addr): Remove function.
16443         (grub_load_modules): Call grub_arch_modules_addr instead of using
16444         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
16445         the grub_module_info fields instead of calling grub_get_end_addr
16446         as loop conditions.  Move grub_add_unused_region code here.
16447         (grub_add_unused_region): Remove function.
16448         * kern/i386/pc/init.c: Include grub/cache.h.
16449         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
16450         one call to add_mem_region.
16451         (grub_arch_modules_addr): New function.
16452         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16453         (grub_total_module_size): Likewise.
16454         Include grub/machine/kernel.h.
16455         (grub_arch_modules_addr): New function.
16456         * util/grub-emu.c (grub_end_addr): Remove variable.
16457         (grub_total_module_size): Likewise.
16458         (grub_arch_modules_addr): New function.
16459         * util/misc.c: Include unistd.h.
16460         (grub_util_get_fp_size): New function.
16461         (grub_util_read_at): Likewise.
16462         (grub_util_write_image_at): Likewise.
16463         (grub_util_read_image): Call grub_util_read_at.
16464         (grub_util_write_image): Call grub_util_write_image_at.
16465         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16466         additional memory in kernel_img for a struct grub_module_info.
16467         Fill in that grub_module_info.
16468         * util/powerpc/ieee1275/grub-mkimage.c: New file.
16470 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16472         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16473         New function.
16474         * include/grub/powerpc/ieee1275/ieee1275.h
16475         (grub_ieee1275_milliseconds): New prototype.
16476         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16477         Change to 1000.
16478         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16479         grub_ieee1275_milliseconds.
16481 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16483         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16484         variable.
16485         (find_options): New function.
16486         (cmain): Call find_options.
16487         * include/grub/powerpc/ieee1275/ieee1275.h
16488         (grub_ieee1275_realmode): New extern variable.
16489         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16490         grub_map if grub_ieee1275_realmode is false.
16492 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
16494         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16495         lines are inserted and make it work like readline.  Reported by
16496         Vincent Pelletier <subdino2004@yahoo.fr>.
16498 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
16500         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16502         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16503         `kern/powerpc/cache.S'.
16505 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
16507         * genmk.rb: Handle the `Program' class in the main loop.  Written
16508         by Johan Rydberg <jrydberg@gnu.org>.
16509         (Program): New class.
16510         (programs): New variable.
16511         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16512         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
16513         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
16514         (help_arch): Function removed.
16515         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16516         `powerpc/libgcc.h' and `loader.h'.
16517         (pkgdata_PROGRAMS): New variable.
16518         (sbin_UTILITIES): Variable removed.
16519         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16520         (grubof_SOURCES): Variable re-defined so it only includes the
16521         core functionality.
16522         (grubof_CFLAGS): Remove `-DGRUBOF'.
16523         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16524         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16525         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16526         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16527         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16528         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16529         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16530         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16531         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16532         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16533         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16534         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16535         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16536         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16537         (pc_mod_CFLAGS): New variables.
16538         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16539         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16540         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16541         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16542         Moved from here...
16543         * include/grub/i386/pc/init.h (grub_os_area_addr)
16544         (rub_os_area_size): ... to here.
16545         * include/grub/powerpc/ieee1275/ieee1275.h
16546         (grub_ieee1275_entry_fn): Export symbol.
16547         * include/grub/powerpc/ieee1275/init.h: New file.
16548         * include/grub/powerpc/libgcc.h: Likewise.
16549         * include/grub/cache.h: Likewise.
16550         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
16551         <hollis@penguinppc.org>.
16552         * kern/dl.c: Include <grub/cache.h>.
16553         (grub_dl_flush_cache): New function.
16554         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16555         for this module.
16556         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16557         (grub_console_init): Removed prototypes.
16558         (grub_machine_init): Don't initialize the modules anymore.
16559         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16560         static.
16561         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16562         Macro undef removed.
16563         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16564         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16565         relocation `R_PPC_REL32'.  Return an error when the relocation is
16566         unknown.
16567         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16568         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16569         * util/misc.c (grub_arch_sync_caches): Likewise.
16571 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
16573         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16574         `symlist.c', add `grubof_symlist.c'.
16575         (symlist.c): Variable removed.
16576         (grubof_HEADERS): Variable added.
16577         (grubof_symlist.c): New target.
16578         (kernel_syms.lst): Use `grubof_HEADERS' instead of
16579         `kernel_img_HEADERS'.
16580         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16581         * kern/powerpc/dl.c: New file.
16582         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16583         Function removed.
16584         (grub_arch_dl_relocate_symbols): Likewise.
16585         (grub_register_exported_symbols): Likewise.
16587 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
16589         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16590         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
16591         to fail instead.  Reported by Vincent Pelletier
16592         <subdino2004@yahoo.fr>.
16594         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16595         it is not allocated.  Reported by Vincent Pelletier
16596         <subdino2004@yahoo.fr>.
16598         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16599         output so the output looks better.
16601 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
16603         Modulize the partition map support and add support for the amiga
16604         partition map.
16606         * commands/ls.c: Include <grub/partition.h> instead of
16607         <grub/machine/partition.h>.
16608         * kern/disk.c: Likewise.
16609         * kern/rescue.c: Likewise.
16610         * loader/i386/pc/chainloader.c: Likewise.
16611         * normal/cmdline.c: Likewise.
16612         * kern/powerpc/ieee1275/init.c: Likewise.
16613         (grub_machine_init): Call `grub_pc_partition_map_init',
16614         `grub_amiga_partition_map_init' and
16615         `grub_apple_partition_map_init'.
16616         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16617         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
16618         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
16619         `partition.h' and `pc_partition.h'.
16620         (grub_setup_SOURCES): Remove
16621         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
16622         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16623         (grub_emu_SOURCES): Likewise.
16624         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16625         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16626         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16627         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16628         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
16629         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16630         (grubof_SOURCES): Likewise.
16631         * disk/i386/pc/partition.c: File removed.
16632         * disk/powerpc/ieee1275/partition.c: Likewise.
16633         * include/grub/powerpc/ieee1275/partition.h: Likewise.
16634         * include/grub/i386/pc/partition.h: Likewise.
16635         * kern/partition.c: New file.
16636         * partmap/amiga.c: Likewise.
16637         * partmap/apple.c: Likewise.
16638         * partmap/pc.c: Likewise.
16639         * include/grub/partition.h: Likewise..
16640         * include/grub/pc_partition.h: Likewise.
16641         * util/grub-emu.c: Include <grub/partition.h> instead of
16642         <grub/machine/partition.h>.
16643         (main): Call `grub_pc_partition_map_init',
16644         `grub_amiga_partition_map_init' and
16645         `grub_apple_partition_map_init' and deinitialize afterwards.
16646         * util/i386/pc/biosdisk.c: Include `#include
16647         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16648         `<grub/machine/partition.h>'.
16649         * util/i386/pc/grub-setup.c: Likewise.
16650         * util/i386/pc/biosdisk.c: Likewise.
16651         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16652         partition information in case of a PC partition.
16653         * util/i386/pc/grub-setup.c: Include `#include
16654         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16655         `<grub/machine/partition.h>'.
16656         (setup): Only access the PC specific partition information in case
16657         of a PC partition.
16659 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
16661         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16662         (grub_longjmp): Likewise.
16663         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16664         20.
16665         * normal/powerpc/setjmp.S: New file.
16666         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16667         `normal/powerpc/setjmp.S'.
16668         (grubof_CFLAGS): Add `-DGRUBOF'.
16669         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16670         [GRUB_UTIL && !GRUBOF].
16672 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
16674         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16675         property named `name'.  Correctly handle the error returned by
16676         `grub_ieee1275_finddevice' if a device can not be opened.
16678 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16680         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16681         `actual' for negativity.
16682         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16683         kern/fshelp.c.
16685 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16687         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16688         (PAGE_OFFSET): New macro.
16689         (CRTC_ADDR_PORT): Likewise.
16690         (CRTC_DATA_PORT): Likewise.
16691         (START_ADDR_HIGH_REGISTER): Likewise.
16692         (START_ADDR_LOW_REGISTER): Likewise.
16693         (GRAPHICS_ADDR_PORT): Likewise.
16694         (GRAPHICS_DATA_PORT): Likewise.
16695         (READ_MAP_REGISTER): Likewise.
16696         (INPUT_STATUS1_REGISTER): Likewise.
16697         (INPUT_STATUS1_VERTR_BIT): Likewise.
16698         (page): New variable.
16699         (wait_vretrace): New function.
16700         (set_read_map): Likewise.
16701         (set_start_address): Likewise.
16702         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
16703         the right page.
16704         (check_vga_mem): Take the page into account.
16705         (write_char): Likewise.
16706         (write_cursor): Likewise.
16707         (scroll_up): Likewise.  Copy the page to the page that is not
16708         shown and switch between both pages.
16709         (grub_vga_putchar): Fix off by one error.
16710         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
16711         account.
16713 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16715         Add support for iso9660 (including rockridge).
16717         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16718         (iso9660_mod_SOURCES): New variable.
16719         (iso9660_mod_CFLAGS): Likewise.
16720         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16721         * include/grub/fs.h (grub_iso9660_init): New prototype.
16722         * util/grub-emu.c (main): Call `grub_iso9660_init'.
16723         * fs/iso9660.c: New file.
16725         * include/grub/misc.h (grub_strncat): New prototype.
16726         * kern/misc.c (grub_strncat): New function.
16728         * fs/hfs.c (grub_hfs_mount): Translate the error
16729         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16730         * fs/jfs.c (grub_jfs_mount): Likewise.
16731         * fs/ufs.c (grub_ufs_mount): Likewise.
16733 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
16735         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16736         which initialized BAT registers.
16737         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16738         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16739         Move from here...
16740         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16741         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16742         ... to here.
16743         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16744         (grub_mapclaim): Likewise.
16745         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16746         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
16747         hand.
16749 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
16751         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16752         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16753         -ffreestanding and -msoft-float.
16755 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
16757         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16758         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16759         set in grub_ieee1275_flags.
16761 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
16763         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16764         prototype.
16765         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16766         grub_console_init first.
16767         Change the memory range used for grub_ieee1275_claim and
16768         grub_mm_init_region.
16769         Print an error message if the claim fails.
16770         Include <grub/misc.h>.
16772 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
16774         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16775         Call grub_children_iterate for device nodes of type `scsi',
16776         `ide', or `ata'.
16777         (grub_ofdisk_open): Remove manual device alias resolution.
16778         Fix memory leak when device cannot be opened.
16779         * include/grub/powerpc/ieee1275/ieee1275.h
16780         (grub_children_iterate): New prototype.
16781         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16782         New function.
16783         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16784         Return -1 if args.size was -1.
16786 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16788         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16789         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16790         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16791         Open Firmware's memory for it; claim memory from _start to _end.
16792         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16793         (_end): New extern.
16794         (_start): Zero BSS from __bss_start to _end.
16795         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16796         New extern.
16797         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16799 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16801         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16802         -1 if args.base was -1.
16804 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
16806         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16807         escape sequence instead of a literal ^L. Also call
16808         grub_ofconsole_gotoxy.
16810 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
16812         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16813         void *  arguments to grub_addr_t.  All callers updated.  Also make
16814         the `result' argument optional.
16815         (grub_ieee1275_release): change void * arguments to grub_addr_t.
16816         All callers updated.
16818 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
16820         * commands/ls.c (grub_ls_list_files): Use the string following the
16821         initial ')', if present, as the filesystem path.
16822         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16824         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16826 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
16828         Make the source code of the menu interface more readable.
16830         * normal/menu.c: Include grub/mm.h.
16831         (TERM_WIDTH): New macro.
16832         (TERM_HEIGHT): Likewise.
16833         (TERM_INFO_HEIGHT): Likewise.
16834         (TERM_MARGIN): Likewise.
16835         (TERM_SCROLL_WIDTH): Likewise.
16836         (TERM_TOP_BORDER_Y): Likewise.
16837         (TERM_LEFT_BORDER_X): Likewise.
16838         (TERM_BORDER_WIDTH): Likewise.
16839         (TERM_MESSAGE_HEIGHT): Likewise.
16840         (TERM_BORDER_HEIGHT): Likewise.
16841         (TERM_NUM_ENTRIES): Likewise.
16842         (TERM_FIRST_ENTRY_Y): Likewise.
16843         (TERM_ENTRY_WIDTH): Likewise.
16844         (TERM_CURSOR_X): Likewise.
16845         (draw_border): Use macros instead of magic numbers.
16846         (print_entry): Likewise.
16847         (print_entries): Likewise.
16848         (run_menu): Likewise. Also, handle the key 'e'.
16849         (run_menu_entry): Ignore empty command lines.
16850         (print_message): Added a new argument EDIT. If EDIT is true,
16851         print a different message.
16852         (init_page): Likewise.
16853         (edit_menu_entry): New function. Not implemented yet.
16855 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
16857         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16858         can be loaded from normal mode.
16860         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16861         `multiboot.mod'.
16862         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16863         (multiboot_mod_CFLAGS): New variables.
16864         * loader/i386/pc/linux_normal.c: New file.
16865         * loader/i386/pc/multiboot_normal.c: Likewise.
16867         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16868         attribute `unused'.
16870         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
16871         `fdiro' to read the mode information from instead of `diro'.
16873         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16874         looking up a symlink.
16876         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16877         macro.
16878         * normal/command.c (grub_command_execute): Don't parse the
16879         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16880         flags of the command.
16882         * normal/menu.c (grub_menu_run): Fix typo.
16884 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
16886         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16888         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16889         `y + 1' instead of `y - 1'.
16891         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16893 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
16895         From Hollis Blanchard <hollis@penguinppc.org>:
16896         * kern/misc.c (memmove): New alias for grub_memmove.
16897         (memcmp): New alias for grub_memcmp.
16898         (memset): New alias for grub_memset.
16899         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16900         Change "int handle" to "grub_ieee1275_phandle_t handle".
16901         * include/grub/powerpc/ieee1275/ieee1275.h
16902         (grub_ieee1275_get_property): Likewise.
16904 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
16906         Added normal mode command `chainloader' as module chain.mod, which
16907         depends on normal.mod and _chain.mod.
16909         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16910         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16911         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16912         Deleted prototype.
16913         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16914         but arguments parsing moved to ...
16915         (grub_chainloader_cmd): ... here.  New function.
16916         * include/grub/i386/pc/chainloader.h: New file.
16917         * loader/i386/pc/chainloader_normal.c: Likewise.
16919 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
16921         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16922         (grub_mkimage_LDFLAGS): Likewise.
16923         (grub_emu_SOURCES): Likewise.
16924         (kernel_img_HEADERS): Added fshelp.h.
16925         * fs/ext2.c: Include <grub/fshelp.h>.
16926         (FILETYPE_REG): New macro.
16927         (FILETYPE_INO_REG): Likewise.
16928         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16929         Changed all users.
16930         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
16931         all users.
16932         (grub_fshelp_node): New struct.
16933         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
16934         to a pointer.
16935         (grub_ext2_get_file_block): Removed function.
16936         (grub_ext2_read_block): New function.
16937         (grub_ext2_read_file): Replaced parameter `data' by `node'.
16938         This function was written.
16939         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
16940         (grub_ext2_find_file): Removed function.
16941         (grub_ext2_read_symlink): New function.
16942         (grub_ext2_iterate_dir): Likewise.
16943         (grub_ext2_open): Rewritten.
16944         (grub_ext2_dir): Rewritten.
16945         * include/grub/fshelp.h: New file.
16946         * fs/fshelp.c: Likewise.
16948 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
16950         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16951         (print_message): Add a missing newline.
16952         (run_menu): Added timeout support.
16953         (run_menu_entry): New local function.
16954         (grub_menu_run): Added support for booting.
16956         * kern/loader.c (grub_loader_is_loaded): New function.
16958         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16959         (grub_get_rtc): Exported.
16961         * include/grub/i386/pc/time.h: Include grub/symbol.h.
16962         (grub_get_rtc): Exported.
16964         * include/grub/normal.h (struct grub_command_list): Remove
16965         constant from the member `command'.
16967         * include/grub/loader.h (grub_loader_is_loaded): Declared.
16969         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16971         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16973 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
16975         Add support for the JFS filesystem.
16977         * fs/jfs.c: New file.
16978         * include/grub/fs.h (grub_jfs_init): New prototype.
16979         (grub_jfs_fini): New prototype.
16980         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16981         (grub_emu_SOURCES): Likewise.
16982         (pkgdata_MODULES): Add jfs.mod.
16983         (jfs_mod_SOURCES): New variable.
16984         (jfs_mod_CFLAGS): Likewise.
16985         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16986         (grubof_SOURCES): Likewise.
16987         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16989         * fs/fat.c (grub_fat_find_dir): Convert the filename little
16990         endian to the host endian.
16991         (grub_fat_utf16_to_utf8): Move function from there...
16992         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
16993         the endianness of the source string anymore.
16994         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16996 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
16998         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16999         (grub_boot_fini) [GRUB_UTIL]: Likewise.
17000         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17001         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
17003         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17004         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
17005         for `node_found' and `it_dir'.
17006         (grub_hfs_dir): Add prototype for `dir_hook'.
17008         * fs/minix.c (grub_minix_get_file_block): Add prototype for
17009         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
17010         and `indir32' to silence a gcc warning.
17012         * include/grub/fs.h (grub_hfs_init): New prototype.
17013         (grub_hfs_fini): Likewise.
17016 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
17018         Each disk device has its own id now. This is useful to make use
17019         of multiple disk devices.
17021         * include/grub/disk.h (grub_disk_dev_id): New enum.
17022         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17023         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17025         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17026         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17028         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17029         GRUB_DISK_DEVICE_OFDISK_ID as an id.
17031         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17032         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17034         * include/grub/disk.h (struct grub_disk_dev): Added a new member
17035         "id" which is used by the cache manager.
17037         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17038         of just "GRUB".
17040 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
17042         * fs/hfs.c: New file.
17043         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17044         (grub_emu_SOURCES): Likewise.
17045         (pkgdata_MODULES): Add hfs.mod.
17046         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17047         (grubof_SOURCES): Likewise.
17048         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17050         * include/grub/misc.h (grub_strncasecmp): Add prototype.
17051         * kern/misc.c (grub_strncasecmp): Add function.
17053 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
17055         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17056         with parentheses.
17058         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17059         (grub_ext2_dir): In case the directory entry type is unknown, read
17060         it from the inode.
17062 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
17064         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17065         grub_load_linux instead of grub_rescue_cmd_linux as second
17066         argument of grub_rescue_register_command.
17068         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17070 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
17072         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17073         function.
17074         * commands/boot.c: Remove the check for `GRUB_UTIL'.
17075         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17076         `loader/powerpc/ieee1275/linux.c',
17077         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17078         * include/grub/powerpc/ieee1275/ieee1275.h
17079         (grub_ieee1275_release): New prototype.
17080         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17081         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17082         normal, boot, linux and linux_normal.
17083         * loader/powerpc/ieee1275/linux.c: New file.
17084         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17086 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
17088         * normal/arg.c (grub_arg_parse): Correct error handling after
17089         reallocating the argumentlist (check if `argl' is not null instead
17090         of checking if `args' is not null).
17091         * kern/mm.c (grub_realloc): Return the same pointer when using the
17092         same region, instead of returning the header address.
17094 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17096         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17097         one block instead of two when looking for the initial partition.
17098         (grub_partition_probe): Initialize the local variable `p' with 0.
17099         Use base 10 for the grub_strtoul call.
17100         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
17101         need for one local variable.
17102         (grub_strtoul): Don't add the new value to `num', instead of that
17103         just assign it.
17105 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17107         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17108         (pxeboot_img_SOURCES): New variable.
17109         (pxeboot_img_ASFLAGS): Likewise.
17110         (pxeboot_img_LDFLAGS): Likewise.
17111         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
17112         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
17113         <lode_leroy@hotmail.com>.
17115 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17117         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17118         there was no input.
17120 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17122         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
17123         the history buffer logic.
17125 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17127         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17128         (FILETYPE_INO_SYMLINK): New macros.
17129         (grub_ext2_find_file): Check if the node is a directory using the
17130         inode stat information instead of using the filetype in the
17131         dirent.  Exclude the first character of an absolute symlink.
17132         (grub_ext2_dir): Mask out the filetype part of the mode member of
17133         the inode.
17135 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
17137         Add support for UFS version 1 and 2.  Add support for the minix
17138         filesystem version 1 and 2, both the variants with 14 and 30 long
17139         filenames.
17141         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17142         fs/minix.c.
17143         (grub_emu_SOURCES): Likewise.
17144         (pkgdata_MODULES): Add ufs.mod and minix.mod.
17145         (ufs_mod_SOURCES): New variable.
17146         (ufs_mod_CFLAGS): Likewise.
17147         (minix_mod_SOURCES): Likewise.
17148         (minix_mod_CFLAGS): Likewise.
17149         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17150         fs/minix.c.
17151         (grubof_SOURCES): Likewise.
17152         * fs/ufs.c: New file.
17153         * fs/minix.c: New file.
17154         * include/grub/fs.h (grub_ufs_init): New prototype.
17155         (grub_ufs_fini): Likewise.
17156         (grub_minix_init): Likewise.
17157         (grub_minix_fini): Likewise.
17158         * util/grub-emu.c (main): Initialize and deinitialize UFS and
17159         minix fs.
17161 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
17163         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17164         commands/ls.c, commands/terminal.c, commands/boot.c,
17165         commands/cmp.c and commands/cat.c.
17166         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17168         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17169         "env.h"
17171 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17173         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17174         and grub_, respectively. Because the conversion is trivial and
17175         mechanical, I omit the details here. Please refer to the CVS
17176         if you need more information.
17178 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17180         * include/pupa: Renamed to ...
17181         * include/grub: ... this.
17182         * util/i386/pc/pupa-mkimage.c: Renamed to ...
17183         * util/i386/pc/grub-mkimage.c: ... this.
17184         * util/i386/pc/pupa-setup.c: Renamed to ...
17185         * util/i386/pc/grub-setup.c: ... this.
17186         * util/pupa-emu.c: Renamed to ...
17187         * util/grub-emu.c: ... this.
17189 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
17191         Add support for the newworld apple macintosh (PPC).  This has been
17192         tested on the powerbook 2000 only.  It only adds support for
17193         generic ieee1275 functions, console and disk support.  This should
17194         be easy to port to other architectures with support for Open
17195         Firmware.
17197         * configure.ac: Accept the powerpc as host_cpu.  In the case of
17198         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
17199         specific tests are only executed while building for the i386.
17200         Inverse test for crosscompile.
17201         * genmk.rb (Utility): Allow assembler files.
17202         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17203         * conf/powerpc-ieee1275.rmk: New file.
17204         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17205         * disk/powerpc/ieee1275/partition.c: Likewise.
17206         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17207         * include/pupa/powerpc/ieee1275/console.h: Likewise.
17208         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17209         * include/pupa/powerpc/ieee1275/time.h: Likewise.
17210         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17211         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17212         * include/pupa/powerpc/ieee1275/loader.h
17213         * include/pupa/powerpc/setjmp.h: Likewise.
17214         * include/pupa/powerpc/types.h: Likewise.
17215         * kern/powerpc/ieee1275/init.c: Likewise.
17216         * kern/powerpc/ieee1275/openfw.c: Likewise.
17217         * term/powerpc/ieee1275/ofconsole.c: Likewise.
17219         These files were written by Johan Rydberg
17220         (jrydberg@night.trouble.net) and I only modified them slightly.
17222         * boot/powerpc/ieee1275/cmain.c: New file.
17223         * boot/powerpc/ieee1275/crt0.S: Likewise.
17224         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17225         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17227 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
17229         * Makefile.in: Update copyright.
17230         * genmodsrc.sh: Likewise.
17231         * gensymlist.sh: Likewise.
17232         * term/i386/pc/vga.c: Indent correctly.
17234         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17235         bugreporting address.
17236         * util/i386/pc/pupa-setup.c (usage): Likewise,
17237         (main): Call pupa_ext2_init and pupa_ext2_fini.
17239         * fs/fat.c (log2): Renamed to ...
17240         (fat_log2): ... this.
17241         All callers changed.
17242         * kern/misc.c (memcpy): Alias to pupa_memmove.
17243         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17244         lvalue cast.
17245         * util/console.c (pupa_ncurses_fini): Return 0.
17247         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17248         Move fail label here.
17249         [__GNU__]: Don't warn when using stat.
17250         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17251         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17252         long int. Use strtol instead of strtoul.
17254 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
17256         * commands/boot.c: New file.
17257         * commands/cat.c: Likewise.
17258         * commands/cmp.c: Likewise.
17259         * commands/ls.c: Likewise.
17260         * commands/terminal.c: Likewise.
17261         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17262         (pupa_register_command): Changed interface to match the new
17263         argument parser.
17264         (pupa_command_execute): Changed (almost rewritten) so it uses
17265         pupa_split_command.  Added support for setting variables using the
17266         syntax `foo=bar'.
17267         (rescue_command): Changed to work with the new argument parser.
17268         (terminal_command): Moved from here to commands/terminal.c.
17269         (set_command): New function.
17270         (unset_command): New function.
17271         (insmod_command): New function.
17272         (rmmod_command): New function.
17273         (lsmod_command): New function.
17274         (pupa_command_init): Don't initialize the command terminal
17275         anymore.  Initialize the commands set, unset, insmod, rmmod and
17276         lsmod.
17277         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17278         (kernel_img_HEADERS): Add arg.h and env.h.
17279         (pupa_mkimage_LDFLAGS): Add kern/env.c.
17280         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17281         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17282         normal/arg.c.
17283         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17284         terminal.mod.
17285         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17286         (boot_mod_SOURCES): New variable.
17287         (terminal_mod_SOURCES): Likewise.
17288         (ls_mod_SOURCES): Likewise.
17289         (cmp_mod_SOURCES): Likewise.
17290         (cat_mod_SOURCES): Likewise.
17292         * normal/arg.c: New file.
17293         * kern/env.c: Likewise.
17294         * include/pupa/arg.h: Likewise.
17295         * include/pupa/env.h: Likewise.
17296         * font/manager.c (font_command): Changed to match argument parsing
17297         interface changes.
17298         (PUPA_MOD_INIT): Likewise.
17299         * hello/hello.c (pupa_cmd_hello): Likewise.
17300         (PUPA_MOD_INIT): Likewise.
17301         * include/pupa/disk.h: Include <pupa/device.h>.
17302         (pupa_print_partinfo): New prototype.
17303         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17304         (pupa_dl_get_prefix): Likewise.
17305         * include/pupa/misc.h: Include <pupa/err.h>.
17306         (pupa_isgraph): New prototype.
17307         (pupa_isdigit): Likewise.
17308         (pupa_split_cmdline): Likewise.
17309         * include/pupa/normal.h: Include <pupa/arg.h>.
17310         (pupa_command): Changed the prototype of the member `func' to
17311         match the argument parsing interface.  Added member `options'.
17312         (pupa_register_command): Updated to match function.
17313         (pupa_arg_parse): New prototype.
17314         (pupa_hello_init) [PUPA_UTIL]: New prototype.
17315         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17316         (pupa_ls_init) [PUPA_UTIL]: Likewise.
17317         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17318         (pupa_cat_init) [PUPA_UTIL]: Likewise.
17319         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17320         (pupa_boot_init) [PUPA_UTIL]: Likewise.
17321         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17322         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17323         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17324         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17325         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17326         * kern/disk.c: Include <pupa/file.h>.
17327         (pupa_print_partinfo): New function.
17328         * kern/dl.c: Include <pupa/env.h>.
17329         (pupa_dl_dir): Variable removed.
17330         (pupa_dl_load): Use the environment variable `prefix' instead of
17331         the variable pupa_dl_dir.
17332         (pupa_dl_set_prefix): Function removed.
17333         (pupa_dl_get_prefix): Likewise.
17334         * kern/i386/pc/init.c: Include <pupa/env.h>.
17335         (pupa_machine_init): Use the environment variable `prefix' instead of
17336         using pupa_dl_set_prefix to set the prefix.
17337         * kern/main.c: Include <pupa/env.h>.
17338         (pupa_set_root_dev): Use the environment variable `prefix' instead of
17339         using pupa_dl_get_prefix to get the prefix.
17340         * kern/misc.c: Include <pupa/env.h>.
17341         (pupa_isdigit): New function.
17342         (pupa_isgraph): Likewise.
17343         (pupa_ftoa): Likewise.
17344         (pupa_vsprintf): Added support for printing values of the type
17345         `double'.  Make it possible to format variable output when using
17346         formatting like `%1.2%f'.
17347         (pupa_split_cmdline): New function.
17348         * kern/rescue.c: Include <pupa/env.h>.
17349         (next_word): Removed function.
17350         (pupa_rescue_cmd_prefix): Likewise.
17351         (pupa_rescue_cmd_set): New function.
17352         (pupa_rescue_cmd_unset): New function.
17353         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17354         split the command line instead of splitting it here.  Added
17355         support for setting variables using the syntax `foo=bar'.  Don't
17356         initialize the prefix command anymore.  Initialized the set and
17357         unset commands.
17358         * normal/cmdline.c: Include <pupa/env.h>.
17359         (pupa_tab_complete): Added prototypes for print_simple_completion,
17360         print_partition_completion, add_completion, iterate_commands,
17361         iterate_dev, iterate_part and iterate_dir. Moved code to print
17362         partition information from here to kern/disk.c.
17363         (pupa_cmdline_run): Don't check if the function exists anymore.
17364         * normal/main.c: Include <pupa/env.h>.
17365         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17366         instead of using pupa_dl_get_prefix to get the prefix.
17367         * term/i386/pc/vga.c: Include <pupa/arg.h>.
17368         (check_vga_mem): Cast pointers to `void *' to silence a gcc
17369         warning.
17370         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17371         (pupa_vga_setcolor): Declare unused variables with `__attribute__
17372         ((unused))' to silence a gcc warning.
17373         (pupa_vga_setcolor): Likewise.
17374         (debug_command): Changed to match argument parsing
17375         interface changes.
17376         * util/pupa-emu.c: Include <pupa/env.h>.
17377         (options): Added 0's for unused fields to silence a gcc warning.
17378         (argp): Likewise.
17379         (main): Use the environment variable `prefix' instead of using
17380         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
17381         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
17382         and terminal.
17384         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17385         * util/misc.c: Include <malloc.h>.
17386         (pupa_malloc): Rewritten so errors are correctly reported.
17387         (pupa_realloc): Likewise.
17388         (pupa_memalign): Likewise.
17389         (pupa_mm_init_region): Declare unused variables with
17390         `__attribute__ ((unused))' to silence a gcc warning.
17391         * normal/i386/setjmp.S: Remove tab at the end of the file to
17392         silence a gcc warning.
17393         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17394         variables with `__attribute__ ((unused))' to silence a gcc
17395         warning.
17396         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17397         local variable i unsigned to silence a gcc warning.
17399         * kern/term.c: Include <pupa/misc.h>.
17400         (pupa_more_lines): New variable.
17401         (pupa_more): Likewise.
17402         (pupa_putcode): When the pager is active pause at the end of every
17403         screen.
17404         (pupa_set_more): New function.
17405         * include/pupa/term.h (pupa_set_more): New prototype.
17408 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
17410         Now this project is GRUB 2 rather than PUPA. The location of
17411         the CVS repository was moved to GRUB's.
17413         * configure.ac: Use bug-grub as the reporting address.
17414         Use GRUB instead of PUPA.
17415         Change the version number to 1.90.
17417 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
17419         * genkernsyms.sh: Updated copyright information.
17420         * genmk.rb: Likewise.
17421         * genmodsrc.sh: Likewise.
17422         * gensymlist.sh: Likewise.
17423         * boot/i386/pc/boot.S: Likewise.
17424         * boot/i386/pc/diskboot.S: Likewise.
17425         * disk/i386/pc/biosdisk.c: Likewise.
17426         * disk/i386/pc/partition.c: Likewise.
17427         * font/manager.c: Likewise.
17428         * fs/ext2.c: Likewise.
17429         * fs/fat.c: Likewise.
17430         * include/pupa/boot.h: Likewise.
17431         * include/pupa/device.h: Likewise.
17432         * include/pupa/disk.h: Likewise.
17433         * include/pupa/dl.h: Likewise.
17434         * include/pupa/elf.h: Likewise.
17435         * include/pupa/err.h: Likewise.
17436         * include/pupa/file.h: Likewise.
17437         * include/pupa/font.h: Likewise.
17438         * include/pupa/fs.h: Likewise.
17439         * include/pupa/kernel.h: Likewise.
17440         * include/pupa/loader.h: Likewise.
17441         * include/pupa/misc.h: Likewise.
17442         * include/pupa/mm.h: Likewise.
17443         * include/pupa/net.h: Likewise.
17444         * include/pupa/normal.h: Likewise.
17445         * include/pupa/rescue.h: Likewise.
17446         * include/pupa/setjmp.h: Likewise.
17447         * include/pupa/symbol.h: Likewise.
17448         * include/pupa/term.h: Likewise.
17449         * include/pupa/types.h: Likewise.
17450         * include/pupa/i386/setjmp.h: Likewise.
17451         * include/pupa/i386/types.h: Likewise.
17452         * include/pupa/i386/pc/biosdisk.h: Likewise.
17453         * include/pupa/i386/pc/boot.h: Likewise.
17454         * include/pupa/i386/pc/console.h: Likewise.
17455         * include/pupa/i386/pc/init.h: Likewise.
17456         * include/pupa/i386/pc/kernel.h: Likewise.
17457         * include/pupa/i386/pc/linux.h: Likewise.
17458         * include/pupa/i386/pc/loader.h: Likewise.
17459         * include/pupa/i386/pc/memory.h: Likewise.
17460         * include/pupa/i386/pc/multiboot.h: Likewise.
17461         * include/pupa/i386/pc/partition.h: Likewise.
17462         * include/pupa/i386/pc/time.h: Likewise.
17463         * include/pupa/i386/pc/vga.h: Likewise.
17464         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17465         * include/pupa/util/getroot.h: Likewise.
17466         * include/pupa/util/misc.h: Likewise.
17467         * include/pupa/util/resolve.h: Likewise.
17468         * kern/device.c: Likewise.
17469         * kern/disk.c: Likewise.
17470         * kern/dl.c: Likewise.
17471         * kern/err.c: Likewise.
17472         * kern/file.c: Likewise.
17473         * kern/fs.c: Likewise.
17474         * kern/loader.c: Likewise.
17475         * kern/main.c: Likewise.
17476         * kern/misc.c: Likewise.
17477         * kern/mm.c: Likewise.
17478         * kern/rescue.c: Likewise.
17479         * kern/term.c: Likewise.
17480         * kern/i386/dl.c: Likewise.
17481         * kern/i386/pc/init.c: Likewise.
17482         * kern/i386/pc/lzo1x.S: Likewise.
17483         * kern/i386/pc/startup.S: Likewise.
17484         * loader/i386/pc/chainloader.c: Likewise.
17485         * loader/i386/pc/linux.c: Likewise.
17486         * loader/i386/pc/multiboot.c: Likewise.
17487         * normal/cmdline.c: Likewise.
17488         * normal/command.c: Likewise.
17489         * normal/main.c: Likewise.
17490         * normal/menu.c: Likewise.
17491         * normal/i386/setjmp.S: Likewise.
17492         * term/i386/pc/console.c: Likewise.
17493         * term/i386/pc/vga.c: Likewise.
17494         * util/console.c: Likewise.
17495         * util/genmoddep.c: Likewise.
17496         * util/misc.c: Likewise.
17497         * util/pupa-emu.c: Likewise.
17498         * util/resolve.c: Likewise.
17499         * util/unifont2pff.rb: Likewise.
17500         * util/i386/pc/biosdisk.c: Likewise.
17501         * util/i386/pc/getroot.c: Likewise.
17502         * util/i386/pc/pupa-mkimage.c: Likewise.
17503         * util/i386/pc/pupa-setup.c: Likewise.
17505 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
17507         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17508         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
17509         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
17510         reading and reset it after reading.
17511         (pupa_ext2_close): Return PUPA_ERR_NONE.
17513         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17514         Correct value.
17515         (struct linux_kernel_header): Add kernel_version and
17516         initrd_addr_max.
17517         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17518         pupa_file_read succeeds.
17519         (pupa_rescue_cmd_initrd): Implement.
17521 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
17523         * fs/ext2.c (pupa_ext2_label): New function.
17524         (pupa_ext2_fs): Added label.
17525         * fs/fat.c (pupa_fat_label): New function.
17526         (pupa_fat_fs): Added label.
17527         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17529         * kern/misc.c (pupa_strndup): New function.
17530         * include/pupa/misc.h (pupa_strndup): New prototype.
17532         * include/pupa/normal.h: Include <pupa/err.h>.
17533         (pupa_set_history): New prototype.
17534         (pupa_iterate_commands): New prototype.
17535         * normal/cmdline.c: Include <pupa/machine/partition.h>,
17536         <pupa/disk.h>, <pupa/file.h>.
17537         (hist_size): New variable.
17538         (hist_lines): Likewise.
17539         (hist_end): Likewise.
17540         (hist_used): Likewise.
17541         (pupa_set_history): New function.
17542         (pupa_history_get): Likewise.
17543         (pupa_history_add): Likewise.
17544         (pupa_history_replace): Likewise.
17545         (pupa_tab_complete): Likewise.
17546         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
17547         completion shows partitionnames while completing partitions, this
17548         feature was suggested by Jeff Bailey.
17549         * normal/command.c (pupa_iterate_commands): New function.
17550         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17551         (pupa_normal_init): Initialize history buffer.
17552         (PUPA_MOD_INIT): Likewise.
17553         (pupa_normal_fini): Free the history buffer.
17554         (PUPA_MOD_FINI): Likewise.
17556         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17557         key.
17559         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17560         * configure.ac [i386]: Check for regparam bug.
17561         (NESTED_FUNC_ATTR) [! i386]: Defined.
17563 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
17565         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17566         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17567         (pupa_emu_SOURCES): New variable.
17568         (pupa_emu_LDFLAGS): Likewise.
17569         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17570         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17571         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17572         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17573         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17574         (pupa_jmp_buf): New typedef.
17575         (pupa_setjmp) [PUPA_UTIL]: New macro.
17576         (pupa_longjmp) [PUPA_UTIL]: Likewise.
17577         * include/pupa/term.h (struct pupa_term): New member `refresh'.
17578         (pupa_refresh): New prototype.
17579         * include/pupa/util/getroot.h: New file.
17580         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17581         it.
17582         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17583         (pupa_rescue_cmd_cat): Likewise.
17584         (pupa_rescue_cmd_ls): Likewise.
17585         (pupa_rescue_cmd_testload): Likewise.
17586         (pupa_rescue_cmd_lsmod): Likewise.
17587         * normal/cmdline.c (pupa_cmdline_get): Likewise.
17588         * normal/menu.c (run_menu): Likewise.
17589         * kern/term.c (pupa_cls): Likewise.
17590         (pupa_refresh): New function.
17591         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17592         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17593         * util/console.c: New file.
17595         * util/i386/pc/getroot.c: New file.
17596         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17597         (pupa_putchar): New function.
17598         (pupa_refresh): Likewise.
17599         (xgetcwd): Function moved to ...
17600         (strip_extra_slashes): Likewise.
17601         (get_prefix): Likewise.
17602         * util/i386/pc/getroot.c: ... here.
17603         (find_root_device): Function moved and renamed to...
17604         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17605         Changed all callers.
17606         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17607         and renamed to...
17608         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17609         Changed all callers.
17610         * util/misc.c (pupa_memalign): New function.
17611         (pupa_mm_init_region): Likewise.
17612         (pupa_register_exported_symbols): Likewise.
17613         (pupa_putchar): Function removed.
17614         * util/pupa-emu.c: New file.
17616 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
17618         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17619         (_multiboot_mod_SOURCES): New variable.
17620         (_multiboot_mod_CFLAGS): Likewise.
17621         * loader/i386/pc/multiboot.c: New file.
17622         * include/pupa/i386/pc/multiboot.h: Likewise.
17623         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17624         (pupa_multiboot_real_boot): New function.
17625         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17626         (pupa_multiboot_real_boot): New prototype.
17627         (pupa_rescue_cmd_multiboot): Likewise
17628         (pupa_rescue_cmd_module): Likewise.
17630         * kern/loader.c (pupa_loader_set): Continue when
17631         pupa_loader_unload_func() fails.
17632         (pupa_loader_unset): New function.
17633         * include/pupa/loader.h (pupa_loader_unset): New prototype.
17635         * kern/misc.c (pupa_stpcpy): New function.
17636         * include/pupa/misc.h (pupa_stpcpy): New prototype.
17638 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
17640         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17641         for available extensions.
17643         * include/pupa/i386/pc/time.h: New file.
17644         * kern/disk.c: Include <pupa/machine/time.h>.
17645         (PUPA_CACHE_TIMEOUT): New macro.
17646         (pupa_last_time): New variable.
17647         (pupa_disk_open): Flush the cache when there was a timeout.
17648         (pupa_disk_close): Reset the timer.
17649         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17650         pupa_currticks.
17651         * util/misc.c: Include <sys/times.h>
17652         (pupa_get_rtc): New function.
17654 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
17656         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17657         as blocks.
17658         (pupa_ext2_get_file_block): Use blocks member.
17660         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17661         first block. Return -1 instead of pupa_errno on error.
17663 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
17665         * README: In the pupa-mkimage example use _chain instead of chain
17666         and ext2 instead of fat.
17667         * TODO: Replace ext2fs with jfs as an example.  Add an item for
17668         adding journal playback for ext2fs.
17669         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17670         (pkgdata_MODULES): Added ext2.mod.
17671         (ext2_mod_SOURCES): New variable.
17672         (ext2_mod_CFLAGS): Likewise.
17673         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17674         * include/pupa/misc.h (pupa_strncpy): New prototype.
17675         (pupa_strcat): Likewise.
17676         (pupa_strncmp): Likewise.
17677         * kern/misc.c (pupa_strcat): Enable function.
17678         (pupa_strncpy): New function.
17679         (pupa_strncmp): Likewise.
17680         * fs/ext2.c: New file.
17682         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17683         when the read failed before retrying.
17684         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17685         (_FILE_OFFSET_BITS): Likewise.
17686         * configure.ac: Added AC_SYS_LARGEFILE.
17688 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17690         * genmk.rb (PModule#rule): Make sure to get only symbol names
17691         from the output of nm.
17692         Reported by Robert Millan <zeratul2@wanadoo.es>.
17694 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17696         I forgot to check in these changes for a long time. This adds
17697         incomplete support for VGA console, and this is still very
17698         buggy. Also, a lot of consideration is required for I18N,
17699         UNICODE, and VGA font issues. Therefore, assume that this is
17700         such that "better than nothing".
17702         * font/manager.c: New file.
17703         * include/pupa/font.h: Likewise.
17704         * include/pupa/i386/pc/vga.h: Likewise.
17705         * term/i386/pc/vga.c: Likewise.
17706         * util/unifont2pff.rb: Likewise.
17708         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17709         (pkgdata_MODULES): Added vga.mod and font.mod.
17710         (vga_mod_SOURCES): New variables.
17711         (vga_mod_CFLAGS): Likewise.
17712         (font_mod_SOURCES): Likewise.
17713         (font_mod_CFLAGS): Likewise.
17715         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17717         * include/pupa/term.h: Include pupa/err.h.
17718         (struct pupa_term): Added init and fini.
17719         Changed the argument of putchar to pupa_uint32_t.
17721         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17722         (pupa_console_real_putchar): New prototype.
17723         (pupa_console_putchar): Removed.
17724         (pupa_console_checkkey): Exported.
17725         (pupa_console_getkey): Likewise.
17727         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17728         characters.
17730         * kern/term.c (pupa_term_set_current): Rewritten.
17731         (pupa_putchar): Likewise.
17732         (pupa_putcode): New function.
17734         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17735         (pupa_console_real_putchar): ... this.
17736         (pupa_vga_set_mode): New function.
17737         (pupa_vga_get_font): Likewise.
17739         * normal/command.c: Include pupa/term.h.
17740         (terminal_command): New function.
17741         (pupa_command_init): Register the command "terminal".
17743         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17744         (DISP_UP): Likewise.
17745         (DISP_RIGHT): Likewise.
17746         (DISP_DOWN): Likewise.
17747         (DISP_HLINE): Likewise.
17748         (DISP_VLINE): Likewise.
17749         (DISP_UL): Likewise.
17750         (DISP_UR): Likewise.
17751         (DISP_LL): Likewise.
17752         (DISP_LR): Likewise.
17754         * term/i386/pc/console.c (pupa_console_putchar): New function.
17756 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
17758         * util/resolve.c (pupa_util_resolve_dependencies): BUG
17759         FIX. Reverse the path_list.
17761         * include/pupa/normal.h: Export pupa_register_command and
17762         pupa_unregister_command.
17764         * hello/hello.c (pupa_cmd_hello): New module.
17765         * conf/i386-pc.rmk: Added hello.mod.
17767 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
17769         * kern/i386/pc/lzo1x.S: New file.
17771         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17772         (compress_kernel): New variable.
17773         (generate_image): Heavily modified to support compressing a
17774         large part of the core image.
17776         * util/misc.c (pupa_util_read_image): Fix a file descriptor
17777         leak.
17778         (pupa_util_load_image): New function.
17780         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17781         (pupa_compressed_size): New variable.
17782         (codestart): Enable Gate A20 here.
17783         Decompress the compressed part of the core image.
17784         Rearrange the code to put functions and variables which are
17785         required for initialization in the non-compressed part.
17786         Include lzo1x.S.
17788         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17789         here.
17791         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17793         * include/pupa/i386/pc/kernel.h
17794         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17795         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17796         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17797         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17798         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17800         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17802         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17803         (Utility#rule): Likewise.
17805         * configure.ac: Check if LZO is available.
17807 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
17809         * include/pupa/normal.h: New file.
17810         * include/pupa/setjmp.h: Likewise.
17811         * include/pupa/i386/setjmp.h: Likewise.
17812         * normal/cmdline.c: Likewise.
17813         * normal/command.c: Likewise.
17814         * normal/main.c: Likewise.
17815         * normal/menu.c: Likewise.
17816         * normal/i386/setjmp.S: Likewise.
17818         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17819         (pupa_rescue_cmd_initrd): Likewise.
17821         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17822         Likewise.
17824         * kern/i386/pc/startup.S (translation_table): New variable.
17825         (translate_keycode): New function.
17826         (pupa_console_getkey): Call translate_keycode.
17828         * kern/rescue.c (attempt_normal_mode): New function.
17829         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17830         it failed, print a message.
17832         * kern/mm.c (pupa_real_malloc): Print more information when a
17833         free magic is broken.
17834         (pupa_free): If the first free header is not free actually, set
17835         it to P.
17837         * kern/main.c (pupa_load_normal_mode): Just load the module
17838         "normal".
17839         (pupa_main): Don't print the message
17840         "Entering into rescue mode..." here.
17842         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17843         Declared.
17844         (pupa_rescue_cmd_initrd): Likewise.
17845         (pupa_rescue_cmd_initrd): Likewise.
17847         * include/pupa/symbol.h (FUNCTION): Specify the type.
17848         (VARIABLE): Likewise.
17850         * include/pupa/err.h (pupa_err_t): Added
17851         PUPA_ERR_UNKNOWN_COMMAND.
17853         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17854         (pupa_dl_get_prefix): Likewise.
17856         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17857         Added _chain.mod and _linux.mod instead of chain.mod and
17858         linux.mod.
17859         (chain_mod_SOURCES): Renamed to ...
17860         (_chain_mod_SOURCES): ... this.
17861         (chain_mod_CFLAGS): Renamed to ...
17862         (_chain_mod_CFLAGS): ... this.
17863         (linux_mod_SOURCES): Renamed to ...
17864         (_linux_mod_SOURCES): ... this.
17865         (linux_mod_CFLAGS): Renamed to ...
17866         (_linux_mod_CFLAGS): ... this.
17867         (normal_mod_SOURCES): New variable.
17868         (normal_mod_CFLAGS): Likewise.
17869         (normal_mod_ASFLAGS): Likewise.
17871 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
17873         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17874         possible.
17876         * kern/dl.c (pupa_dl_ref): Refer depending modules
17877         recursively.
17878         (pupa_dl_unref): Unrefer depending modules recursively.
17879         Don't call pupa_dl_unload implicitly, because PUPA can crash if
17880         a module is unloaded before one depending on that module is
17881         unloaded.
17882         (pupa_dl_unload): Unload depending modules explicitly,
17883         if possible.
17885 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
17887         * include/pupa/i386/pc/linux.h: New file.
17888         * loader/i386/pc/linux.c: Likewise.
17890         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17891         Removed.
17892         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17893         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17894         of PUPA_CHAINLOADER_BOOT_SECTOR.
17896         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17897         (pupa_linux_prot_size): New variable.
17898         (pupa_linux_tmp_addr): Likewise.
17899         (pupa_linux_real_addr): Likewise.
17900         (pupa_linux_boot_zimage): New function.
17901         (pupa_linux_boot_bzimage): Likewise.
17903         * kern/i386/pc/init.c (struct mem_region): New structure.
17904         (MAX_REGIONS): New macro.
17905         (mem_regions): New variable.
17906         (num_regions): Likewise.
17907         (pupa_os_area_addr): Likewise.
17908         (pupa_os_area_size): Likewise.
17909         (pupa_lower_mem): Likewise.
17910         (pupa_upper_mem): Likewise.
17911         (add_mem_region): New function.
17912         (compact_mem_regions): Likewise.
17913         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17914         the size of the conventional memory and that of so-called upper
17915         memory (before the first memory hole).
17916         Instead of adding each found region to free memory, use
17917         add_mem_region and add them after removing overlaps.
17918         Also, add only 1/4 of the upper memory to free memory. The rest
17919         is used for loading OS images. Maybe this is ad hoc, but this
17920         makes it much easier to relocate OS images when booting.
17922         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17923         (pupa_enter_rescue_mode): Don't register initrd and module.
17925         * kern/mm.c: Include pupa/dl.h.
17927         * kern/main.c: Include pupa/file.h and pupa/device.h.
17929         * kern/loader.c (pupa_loader_load_module_func): Removed.
17930         (pupa_loader_load_module): Likewise.
17932         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17933         ``.o''.
17935         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17936         (pupa_linux_tmp_addr): Likewise.
17937         (pupa_linux_real_addr): Likewise.
17938         (pupa_linux_boot_zimage): Likewise.
17939         (pupa_linux_boot_bzimage): Likewise.
17941         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17942         (pupa_upper_mem): Likewise.
17943         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17944         module is too dangerous.
17946         * include/pupa/loader.h (pupa_os_area_addr): Declared.
17947         (pupa_os_area_size): Likewise.
17948         (pupa_loader_set): Remove the first argument. Loader doesn't
17949         manage modules or initrd any longer.
17950         (pupa_loader_load_module): Removed.
17952         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17953         (linux_mod_SOURCES): New variable.
17954         (linux_mod_CFLAGS): Likewise.
17956 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
17958         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17959         the length of a blocklist correctly.
17961         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17962         Use ioctl only if the OS file is a block device.
17963         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17964         not very useful for normal files.
17966         * kern/main.c (pupa_set_root_dev): New function.
17967         (pupa_load_normal_mode): Likewise.
17968         (pupa_main): Call those above.
17970         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17971         pupa_uint16_t.
17973         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17975 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
17977         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17978         (setup): Configure the installed partition information and the
17979         dl prefix.
17981         * loader/i386/pc/chainloader.c (my_mod): New variable.
17982         (pupa_chainloader_unload): New function.
17983         (pupa_rescue_cmd_chainloader): Refer itself.
17984         (PUPA_MOD_INIT): Save its own module in MY_MOD.
17986         * kern/i386/pc/startup.S (install_partition): Removed.
17987         (version_string): Likewise.
17988         (config_file): Likewise.
17989         (pupa_install_dos_part): New variable.
17990         (pupa_install_bsd_part): Likewise.
17991         (pupa_prefix): Likewise.
17992         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17994         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17995         and pupa/misc.h.
17996         (make_install_device): New function.
17997         (pupa_machine_init): Set the dl prefix.
17999         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18000         (buf): Renamed to ...
18001         (linebuf): ... this.
18002         (pupa_rescue_cmd_prefix): New function.
18003         (pupa_rescue_cmd_insmod): Likewise.
18004         (pupa_rescue_cmd_rmmod): Likewise.
18005         (pupa_rescue_cmd_lsmod): Likewise.
18006         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18007         rmmod and lsmod.
18009         * kern/mm.c (pupa_memalign): If failed even after invalidating
18010         disk caches, unload unneeded modules and retry.
18012         * kern/misc.c (pupa_memmove): New function.
18013         (pupa_memcpy): Removed.
18014         (pupa_strcpy): New function.
18015         (pupa_itoa): Made static.
18017         * kern/dl.c (pupa_dl_iterate): New function.
18018         (pupa_dl_ref): Likewise.
18019         (pupa_dl_unref): Likewise.
18020         (pupa_dl_unload): Return if succeeded or not.
18021         (pupa_dl_unload_unneeded): New function.
18022         (pupa_dl_unload_all): Likewise.
18023         (pupa_dl_init): Renamed to ...
18024         (pupa_dl_set_prefix): ... this.
18025         (pupa_dl_get_prefix): New function.
18027         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18028         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18029         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18030         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18031         (pupa_install_dos_part): Declared.
18032         (pupa_install_bsd_part): Likewise.
18033         (pupa_prefix): Likewise.
18034         (pupa_boot_drive): Likewise.
18036         * include/pupa/types.h: Fix a typo.
18038         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18039         pupa_memmove.
18040         (pupa_memmove): Declared.
18041         (pupa_strcpy): Likewise.
18043         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18044         pupa_mod_init takes one argument, its own module.
18045         (pupa_dl_unload_unneeded): Declared.
18046         (pupa_dl_unload_all): Likewise.
18047         (pupa_dl_ref): Likewise.
18048         (pupa_dl_unref): Likewise.
18049         (pupa_dl_iterate): Likewise.
18050         (pupa_dl_init): Renamed to ...
18051         (pupa_dl_set_prefix): ... this.
18052         (pupa_dl_get_prefix): Declared.
18054         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18055         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18056         unloaded.
18057         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18058         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18060         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18061         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18063 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18065         * util/i386/pc/pupa-setup.c (setup): Define the internal
18066         function find_first_partition_start at the top level, because GCC
18067         3.0.x cannot compile internal functions in deeper scopes
18068         correctly.
18069         (find_root_device): Use lstat instead of stat.
18070         Don't follow symbolic links.
18071         Fix the path-constructing code.
18073         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18074         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18075         by a BLKGETSIZE ioctl first, because block devices don't fill
18076         the member st_mode of the structure stat on Linux.
18077         [__linux__] (linux_find_partition): Use a temporary buffer
18078         REAL_DEV for the working space. Copy it to DEV before returning.
18079         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18080         buffer cache consistent.
18081         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18082         strncmp. The previous value was merely wrong.
18083         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18085         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18086         FAT size is 12. The previous value was merely wrong.
18088         * kern/main.c (pupa_main): Don't split the starting message from
18089         newlines.
18091         * kern/term.c (pupa_putchar): Put CR after LF instead of before
18092         LF, because BIOS goes crazy about character attributes in this
18093         case.
18095 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18097         * include/i386/pc/util/biosdisk.h: New file.
18098         * util/i386/pc/biosdisk.c: Likewise.
18099         * util/i386/pc/pupa-setup.c: Likewise.
18101         * Makefile.in (INCLUDE_DISTFILES): Added
18102         include/pupa/i386/pc/util/biosdisk.h.
18103         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18104         directory util/i386/pc.
18105         (install-local): Added a rule for sbin_UTILITIES.
18106         (uninstall): Likewise.
18108         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18110         * util/misc.c (xrealloc): New function.
18111         (pupa_malloc): Likewise.
18112         (pupa_free): Likewise.
18113         (pupa_realloc): Likewise.
18114         (pupa_stop): Likewise.
18115         (pupa_putchar): Likewise.
18117         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18119         * include/pupa/util/misc.h (xrealloc): Declared.
18121         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18122         macro.
18123         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18124         (PUPA_BOOT_MACHINE_BPB_END): ... this.
18126         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18127         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18129         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18130         way should be implemented.
18131         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18133         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18134         the size of NAME for safety.
18135         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18136         0x88.
18138         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18139         (pupa_setup_SOURCES): Likewise.
18141         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18143 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18145         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18146         bunch of pushl's from pusha, because this destroys the return
18147         value.
18149 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18151         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18152         This means that any missing prototypes could be fatal. Also, you
18153         must take care when writing assembly code. See the comments at
18154         the beginning of startup.S, for more details.
18156         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18157         compilation mechanism.
18158         (pupa_chainloader_real_boot): Likewise.
18159         (pupa_biosdisk_rw_int13_extensions): Likewise.
18160         (pupa_biosdisk_rw_standard): Likewise.
18161         (pupa_biosdisk_check_int13_extensions): Likewise.
18162         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18163         (pupa_biosdisk_get_diskinfo_standard): Likewise.
18164         (pupa_get_memsize): Likewise.
18165         (pupa_get_mmap_entry): Likewise.
18166         (pupa_console_putchar): Likewise.
18167         (pupa_console_setcursor): Likewise.
18168         (pupa_getrtsecs): Use pushl instead of push.
18170         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18171         memory instead of the stack for a mmap entry, because some
18172         BIOSes may ignore the maximum size and overflow.
18174         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18176         * genmk.rb (PModule#rule): Compile automatically generated
18177         sources with module-specific CFLAGS as well as other sources.
18179 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18181         * configure.ac: Check ld.
18182         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18183         respectively, before checking endianness and sizes.
18185         * Makefile.in (LD): New variable.
18187 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18189         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18191 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18193         * Changelog: New file.